|
GEF (MVC) 3.9.0.201308190730 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.gef.palette.PaletteEntry
org.eclipse.gef.palette.ToolEntry
public abstract class ToolEntry
A factory for returning Tools.
| Field Summary | |
|---|---|
static java.lang.Object |
PALETTE_TYPE_TOOL
Type Identifier |
| Fields inherited from class org.eclipse.gef.palette.PaletteEntry |
|---|
listeners, PALETTE_TYPE_UNKNOWN, PERMISSION_FULL_MODIFICATION, PERMISSION_HIDE_ONLY, PERMISSION_LIMITED_MODIFICATION, PERMISSION_NO_MODIFICATION, PROPERTY_DEFAULT, PROPERTY_DESCRIPTION, PROPERTY_LABEL, PROPERTY_LARGE_ICON, PROPERTY_PARENT, PROPERTY_SMALL_ICON, PROPERTY_TYPE, PROPERTY_VISIBLE |
| Constructor Summary | |
|---|---|
ToolEntry(java.lang.String label,
java.lang.String shortDesc,
ImageDescriptor iconSmall,
ImageDescriptor iconLarge)
Creates a new ToolEntry. |
|
ToolEntry(java.lang.String label,
java.lang.String description,
ImageDescriptor iconSmall,
ImageDescriptor iconLarge,
java.lang.Class tool)
Constructor to create a new ToolEntry. |
|
| Method Summary | |
|---|---|
Tool |
createTool()
Creates the tool of the type specified by setToolClass(Class)
for this ToolEntry. |
protected java.util.Map |
getToolProperties()
|
java.lang.Object |
getToolProperty(java.lang.Object key)
Returns the property value for the specified property key. |
void |
setToolClass(java.lang.Class toolClass)
Sets the type of tool to be created. |
void |
setToolProperty(java.lang.Object key,
java.lang.Object value)
Clients can use this method to configure the associated tool without having to sub-class. |
| Methods inherited from class org.eclipse.gef.palette.PaletteEntry |
|---|
addPropertyChangeListener, getDescription, getId, getLabel, getLargeIcon, getParent, getSmallIcon, getType, getUserModificationPermission, isVisible, removePropertyChangeListener, setDescription, setId, setLabel, setLargeIcon, setParent, setSmallIcon, setType, setUserModificationPermission, setVisible, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.Object PALETTE_TYPE_TOOL
| Constructor Detail |
|---|
public ToolEntry(java.lang.String label,
java.lang.String shortDesc,
ImageDescriptor iconSmall,
ImageDescriptor iconLarge)
null.
label - the entry's nameshortDesc - the entry's descriptioniconSmall - the entry's small iconiconLarge - the entry's large icon
public ToolEntry(java.lang.String label,
java.lang.String description,
ImageDescriptor iconSmall,
ImageDescriptor iconLarge,
java.lang.Class tool)
null.
label - the entry's namedescription - the entry's descriptioniconSmall - the entry's small iconiconLarge - the entry's large icontool - the type of tool that this entry uses| Method Detail |
|---|
public Tool createTool()
setToolClass(Class)
for this ToolEntry. The tool is also configured with the properties set
in setToolProperty(Object, Object). Sub-classes overriding this
method should ensure that their tools are also configured with those
properties.
protected java.util.Map getToolProperties()
setToolProperty(Object, Object)public java.lang.Object getToolProperty(java.lang.Object key)
key - the property key
public void setToolClass(java.lang.Class toolClass)
toolClass - the type of tool to be created by this entry
public void setToolProperty(java.lang.Object key,
java.lang.Object value)
key - the property namevalue - a value of type associated with the given propertyTool.setProperties(Map)
|
GEF (MVC) 3.9.0.201308190730 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||