org.eclipse.graphiti.tb

## Interface IContextButtonPadData

All Known Implementing Classes:
  DefaultContextButtonPadData

    public interface IContextButtonPadData

The interface IContextButtonPadData allows to define all information needed to show a context button pad.

### Method Summary

All Methods Instance Methods Abstract Methods
`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.

### Method Detail

#### getPadLocation

    IRectangle getPadLocation()

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()).

Returns:
  The location of the context button pad.

#### getGenericContextButtons

    java.util.List<IContextButtonEntry> getGenericContextButtons()

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)`.

Returns:
  The generic context buttons (remove, delete, update, ...) to show in the context button pad.
See Also:
  `DefaultToolBehaviorProvider.setGenericContextButtons(IContextButtonPadData, org.eclipse.graphiti.mm.pictograms.PictogramElement, int)`

#### getDomainSpecificContextButtons

    java.util.List<IContextButtonEntry> getDomainSpecificContextButtons()

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()).

Returns:
  The domain specific context buttons to show in the context button pad.

#### getCollapseContextButton

    IContextButtonEntry getCollapseContextButton()

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.

Returns:
  The collapse context button to show in the context button pad.

#### setCollapseContextButton

    void setCollapseContextButton(IContextButtonEntry collapseContextButton)

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)`.

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:
  `ContextEntryHelper.createCollapseContextButton(boolean, org.eclipse.graphiti.features.IFeature, org.eclipse.graphiti.features.context.IContext)`