public class PositionedContextButton
extends java.lang.Object
IContextButtonEntry
and several graphical attributes used to paint a context button.Constructor and Description |
---|
PositionedContextButton(IContextButtonEntry contextButtonEntry,
java.awt.Rectangle position)
Creates a new PositionedContextbutton.
|
Modifier and Type | Method and Description |
---|---|
IContextButtonEntry |
getContextButtonEntry()
Returns the context button entry, which contains the logical definition
of the context button.
|
int |
getCornerRadius()
Returns the corner radius of the context button outline(s).
|
double |
getDefaultOpacity()
Returns the default opacity of the context button.
|
IColorConstant |
getFillColor()
Returns the fill color of the context button.
|
int |
getLineWidth()
Returns the line-width of the context button outline(s).
|
IColorConstant |
getMiddleLineColor()
Returns the color of the middle line of the context button.
|
double |
getMouseDownOpacity()
Returns the mouse-down opacity of the context button.
|
double |
getMouseOverOpacity()
Returns the mouse-over opacity of the context button.
|
IColorConstant |
getOuterLineColor()
Returns the color of the outer line of the context button.
|
java.awt.Rectangle |
getPosition()
Returns the position (location and size) of the context button.
|
void |
setColors(IColorConstant outerLineColor,
IColorConstant middleLineColor,
IColorConstant fillColor)
Sets the graphical color attributes.
|
void |
setLine(int lineWidth,
int cornerRadius)
Sets the graphical attributes for the line(s).
|
void |
setOpacity(double defaultOpacity,
double mouseOverOpacity,
double mouseDownOpacity)
Sets the graphical opacity attributes.
|
public PositionedContextButton(IContextButtonEntry contextButtonEntry, java.awt.Rectangle position)
contextButtonEntry
- The context button entry as defined in
getContextButtonEntry()
.position
- The position as described in getPosition()
.public final void setLine(int lineWidth, int cornerRadius)
lineWidth
- The line-width as described in getLineWidth()
.cornerRadius
- The corner radius as described in getCornerRadius()
.public final void setColors(IColorConstant outerLineColor, IColorConstant middleLineColor, IColorConstant fillColor)
outerLineColor
- The color of the outer line as described in
getOuterLineColor()
.middleLineColor
- The color of the middle line as described in
getMiddleLineColor()
.fillColor
- The fill color as described in getFillColor()
.public final void setOpacity(double defaultOpacity, double mouseOverOpacity, double mouseDownOpacity)
defaultOpacity
- The default opacity as described in
getDefaultOpacity()
.mouseOverOpacity
- The mouse-over opacity as described in
getMouseOverOpacity()
.mouseDownOpacity
- The mouse-down opacity as described in
getMouseDownOpacity()
.public final IContextButtonEntry getContextButtonEntry()
public final java.awt.Rectangle getPosition()
public final int getLineWidth()
public final int getCornerRadius()
public final IColorConstant getOuterLineColor()
getMiddleLineColor()
).public final IColorConstant getMiddleLineColor()
getOuterLineColor()
).public final IColorConstant getFillColor()
public final double getDefaultOpacity()
public final double getMouseOverOpacity()
The mouse-over opacity is used when the mouse is over the context button, to give visual feedback to the user.
public final double getMouseDownOpacity()
The mouse-down opacity is used when the context button is pressed, to give visual feedback to the user.