Package org.eclipse.graphiti.ui.internal.contextbuttons

# Class ContextButtonManagerForPad

java.lang.Object
org.eclipse.graphiti.ui.internal.contextbuttons.ContextButtonManagerForPad

All Implemented Interfaces:
  `IContextButtonManager`

public class ContextButtonManagerForPad extends Object implements IContextButtonManager
The context button manager shows and hides the context button pad. Mostly showing/hiding the context button pad is triggered by mouse events.

## Field Summary

Fields
Modifier and Type
Field
Description
`protected static final double`
`MINIMUM_ZOOM_LEVEL`
The context button pad is not shown, when the zoom level is below this minimum value.

## Constructor Summary

Constructors
Constructor
Description
`ContextButtonManagerForPad(DiagramBehavior diagramBehavior, IResourceRegistry resourceRegistry)`
Creates a new ContextButtonManagerForPad.

## Method Summary

Modifier and Type
Method
Description
`void`
`deRegister(org.eclipse.gef.GraphicalEditPart graphicalEditPart)`
Deregisters a given edit-part, which is opposite to `register(GraphicalEditPart)`.
`DiagramBehavior`
`getDiagramBehavior()`
Returns the container this context button manager works on.
`void`
`hideContextButtonsInstantly()`
Hides the context button pad (if there is currently a context button pad active).
`void`
`register(org.eclipse.gef.GraphicalEditPart graphicalEditPart)`
Registers a given edit-part.
`void`
`setContextButtonShowing(boolean enable)`
Sets the general availability of the context button pad.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### MINIMUM_ZOOM_LEVEL

protected static final double MINIMUM_ZOOM_LEVEL
The context button pad is not shown, when the zoom level is below this minimum value.

See Also:
  - Constant Field Values

## Constructor Details

### ContextButtonManagerForPad

public ContextButtonManagerForPad(DiagramBehavior diagramBehavior, IResourceRegistry resourceRegistry)
Creates a new ContextButtonManagerForPad.

Parameters:
  `container` - The container on which this context button manager works, see
  invalid reference

      #getContainer()

  .
  `iResourceRegistry` -

## Method Details

### getDiagramBehavior

public DiagramBehavior getDiagramBehavior()
Returns the container this context button manager works on. It is set in the constructor and can not be changed.

Returns:
  The container this context button manager works on.

### register

public void register(org.eclipse.gef.GraphicalEditPart graphicalEditPart)
Registers a given edit-part. This means, that a context button pad will be shown for this edit-part when the mouse enters its figure. Typically this method is called, when an edit-part is activated.

Specified by:
  `register` in interface `IContextButtonManager`
Parameters:
  `graphicalEditPart` - The graphical edit-part to register for the context button manager.

### deRegister

public void deRegister(org.eclipse.gef.GraphicalEditPart graphicalEditPart)
Deregisters a given edit-part, which is opposite to `register(GraphicalEditPart)`. If a context-button pad is currently shown for this edit-part / figure, it is hidden first. Typically this method is called, when an edit-part is deactivated.

Specified by:
  `deRegister` in interface `IContextButtonManager`
Parameters:
  `graphicalEditPart` - The graphical edit-part to deregister from the context button manager.

### hideContextButtonsInstantly

public void hideContextButtonsInstantly()
Hides the context button pad (if there is currently a context button pad active).

Specified by:
  `hideContextButtonsInstantly` in interface `IContextButtonManager`

### setContextButtonShowing

public void setContextButtonShowing(boolean enable)
Sets the general availability of the context button pad.

Specified by:
  `setContextButtonShowing` in interface `IContextButtonManager`