|
org.eclipse.gmf.runtime.common.ui.services.properties.extended
Class PropertyPageCellEditor
java.lang.Object
org.eclipse.jface.viewers.CellEditor
org.eclipse.gmf.runtime.common.ui.services.properties.extended.MultiButtonCellEditor
org.eclipse.gmf.runtime.common.ui.services.properties.extended.PropertyPageCellEditor
-
public class PropertyPageCellEditor
- extends
MultiButtonCellEditor
Cell editor for properties that can be modified via a property page.
This cell editor is composed of an elipsis button for editing via
a property page.
Method Summary
|
protected java.lang.Object
|
getCellObjectValue
()
Getter method for value |
protected void
|
initButtons
()
The subclasses have to override this method. |
boolean
|
isCopyEnabled
()
Determines if there is text to copy. |
boolean
|
isCutEnabled
()
Determines if there is text to cut |
boolean
|
isDeleteEnabled
()
Determines if there is text to delete |
boolean
|
isPasteEnabled
()
Determines if there is a text widget on which text can be pasted |
boolean
|
isSaveAllEnabled
()
Determines if there is a text widget in which text can be saved |
boolean
|
isSelectAllEnabled
()
Determines if there is text to be selected. |
protected java.lang.Object
|
openDialogBox
(
Control cellEditorWindow)
Opens the org.eclipse.gmf.runtime.common.ui.dialogs.PropertiesDialog . |
void
|
performCopy
()
Copies the selected text |
void
|
performCut
()
Cuts the selected text to the clipboard. |
void
|
performDelete
()
Deletes the selected text or, if there is no selection,
the character next character from the current position. |
void
|
performPaste
()
Pastes the the clipboard contents over the selected text. |
void
|
performSelectAll
()
Selects all of the text |
Methods inherited from class org.eclipse.jface.viewers.
CellEditor
|
activate,
activate,
addListener,
addPropertyChangeListener,
create,
deactivate,
deactivate,
dependsOnExternalFocusListener,
dispose,
fireApplyEditorValue,
fireCancelEditor,
fireEditorValueChanged,
fireEnablementChanged,
focusLost,
getControl,
getDoubleClickTimeout,
getErrorMessage,
getLayoutData,
getStyle,
getValidator,
getValue,
isActivated,
isCorrect,
isDirty,
isFindEnabled,
isRedoEnabled,
isUndoEnabled,
isValueValid,
keyReleaseOccured,
markDirty,
performFind,
performRedo,
performUndo,
removeListener,
removePropertyChangeListener,
setErrorMessage,
setFocus,
setStyle,
setValidator,
setValue,
setValueValid,
valueChanged
|
Methods inherited from class java.lang.Object
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
|
PropertyPageCellEditor
public PropertyPageCellEditor(
Composite parent,
PropertyPagePropertyDescriptor descriptor)
- Creates a new property page cell editor parented under the given control.
The cell editor value is
null initially, and has no
validator.
-
Parameters:
-
parent - The parent control -
descriptor - The property descriptor for this cell
PropertyPageCellEditor
public PropertyPageCellEditor(
Composite parent,
PropertyPagePropertyDescriptor descriptor,
int style)
- Creates a new property page cell editor parented under the given control.
The cell editor value is
null initially, and has no
validator.
-
Parameters:
-
parent - The parent control -
descriptor - The property descriptor for this cell -
style - the style bits
openDialogBox
protected java.lang.Object openDialogBox(
Control cellEditorWindow)
- Opens the
org.eclipse.gmf.runtime.common.ui.dialogs.PropertiesDialog . Always
returns null. The UI is updated by the model event when the property
is modified by the property dialog.
-
-
See Also:
-
DialogCellEditor.openDialogBox(org.eclipse.swt.widgets.Control)
isCopyEnabled
public boolean isCopyEnabled()
- Determines if there is text to copy.
-
-
Overrides:
-
isCopyEnabled
in class
CellEditor
-
-
Returns:
-
true if the text selection is not empty,
false otherwise
isCutEnabled
public boolean isCutEnabled()
- Determines if there is text to cut
-
-
Overrides:
-
isCutEnabled
in class
CellEditor
-
-
Returns:
-
true if the text selection is not empty,
false otherwise
isDeleteEnabled
public boolean isDeleteEnabled()
- Determines if there is text to delete
-
-
Overrides:
-
isDeleteEnabled
in class
CellEditor
-
-
Returns:
-
true if the text selection is not empty,
false otherwise
isPasteEnabled
public boolean isPasteEnabled()
- Determines if there is a text widget on which text can be pasted
-
-
Overrides:
-
isPasteEnabled
in class
CellEditor
-
-
Returns:
-
true if the text selection is not empty,
false otherwise
isSaveAllEnabled
public boolean isSaveAllEnabled()
- Determines if there is a text widget in which text can be saved
-
-
Returns:
-
true if the text widget is not disposed,
false otherwise
isSelectAllEnabled
public boolean isSelectAllEnabled()
- Determines if there is text to be selected.
-
-
Overrides:
-
isSelectAllEnabled
in class
CellEditor
-
-
Returns:
-
true if select all is possible,
false otherwise
performCopy
public void performCopy()
- Copies the selected text
-
-
Overrides:
-
performCopy
in class
CellEditor
-
performCut
public void performCut()
- Cuts the selected text to the clipboard.
-
-
Overrides:
-
performCut
in class
CellEditor
-
performDelete
public void performDelete()
- Deletes the selected text or, if there is no selection,
the character next character from the current position.
-
-
Overrides:
-
performDelete
in class
CellEditor
-
performPaste
public void performPaste()
- Pastes the the clipboard contents over the selected text.
-
-
Overrides:
-
performPaste
in class
CellEditor
-
performSelectAll
public void performSelectAll()
- Selects all of the text
-
-
Overrides:
-
performSelectAll
in class
CellEditor
-
getCellObjectValue
protected java.lang.Object getCellObjectValue()
- Getter method for value
-
-
Returns:
- the value of this cell editor
initButtons
protected void initButtons()
-
Description copied from class:
MultiButtonCellEditor
- The subclasses have to override this method. The implementation should
only make calls to the method addButton() to initialize the desired
buttons. Note: the implementation of the IPropertyAction's execute method
should return the new value for the editor or null if the value has not
changed.
-
-
Specified by:
-
initButtons
in class
MultiButtonCellEditor
-
-
See Also:
-
MultiButtonCellEditor.initButtons()
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp., Borland Software Corp., and others 2005,2006. All rights reserved.
|
|