|
Runtime | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.jface.viewers.CellEditor
org.eclipse.gmf.runtime.common.ui.services.properties.extended.MultiButtonCellEditor
public abstract class MultiButtonCellEditor
Cell editor that provides for a read-only label representation of the value and multiple buttons at the end. The last button receives the focus. The subclasses have to override the initButtons() method. The implementation of that method should only make calls to the method addButton() to initialize the desired buttons.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.eclipse.jface.viewers.CellEditor |
---|
CellEditor.LayoutData |
Field Summary |
---|
Fields inherited from class org.eclipse.jface.viewers.CellEditor |
---|
COPY, CUT, DELETE, FIND, PASTE, REDO, SELECT_ALL, UNDO |
Constructor Summary | |
---|---|
MultiButtonCellEditor(Composite parent)
|
|
MultiButtonCellEditor(Composite parent,
int style)
|
Method Summary | |
---|---|
protected void |
addButton(java.lang.String buttonLabel,
IPropertyAction buttonAction)
Creates and adds the button to the cell editor |
protected Control |
createControl(Composite parent)
|
protected java.lang.Object |
doGetValue()
|
protected void |
doSetFocus()
This implementations sets focus on the last button |
protected void |
doSetValue(java.lang.Object val)
|
protected Label |
getLabel()
Get the label widget. |
protected Text |
getText()
Get the text widget in the case where the label is modifiable. |
protected abstract void |
initButtons()
The subclasses have to override this method. |
protected boolean |
isModifiable()
Determine if the label in the cell editor is modifiable. |
protected void |
updateLabel(java.lang.Object val)
Updates the label showing the value. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MultiButtonCellEditor(Composite parent)
parent
- The parent controlpublic MultiButtonCellEditor(Composite parent, int style)
parent
- The parent controlstyle
- The style bitsMethod Detail |
---|
protected Control createControl(Composite parent)
createControl
in class CellEditor
CellEditor.createControl(org.eclipse.swt.widgets.Composite)
protected boolean isModifiable()
true
if the label is modifiableprotected java.lang.Object doGetValue()
doGetValue
in class CellEditor
CellEditor.doGetValue()
protected void doSetFocus()
doSetFocus
in class CellEditor
CellEditor.doSetFocus()
protected void doSetValue(java.lang.Object val)
doSetValue
in class CellEditor
CellEditor.doSetValue(java.lang.Object)
protected void addButton(java.lang.String buttonLabel, IPropertyAction buttonAction)
buttonLabel
- Button labelbuttonAction
- The action to be executed when the button is invokedprotected void updateLabel(java.lang.Object val)
toString
and sets this
as the text of the label widget.
val
- The new valueprotected abstract void initButtons()
protected Label getLabel()
protected Text getText()
|
Runtime | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp., Borland Software Corp., and others 2005,2006. All rights reserved.