HATS 9.0.0 Rich Client API Reference

Publicly accessible methods not documented here are for IBM internal use only and may change in a future release of the product.

com.ibm.hats.rcp.transform
Class GlobalVariableControl

java.lang.Object
  extended by org.eclipse.swt.widgets.Widget
      extended by org.eclipse.swt.widgets.Control
          extended by org.eclipse.swt.widgets.Scrollable
              extended by org.eclipse.swt.widgets.Composite
                  extended by com.ibm.hats.rcp.transform.GlobalVariableControl
All Implemented Interfaces:
SwtTransformationConstants, Drawable

public class GlobalVariableControl
extends Composite
implements SwtTransformationConstants

This is the control that represents a global variable. This extends SWT Composite class and contains either a Label or a Text depending on the style parameter given to the constructor.


Field Summary
 
Fields inherited from class org.eclipse.swt.widgets.Control
handle
 
Fields inherited from interface com.ibm.hats.rcp.transform.SwtTransformationConstants
BUTTON, LABEL, LINK, TEXT
 
Constructor Summary
GlobalVariableControl(Composite parent, int style)
          Constructs a new GlobalVariableControl with the given parent and style.
 
Method Summary
 void addSelectionListener(SelectionListener listener)
          Adds the listener to the collection of listeners who will be notified when the control is selected.
 void dispose()
          Disposes of the operating system resources associated.
 Accessible getAccessible()
          Returns the accessible object for the receiver.
 Color getBackground()
          Returns the receiver's background color.
 Image getBackgroundImage()
          Returns the receiver's background image.
 Control getControl()
          Returns the child control contained by this object.
 Object getData()
          Returns the application defined widget data associated with the receiver, or null if it has not been set.
 Object getData(String key)
          Returns the application defined property of the receiver with the specified name, or null if it has not been set.
 Font getFont()
          Returns the font that the receiver will use to paint textual information.
 Color getForeground()
          Returns the foreground color that the receiver will use to draw.
 String getGlobalVariableName()
          Returns the name of global variable.
 String getGlobalVariableValue()
          Returns the value of the global variable.
 Image getImage()
          Returns the receiver's image if it has one, or null if it does not.
 int getIndex()
          Returns the index used for displaying the information on a label when the global variable is indexed.
 String getSeparator()
          Returns the separator string used for displaying values from a indexed global variable.
 int getStyle()
          Returns the style bits.
 String getText()
          Returns the receiver's text.
 String getToolTipText()
          Returns the receiver's tool tip text, or null if it has not been set.
 boolean isGlobalVariableIndexed()
          Returns whether the global variable is indexed or not.
 boolean isInitialValueFromGlobalVariable()
          Returns whether the initial value is set for the input box.
 boolean isPasswordField()
          Returns whether the input box is masked as a password field or not.
 boolean isShared()
          Returns whether the global variable is shared or not.
 boolean isUseAllIndices()
          Returns whether all indices are used for displaying information on a label if the global variable is indexed.
 void removeSelectionListener(SelectionListener listener)
          Removes the listener from the collection of listeners who will be notified when the control is selected.
 void renderControlBiDi(boolean isArabic, boolean isScreenRtl)
          Replaces SWT Text control with VisualText control.
 void setBackground(Color color)
          Sets the receiver's background color to the color specified by the argument, or to the default system color for the control if the argument is null.
 void setBackgroundImage(Image image)
          Sets the receiver's background image to the image specified by the argument, or to the default system color for the control if the argument is null.
 void setData(Object data)
          Sets the application defined widget data associated with the receiver to be the argument.
 void setData(String key, Object value)
          Sets the application defined property of the receiver with the specified name to the given value.
 boolean setFocus()
          Causes the receiver to have the keyboard focus.
 void setFont(Font font)
          Sets the font that the receiver will use to paint textual information to the font specified by the argument, or to the default font if the argument is null.
 void setForeground(Color color)
          Sets the receiver's foreground color to the color specified by the argument, or to the default system color if the argument is null.
 void setGlobalVariableIndexed(boolean isGlobalVariableIndexed)
          Sets whether the global variable is indexed or not.
 void setGlobalVariableName(String globalVariableName)
          Sets the name of global variable.
 void setGlobalVariableValue(String globalVariableValue)
          Sets the value of the global variable.
 void setImage(Image image)
          Sets the receiver's image to the argument, which may be null indicating that no image should be displayed.
 void setIndex(int index)
          Sets the index to be used for displaying the information on a label when the global variable is indexed.
 void setInitialValueFromGlobalVariable(boolean isInitialValueFromGlobalVariable)
          Sets whether the initial value is set for the input box.
 void setPasswordField(boolean isPasswordField)
          Sets whether the input box is masked as a password field or not.
 void setSeparator(String separator)
          Sets the separator string used for displaying values from a indexed global variable.
 void setShared(boolean isShared)
          Sets whether the global variable is shared or not.
 void setText(String string)
          Sets the receiver's text.
 void setToolTipText(String string)
          Sets the receiver's tool tip text to the argument, which may be null indicating that no tool tip text should be shown.
 void setUseAllIndices(boolean useAllIndices)
          Sets whether all indices are used for displaying information on a label if the global variable is indexed.
 void setVisualStaticGlobalVariable(boolean isVisualStaticGlobalVariable)
          Sets whether the insertion static text Global variable is in Visual format.
 
