|
HATS 7.5.1 Web API ReferencePublicly accessible methods not documented here are for IBM internal use only and may change in a future release of the product. |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.eclipse.swt.widgets.Widget
org.eclipse.swt.widgets.Control
org.eclipse.swt.widgets.Scrollable
org.eclipse.swt.widgets.Composite
com.ibm.hats.studio.composites.BasePropertiesComposite
public abstract class BasePropertiesComposite
This class represents a composite for containing controls associated with specific String keys.
Once controls have been constructed on the composite (using the convenience methods provided), setting a
Properties object populates the associated controls. A Properties object
representing the values of the control can be retrieved using the getProperties method.
Note:It is recommended to create SWT widgets using the convenience methods provided by this class. This ensures the control's data area is properly configured.
ICustomPropertySupplier,
HCustomProperty| Field Summary | |
|---|---|
static String |
CLASS_NAME
|
protected ContextAttributes |
contextAttributes
Context attributes |
static String |
Copyright
|
static int |
DEFAULT_CONTROL_WIDTH
Default width (in pixels) for controls (text boxes, drop-downs, etc). |
static int |
DEFAULT_INTEGER_CONTROL_WIDTH
Default width (in pixels) for integer-only text box controls. |
protected com.ibm.hats.studio.misc.HotKeyUniquenessValidator |
hotKeyValidator
|
protected boolean |
keep
|
protected IProject |
project
The project associated with the controls created on this composite. |
protected Properties |
properties
|
| Fields inherited from class org.eclipse.swt.widgets.Control |
|---|
handle |
| Constructor Summary | |
|---|---|
BasePropertiesComposite(Composite parent,
int style)
Constructs a new BasePropertiesComposite object. |
|
| Method Summary | |
|---|---|
void |
addPropertyChangeListener(IPropertyChangeListener l)
Adds an IPropertyChangeListner object to this composite. |
protected Button |
createButton(Composite parent,
String caption)
Creates a button. |
protected Button |
createCheck(Composite parent,
String caption,
String key)
|
protected Button |
createCheck(Composite parent,
String caption,
String key,
boolean defaultValue)
Creates a new checkbox control. |
protected Button |
createCheck(Composite parent,
String caption,
String key,
String defaultValue)
|
protected Combo |
createCombo(Composite parent,
String key,
String[] prefilledValues,
String[] prefilledCodes,
String defaultValue,
boolean isEditable)
Creates a combo (or drop-down) control that is read-only or editable based on the specified editable flag. |
protected Composite |
createExclusiveGroup(Composite parent,
String key,
int numColumns)
Creates an exclusive group. |
protected Button |
createExclusiveOption(Composite parent,
String key,
String caption,
String value)
Creates an exclusive option (radio button) with the specified key. |
protected Group |
createGroup(Composite parent,
String key,
String caption,
int numColumns)
Creates a group using the specified key name, caption, and number of columns. |
protected com.ibm.hats.studio.composites.ImageSelectorComposite |
createImageSelectorComposite(Composite parent)
|
protected Label |
createLabel(Composite parent,
String caption)
Creates a label. |
protected Button |
createReverseOption(Composite parent,
String key,
String caption,
boolean defaultValue)
Creates a "reverse" checkbox. |
protected Button |
createReverseOption(Composite parent,
String key,
String caption,
String defaultValue)
|
protected Text |
createText(Composite parent,
String key)
Creates a text box control. |
protected Text |
createText(Composite parent,
String key,
String defaultValue)
Creates a text box control. |
void |
firePropertyChangeEvent(PropertyChangeEvent e)
Fires a new PropertyChangeEvent. |
ContextAttributes |
getContextAttributes()
|
protected Control[] |
getControl(Composite parent,
String key)
Returns the array of controls associated with the specified key contained on the specified parent composite. |
Control[] |
getControl(String key)
Returns the array of controls associated with the specified key. |
String |
getKey(Control c)
Returns the key associated with the specified control. |
IProject |
getProject()
|
Properties |
getProperties()
Returns a Properties object populated with values determined from the controls on this composite. |
protected Properties |
getProperties(Composite target)
Returns a Properties object populated with values determined from the controls on the specified composite. |
protected Label |
getPropertyLabel(Composite target,
String key)
Returns the label associated with the control associated with the specified key. |
Label |
getPropertyLabel(String key)
Returns the label associated with the control associated with the specified key. |
protected String |
getValue(Control control)
Returns the value of the specified control. |
String |
getValue(String key)
Returns the value of the control represented by the specified key. |
protected boolean |
isCSSComposite(Control control)
|
void |
modifyText(ModifyEvent e)
|
void |
removePropertyChangeListener(IPropertyChangeListener l)
Removes the specified IPropertyChangeListener. |
void |
setBackground(Color c)
|
protected void |
setBackground(Composite target,
Color c)
|
void |
setContextAttributes(ContextAttributes contextAttributes)
|
void |
setEnabled(boolean enabled)
Enables or disables this composite (and all controls contained on it). |
protected void |
setEnabled(Composite target,
boolean enabled)
Enables or disables the specified composite (and all controls contained on it) with the specified value. |
protected void |
setEnableStates()
Internal method. |
void |
setProject(IProject project)
|
void |
setProperties(Properties newProperties)
Sets both the internal Properties object and populates the appropriate controls on this composite. |
protected void |
setValue(Control control,
String value)
Sets the value of the specified control with the specified value. |
void |
setValue(String key,
String value)
Sets the value of the control represented by the specified keys with the specified value. |
String[] |
validateValues()
Method to validate control values. |
| Methods inherited from class org.eclipse.swt.widgets.Composite |
|---|
changed, checkSubclass, computeSize, getBackgroundMode, getChildren, getLayout, getLayoutDeferred, getTabList, isLayoutDeferred, layout, layout, layout, layout, setBackgroundMode, setFocus, setLayout, setLayoutDeferred, setTabList |
| Methods inherited from class org.eclipse.swt.widgets.Scrollable |
|---|
computeTrim, getClientArea, getHorizontalBar, getVerticalBar |
| Methods inherited from class org.eclipse.swt.widgets.Widget |
|---|
addDisposeListener, addListener, checkWidget, dispose, getData, getData, getDisplay, getListeners, getStyle, isDisposed, isListening, notifyListeners, removeDisposeListener, removeListener, removeListener, setData, setData, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final String Copyright
public static final String CLASS_NAME
protected Properties properties
protected com.ibm.hats.studio.misc.HotKeyUniquenessValidator hotKeyValidator
public static final int DEFAULT_CONTROL_WIDTH
public static final int DEFAULT_INTEGER_CONTROL_WIDTH
protected IProject project
protected ContextAttributes contextAttributes
TransformationConstantsprotected boolean keep
| Constructor Detail |
|---|
public BasePropertiesComposite(Composite parent,
int style)
BasePropertiesComposite object.
parent - parent compositestyle - composite style| Method Detail |
|---|
protected Group createGroup(Composite parent,
String key,
String caption,
int numColumns)
parent - parent composite (normally this)key - string key representing this group (not appliable to a group)caption - caption of the groupnumColumns - number of columns
Group
protected Composite createExclusiveGroup(Composite parent,
String key,
int numColumns)
parent - parent composite (normally this)key - string key representing this group (not appliable to an exclusive group)numColumns - number of columns
protected Button createExclusiveOption(Composite parent,
String key,
String caption,
String value)
parent - Parent composite (normally this).key - String key representing this option.caption - Caption of the radio button.value - Value of the radio button.
protected Button createReverseOption(Composite parent,
String key,
String caption,
String defaultValue)
BasePropertiesComposite.createReverseOption(Composite, String, String, boolean)
protected Button createReverseOption(Composite parent,
String key,
String caption,
boolean defaultValue)
parent - The composite (normally this).key - The property name/key.caption - The text of the checkbox.defaultValue - The boolean indicating the defaultValue
public String[] validateValues()
Intended to be subclassed.
protected Text createText(Composite parent,
String key)
parent - parent composite (normally this)key - string key representing this text box control
protected Text createText(Composite parent,
String key,
String defaultValue)
parent - The parent composite (normally this).key - The string key representing this text box control.defaultValue - The default value for the text box.
protected Combo createCombo(Composite parent,
String key,
String[] prefilledValues,
String[] prefilledCodes,
String defaultValue,
boolean isEditable)
editable flag.
The prefilledValues and prefilledCodes array should correspond and have the same length.
parent - The composite (normally this).key - The property name/key.prefilledValues - The array of values (values are shown to the user).prefilledCodes - The array of codes (codes are not shown to the user.defaultValue - The default value (or code).isEditable - Specifies whether the contents of the combo are editable by the user.
protected Label createLabel(Composite parent,
String caption)
parent - The composite (normally this).caption - The string caption of the label.
protected com.ibm.hats.studio.composites.ImageSelectorComposite createImageSelectorComposite(Composite parent)
protected Button createButton(Composite parent,
String caption)
parent - The composite (normally this).caption - The string caption of the button.
protected Button createCheck(Composite parent,
String caption,
String key)
BasePropertiesComposite.createCheck(Composite, String, String, boolean)
protected Button createCheck(Composite parent,
String caption,
String key,
String defaultValue)
BasePropertiesComposite.createCheck(Composite, String, String)
protected Button createCheck(Composite parent,
String caption,
String key,
boolean defaultValue)
parent - The composite (normally this).caption - The caption of the checkbox.key - The string key representing this checkbox.defaultValue - The default value of the checkbox.
public void addPropertyChangeListener(IPropertyChangeListener l)
IPropertyChangeListner object to this composite. Listeners are notified as controls are modified.
l - public void removePropertyChangeListener(IPropertyChangeListener l)
IPropertyChangeListener.
l - public void firePropertyChangeEvent(PropertyChangeEvent e)
PropertyChangeEvent. This method is called when a control's value changes.
e - public Properties getProperties()
Properties object populated with values determined from the controls on this composite.
getProperties in interface com.ibm.hats.common.IPropertyValueSupplierprotected Properties getProperties(Composite target)
Properties object populated with values determined from the controls on the specified composite.
target - The target composite.
Properties object populated with values determined from the controls on the specified composite.public String getValue(String key)
getValue in interface com.ibm.hats.common.IPropertyValueSupplierkey - String key representing the control to get the value of.
protected String getValue(Control control)
control - The specified control.
public void setProperties(Properties newProperties)
Properties object and populates the appropriate controls on this composite.
setProperties in interface com.ibm.hats.common.IPropertyValueSuppliernewProperties - new values
public void setValue(String key,
String value)
key - string key representing the control to set the value onvalue - string value
protected void setValue(Control control,
String value)
control - value - new valuepublic Control[] getControl(String key)
key - The key.
protected Control[] getControl(Composite parent,
String key)
parent - The parent composite.key - The key.
public String getKey(Control c)
c - controlpublic void setEnabled(boolean enabled)
setEnabled in class Controlenabled -
protected void setEnabled(Composite target,
boolean enabled)
target - enabled - protected void setEnableStates()
public Label getPropertyLabel(String key)
key -
protected Label getPropertyLabel(Composite target,
String key)
target - The composite target.key - The key.
public void setProject(IProject project)
public IProject getProject()
public void setContextAttributes(ContextAttributes contextAttributes)
contextAttributes - TransformationConstantspublic ContextAttributes getContextAttributes()
TransformationConstantsprotected boolean isCSSComposite(Control control)
public void modifyText(ModifyEvent e)
modifyText in interface ModifyListenerpublic void setBackground(Color c)
setBackground in class Control
protected void setBackground(Composite target,
Color c)
|
HATS 7.5.1 (201005110649) | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||