public class GLabelWithIndicator extends GContainer implements GDisplay
Index | Class | Item | Constraint |
0 | GLabel | this.widgetId | "newline , split 2" |
1 | GLabel | indicator | (null) |
GComponent.CopyPasteOperation, GComponent.DisplayIndicatorStatus, GComponent.ItemType, GComponent.Operation
NAME_ATTRIBUTE
Constructor and Description |
---|
GLabelWithIndicator(String text)
Constructor.
|
GLabelWithIndicator(String widgetId,
String text)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
attachCopyPasteMenu(String label,
GComponent.CopyPasteOperation... operationList)
Attach the copy and paste menu to this component.
|
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.
|
GLabel |
getGLabel()
Get the GLabel.
|
GComponent |
getSubComponent(int position)
Gets the subcomponent occupying the position defined by position.
|
String |
getText()
Get the text of the label.
|
GComponent.CopyPasteOperation |
isCopyPasteEvent(GEvent event)
Checks if the event corresponds to one of the copy and paste menu operations.
|
boolean |
isEnabled()
Gets the enable status of the widget.
|
void |
setCopyPasteMenuEnabled(boolean b)
Set the enable status of the copy-paste menu associated to the component.
|
protected void |
setDefaultConstraints()
Set default constraints.
|
void |
setEnabled(boolean flag)
Set the enable status of the component.
|
static void |
setErrorColor(Color errorColor)
Setter of the ERROR color to update the status.
|
static void |
setErrorIcon(ImageIcon errorIcon)
Setter of the ERROR icon to update the status.
|
void |
setIndicatorVisible(boolean flag)
Set the isModified indicator to true.
|
void |
setNominalColor(Color nominalColor)
Setter of the label color when it is in OK status.
|
void |
setStatus(GIntervalAbstract.GStatus status)
Set the status of the widget.
|
void |
setStringConstraint(String constraints)
Set the constraint in string format for the component.
|
void |
setText(String text)
Sets the text of the label.
|
void |
setToolTipText(String text)
Empty method to be overwrite by the components at a higher level if needed.
|
static void |
setWarningColor(Color warningColor)
Setter of the WARNING color to update the status.
|
static void |
setWarningIcon(ImageIcon warningIcon)
Setter of the WARNING icon to update the status.
|
void |
setWidgetId(String widgetId)
Sets the widget identifier of the component.
|
protected void |
updateIsModifiedIndicator()
Updates the is modified indicator.
|
void |
updateStatus()
Update the status of the field applying the defined validity intervals.
|
put
activateConstraintsByType, 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, isModified, launchInvalidPositionException, mouseWheelMoved, parseSimpleConstraint, processGEvent, processMouseWheelEvent, setBusyCursor, setCommentInConfigFile, setConstraint, setCurrentOperation, setDataForConstraintsByType, setDisplayIsModifiedIndicator, setElement, setForcedStatus, setGPanel, setGParent, setGUnitInConfigFile, setInnerDescendantConstraint, setName, setNameAndCommentInConfigFile, setNameInConfigFile, setPathInConfigFile, setWidth, setWindowBusyCursor, writeCollection, writeCollection, writeCollection, writeCollection, writeConfigItem, writeConfigItem, writeConfigItem, writeConfigItem, writeConfigItem
public GLabelWithIndicator(String text)
text
- for the label.protected final void setDefaultConstraints()
GComponent
setDefaultConstraints
in class GComponent
public GComponent getSubComponent(int position) throws GComponentException
GComponent
getSubComponent
in class GComponent
position
- position of the requested component.GComponentException
- in case the position argument is invalid.public final void setWidgetId(String widgetId)
GComponent
setWidgetId
in class GComponent
widgetId
- the widget identifier of the component.public void generic() throws GException
GContainer
generic
in class GContainer
GException
- In case of problem.public void display() throws GException
GDisplay
display
in interface GDisplay
GException
- in case of problem while reading the value from file.public void setEnabled(boolean flag)
GComponent
setEnabled
in class GComponent
flag
- new enable status of the component.public void setCopyPasteMenuEnabled(boolean b)
GComponent
setCopyPasteMenuEnabled
in class GComponent
b
- new enable status.public boolean isEnabled()
GComponent
isEnabled
in class GComponent
public void setStatus(GIntervalAbstract.GStatus status)
GComponent
setStatus
in class GComponent
status
- the new status of the widget.public void setText(String text)
text
- of the label.public String getText()
public GLabel getGLabel()
public void setIndicatorVisible(boolean flag)
flag
- true if the indicator shall be displayed, false otherwise.public static void setErrorIcon(ImageIcon errorIcon)
errorIcon
- to be set.public static void setWarningIcon(ImageIcon warningIcon)
warningIcon
- to be set.public static void setErrorColor(Color errorColor)
errorColor
- to be set.public static void setWarningColor(Color warningColor)
warningColor
- to be set.public void setNominalColor(Color nominalColor)
nominalColor
- to be set to the label.public void updateStatus()
public void setToolTipText(String text)
setToolTipText
in class GComponent
text
- to set in the tooltip.public void attachCopyPasteMenu(String label, GComponent.CopyPasteOperation... operationList)
attachCopyPasteMenu
in class GComponent
label
- of the copy&paste menu, if null no label is displayed.operationList
- list of operations to set in the menu. Valid values are Copy if the
"Copy" menu is available, Paste if the "Paste" menu is available, Import if the
"Import" menu is available, and Export if the "Export" menu is available.public GComponent.CopyPasteOperation isCopyPasteEvent(GEvent event)
isCopyPasteEvent
in class GComponent
event
- to check.public void setStringConstraint(String constraints)
setStringConstraint
in class GComponent
constraints
- constraint in string format to set for the component.protected void updateIsModifiedIndicator()
updateIsModifiedIndicator
in class GComponent
Copyright © 2024. All rights reserved.