Methods inherited from class org.eclipse.swt.widgets.Composite
changed, checkSubclass, computeSize, drawBackground, getBackgroundMode, getChildren, getLayout, getLayoutDeferred, getTabList, isLayoutDeferred, layout, layout, layout, layout, layout, setBackgroundMode, setLayout, setLayoutDeferred, setTabList
 
Methods inherited from class org.eclipse.swt.widgets.Scrollable
computeTrim, getClientArea, getHorizontalBar, getScrollbarsMode, getVerticalBar
 
Methods inherited from class org.eclipse.swt.widgets.Control
addControlListener, addDragDetectListener, addFocusListener, addGestureListener, addHelpListener, addKeyListener, addMenuDetectListener, addMouseListener, addMouseMoveListener, addMouseTrackListener, addMouseWheelListener, addPaintListener, addTouchListener, addTraverseListener, computeSize, dragDetect, dragDetect, forceFocus, getBorderWidth, getBounds, getCursor, getDragDetect, getEnabled, getLayoutData, getLocation, getMenu, getMonitor, getOrientation, getParent, getRegion, getShell, getSize, getTouchEnabled, getVisible, internal_dispose_GC, internal_new_GC, isEnabled, isFocusControl, isReparentable, isVisible, moveAbove, moveBelow, pack, pack, print, redraw, redraw, removeControlListener, removeDragDetectListener, removeFocusListener, removeGestureListener, removeHelpListener, removeKeyListener, removeMenuDetectListener, removeMouseListener, removeMouseMoveListener, removeMouseTrackListener, removeMouseWheelListener, removePaintListener, removeTouchListener, removeTraverseListener, setBounds, setBounds, setCapture, setCursor, setDragDetect, setEnabled, setLayoutData, setLocation, setLocation, setMenu, setOrientation, setParent, setRedraw, setRegion, setSize, setSize, setTouchEnabled, setVisible, toControl, toControl, toDisplay, toDisplay, traverse, traverse, traverse, update
 
Methods inherited from class org.eclipse.swt.widgets.Widget
addDisposeListener, addListener, checkWidget, getDisplay, getListeners, isDisposed, isListening, notifyListeners, removeDisposeListener, removeListener, removeListener, reskin, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GlobalVariableControl

public GlobalVariableControl(Composite parent,
                             int style)
Constructs a new GlobalVariableControl with the given parent and style.

Parameters:
parent - parent Composite
style - style bits
See Also:
SwtTransformationConstants.BUTTON, SwtTransformationConstants.LINK
Method Detail

renderControlBiDi

public void renderControlBiDi(boolean isArabic,
                              boolean isScreenRtl)
Replaces SWT Text control with VisualText control.


getStyle

public int getStyle()
Returns the style bits.

Overrides:
getStyle in class Widget
Returns:
the int value that represents style bits
See Also:
GlobalVariableControl.GlobalVariableControl(Composite, int)

dispose

public void dispose()
Disposes of the operating system resources associated.

Overrides:
dispose in class Widget

getAccessible

public Accessible getAccessible()
Returns the accessible object for the receiver.

Overrides:
getAccessible in class Control
Returns:
the Accessible object

