oracle.cabo.image.painter
Class AdjustableBorderPainter
java.lang.Object
|
+--oracle.cabo.image.painter.AbstractPainter
|
+--oracle.cabo.image.painter.AbstractWrappingPainter
|
+--oracle.cabo.image.painter.AbstractBorderPainter
|
+--oracle.cabo.image.painter.AdjustableBorderPainter
- All Implemented Interfaces:
- BorderPainter, Painter
- public class AdjustableBorderPainter
- extends AbstractBorderPainter
A border that insets painting of the wrapped painter by an amount
which is adjustable from font to font. The font-specific offsets
are defined by named styles in an XSS document. Style names for
each font are dervied by prepending the provided prefix to the font
name. For example, if the prefix is "BLAFServerButtonPadding"
the style with the name "BLAFServerButtonPaddingDialog" defines the insets
for the "Dialog" font. Padding values for each inset are defined using
the CSS style properties "padding-top", "padding-bottom", "padding-left"
and "padding-right".
Fields inherited from interface oracle.cabo.image.painter.Painter |
STATE_ACTIVE_CHANGED, STATE_ARMED_CHANGED, STATE_BACKGROUND_CHANGED, STATE_ENABLED_CHANGED, STATE_FOCUSED_CHANGED, STATE_FONT_CHANGED, STATE_FOREGROUND_CHANGED, STATE_ISDEFAULT_CHANGED, STATE_MOUSE_OVER_CHANGED, STATE_READING_DIRECTION_CHANGED, STATE_SELECTED_CHANGED, STATE_SET_CHANGED, STATE_SIZE_CHANGED, STATE_XALIGNMENT_CHANGED, STATE_YALIGNMENT_CHANGED |
Constructor Summary |
AdjustableBorderPainter(Painter wrappedPainter,
int top,
int left,
int bottom,
int right,
java.lang.String styleNamePrefix)
Creates a BorderPainter that insets painting by the specified amount. |
Methods inherited from class oracle.cabo.image.painter.AbstractBorderPainter |
borderContains, contentContains, getBorderPainterAt, getContentPainterAt, getFillInsets, getInsets, getMaximumSize, getMinimumSize, getOwnFillInsets, getPainterAt, getPreferredSize, getSize, isTransparent, paint, paintBorder |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface oracle.cabo.image.painter.Painter |
contains |
AdjustableBorderPainter
public AdjustableBorderPainter(Painter wrappedPainter,
int top,
int left,
int bottom,
int right,
java.lang.String styleNamePrefix)
- Creates a BorderPainter that insets painting by the specified amount.
The specified insets are used as default values if font-specific
insets are not found when measuring/painting the border.
- Parameters:
wrappedPainter
- Painter to wrap this border around.top
- Amount to inset painting from the top.left
- Amount to inset painting from the left.bottom
- Amount to inset painting from the bottom.right
- Amount to inset painting from the right.styleNamePrefix
- The prefix to use for the style name
which defines the insets for this instance.
getOwnInsets
protected ImmInsets getOwnInsets(PaintContext context)
- Returns the insets of just this BorderPainter. These are the insets
that were passed into our constructor.
- Overrides:
getOwnInsets
in class AbstractBorderPainter
- Parameters:
context
- PaintContext to use when getting our own Insets
- Returns:
- The insets of just this BorderPainter.
- See Also:
AbstractBorderPainter.getInsets(oracle.cabo.image.painter.PaintContext)
isBorderTransparent
protected boolean isBorderTransparent(PaintContext context)
- Returns true if the border itself is transparent.
- Overrides:
isBorderTransparent
in class AbstractBorderPainter
- Parameters:
context
- PaintContext to use when determining transparency.
- Returns:
- true if this BorderPainter is transparent.
- See Also:
AbstractBorderPainter.isTransparent(oracle.cabo.image.painter.PaintContext)
getRepaintFlags
public int getRepaintFlags(PaintContext context)
- Returns the flags indicating the conditions under which the
Painter must be repainted.
- Overrides:
getRepaintFlags
in class AbstractWrappingPainter
- Parameters:
context
- Context to use for determining the conditions under
which reapinting is required.
- Returns:
- Flags indicating the conditions under which this Painter must
be repainted.
getInvalidateFlags
public int getInvalidateFlags(PaintContext context)
- Returns the flags indicating the conditions under which the
Painter must be invalidated.
- Overrides:
getInvalidateFlags
in class AbstractWrappingPainter
- Parameters:
context
- Context to use for determining the conditions under
which reapinting is required.
- Returns:
- Flags indicating the conditions under which this Painter must
be invalidated.
Copyright © 2002,2003, Oracle. All Rights Reserved.