Class DefaultContextButtonPadData
- All Implemented Interfaces:
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 Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturns the collapse context button to show in the context button pad.Returns the domain specific context buttons to show in the context button pad.Returns the generic context buttons (remove, delete, update, ...) to show in the context button pad.Returns the location of the context button pad.void
setCollapseContextButton
(IContextButtonEntry collapseContextButton) Sets the collapse context button to show in the context button pad.
-
Constructor Details
-
DefaultContextButtonPadData
public DefaultContextButtonPadData()Creates a newDefaultContextButtonPadData
.
-
-
Method Details
-
getGenericContextButtons
Description copied from interface:IContextButtonPadData
Returns the generic context buttons (remove, delete, update, ...) to show in the context button pad. It can not be null, but it can be empty. Note, that the differentiation between the button semantics (generic, domain-specific, collapse, ...) is only made to display the buttons differently.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)
.- Specified by:
getGenericContextButtons
in interfaceIContextButtonPadData
- Returns:
- The generic context buttons (remove, delete, update, ...) to show in the context button pad.
- See Also:
-
getDomainSpecificContextButtons
Description copied from interface:IContextButtonPadData
Returns the domain specific context buttons to show in the context button pad. It can not be null, but it can be empty. Note, that the differentiation between the button semantics (generic, domain-specific, collapse, ...) is only made to display the buttons differently.The button list can be changed by working directly on the result list (e.g. getDomainSpecificContextButtons().add()).
- Specified by:
getDomainSpecificContextButtons
in interfaceIContextButtonPadData
- Returns:
- The domain specific context buttons to show in the context button pad.
-
getCollapseContextButton
Description copied from interface:IContextButtonPadData
Returns the collapse context button to show in the context button pad. It can be null. Note, that the differentiation between the button semantics (generic, domain-specific, collapse, ...) is only made to display the buttons differently.- Specified by:
getCollapseContextButton
in interfaceIContextButtonPadData
- Returns:
- The collapse context button to show in the context button pad.
-
setCollapseContextButton
Description copied from interface:IContextButtonPadData
Sets the collapse context button to show in the context button pad. Note, that the differentiation between the button semantics (generic, domain-specific, collapse, ...) is only made to display the buttons differently.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)
.- Specified by:
setCollapseContextButton
in interfaceIContextButtonPadData
- Parameters:
collapseContextButton
- The collapse context button to show in the context button pad. A value of null means, that there is no collapse context button.- See Also:
-
getPadLocation
Description copied from interface:IContextButtonPadData
Returns the location of the context button pad. It can not be null. These are not the outer bounds of the context button pad, but the inner rectangle, around which the context button pad is shown. Often these are the outer bounds of the figure, for which the context button pad is shown. But in some cases it makes sense to use the outer bounds of an inner figure or to shrink/enlarge the rectangle.The location can be changed by working directly on the result rectangle (e.g. getPadLocation().setRectangle()).
- Specified by:
getPadLocation
in interfaceIContextButtonPadData
- Returns:
- The location of the context button pad.
-