setFocus

public boolean setFocus()
Causes the receiver to have the keyboard focus.

Overrides:
setFocus in class Composite
Returns:
true if the control got focus, and false if it was unable to

addSelectionListener

public void addSelectionListener(SelectionListener listener)
Adds the listener to the collection of listeners who will be notified when the control is selected.

Parameters:
listener - the listener which should be notified

removeSelectionListener

public void removeSelectionListener(SelectionListener listener)
Removes the listener from the collection of listeners who will be notified when the control is selected.

Parameters:
listener - the listener which should no longer be notified

setText

public void setText(String string)
Sets the receiver's text. This method sets either label or text.

Parameters:
string - the new text

getText

public String getText()
Returns the receiver's text.

Returns:
the receiver's text

setToolTipText

public void setToolTipText(String string)
Sets the receiver's tool tip text to the argument, which may be null indicating that no tool tip text should be shown.

Overrides:
setToolTipText in class Control
Parameters:
string - the new tool tip text (or null)

getToolTipText

public String getToolTipText()
Returns the receiver's tool tip text, or null if it has not been set.

Overrides:
getToolTipText in class Control

setData

public void setData(Object data)
Sets the application defined widget data associated with the receiver to be the argument.

Overrides:
setData in class Widget
Parameters:
data - the widget data

setData

public void setData(String key,
                    Object value)
Sets the application defined property of the receiver with the specified name to the given value.

Overrides:
setData in class Widget
Parameters:
key - the name of the property
value - the new value for the property

getData

public Object getData()
Returns the application defined widget data associated with the receiver, or null if it has not been set.

Overrides:
getData in class Widget
Returns:
the widget data

getData

public Object getData(String key)
Returns the application defined property of the receiver with the specified name, or null if it has not been set.

Overrides:
getData in class Widget
Parameters:
key - the name of the property
Returns:
the value of the property or null if it has not been set

setBackground

public void setBackground(Color color)
Sets the receiver's background color to the color specified by the argument, or to the default system color for the control if the argument is null.

Overrides:
setBackground in class Control
Parameters:
color - the new color (or null)

getBackground

public Color getBackground()
Returns the receiver's background color.

Overrides:
getBackground in class Control
Returns:
the background color

setBackgroundImage

public void setBackgroundImage(Image image)
Sets the receiver's background image to the image specified by the argument, or to the default system color for the control if the argument is null.

Overrides:
setBackgroundImage in class Control
Parameters:
image - the new image (or null)

getBackgroundImage

public Image getBackgroundImage()
Returns the receiver's background image.

Overrides:
getBackgroundImage in class Control
Returns:
the background image

setFont

public void setFont(Font font)
Sets the font that the receiver will use to paint textual information to the font specified by the argument, or to the default font if the argument is null.

Overrides:
setFont in class Control
Parameters:
font - the new font (or null)

getFont

public Font getFont()
Returns the font that the receiver will use to paint textual information.

Overrides:
getFont in class Control
Returns:
the receiver's font

setForeground

public void setForeground(Color color)
Sets the receiver's foreground color to the color specified by the argument, or to the default system color if the argument is null.

Overrides:
setForeground in class Control
Parameters:
color - the new color (or null)

getForeground

public Color getForeground()
Returns the foreground color that the receiver will use to draw.

Overrides:
getForeground in class Control
Returns:
the receiver's foreground color

setImage

public void setImage(Image image)
Sets the receiver's image to the argument, which may be null indicating that no image should be displayed. If the receiver does not contain a label, this method does nothing.

Parameters:
image - the image to display on the label (may be null)

getImage

public Image getImage()
Returns the receiver's image if it has one, or null if it does not.

Returns:
image the receiver's image

getGlobalVariableName

public String getGlobalVariableName()
Returns the name of global variable.

Returns:
the name of global variable
See Also:
GlobalVariableControl.setGlobalVariableName(String)

setGlobalVariableName

public void setGlobalVariableName(String globalVariableName)
Sets the name of global variable.

Parameters:
globalVariableName - the new name of the global variable
See Also:
GlobalVariableControl.getGlobalVariableName()

getIndex

public int getIndex()
Returns the index used for displaying the information on a label when the global variable is indexed.

Returns:
the specified index.
See Also:
GlobalVariableControl.setIndex(int)

