|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.graphiti.tb.DefaultContextButtonPadData
public class DefaultContextButtonPadData
A very simple implementation of 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.
| Field Summary | |
|---|---|
private IContextButtonEntry |
collapseContextButton
|
private List<IContextButtonEntry> |
domainSpecificContextButtons
|
private List<IContextButtonEntry> |
genericContextButtons
|
private IRectangle |
location
|
| Constructor Summary | |
|---|---|
DefaultContextButtonPadData()
Creates a new DefaultContextButtonPadData. |
|
| Method Summary | |
|---|---|
IContextButtonEntry |
getCollapseContextButton()
Returns the collapse context button to show in the context button pad. |
List<IContextButtonEntry> |
getDomainSpecificContextButtons()
Returns the domain specific context buttons to show in the context button pad. |
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private List<IContextButtonEntry> genericContextButtons
private List<IContextButtonEntry> domainSpecificContextButtons
private IContextButtonEntry collapseContextButton
private IRectangle location
| Constructor Detail |
|---|
public DefaultContextButtonPadData()
DefaultContextButtonPadData.
| Method Detail |
|---|
public List<IContextButtonEntry> getGenericContextButtons()
IContextButtonPadDataThe 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 IContextButtonPadDataDefaultToolBehaviorProvider.setGenericContextButtons(IContextButtonPadData,
org.eclipse.graphiti.mm.pictograms.PictogramElement, int)public List<IContextButtonEntry> getDomainSpecificContextButtons()
IContextButtonPadDataThe button list can be changed by working directly on the result list (e.g. getDomainSpecificContextButtons().add()).
getDomainSpecificContextButtons in interface IContextButtonPadDatapublic IContextButtonEntry getCollapseContextButton()
IContextButtonPadData
getCollapseContextButton in interface IContextButtonPadDatapublic 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 IContextButtonPadDatacollapseContextButton - 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()
IContextButtonPadDataThe location can be changed by working directly on the result rectangle (e.g. getPadLocation().setRectangle()).
getPadLocation in interface IContextButtonPadData
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||