jACOB 2.7 API Documentation.

de.tif.jacob.screen
Interface IGuiElement

All Known Subinterfaces:
IActionEmitter, IApplication, IBarChart, IBrowser, IButton, ICaption, IChart, ICheckBox, IComboBox, IContextMenu, IContextMenuEntry, IDate, IDateTime, IDocument, IDomain, IForeignField, IForm, IGroup, IHeading, IHtmlText, IImage, IInFormBrowser, IInFormHtmlText, IInFormLongText, ILineChart, IListBox, ILongText, IMutableComboBox, IMutableListBox, IOwnDrawElement, IPassword, ISingleDataGuiElement, IStaticImage, ITabContainer, ITableListBox, IText, ITime, IToolbar, IToolbarButton

public interface IGuiElement

Base interface which is implemented by all jACOB GUI elements.


Nested Class Summary
static class IGuiElement.GroupState
          Class to reflect the (data) status of a GUI group.
 
Field Summary
static IGuiElement.GroupState NEW
          The group state for the new mode, i.e. the data record displayed within the group is a new record.
static java.lang.String RCS_ID
          The internal revision control system id.
static java.lang.String RCS_REV
          The internal revision control system id in short form.
static IGuiElement.GroupState SEARCH
          The group state for the search mode, i.e. no underlying data record exists.
static IGuiElement.GroupState SELECTED
          The group state for the selected mode, i.e. a data record has been selected for being displayed within the group.
static IGuiElement.GroupState UNDEFINED
          Internal dummy group state.
static IGuiElement.GroupState UPDATE
          The group state for the update mode, i.e. the data record displayed within the group is going to be updated by an user.
 
Method Summary
 IGuiElement findByName(java.lang.String name)
          Traverse the GUI element tree and looks for a GUI element with the given name.
 IApplicationDefinition getApplicationDefinition()
          Returns the definition of the application this GUI element belongs to.
 java.util.List getChildren()
          Returns all child GUI elements of this GUI element.
 IGuiElement.GroupState getDataStatus()
          Returns the data status of this GUI element.
 java.lang.String getGroupTableAlias()
          Returns the name of the group table alias.
 java.lang.String getI18NLabel(IClientContext context)
          Returns the internationalized label of this GUI element.
 java.lang.String getLabel()
          Returns the label of this GUI element.
 java.lang.String getName()
          Returns the name of this GUI element.
 IGuiElement getParent()
          Returns the parent of this GUI element.
 java.lang.String getPathName()
          Returns the full path name of this GUI element.
 boolean hasChild(IGuiElement element)
          Checks whether the given GUI element is contained within this GUI element, i.e. the given GUI element is either a (direct) child of this GUI element or a child of a child of this GUI element and so further.
 boolean isEnabled()
          Checks whether this GUI element is enabled.
 boolean isVisible()
          Checks whether this GUI element is visible.
 void setBackgroundColor(java.awt.Color color)
          Sets the background color of the GUI element.
 void setColor(java.awt.Color color)
          Sets the foreground color of the GUI element.
 void setEnable(boolean isEnable)
          Enables or disables this GUI element.
 void setLabel(java.lang.String label)
          Sets the label of this GUI element.
 void setVisible(boolean visible)
          Sets the visibility of this GUI element.
 

Field Detail

RCS_ID

static final java.lang.String RCS_ID
The internal revision control system id.

See Also:
Constant Field Values

RCS_REV

static final java.lang.String RCS_REV
The internal revision control system id in short form.

See Also:
Constant Field Values

UNDEFINED

static final IGuiElement.GroupState UNDEFINED
Internal dummy group state.


UPDATE

static final IGuiElement.GroupState UPDATE
The group state for the update mode, i.e. the data record displayed within the group is going to be updated by an user.

See Also:
IClientContext.getSelectedRecord(), IDataTableRecord.isUpdated()

NEW

static final IGuiElement.GroupState NEW
The group state for the new mode, i.e. the data record displayed within the group is a new record.