setIndex

public void setIndex(int index)
Sets the index to be used for displaying the information on a label when the global variable is indexed.

Parameters:
index - the new index value
See Also:
GlobalVariableControl.getIndex()

isGlobalVariableIndexed

public boolean isGlobalVariableIndexed()
Returns whether the global variable is indexed or not.

Returns:
true if the global variable is indexed, false if it is not
See Also:
GlobalVariableControl.setGlobalVariableIndexed(boolean)

setGlobalVariableIndexed

public void setGlobalVariableIndexed(boolean isGlobalVariableIndexed)
Sets whether the global variable is indexed or not.

Parameters:
isGlobalVariableIndexed - true if the global variable is indexed, false if it is not
See Also:
GlobalVariableControl.isGlobalVariableIndexed()

setVisualStaticGlobalVariable

public void setVisualStaticGlobalVariable(boolean isVisualStaticGlobalVariable)
Sets whether the insertion static text Global variable is in Visual format.

Parameters:
isVisualStaticGlobalVariable - true if the insertion of static text Global variable is in Visual format, false if it is not

isInitialValueFromGlobalVariable

public boolean isInitialValueFromGlobalVariable()
Returns whether the initial value is set for the input box.

Returns:
true if the initial value is set for the input box, false if it is not
See Also:
GlobalVariableControl.setInitialValueFromGlobalVariable(boolean)

setInitialValueFromGlobalVariable

public void setInitialValueFromGlobalVariable(boolean isInitialValueFromGlobalVariable)
Sets whether the initial value is set for the input box.

Parameters:
isInitialValueFromGlobalVariable - true if the initial value is set for the input box, false if it is not
See Also:
GlobalVariableControl.isInitialValueFromGlobalVariable()

isPasswordField

public boolean isPasswordField()
Returns whether the input box is masked as a password field or not.

Returns:
whether the input box is masked as a password field or not
See Also:
GlobalVariableControl.setPasswordField(boolean)

setPasswordField

public void setPasswordField(boolean isPasswordField)
Sets whether the input box is masked as a password field or not.

Parameters:
isPasswordField - whether the input box is masked as a password field or not.
See Also:
GlobalVariableControl.isPasswordField()

isShared

public boolean isShared()
Returns whether the global variable is shared or not.

Returns:
true if the global variable is shared, false if it is not.
See Also:
GlobalVariableControl.setShared(boolean)

setShared

public void setShared(boolean isShared)
Sets whether the global variable is shared or not.

Parameters:
isShared - true if the global variable is shared, false if it is not.
See Also:
GlobalVariableControl.isShared()

getSeparator

public String getSeparator()
Returns the separator string used for displaying values from a indexed global variable.

Returns:
the separator string
See Also:
GlobalVariableControl.setSeparator(String)

setSeparator

public void setSeparator(String separator)
Sets the separator string used for displaying values from a indexed global variable.

Parameters:
separator - the separator string
See Also:
GlobalVariableControl.getSeparator()

isUseAllIndices

public boolean isUseAllIndices()
Returns whether all indices are used for displaying information on a label if the global variable is indexed.

Returns:
true if all indices are used, false if it is not
See Also:
GlobalVariableControl.setUseAllIndices(boolean)

setUseAllIndices

public void setUseAllIndices(boolean useAllIndices)
Sets whether all indices are used for displaying information on a label if the global variable is indexed.

Parameters:
useAllIndices - true if all indices are used, false if it is not
See Also:
GlobalVariableControl.isUseAllIndices()

getGlobalVariableValue

public String getGlobalVariableValue()
Returns the value of the global variable.

Returns:
the value of the global variable
See Also:
GlobalVariableControl.setGlobalVariableValue(String)

setGlobalVariableValue

public void setGlobalVariableValue(String globalVariableValue)
Sets the value of the global variable.

Parameters:
globalVariableValue - the value of the global variable
See Also:
GlobalVariableControl.getGlobalVariableValue()

getControl

public Control getControl()
Returns the child control contained by this object. It is either an SWT Text or an SWT Label depending on the style specified when the object is instantiated.

Returns:
a Button or a Link object.
See Also:
GlobalVariableControl.GlobalVariableControl(Composite, int)

HATS 9.0.0 (201308041338)