public class GCheckBox extends GComponent implements GDisplay, GReadWrite, ActionListener, GClear
GComponent.CopyPasteOperation, GComponent.DisplayIndicatorStatus, GComponent.ItemType, GComponent.OperationNAME_ATTRIBUTE| Constructor and Description |
|---|
GCheckBox(String label)
Constructor.
|
GCheckBox(String widgetId,
String label)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
actionPerformed(ActionEvent e) |
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.
|
Component |
getComponent()
Returns the low level Swing Component encapsulated by the class if any, otherwise returns
null.
|
boolean |
getDefaultValue()
Getter for the selection by default.
|
JCheckBox |
getJCheckBox()
Get the internal Swing checkbox.
|
String |
getText()
Return the text associated with the checkbox.
|
boolean |
isSelected()
Checks if the checkbox is selected.
|
void |
read()
Implementaion of the routines that allow the component to be loaded from a configuration file.
|
void |
setDefaultValue(boolean value)
Setter for the selection by default.
|
void |
setSelected(boolean b)
Set the selection status of the widget.
|
void |
setShortcut(int shorcutKey)
Set the shortcut key for selecting the checkbox.
|
void |
write()
Implementaion of the routines that allow the component to be saved to a configuration file.
|
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, isModified, launchInvalidPositionException, mouseWheelMoved, parseSimpleConstraint, processGEvent, processMouseWheelEvent, setBusyCursor, setCommentInConfigFile, setConstraint, setCopyPasteMenuEnabled, setCurrentOperation, setDataForConstraintsByType, setDefaultConstraints, setDisplayIsModifiedIndicator, setElement, setEnabled, setForcedStatus, setGPanel, setGParent, setGUnitInConfigFile, setInnerDescendantConstraint, setName, setNameAndCommentInConfigFile, setNameInConfigFile, setPathInConfigFile, setStatus, setStringConstraint, setToolTipText, setWidgetId, setWidth, setWindowBusyCursor, updateIsModifiedIndicator, writeCollection, writeCollection, writeCollection, writeCollection, writeConfigItem, writeConfigItem, writeConfigItem, writeConfigItem, writeConfigItempublic GCheckBox(String label)
label - for the checkbox.public void setDefaultValue(boolean value)
value - true if CheckBox is selected by default.public boolean getDefaultValue()
public void actionPerformed(ActionEvent e)
actionPerformed in interface ActionListenerpublic void display()
GDisplaypublic Component getComponent()
GComponentgetComponent in class GComponentpublic JCheckBox getJCheckBox()
public void read()
throws GException
GReadWriteread in interface GReadWriteGException - in case of problem while reading the value from file.public void write()
throws GException
GReadWritewrite in interface GReadWriteGException - in case of problem while writing the value to file.public boolean isSelected()
public void setSelected(boolean b)
b - true if the checkbox is selected, false otherwise.public String getText()
public void clear()
throws GException
GClearclear in interface GClearGException - in case of problem while clearing the values.public void setShortcut(int shorcutKey)
shorcutKey - the shortcut key to be attached to the checkbox.Copyright © 2024. All rights reserved.