See Also:
IClientContext.getSelectedRecord(), IDataTableRecord.isNew()

SEARCH

static final IGuiElement.GroupState SEARCH
The group state for the search mode, i.e. no underlying data record exists. Nevertheless, data within the group's input field is used as QBE search constraints.


SELECTED

static final IGuiElement.GroupState SELECTED
The group state for the selected mode, i.e. a data record has been selected for being displayed within the group.

See Also:
IClientContext.getSelectedRecord()
Method Detail

isVisible

boolean isVisible()
Checks whether this GUI element is visible.

Returns:
true if visible, otherwise false

setVisible

void setVisible(boolean visible)
Sets the visibility of this GUI element.

Parameters:
visible - true to make the GUI element visible, false to make the GUI element invisible

getName

java.lang.String getName()
Returns the name of this GUI element.

Note: GUI element names must not necessarily be unique within an application.

Returns:
the name of the GUI element

getLabel

java.lang.String getLabel()
Returns the label of this GUI element. If the label starts with a '%', it is treated as a label key to the application's internationalization resource bundle.

Returns:
the label of the GUI element or null, if the GUI element has no label
See Also:
getI18NLabel(IClientContext)

getI18NLabel

java.lang.String getI18NLabel(IClientContext context)
Returns the internationalized label of this GUI element.

Parameters:
context - the current client context
Returns:
the internationalized label or null, if the GUI element has no label

setLabel

void setLabel(java.lang.String label)
Sets the label of this GUI element.

Parameters:
label - the new label

setBackgroundColor

void setBackgroundColor(java.awt.Color color)
Sets the background color of the GUI element.
Use null to reset to the default value.

Parameters:
color - The new background color of the element or null

setColor

void setColor(java.awt.Color color)
Sets the foreground color of the GUI element.
Use null to reset to the default value.

Parameters:
color - The new color of the element or null

getParent

IGuiElement getParent()
Returns the parent of this GUI element.

Returns:
The parent or null if no parent exists, which should be the case for top level GUI elements only.

getChildren

java.util.List getChildren()
Returns all child GUI elements of this GUI element.

Returns:
List of IGuiElement. An empty list will be returned, if no child GUI elements exist.

findByName

IGuiElement findByName(java.lang.String name)
Traverse the GUI element tree and looks for a GUI element with the given name.

Note: This method looks up for a matching child GUI element first. If this is not successful, this method will be invoked on each child GUI element until success.

Parameters:
name - the name of the GUI element
Returns:
the desired GUI element or null if no GUI element of the given name exists.

isEnabled

boolean isEnabled()
Checks whether this GUI element is enabled.

Returns:
true if enabled, false if disabled.

setEnable

void setEnable(boolean isEnable)
Enables or disables this GUI element.

Parameters:
isEnable - true to enable, false to disable

getDataStatus

IGuiElement.GroupState getDataStatus()
Returns the data status of this GUI element. The data status is equivalent to the status of the group this GUI element belongs to.

Returns:
the data status or UNDEFINED if not applicable.

getApplicationDefinition

IApplicationDefinition getApplicationDefinition()
Returns the definition of the application this GUI element belongs to.

Returns:
the application definition.

getGroupTableAlias

java.lang.String getGroupTableAlias()
Returns the name of the group table alias.

Returns:
the group table alias name or null, if this GUI element does not belong to a group.

hasChild

boolean hasChild(IGuiElement element)
Checks whether the given GUI element is contained within this GUI element, i.e. the given GUI element is either a (direct) child of this GUI element or a child of a child of this GUI element and so further.

Parameters:
element - the GUI element to check for containment
Returns:
true, if the given GUI element is contained within this GUI element, otherwise true.

getPathName

java.lang.String getPathName()
Returns the full path name of this GUI element.

Example:
jcrm.f_incident.incidenForm.incidentGroup.myButton

Returns:
the full path name

jACOB 2.7 API Documentation.