org.eclipse.graphiti.internal.contextbuttons

## Class StandardContextButtonPadDeclaration

- java.lang.Object
- - org.eclipse.graphiti.internal.contextbuttons.AbstractContextButtonPadDeclaration
  - - org.eclipse.graphiti.internal.contextbuttons.StandardContextButtonPadDeclaration

All Implemented Interfaces:
  IContextButtonPadDeclaration

    public class StandardContextButtonPadDeclaration
    extends AbstractContextButtonPadDeclaration

An implementation of `IContextButtonPadDeclaration` which is based on the UX guidelines.

### Nested Class Summary

### Nested classes/interfaces inherited from interface org.eclipse.graphiti.internal.contextbuttons.IContextButtonPadDeclaration

`IContextButtonPadDeclaration.PadStyle`

### Constructor Summary

Constructors
Constructor and Description
`StandardContextButtonPadDeclaration(IContextButtonPadData contextButtonPadData)`

### Method Summary

All Methods Instance Methods Concrete Methods
`PositionedContextButton` `createButton(IContextButtonEntry entry, Rectangle position)` Creates a `PositionedContextButton` for a given context button entry and position.
`int` `getPadAppendageLength()` Returns the length of the pad appendage, which is shown if the neighboring pad does not exist.
`int` `getPadCornerRadius()` Returns the corner radius which is used to paint all corners of the pad.
`double` `getPadDefaultOpacity()` Returns the opacity which is used when painting the pad.
`IColorConstant` `getPadFillColor()` Returns the color in which the pads outline is filled.
`IColorConstant` `getPadInnerLineColor()` Returns the color in which the inner line of the pads outline is painted.
`int` `getPadLineWidth()` Returns the line width which is used to paint the outline of the pad.
`IColorConstant` `getPadMiddleLineColor()` Returns the color in which the middle line of the pads outline is painted.
`IColorConstant` `getPadOuterLineColor()` Returns the color in which the outer line of the pads outline is painted.

### Methods inherited from class org.eclipse.graphiti.internal.contextbuttons.AbstractContextButtonPadDeclaration

`getBottomPad, getContainmentRectangles, getOverlappingContainmentRectangles, getPositionedContextButtons, getRightPad, getRightPadStyle, getTopPad, getTopPadStyle`

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

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

### Constructor Detail

#### StandardContextButtonPadDeclaration

    public StandardContextButtonPadDeclaration(IContextButtonPadData contextButtonPadData)

### Method Detail

#### getPadAppendageLength

    public int getPadAppendageLength()

Description copied from class: `AbstractContextButtonPadDeclaration`
Returns the length of the pad appendage, which is shown if the neighboring pad does not exist.

Returns:
  The length of the pad appendage, which is shown if the neighboring pad does not exist.

#### getPadLineWidth

    public int getPadLineWidth()

Description copied from interface: `IContextButtonPadDeclaration`
Returns the line width which is used to paint the outline of the pad.

Returns:
  The line width which is used to paint the outline of the pad.

#### getPadCornerRadius

    public int getPadCornerRadius()

Description copied from interface: `IContextButtonPadDeclaration`
Returns the corner radius which is used to paint all corners of the pad.

Returns:
  The corner radius which is used to paint all corners of the pad.

#### getPadOuterLineColor

    public IColorConstant getPadOuterLineColor()

Description copied from interface: `IContextButtonPadDeclaration`
Returns the color in which the outer line of the pads outline is painted. Note, that the pad is outlined with three adjacent lines (outer, middle, inner) and then filled inside.

Returns:
  The color in which the outer line of the pads outline is painted.

#### getPadMiddleLineColor

    public IColorConstant getPadMiddleLineColor()

Description copied from interface: `IContextButtonPadDeclaration`
Returns the color in which the middle line of the pads outline is painted. Note, that the pad is outlined with three adjacent lines (outer, middle, inner) and then filled inside.

Returns:
  The color in which the middle line of the pads outline is painted.

#### getPadInnerLineColor

    public IColorConstant getPadInnerLineColor()

Description copied from interface: `IContextButtonPadDeclaration`
Returns the color in which the inner line of the pads outline is painted. Note, that the pad is outlined with three adjacent lines (outer, middle, inner) and then filled inside.

Returns:
  The color in which the inner line of the pads outline is painted.

#### getPadFillColor

    public IColorConstant getPadFillColor()

Description copied from interface: `IContextButtonPadDeclaration`
Returns the color in which the pads outline is filled. Note, that the pad is outlined with three adjacent lines (outer, middle, inner) and then filled inside.

Returns:
  The color in which the pads outline is filled.

#### getPadDefaultOpacity

    public double getPadDefaultOpacity()

Description copied from interface: `IContextButtonPadDeclaration`
Returns the opacity which is used when painting the pad. Possible values are between 0.0 (invisible, transparent) and 1.0 (completely visible, opaque).

Returns:
  The opacity which is used when painting the pad.

#### createButton

    public PositionedContextButton createButton(IContextButtonEntry entry,
                                                Rectangle position)

Description copied from class: `AbstractContextButtonPadDeclaration`
Creates a `PositionedContextButton` for a given context button entry and position. This method can be implemented to set all the visual attributes of the context buttons (line-width, color, opacity, ...).

Specified by:
  `createButton` in class `AbstractContextButtonPadDeclaration`