Class SpecialContextButtonPadDeclaration
- java.lang.Object
-
- org.eclipse.graphiti.internal.contextbuttons.AbstractContextButtonPadDeclaration
-
- org.eclipse.graphiti.internal.contextbuttons.SpecialContextButtonPadDeclaration
-
- All Implemented Interfaces:
IContextButtonPadDeclaration
public class SpecialContextButtonPadDeclaration extends AbstractContextButtonPadDeclaration
An alternative implementation ofIContextButtonPadDeclarationwhich is mainly used for testing.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.eclipse.graphiti.internal.contextbuttons.IContextButtonPadDeclaration
IContextButtonPadDeclaration.PadStyle
-
-
Constructor Summary
Constructors Constructor Description SpecialContextButtonPadDeclaration(IContextButtonPadData contextButtonPadData)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PositionedContextButtoncreateButton(IContextButtonEntry entry, java.awt.Rectangle position)Creates aPositionedContextButtonfor a given context button entry and position.protected intgetButtonPadding()Returns the padding between the generic and domain-specific context buttons.protected intgetButtonSize()Returns the size of the generic and domain-specific context buttons.protected intgetCollapseButtonPadding()Returns the padding between the collapse context button and the other generic context buttons.intgetPadAppendageLength()Returns the length of the pad appendage, which is shown if the neighboring pad does not exist.intgetPadCornerRadius()Returns the corner radius which is used to paint all corners of the pad.doublegetPadDefaultOpacity()Returns the opacity which is used when painting the pad.IColorConstantgetPadFillColor()Returns the color in which the pads outline is filled.protected intgetPadHorizontalOverlap()Returns the horizontal overlap of the pads (top with right, right with bottom).IColorConstantgetPadInnerLineColor()Returns the color in which the inner line of the pads outline is painted.intgetPadLineWidth()Returns the line width which is used to paint the outline of the pad.IColorConstantgetPadMiddleLineColor()Returns the color in which the middle line of the pads outline is painted.IColorConstantgetPadOuterLineColor()Returns the color in which the outer line of the pads outline is painted.protected intgetPadPaddingInside()Returns the padding of the generic and domain-specific context buttons at the inside of the context button pad.protected intgetPadPaddingOutside()Returns the padding of the generic and domain-specific context buttons at the outside of the context button pad.protected intgetPadVerticalOverlap()Returns the vertical overlap of the pads (top with right, right with bottom).-
Methods inherited from class org.eclipse.graphiti.internal.contextbuttons.AbstractContextButtonPadDeclaration
getBottomPad, getCollapseAndGenericButtons, getCollapseButton, getContainmentRectangles, getDomainButtons, getDomainButtonsBottom, getDomainButtonsRight, getGenericButtons, getOriginalReferenceRectangle, getOverlappingContainmentRectangles, getPadReferenceRectangle, getPositionedContextButtons, getRightPad, getRightPadStyle, getTopPad, getTopPadStyle, initializeButtonPositions, initializeContainmentRectangles, initializeDomainButtonLists, initializeRectangles
-
-
-
-
Constructor Detail
-
SpecialContextButtonPadDeclaration
public SpecialContextButtonPadDeclaration(IContextButtonPadData contextButtonPadData)
-
-
Method Detail
-
getButtonSize
protected int getButtonSize()
Description copied from class:AbstractContextButtonPadDeclarationReturns the size of the generic and domain-specific context buttons.- Specified by:
getButtonSizein classAbstractContextButtonPadDeclaration- Returns:
- The size of the generic and domain-specific context buttons.
-
getButtonPadding
protected int getButtonPadding()
Description copied from class:AbstractContextButtonPadDeclarationReturns the padding between the generic and domain-specific context buttons.- Specified by:
getButtonPaddingin classAbstractContextButtonPadDeclaration- Returns:
- The padding between the generic and domain-specific context buttons.
-
getCollapseButtonPadding
protected int getCollapseButtonPadding()
Description copied from class:AbstractContextButtonPadDeclarationReturns the padding between the collapse context button and the other generic context buttons.- Specified by:
getCollapseButtonPaddingin classAbstractContextButtonPadDeclaration- Returns:
- The padding between the collapse context button and the other generic context buttons.
-
getPadPaddingOutside
protected int getPadPaddingOutside()
Description copied from class:AbstractContextButtonPadDeclarationReturns the padding of the generic and domain-specific context buttons at the outside of the context button pad.- Specified by:
getPadPaddingOutsidein classAbstractContextButtonPadDeclaration- Returns:
- The padding of the generic and domain-specific context buttons at the outside of the context button pad.
-
getPadPaddingInside
protected int getPadPaddingInside()
Description copied from class:AbstractContextButtonPadDeclarationReturns the padding of the generic and domain-specific context buttons at the inside of the context button pad.- Specified by:
getPadPaddingInsidein classAbstractContextButtonPadDeclaration- Returns:
- The padding of the generic and domain-specific context buttons at the inside of the context button pad.
-
getPadHorizontalOverlap
protected int getPadHorizontalOverlap()
Description copied from class:AbstractContextButtonPadDeclarationReturns the horizontal overlap of the pads (top with right, right with bottom).- Specified by:
getPadHorizontalOverlapin classAbstractContextButtonPadDeclaration- Returns:
- The horizontal overlap of the pads (top with right, right with bottom).
-
getPadVerticalOverlap
protected int getPadVerticalOverlap()
Description copied from class:AbstractContextButtonPadDeclarationReturns the vertical overlap of the pads (top with right, right with bottom).- Specified by:
getPadVerticalOverlapin classAbstractContextButtonPadDeclaration- Returns:
- The vertical overlap of the pads (top with right, right with bottom).
-
getPadAppendageLength
public int getPadAppendageLength()
Description copied from class:AbstractContextButtonPadDeclarationReturns the length of the pad appendage, which is shown if the neighboring pad does not exist.- Specified by:
getPadAppendageLengthin classAbstractContextButtonPadDeclaration- 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:IContextButtonPadDeclarationReturns 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:IContextButtonPadDeclarationReturns 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:IContextButtonPadDeclarationReturns 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:IContextButtonPadDeclarationReturns 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:IContextButtonPadDeclarationReturns 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:IContextButtonPadDeclarationReturns 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:IContextButtonPadDeclarationReturns 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, java.awt.Rectangle position)
Description copied from class:AbstractContextButtonPadDeclarationCreates aPositionedContextButtonfor 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:
createButtonin classAbstractContextButtonPadDeclaration
-
-