public class GIntField extends GNumberFieldAbstract implements GListener
GTextField.GDocumentFieldFilterAbstract
GComponent.CopyPasteOperation, GComponent.DisplayIndicatorStatus, GComponent.ItemType, GComponent.Operation
NAME_ATTRIBUTE
Constructor and Description |
---|
GIntField(int value)
Constructor.
|
GIntField(String widgetId,
int value)
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.
|
GEnvironment.Format |
getCurrentFormat()
Get the current format of the field.
|
String |
getFormattedValue()
Return the value contained by the field in the format that shall be used to read/write from/to file.
|
String |
getFormattedValue(Object value)
Return the value contained by the field in the format that shall be used to read/write from/to file.
|
int |
getFracDigits()
Get the number of fractinal digits of the field.
|
String |
getUnitString()
Get the unit string written directly in the field.
|
Object |
getValue()
Get the current value of the widget.
|
boolean |
isModified()
Gets the modification status of the component against the last set of values loaded or saved.
|
void |
setValue(Object numberValue)
Set the value of the widget.
|
getIsNotAnInstanceIfNumberError
actionPerformed, computeDefaultWidth, display, focusGained, focusLost, getCharWidth, getComponent, getJTextField, getText, keyPressed, keyReleased, keyTyped, setDocumentFilter, setEnabled, setText
activateConstraintsByType, attachCopyPasteMenu, attachCopyPasteMenu, beginOfElement, beginOfElement, beginOfElement, beginOfElement, clearAllInnerDescendantConstraint, clearConstraint, clearInnerDescendantContraint, composeWidgetId, doDisplay, endOfElement, getCommentInConfigFile, getConstraint, getCurrentOperation, getDisplayIndicatorStatus, getDisplayIsModifiedIndicator, getElement, getGClassName, getGPanel, getGParent, getGUnitInConfigFile, getInnerDescendantConstraint, getName, getNameInConfigFile, getOperationSaveValue, getPathInConfigFile, getSimpleWidgetId, getStatus, getStringConstraint, getSubComponent, getWidgetId, handleCopyPasteEvent, handleCopyPasteEvent, handleProcessEventException, isCopyPasteEvent, isEnabled, isForcedStatus, launchInvalidPositionException, mouseWheelMoved, parseSimpleConstraint, processGEvent, processMouseWheelEvent, setBusyCursor, setCommentInConfigFile, setConstraint, setCopyPasteMenuEnabled, setCurrentOperation, setDataForConstraintsByType, setDefaultConstraints, setDisplayIsModifiedIndicator, setElement, setForcedStatus, setGPanel, setGParent, setGUnitInConfigFile, setInnerDescendantConstraint, setName, setNameAndCommentInConfigFile, setNameInConfigFile, setPathInConfigFile, setStatus, setStringConstraint, setToolTipText, setWidgetId, setWidth, setWindowBusyCursor, updateIsModifiedIndicator, writeCollection, writeCollection, writeCollection, writeCollection, writeConfigItem, writeConfigItem, writeConfigItem, writeConfigItem, writeConfigItem
public GIntField(int value)
value
- to display in the field.public GIntField(String widgetId, int value)
widgetId
- widget identificator.value
- to display in the widget.public void before(GEvent e) throws GException
before
in interface GListener
before
in class GTextField
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
after
in class GTextField
e
- processed event.GException
- in case there is a problem managing the event.public String getUnitString()
getUnitString
in class GNumberFieldAbstract
public void setValue(Object numberValue)
setValue
in class GNumberFieldAbstract
numberValue
- new value of the widget.public Object getValue()
getValue
in class GNumberFieldAbstract
public String getFormattedValue(Object value)
getFormattedValue
in class GNumberFieldAbstract
value
- to format.public String getFormattedValue()
getFormattedValue
in class GNumberFieldAbstract
public boolean isModified()
isModified
in class GComponent
public GEnvironment.Format getCurrentFormat()
getCurrentFormat
in class GNumberFieldAbstract
public int getFracDigits()
getFracDigits
in class GNumberFieldAbstract
Copyright © 2024. All rights reserved.