public class GPopupList extends GContainer implements GDisplay, GListener, GClear
GPopupMenu
associated with a GHyperlinkLabel
. The menu is displayed
when the user clicks on the hyperlink label with the left mouse button (by default, but it is possible to
configure another button). The widget can be configured so that the text in GHyperlinkLabel
will be
updated with the selection in GPopupMenu, or not.GComponent.CopyPasteOperation, GComponent.DisplayIndicatorStatus, GComponent.ItemType, GComponent.Operation
NAME_ATTRIBUTE
Constructor and Description |
---|
GPopupList(int rank,
ArrayList<GMenuItem> menuItems)
Constructor.
|
GPopupList(String widgetId,
int rank,
ArrayList<GMenuItem> menuItems)
Constructor.
|
GPopupList(String widgetId,
int rank,
ArrayList<GMenuItem> menuItems,
String[] toolTipsList)
Constructor.
|
GPopupList(String title,
List<GMenuItem> menuItems)
Constructor.
|
GPopupList(String widgetId,
String title,
List<GMenuItem> menuItems)
Constructor.
|
GPopupList(String widgetId,
String title,
List<GMenuItem> menuItems,
String[] toolTipsList)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
add(GMenuItem menuItem)
Add a menu item to the popup menu.
|
void |
addSeparator()
Add a separtor to the popup menu.
|
void |
after(GEvent e)
Called after the event is processed.
|
void |
before(GEvent e)
Called before the event is processed.
|
void |
clear()
Called when the element is to be cleared, so it can perform the actions required to return to the last
saved/loaded values.
|
void |
display()
Called when the element is to be displayed, so it can perform the actions required for its display, and
the display of its inmmediate descendants.
|
void |
generic()
The prototype of the generic function that shall exist in all the descendants.
|
GConstraint |
getConstraint()
Return the current component constraint.
|
String |
getDefaultValueLabel()
Get label of item selected by default.
|
GHyperlinkLabel |
getGHyperlinkLabel()
Get the GHyperlinkLabel associated with the widget.
|
List<GMenuItem> |
getGMenuItem()
Get the GMenuItem array associated with the widget.
|
GPopupMenu |
getGPopupMenu()
Get the GPopupMenu associated with the widget.
|
String |
getSelectedItem()
Get the text associated with the selected menu item.
|
int |
getValue()
Get the rang of the selected menu item.
|
boolean |
isEnabled()
Gets the enable status of the widget.
|
void |
setConstraint(GConstraint constraint)
Set the constraint for the component.
|
void |
setDefaultValue(int newDefaultRank)
Set the item selected by default.
|
void |
setEnabled(boolean b)
Set the enable status of the component.
|
void |
setMouseEvent(int event)
Set the event that will launch the display of the popup menu.
|
void |
setStringConstraint(String constraint)
Set the constraint in string format for the component.
|
void |
setTitle(String title)
Set the text to be displayed in the hyperlink label.
|
void |
setTooltipsList(String[] tooltipsList)
Setter of tooltips to each item in the popup list.
|
void |
setValue(int value)
Set the rang of the selected menu item.
|
void |
setWidgetId(String widgetId)
Sets the widget identifier of the component.
|
put
activateConstraintsByType, attachCopyPasteMenu, attachCopyPasteMenu, beginOfElement, beginOfElement, beginOfElement, beginOfElement, clearAllInnerDescendantConstraint, clearConstraint, clearInnerDescendantContraint, composeWidgetId, doDisplay, endOfElement, getCommentInConfigFile, getComponent, getCurrentOperation, getDisplayIndicatorStatus, getDisplayIsModifiedIndicator, getElement, getGClassName, getGPanel, getGParent, getGUnitInConfigFile, getInnerDescendantConstraint, getName, getNameInConfigFile, getOperationSaveValue, getPathInConfigFile, getSimpleWidgetId, getStatus, getStringConstraint, getSubComponent, getWidgetId, handleCopyPasteEvent, handleCopyPasteEvent, handleProcessEventException, isCopyPasteEvent, isForcedStatus, isModified, launchInvalidPositionException, mouseWheelMoved, parseSimpleConstraint, processGEvent, processMouseWheelEvent, setBusyCursor, setCommentInConfigFile, setCopyPasteMenuEnabled, setCurrentOperation, setDataForConstraintsByType, setDefaultConstraints, setDisplayIsModifiedIndicator, setElement, setForcedStatus, setGPanel, setGParent, setGUnitInConfigFile, setInnerDescendantConstraint, setName, setNameAndCommentInConfigFile, setNameInConfigFile, setPathInConfigFile, setStatus, setToolTipText, setWidth, setWindowBusyCursor, updateIsModifiedIndicator, writeCollection, writeCollection, writeCollection, writeCollection, writeConfigItem, writeConfigItem, writeConfigItem, writeConfigItem, writeConfigItem
public GPopupList(String title, List<GMenuItem> menuItems)
title
- that will be displayed in the hyperlink label.menuItems
- list of menus to display in the popup menu.public GPopupList(String widgetId, String title, List<GMenuItem> menuItems)
widgetId
- widget identifier.title
- that will be displayed in the hyperlink label.menuItems
- list of menus to display in the popup menu.public GPopupList(String widgetId, String title, List<GMenuItem> menuItems, String[] toolTipsList)
widgetId
- widget identifier.title
- that will be displayed in the hyperlink label.menuItems
- list of menus to display in the popup menu.toolTipsList
- for the different items.public GPopupList(int rank, ArrayList<GMenuItem> menuItems)
rank
- of the selected menu item.menuItems
- list of menus to display in the popup menu.public GPopupList(String widgetId, int rank, ArrayList<GMenuItem> menuItems)
widgetId
- widget identifier.rank
- of the selected menu item.menuItems
- list of menus to display in the popup menu.public GPopupList(String widgetId, int rank, ArrayList<GMenuItem> menuItems, String[] toolTipsList)
widgetId
- widget identifier.rank
- of the selected menu item.menuItems
- list of menus to display in the popup menu.toolTipsList
- for the different items.public void setConstraint(GConstraint constraint)
setConstraint
in class GComponent
constraint
- constraint to set for the component.public GConstraint getConstraint()
getConstraint
in class GComponent
public void setStringConstraint(String constraint)
setStringConstraint
in class GComponent
constraint
- constraint in string format to set for the component.public void generic() throws GException
GContainer
generic
in class GContainer
GException
- In case of problem.public void display() throws GException
GDisplay
display
in interface GDisplay
GException
- in case of problem while reading the value from file.public GHyperlinkLabel getGHyperlinkLabel()
public GPopupMenu getGPopupMenu()
public List<GMenuItem> getGMenuItem()
public void setWidgetId(String widgetId)
GComponent
setWidgetId
in class GComponent
widgetId
- the widget identifier of the component.public void setTitle(String title)
title
- text to be displayed in the hyperlink label.public void add(GMenuItem menuItem)
menuItem
- menu item to add to the popup menu.public void addSeparator()
public boolean isEnabled()
isEnabled
in class GComponent
public void setEnabled(boolean b)
setEnabled
in class GComponent
b
- new enable status of the component.public String getSelectedItem()
public int getValue()
public void setValue(int value)
value
- the rang of the selected menu item.public void setMouseEvent(int event)
event
- that will launch the display of the popup menu.public void before(GEvent e) throws GException
before
in interface GListener
e
- event to processed.GException
- in case there is a problem managing the event.public void after(GEvent e) throws GException
after
in interface GListener
e
- processed event.GException
- in case there is a problem managing the event.public void setDefaultValue(int newDefaultRank)
newDefaultRank
- new rank of the item selected by default.public String getDefaultValueLabel() throws GException
GException
- in case of wrong default item rank.public void clear() throws GException
GClear
clear
in interface GClear
GException
- in case of problem while clearing the values.public final void setTooltipsList(String[] tooltipsList)
tooltipsList
- the ordered list of tooltips to be set.Copyright © 2024. All rights reserved.