public class DefaultContextButtonPadData extends java.lang.Object implements IContextButtonPadData
IContextButtonPadData
without any
real functionality.
Users may subclass this class.
NOTE: By doing so it is also possible to alter the standard behavior of the editor (e.g. change the location of the standard context button pad). This might lead to inconsistent behavior in different editor implemented on top of Graphiti, which might be irritating to users. From a consistency point of view it is advisable in such cases to stick to the Graphiti standard, and to only change it in case you really need to.
Constructor and Description |
---|
DefaultContextButtonPadData()
Creates a new
DefaultContextButtonPadData . |
Modifier and Type | Method and Description |
---|---|
IContextButtonEntry |
getCollapseContextButton()
Returns the collapse context button to show in the context button pad.
|
java.util.List<IContextButtonEntry> |
getDomainSpecificContextButtons()
Returns the domain specific context buttons to show in the context button
pad.
|
java.util.List<IContextButtonEntry> |
getGenericContextButtons()
Returns the generic context buttons (remove, delete, update, ...) to show
in the context button pad.
|
IRectangle |
getPadLocation()
Returns the location of the context button pad.
|
void |
setCollapseContextButton(IContextButtonEntry collapseContextButton)
Sets the collapse context button to show in the context button pad.
|
public DefaultContextButtonPadData()
DefaultContextButtonPadData
.public java.util.List<IContextButtonEntry> getGenericContextButtons()
IContextButtonPadData
The button list can be changed by working directly on the result list (e.g. getGenericContextButtons().add()).
To ensure, that the generic context buttons are identical in all tools,
you have to create them using
DefaultToolBehaviorProvider.setGenericContextButtons(IContextButtonPadData, org.eclipse.graphiti.mm.pictograms.PictogramElement, int)
.
getGenericContextButtons
in interface IContextButtonPadData
DefaultToolBehaviorProvider.setGenericContextButtons(IContextButtonPadData,
org.eclipse.graphiti.mm.pictograms.PictogramElement, int)
public java.util.List<IContextButtonEntry> getDomainSpecificContextButtons()
IContextButtonPadData
The button list can be changed by working directly on the result list (e.g. getDomainSpecificContextButtons().add()).
getDomainSpecificContextButtons
in interface IContextButtonPadData
public IContextButtonEntry getCollapseContextButton()
IContextButtonPadData
getCollapseContextButton
in interface IContextButtonPadData
public void setCollapseContextButton(IContextButtonEntry collapseContextButton)
IContextButtonPadData
To ensure, that the collapse context button is identical in all tools,
you have to create it using
ContextEntryHelper.createCollapseContextButton(boolean, org.eclipse.graphiti.features.IFeature, org.eclipse.graphiti.features.context.IContext)
.
setCollapseContextButton
in interface IContextButtonPadData
collapseContextButton
- The collapse context button to show in the context button pad.
A value of null means, that there is no collapse context
button.ContextEntryHelper.createCollapseContextButton(boolean,
org.eclipse.graphiti.features.IFeature,
org.eclipse.graphiti.features.context.IContext)
public IRectangle getPadLocation()
IContextButtonPadData
The location can be changed by working directly on the result rectangle (e.g. getPadLocation().setRectangle()).
getPadLocation
in interface IContextButtonPadData