|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.swt.widgets.Widget org.eclipse.swt.widgets.Control org.eclipse.swt.widgets.Scrollable org.eclipse.swt.widgets.Composite com.ibm.commons.swt.controls.custom.CustomComposite com.ibm.commons.swt.data.editors.api.CompositeEditor
public abstract class CompositeEditor
Used as a UI controller for the PropertyEditor. Instances of this class are responsible for creating the UI for the PropertyEditor.
Field Summary | |
---|---|
DialogButton |
cmptdDialogButton
|
static com.ibm.commons.swt.util.ImageWrapper |
COMPUTED_IMG
|
static com.ibm.commons.swt.util.ImageWrapper |
COMPUTED_IMG_HC
|
static com.ibm.commons.swt.util.ImageWrapper |
COMPUTED_IMG_HOVER
|
static com.ibm.commons.swt.util.ImageWrapper |
COMPUTED_IMG_HOVER_HC
|
org.eclipse.swt.widgets.Control |
control
|
static com.ibm.commons.swt.util.ImageWrapper |
CUSTOM_EDITOR_IMG
|
static com.ibm.commons.swt.util.ImageWrapper |
CUSTOM_EDITOR_IMG_HC
|
DialogButton |
delButton
|
DialogButton |
dialogButton
|
org.eclipse.swt.widgets.Label |
extraLabel
|
static com.ibm.commons.swt.util.ImageWrapper |
IMG_BROWSEBUTTON
|
static com.ibm.commons.swt.util.ImageWrapper |
IMG_BROWSEBUTTON_HC
|
static com.ibm.commons.swt.util.ImageWrapper |
IMG_COMPUTED
|
static com.ibm.commons.swt.util.ImageWrapper |
IMG_VALUEBINDING
|
org.eclipse.swt.widgets.Control |
label
|
MenuButton |
menuButton
|
static com.ibm.commons.swt.util.ImageWrapper |
NON_COMPUTED_IMG
|
static com.ibm.commons.swt.util.ImageWrapper |
NON_COMPUTED_IMG_HC
|
static com.ibm.commons.swt.util.ImageWrapper |
NON_COMPUTED_IMG_HOVER
|
static com.ibm.commons.swt.util.ImageWrapper |
NON_COMPUTED_IMG_HOVER_HC
|
org.eclipse.swt.widgets.Control |
realControl
|
DialogButton |
realDialogButton
|
Fields inherited from class org.eclipse.swt.widgets.Control |
---|
handle |
Constructor Summary | |
---|---|
CompositeEditor(org.eclipse.swt.widgets.Composite parent)
The default constructor for a CompositeEditor. |
|
CompositeEditor(org.eclipse.swt.widgets.Composite parent,
java.lang.String id)
See: CompositeEditor(Composite) |
Method Summary | |
---|---|
void |
addCompositeChildrenListener(CompositeChildrenListener listener)
|
protected static void |
addListeners(org.eclipse.swt.widgets.Control c,
org.eclipse.swt.events.MouseTrackListener ml,
org.eclipse.swt.events.FocusListener fl)
|
void |
addValueChangedListener(com.ibm.commons.swt.data.editors.support.ValueChangedListener listener)
Adds a listener to the editor. |
void |
callDialog()
This method is called to pop up a dialog through which the user can enter a value for the property that the underlying PropertyEditor represents. |
void |
callScriptDialog()
This method is called to pop up a dialog through which the user can enter script values for the property that the underlying PropertyEditor represents. |
void |
checkBtnVisible(org.eclipse.swt.widgets.Control lostFocus)
Checks whether the menu button associated with this CompositeEditor should display a menu button, if it should this method also determines the image to be used by the button. |
protected java.lang.String |
getComputedLabelString(java.lang.String oldText)
|
protected java.lang.String |
getComputedLabelTooltip(java.lang.String oldText)
|
int |
getCurrentValueType()
Determines if the value contained in the editor is one of the following: com.ibm.commons.swt.data.editors.ICompositeEditorOptions.TYPE_UNKNOWN com.ibm.commons.swt.data.editors.ICompositeEditorOptions.TYPE_LITERAL com.ibm.commons.swt.data.editors.ICompositeEditorOptions.TYPE_COMPUTED |
PropertyEditor |
getEditor()
Returns the property editor associated with this composite editot. |
org.eclipse.swt.widgets.Control |
getEditorControl()
Returns the 'edit' control for the property editor. |
protected abstract ICompositeEditorOptions |
getEditorOptions()
An abstract method that returns the editor options (ICompositeEditorOptions) related to the property that the underlying PropertyEditor represents. |
java.lang.String |
getLabel()
Returns the label associated wiyh this control. |
org.eclipse.swt.graphics.Image |
getMenuButtonImage()
Returns an Image is to be used by the menu button associated with the editor. |
org.eclipse.swt.graphics.Image |
getMenuButtonImageHover()
Returns an Image is to be used by the menu button associated with the editor when the user hovers the moude over the menu button.. |
java.lang.String |
getPropertyEditorScriptMode()
Sets the value binding mode of the script dialog that is invoked from this editor. |
org.eclipse.swt.widgets.Control |
getRealControl()
Returns the underlying control that is used as the property 'editor'. |
java.lang.String |
getValue()
Returns the value contained in the property edito control. |
void |
handleDeleteButton()
This method gets called when handling prematives. |
boolean |
hasCmptdAccessBtn()
Returns whether or not this editor has a button that allows the editor to pop up a script dialog. |
protected boolean |
hasMenuButton()
Returns whether or not the composite editor a button which displays a menu when pressed. |
protected void |
initComputedLabel(org.eclipse.swt.custom.CLabel label,
java.lang.String oldText)
|
void |
initPropertyEditor(PropertyEditor propertyEditor,
boolean force)
Causes the property editor to be recreated. |
boolean |
isCellEditor()
Return true if the property editor is inside a table. |
boolean |
isComputable()
Returns true if the value of the underlying attribute that the property editor represents can be computed. |
boolean |
isPrimitiveCollectionItemNode()
Return true if the value represented in the editor is a member of a premitive collection. |
boolean |
isPropertyEditorScriptModeFixed()
Returns true if the value of the attribute that the PropertyEditor represents is fixed, meaning
that the attribute's value can only be a value binding ('${...}') which is only computed when the XSP page
loads or computed ('#{....}') which is computed each time the page is submitted or loaded. |
void |
postDisposeEditor(boolean cancel)
Informs the composite editor that the property editor has been disposed (for instance, when a combo box is not longer being shown). |
void |
removeCompositeChildrenListener(CompositeChildrenListener listener)
|
void |
removeValueChangedListener(com.ibm.commons.swt.data.editors.support.ValueChangedListener listener)
Removes a listener from the editor. |
void |
setAccessibleListener(org.eclipse.swt.accessibility.AccessibleListener listener)
Adds an accessibility listener to the underlying property editor. |
void |
setEnabled(boolean enabled)
Sets the enablement of the current composite editor. |
void |
setHasCmptdAccessBtn(boolean hasCmptdAccessBtn)
Sets whether or not the current composite editor has a button that can launch a script editor |
void |
setHasMenuButton(boolean hasMenuButton)
Sets whether or not the current composite editor has a button that when pressed exposes a menu. |
void |
setIsComputable(boolean isComputable)
Sets whether or not the underlying property that the editor represents can be computed. |
void |
setLabel(java.lang.String label)
an Image is to be used by the menu button associated with the editor. |
void |
setTraverseListener(org.eclipse.swt.events.TraverseListener listener)
|
void |
setValue(java.lang.String value)
Sets the label associated with this control. |
void |
showPopUpMenu()
Invokes a popup menu (a context menu of sorts) when the menu button is pressed. |
void |
updateControls()
Method is called when the controls must be updated due to a switch in computed or non-computed status. |
void |
updateValue(java.lang.String value)
Called to update the composite editor's cached value and to notify listeners. |
Methods inherited from class com.ibm.commons.swt.controls.custom.CustomComposite |
---|
getId, getUpdater, setId, setUpdater |
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, setFocus, setLayout, setLayoutDeferred, setTabList |
Methods inherited from class org.eclipse.swt.widgets.Scrollable |
---|
computeTrim, getBorderWidth, getClientArea, getHorizontalBar, getVerticalBar |
Methods inherited from class org.eclipse.swt.widgets.Control |
---|
addControlListener, addDragDetectListener, addFocusListener, addHelpListener, addKeyListener, addMenuDetectListener, addMouseListener, addMouseMoveListener, addMouseTrackListener, addMouseWheelListener, addPaintListener, addTraverseListener, computeSize, dragDetect, dragDetect, forceFocus, getAccessible, getBackground, getBackgroundImage, getBounds, getCursor, getDragDetect, getEnabled, getFont, getForeground, getLayoutData, getLocation, getMenu, getMonitor, getParent, getRegion, getShell, getSize, getToolTipText, getVisible, internal_dispose_GC, internal_new_GC, isEnabled, isFocusControl, isReparentable, isVisible, moveAbove, moveBelow, pack, pack, print, redraw, redraw, removeControlListener, removeDragDetectListener, removeFocusListener, removeHelpListener, removeKeyListener, removeMenuDetectListener, removeMouseListener, removeMouseMoveListener, removeMouseTrackListener, removeMouseWheelListener, removePaintListener, removeTraverseListener, setBackground, setBackgroundImage, setBounds, setBounds, setCapture, setCursor, setDragDetect, setFont, setForeground, setLayoutData, setLocation, setLocation, setMenu, setParent, setRedraw, setRegion, setSize, setSize, setToolTipText, setVisible, toControl, toControl, toDisplay, toDisplay, traverse, traverse, traverse, update |
Methods inherited from class org.eclipse.swt.widgets.Widget |
---|
addDisposeListener, addListener, checkWidget, dispose, getData, getData, getDisplay, getListeners, getStyle, isDisposed, isListening, notifyListeners, removeDisposeListener, removeListener, removeListener, reskin, setData, setData, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static com.ibm.commons.swt.util.ImageWrapper CUSTOM_EDITOR_IMG
public static com.ibm.commons.swt.util.ImageWrapper CUSTOM_EDITOR_IMG_HC
public static com.ibm.commons.swt.util.ImageWrapper COMPUTED_IMG
public static com.ibm.commons.swt.util.ImageWrapper COMPUTED_IMG_HOVER
public static com.ibm.commons.swt.util.ImageWrapper NON_COMPUTED_IMG
public static com.ibm.commons.swt.util.ImageWrapper NON_COMPUTED_IMG_HOVER
public static com.ibm.commons.swt.util.ImageWrapper COMPUTED_IMG_HC
public static com.ibm.commons.swt.util.ImageWrapper COMPUTED_IMG_HOVER_HC
public static com.ibm.commons.swt.util.ImageWrapper NON_COMPUTED_IMG_HC
public static com.ibm.commons.swt.util.ImageWrapper NON_COMPUTED_IMG_HOVER_HC
public static com.ibm.commons.swt.util.ImageWrapper IMG_COMPUTED
public static com.ibm.commons.swt.util.ImageWrapper IMG_VALUEBINDING
public static com.ibm.commons.swt.util.ImageWrapper IMG_BROWSEBUTTON
public static com.ibm.commons.swt.util.ImageWrapper IMG_BROWSEBUTTON_HC
public org.eclipse.swt.widgets.Control control
public org.eclipse.swt.widgets.Control label
public org.eclipse.swt.widgets.Label extraLabel
public DialogButton delButton
public DialogButton realDialogButton
public org.eclipse.swt.widgets.Control realControl
public DialogButton dialogButton
public DialogButton cmptdDialogButton
public MenuButton menuButton
Constructor Detail |
---|
public CompositeEditor(org.eclipse.swt.widgets.Composite parent)
parent
- public CompositeEditor(org.eclipse.swt.widgets.Composite parent, java.lang.String id)
CompositeEditor(Composite)
parent
- id
- - java.lang.String
A string identifier used to programatically identify this control
when rendered at runtime.Method Detail |
---|
protected static void addListeners(org.eclipse.swt.widgets.Control c, org.eclipse.swt.events.MouseTrackListener ml, org.eclipse.swt.events.FocusListener fl)
public void addCompositeChildrenListener(CompositeChildrenListener listener)
addCompositeChildrenListener
in interface CompositeWithDynamicChildren
public void addValueChangedListener(com.ibm.commons.swt.data.editors.support.ValueChangedListener listener)
listener
- ValueChangedListener
public void callDialog()
{@link PropertyEditor#callDialog(CompositeEditor, String)}
public void callScriptDialog()
getEditorOptions()
.
#getEditorOptions()}
{@link com.ibm.commons.swt.data.editors.support.ICompositeEditorOptions}
public void checkBtnVisible(org.eclipse.swt.widgets.Control lostFocus)
lostFocus
- protected java.lang.String getComputedLabelString(java.lang.String oldText)
protected java.lang.String getComputedLabelTooltip(java.lang.String oldText)
public int getCurrentValueType()
ICompositeEditorOptions
public PropertyEditor getEditor()
public org.eclipse.swt.widgets.Control getEditorControl()
protected abstract ICompositeEditorOptions getEditorOptions()
ICompositeEditorOptions
public java.lang.String getLabel()
public org.eclipse.swt.graphics.Image getMenuButtonImage()
public org.eclipse.swt.graphics.Image getMenuButtonImageHover()
public java.lang.String getValue()
public void handleDeleteButton()
public boolean hasCmptdAccessBtn()
protected boolean hasMenuButton()
protected void initComputedLabel(org.eclipse.swt.custom.CLabel label, java.lang.String oldText)
public void initPropertyEditor(PropertyEditor propertyEditor, boolean force)
getEditorControl()
.
propertyEditor
- - PropertyEditor The value of the PropertyEditor that the caller wishes to use to initialize the information in the editor.force
- - boolean - Forces the CompositeEditor to recreate all controls even if they are unchanged.public boolean isCellEditor()
public boolean isComputable()
public boolean isPrimitiveCollectionItemNode()
PrimitiveCollectionItemNode
public void postDisposeEditor(boolean cancel)
boolean
- - cancel. Tells the editor if the user cancelled the current operation in the property editor.public void removeCompositeChildrenListener(CompositeChildrenListener listener)
removeCompositeChildrenListener
in interface CompositeWithDynamicChildren
public void removeValueChangedListener(com.ibm.commons.swt.data.editors.support.ValueChangedListener listener)
listener
- ValueChangedListener
public void setAccessibleListener(org.eclipse.swt.accessibility.AccessibleListener listener)
listener
- AccessibleListener
public void setEnabled(boolean enabled)
setEnabled
in class org.eclipse.swt.widgets.Control
boolean
- public void setHasCmptdAccessBtn(boolean hasCmptdAccessBtn)
hasCmptdAccessBtn
- public void setHasMenuButton(boolean hasMenuButton)
hasMenuButton
- public void setIsComputable(boolean isComputable)
isComputable
- public void setLabel(java.lang.String label)
public void setTraverseListener(org.eclipse.swt.events.TraverseListener listener)
public void setValue(java.lang.String value)
String
- public void showPopUpMenu()
setHasMenuButton(boolean)
public void updateControls()
public void updateValue(java.lang.String value)
public boolean isPropertyEditorScriptModeFixed()
true
if the value of the attribute that the PropertyEditor represents is fixed, meaning
that the attribute's value can only be a value binding ('${...}') which is only computed when the XSP page
loads or computed ('#{....}') which is computed each time the page is submitted or loaded.
public java.lang.String getPropertyEditorScriptMode()
com.ibm.commons.swt.data.editors.support.ICompositeEditorOptions#callScriptDialog(CompositeEditor, String)},
{@link com.ibm.commons.swt.data.editors.api.PropertyEditor#getScriptMode()}
public org.eclipse.swt.widgets.Control getRealControl()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |