oracle.cabo.image.laf.browser
Class GlobalButtonPainter
java.lang.Object
|
+--oracle.cabo.image.painter.AbstractPainter
|
+--oracle.cabo.image.painter.AbstractWrappingPainter
|
+--oracle.cabo.image.painter.AbstractBorderPainter
|
+--oracle.cabo.image.laf.browser.GlobalButtonPainter
- All Implemented Interfaces:
- BorderPainter, Painter
- public class GlobalButtonPainter
- extends AbstractBorderPainter
Painter used to painter global buttons in the correct
Oracle Look And Feel. A global button contains only a
image and is always 32x32 pixels.
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 |
Method Summary |
Painter |
getContentPainterAt(PaintContext context,
int availableWidth,
int availableHeight,
int x,
int y,
Painter proxyPainter)
Returns the Painter inside the ContentPainter at location x,y of
the available size. |
static java.awt.Color |
getDefaultBackground(ImageContext context,
boolean disabled,
boolean selected)
|
static java.awt.Color |
getDefaultForeground(ImageContext context,
boolean disabled,
boolean selected)
|
protected ImmInsets |
getOwnInsets(PaintContext context)
Returns the insets of just the GlobalButtonPainter. |
int |
getRepaintFlags(PaintContext context)
Returns the flags indicating the conditions under which the
Painter must be repainted. |
protected boolean |
isBorderTransparent(PaintContext context)
Returns true if the border itself is transparent. |
protected void |
paintBorder(PaintContext context,
java.awt.Graphics g,
int x,
int y,
int width,
int height)
Paint just the border of the GlobalButtonPainter. |
Methods inherited from class oracle.cabo.image.painter.AbstractBorderPainter |
borderContains, contentContains, getBorderPainterAt, getFillInsets, getInsets, getMaximumSize, getMinimumSize, getOwnFillInsets, getPainterAt, getPreferredSize, getSize, isTransparent, paint |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GlobalButtonPainter
public GlobalButtonPainter()
- Creates an GlobalButtonPainter.
getDefaultBackground
public static java.awt.Color getDefaultBackground(ImageContext context,
boolean disabled,
boolean selected)
getDefaultForeground
public static java.awt.Color getDefaultForeground(ImageContext context,
boolean disabled,
boolean selected)
getOwnInsets
protected ImmInsets getOwnInsets(PaintContext context)
- Returns the insets of just the GlobalButtonPainter.
- Overrides:
getOwnInsets
in class AbstractBorderPainter
- Following copied from class:
oracle.cabo.image.painter.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)
paintBorder
protected void paintBorder(PaintContext context,
java.awt.Graphics g,
int x,
int y,
int width,
int height)
- Paint just the border of the GlobalButtonPainter.
- Overrides:
paintBorder
in class AbstractBorderPainter
- Following copied from class:
oracle.cabo.image.painter.AbstractBorderPainter
- Parameters:
context
- PaintContext to use when painting the Borderg
- Graphics context to use when paintingx
- x coordinate to begin painting aty
- y coordinate to begin painting atwidth
- width of area to paintheight
- height of area to paint
- Returns:
- The insets of just this BorderPainter.
- See Also:
AbstractBorderPainter.paint(oracle.cabo.image.painter.PaintContext, java.awt.Graphics, int, int, int, int)
getContentPainterAt
public Painter getContentPainterAt(PaintContext context,
int availableWidth,
int availableHeight,
int x,
int y,
Painter proxyPainter)
- Returns the Painter inside the ContentPainter at location x,y of
the available size. If no Painter is at that location, this
method returns null.
- Overrides:
getContentPainterAt
in class AbstractBorderPainter
- Following copied from class:
oracle.cabo.image.painter.AbstractBorderPainter
- Parameters:
context
- Context for determining containership.availableWidth
- Amount of width available to the Painter.availableHeight
- Amount of height available to the Painter.x
- X location to test for containership in this
Painter.y
- Y location to test for containership in this
Painter.proxyPainter
- Painter to return instead of child painters
- Returns:
- The Painter at the specified loaction, or null if none.
#getPainterAt
isBorderTransparent
protected boolean isBorderTransparent(PaintContext context)
- Returns true if the border itself is transparent.
- Overrides:
isBorderTransparent
in class AbstractBorderPainter
- Following copied from class:
oracle.cabo.image.painter.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
- Following copied from interface:
oracle.cabo.image.painter.Painter
- Parameters:
context
- Context to use for determining the conditions under
which repainting is required.
- Returns:
- Flags indicating the conditions under which this Painter must
be repainted.
- See Also:
Painter.getInvalidateFlags(oracle.cabo.image.painter.PaintContext)