public class GConstantSelector extends GContainer implements GDisplay, GListener
Index | Class | Item | Constraint |
0 | GButton | button | "newline" |
1 | GConstantSelelectorDialog | dialog | "newline , pushx , pushy , growx , growy"
(see table below) |
Index | Class | Item | Constraint |
1, 0 | GComboBoxWithLabel | combobox | 1, 0, 0, 0 =>
"split 3" 1, 0, 0, 1 => (null) 1, 0, 1 => (null) |
1, 1 | GLabel | label | "newline , split 3" |
1, 2 | GLabel | valueLabel | (null) |
1, 3 | GLabel | unitLabel | (null) |
1, 4 | GButton | selectButton | "newline , pushx , pushy" |
1, 5 | GButton | cancelButton | (null) |
GComponent.CopyPasteOperation, GComponent.DisplayIndicatorStatus, GComponent.ItemType, GComponent.Operation
NAME_ATTRIBUTE
Constructor and Description |
---|
GConstantSelector(String buttonTitle,
String dialogTitle,
String[] labelList,
double[] valueList,
String unitString)
Constructor.
|
GConstantSelector(String widgetId,
String buttonTitle,
String dialogTitle,
String[] labelList,
double[] valueList,
String unitString)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
after(GEvent e)
Called after the event is processed.
|
void |
before(GEvent e)
Called before the event is processed.
|
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[] |
getLabelList()
Getter for the list of labels.
|
GComponent |
getSubComponent(int position)
Gets the subcomponent occupying the position defined by position.
|
String |
getUnitString()
Getter for the unit string.
|
Double |
getValue()
Get the selected constant of null if no constant is currently selected.
|
double[] |
getValueList()
Getter for the list of values.
|
boolean |
isEnabled()
Gets the enable status of the widget.
|
void |
setConstraint(GConstraint constraint)
Set the constraint for the component.
|
void |
setDialogTooltip(String text)
Set the tooltip to display in the dialog label.
|
void |
setEnabled(boolean flag)
Set the enable status of the component.
|
void |
setStringConstraint(String constraint)
Set the constraint in string format for the component.
|
void |
setToolTipText(String text)
Set the tooltip text for the entry's label.
|
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, 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, setWidth, setWindowBusyCursor, updateIsModifiedIndicator, writeCollection, writeCollection, writeCollection, writeCollection, writeConfigItem, writeConfigItem, writeConfigItem, writeConfigItem, writeConfigItem
public GConstantSelector(String buttonTitle, String dialogTitle, String[] labelList, double[] valueList, String unitString)
buttonTitle
- of the button.dialogTitle
- of the dialog.labelList
- list of labels to display in the constant selector.valueList
- list of values associated with the labels.unitString
- string of the unit to be displayed along with the value, null if no unit is
to be displayed.public GConstantSelector(String widgetId, String buttonTitle, String dialogTitle, String[] labelList, double[] valueList, String unitString)
widgetId
- widget identifier.buttonTitle
- of the button.dialogTitle
- of the dialog.labelList
- list of labels to display in the constant selector.valueList
- list of values associated with the labels.unitString
- string of the unit to be displayed along with the value, null if no unit is
to be displayed.public String[] getLabelList()
public double[] getValueList()
public String getUnitString()
public void setWidgetId(String widgetId)
setWidgetId
in class GComponent
widgetId
- the widget identifier of the component.public void setConstraint(GConstraint constraint)
setConstraint
in class GComponent
constraint
- constraint to set for the component.public GConstraint getConstraint()
getConstraint
in class GComponent
public Double getValue()
public void setEnabled(boolean flag)
GComponent
setEnabled
in class GComponent
flag
- new enable status of the component.public boolean isEnabled()
GComponent
isEnabled
in class GComponent
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 display() throws GException
display
in interface GDisplay
GException
- in case of problem while reading the value from file.public void generic() throws GException
generic
in class GContainer
GException
- In case of problem.public void setToolTipText(String text)
setToolTipText
in class GComponent
text
- the tooltip text for the entry's label.public void setDialogTooltip(String text)
text
- tooltip to display in the dialog label.public void setStringConstraint(String constraint)
setStringConstraint
in class GComponent
constraint
- constraint in string format to set for the component.public GComponent getSubComponent(int position) throws GComponentException
getSubComponent
in class GComponent
position
- position of the requested component.GComponentException
- in case the position argument is invalid.Copyright © 2024. All rights reserved.