public class GEntryConstant extends GEntryReal
| Index | Class | Item | Constraint |
| 0 | GLabelWithIndicator | label | 0, 0 => "newline , gapleft 0" 0, 1 => (null) |
| 1 | GRealField | textField | "skip 1" |
| 2 | GPopupList | units | (null) |
| 3 | GPEarthEqRadSelector | constantSelectorEqRad | "newline" (see table below) |
| 4 | GLabel | GLabel_222 | "newline , spanx 2 , height 0" |
| Index | Class | Item | Constraint |
| 3, 0 | GButton | button | "spany 2 , growy" |
| 3, 1 | GConstantSelelectorDialog | dialog | "newline , pushx , pushy , growx , growy"
(see table below) |
| Index | Class | Item | Constraint |
| 3, 1, 0 | GComboBoxWithLabel | combobox | 3, 1, 0, 0, 0 =>
"split 3" 3, 1, 0, 0, 1 => (null) 3, 1, 0, 1 => (null) |
| 3, 1, 1 | GLabel | label | "newline , split 3" |
| 3, 1, 2 | GLabel | valueLabel | (null) |
| 3, 1, 3 | GLabel | unitLabel | (null) |
| 3, 1, 4 | GButton | selectButton | "newline , pushx , pushy" |
| 3, 1, 5 | GButton | cancelButton | (null) |
GComponent.CopyPasteOperation, GComponent.DisplayIndicatorStatus, GComponent.ItemType, GComponent.OperationNAME_ATTRIBUTE| Constructor and Description |
|---|
GEntryConstant(String label,
double initialValue,
GUnit[] units,
GConstantSelector constantSelector)
Constructor.
|
GEntryConstant(String label,
double initialValue,
GUnit[] units,
String buttonTitle,
String dialogTitle,
String[] labelList,
double[] valueList,
String unitString)
Constructor.
|
GEntryConstant(String widgetId,
String label,
double initialValue,
GUnit[] units,
GConstantSelector constantSelector)
Constructor.
|
GEntryConstant(String widgetId,
String label,
double initialValue,
GUnit[] units,
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 |
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.
|
GConstantSelector |
getGConstantSelector()
Getter for the GConstantSelector which allows to select a value for the constant.
|
GComponent |
getSubComponent(int position)
Gets the subcomponent occupying the position defined by position.
|
void |
setConstraint(int widgetGap)
Setter for the constraints of the widget.
|
protected void |
setDefaultConstraints()
Set default constraints.
|
void |
setEnabled(boolean b)
Set the enable status of the component.
|
void |
setWidgetId(String widgetId)
Sets the widget identifier of the component.
|
before, clear, generic, getCurrentUnit, getDefaultValue, getGUnitsPopupList, getNumber, getSavedValue, getUnitsArray, getValue, isModified, read, setCurrentFormat, setDefaultValue, setFormatMode, setFracDigits, setSavedValue, setUnit, setValue, updateIsModifiedIndicator, updateStatus, writeaddGInterval, attachCopyPasteMenu, getGField, getGInterval, getGLabelWithIndicator, getGTextField, isCopyPasteEvent, isEnabled, removeGInterval, setShortcut, setStringConstraint, setToolTipText, updateGInterval, updateIntervalMessageputactivateConstraintsByType, attachCopyPasteMenu, beginOfElement, beginOfElement, beginOfElement, beginOfElement, clearAllInnerDescendantConstraint, clearConstraint, clearInnerDescendantContraint, composeWidgetId, doDisplay, endOfElement, getCommentInConfigFile, getComponent, getConstraint, getCurrentOperation, getDisplayIndicatorStatus, getDisplayIsModifiedIndicator, getElement, getGClassName, getGPanel, getGParent, getGUnitInConfigFile, getInnerDescendantConstraint, getName, getNameInConfigFile, getOperationSaveValue, getPathInConfigFile, getSimpleWidgetId, getStatus, getStringConstraint, getWidgetId, handleCopyPasteEvent, handleCopyPasteEvent, handleProcessEventException, isForcedStatus, launchInvalidPositionException, mouseWheelMoved, parseSimpleConstraint, processGEvent, processMouseWheelEvent, setBusyCursor, setCommentInConfigFile, setConstraint, setCopyPasteMenuEnabled, setCurrentOperation, setDataForConstraintsByType, setDisplayIsModifiedIndicator, setElement, setForcedStatus, setGPanel, setGParent, setGUnitInConfigFile, setInnerDescendantConstraint, setName, setNameAndCommentInConfigFile, setNameInConfigFile, setPathInConfigFile, setStatus, setWidth, setWindowBusyCursor, writeCollection, writeCollection, writeCollection, writeCollection, writeConfigItem, writeConfigItem, writeConfigItem, writeConfigItem, writeConfigItempublic GEntryConstant(String label, double initialValue, GUnit[] units, String buttonTitle, String dialogTitle, String[] labelList, double[] valueList, String unitString)
label - to be shown in the widgetinitialValue - initial value.units - list of units to display in the unit menu.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 GEntryConstant(String widgetId, String label, double initialValue, GUnit[] units, String buttonTitle, String dialogTitle, String[] labelList, double[] valueList, String unitString)
widgetId - widget identifier.label - to be shown in the widgetinitialValue - initial value.units - list of units to display in the unit menu.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 GEntryConstant(String label, double initialValue, GUnit[] units, GConstantSelector constantSelector)
label - to be shown in the widgetinitialValue - initial value.units - list of units to display in the unit menu.constantSelector - the constant selector.public GEntryConstant(String widgetId, String label, double initialValue, GUnit[] units, GConstantSelector constantSelector)
widgetId - widget identifier.label - to be shown in the widgetinitialValue - initial value.units - list of units to display in the unit menu.constantSelector - the constant selector.public void setWidgetId(String widgetId)
setWidgetId in class GEntryRealwidgetId - the widget identifier of the component.public void setConstraint(int widgetGap)
widgetGap - left gap from panel border to display the sub-widgets of the widget.protected final void setDefaultConstraints()
GComponentsetDefaultConstraints in class GEntryNumberAbstractpublic GConstantSelector getGConstantSelector()
public void setEnabled(boolean b)
setEnabled in class GEntryRealb - new enable status of the component.public void display()
throws GException
display in interface GDisplaydisplay in class GEntryNumberAbstractGException - in case of problem while reading the value from file.public void after(GEvent e) throws GException
after in interface GListenerafter in class GEntryReale - processed event.GException - in case there is a problem managing the event.public GComponent getSubComponent(int position) throws GComponentException
getSubComponent in class GEntryRealposition - position of the requested component.GComponentException - in case the position argument is invalid.Copyright © 2024. All rights reserved.