com.ibm.commons.swt.data.editors.api
Class AbstractCLabelEditor

java.lang.Object
  extended by com.ibm.commons.swt.data.editors.api.PropertyEditor
      extended by com.ibm.commons.swt.data.editors.api.AbstractCLabelEditor
All Implemented Interfaces:
IPropertyEditor

public abstract class AbstractCLabelEditor
extends PropertyEditor

An editor for using a clabel. This 'editor' provides a read-only UI, basically for viewing information rather than editing it.


Constructor Summary
AbstractCLabelEditor(int style)
          Constructs a new instance of this class given its style value describing its behavior and appearance.
 
Method Summary
 org.eclipse.swt.widgets.Control createControl(CompositeEditor parent)
          This method is called by the PropertyEditor during initialization.
 void initControlValue(CompositeEditor control, java.lang.String value)
          Set the given value into the control created for this property editor.
 void setId(java.lang.String id)
          Allows the implementor to associate an ID attribute with this control.
 boolean stopEdit(CompositeEditor control)
          Called to tell the current editor to stop editing the associated attribute.
 
Methods inherited from class com.ibm.commons.swt.data.editors.api.PropertyEditor
addPropertyEditorUpdateListener, addValidator, callDialog, getContextAttribute, getContextObject, getDefaultEditor, getDialogButtonAltText, getDialogButtonImage, getDialogButtonText, getEditor, getRenderedValue, getScriptMode, getTextValidator, getValidator, getWorkBenchPart, hasDialogButton, isScriptModeFixed, postModelUpdate, preModelUpdate, removePropertyEditorUpdateListener, setContextAttribute, setContextObject, setScriptMode, setValidator, setWorkBenchPart
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractCLabelEditor

public AbstractCLabelEditor(int style)
Constructs a new instance of this class given its style value describing its behavior and appearance. The style value is either one of the style constants defined in class SWT which is applicable to instances of this class, or must be built by bitwise OR'ing together (that is, using the int "|" operator) two or more of those SWT style constants. The class description lists the style constants that are applicable to the class.

Parameters:
style - the style of label to construct
Method Detail

createControl

public org.eclipse.swt.widgets.Control createControl(CompositeEditor parent)
Description copied from class: PropertyEditor
This method is called by the PropertyEditor during initialization. This method creates the control that is used by the PropertyEditor to edit the associated property.

Specified by:
createControl in class PropertyEditor
Parameters:
parent - - The parent of the control
Returns:
Control - The 'control' used to edit this property (control is used liberally here as a composite of controls could be returned).

setId

public void setId(java.lang.String id)
Description copied from class: PropertyEditor
Allows the implementor to associate an ID attribute with this control. This may be of use later when trying to identify the control.

Specified by:
setId in class PropertyEditor

initControlValue

public void initControlValue(CompositeEditor control,
                             java.lang.String value)
Description copied from class: PropertyEditor
Set the given value into the control created for this property editor.

Specified by:
initControlValue in class PropertyEditor
See Also:
CompositeEditor

stopEdit

public boolean stopEdit(CompositeEditor control)
Description copied from class: PropertyEditor
Called to tell the current editor to stop editing the associated attribute. Typically this will be called when the current CompositeEditor has lost focus.

Specified by:
stopEdit in class PropertyEditor
Parameters:
control - - CompositeEditor
Returns:
boolean - returns true if the operation succeeded, otherwise returns false.