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.OperationNAME_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.
|
putactivateConstraintsByType, 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, writeConfigItempublic 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 GComponentwidgetId - the widget identifier of the component.public void setConstraint(GConstraint constraint)
setConstraint in class GComponentconstraint - constraint to set for the component.public GConstraint getConstraint()
getConstraint in class GComponentpublic Double getValue()
public void setEnabled(boolean flag)
GComponentsetEnabled in class GComponentflag - new enable status of the component.public boolean isEnabled()
GComponentisEnabled in class GComponentpublic void before(GEvent e) throws GException
before in interface GListenere - event to processed.GException - in case there is a problem managing the event.public void after(GEvent e) throws GException
after in interface GListenere - processed event.GException - in case there is a problem managing the event.public void display()
throws GException
display in interface GDisplayGException - in case of problem while reading the value from file.public void generic()
throws GException
generic in class GContainerGException - In case of problem.public void setToolTipText(String text)
setToolTipText in class GComponenttext - 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 GComponentconstraint - constraint in string format to set for the component.public GComponent getSubComponent(int position) throws GComponentException
getSubComponent in class GComponentposition - position of the requested component.GComponentException - in case the position argument is invalid.Copyright © 2024. All rights reserved.