|
Oracle UIX API Reference Release 2.1.22.0.0 B12196-01 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--oracle.cabo.image.painter.AbstractPainter | +--oracle.cabo.image.painter.AbstractWrappingPainter | +--oracle.cabo.image.painter.AbstractBorderPainter
Abstract baseclass combining a BorderPainter with the ability to wrap other components. Most BorderPainters are subclasses of this class.
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 | |
AbstractBorderPainter()
Creates an AbstractBorderPainter. |
|
AbstractBorderPainter(Painter wrappedPainter)
Creates an AbstractBorderPainter wrapping the wrappedPainter |
|
AbstractBorderPainter(Painter wrappedPainter,
boolean alwaysAddInsets)
Creates an AbstractBorderPainter wrapping the wrappedPainter and using alwaysAddInsets to determine whether to add the border's insets when computing its size. |
Method Summary | |
boolean |
borderContains(PaintContext context,
int availableWidth,
int availableHeight,
int x,
int y)
Returns true if the specified x, y location is inside the border portion of the BorderPainter. |
boolean |
contentContains(PaintContext context,
int availableWidth,
int availableHeight,
int x,
int y)
Returns true if the specified x, y location is inside the content portion of the BorderPainter. |
protected Painter |
getBorderPainterAt(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. |
protected 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. |
ImmInsets |
getFillInsets(PaintContext context)
Returns the amount of space by which fills should be inset. |
ImmInsets |
getInsets(PaintContext context)
Returns the insets of this stack of BorderPainters. |
java.awt.Dimension |
getMaximumSize(PaintContext context)
Returns the maximum size of the AbstractBorderPainter. |
java.awt.Dimension |
getMinimumSize(PaintContext context)
Returns the minimum size of the AbstractBorderPainter. |
protected ImmInsets |
getOwnFillInsets(PaintContext context)
Returns the amount of space by which fills should be inset for this BorderPainter. |
protected ImmInsets |
getOwnInsets(PaintContext context)
Returns the insets of just this BorderPainter, as opposed to the entire nested stack of BorderPainters like getInsets does. |
Painter |
getPainterAt(PaintContext context,
int availableWidth,
int availableHeight,
int x,
int y,
Painter proxyPainter)
Returns the Painter inside this Painter at location x,y of the available size. |
java.awt.Dimension |
getPreferredSize(PaintContext context)
Returns the preferred size of the AbstractBorderPainter. |
java.awt.Dimension |
getSize(PaintContext context,
int width,
int height)
Returns the size of the AbstractBorderPainter for the specified amount of availableWidth and availableHeight. |
protected abstract boolean |
isBorderTransparent(PaintContext context)
Returns true if the border itself is transparent. |
boolean |
isTransparent(PaintContext context)
Returns whether the Painter is transparent. |
void |
paint(PaintContext context,
java.awt.Graphics g,
int x,
int y,
int width,
int height)
Paints the Painter wrapped by the AbstractBorderPainter with the AbstractBorderPainter painted around it. |
protected void |
paintBorder(PaintContext context,
java.awt.Graphics g,
int x,
int y,
int width,
int height)
Paint just the border of the BorderPainter. |
Methods inherited from class oracle.cabo.image.painter.AbstractWrappingPainter |
getInvalidateFlags, getRepaintFlags, getWrappedPainter |
Methods inherited from class oracle.cabo.image.painter.AbstractPainter |
contains, getData, getDataKey |
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, getInvalidateFlags, getRepaintFlags |
Constructor Detail |
public AbstractBorderPainter()
public AbstractBorderPainter(Painter wrappedPainter)
wrappedPainter
- Painter to wrap this border around.public AbstractBorderPainter(Painter wrappedPainter, boolean alwaysAddInsets)
wrappedPainter
- Painter to wrap this border around.alwaysAddInsets
- True if the border should always add its insets
to the size of the wrapped painter when computing
its size, even if the wrapped painter's size is
zero.
getSize(oracle.cabo.image.painter.PaintContext, int, int)
Method Detail |
public final java.awt.Dimension getSize(PaintContext context, int width, int height)
getSize
in interface Painter
getSize
in class AbstractWrappingPainter
context
- Context for deterimining the size.availableWidth
- Amount of width available to the Painter.availableHeight
- Amount of height available to the Painter.
public java.awt.Dimension getPreferredSize(PaintContext context)
In general, BorderPainters should not need to override this method, since it already accounts for the Border's insets.
getPreferredSize
in interface Painter
getPreferredSize
in class AbstractWrappingPainter
context
- Context for determining the preferred size.
public java.awt.Dimension getMinimumSize(PaintContext context)
In general, BorderPainters should not need to override this method, since it already accounts for the Border's insets.
getMinimumSize
in interface Painter
getMinimumSize
in class AbstractWrappingPainter
context
- Context for determining the minimum size.
public java.awt.Dimension getMaximumSize(PaintContext context)
In general, BorderPainters should not need to override this method, since it already accounts for the Border's insets.
getMaximumSize
in interface Painter
getMaximumSize
in class AbstractWrappingPainter
context
- Context for determining the maximum size.
public final void paint(PaintContext context, java.awt.Graphics g, int x, int y, int width, int height)
Painters that modify the Graphics context are responsible for returning it to its initial state when done painting. Further Painters that paint outside the bounds of x, y, width, and height are responsible for clipping themselves to the bounds.
paint
in interface Painter
paint
in class AbstractWrappingPainter
context
- PaintContext to use when paintingg
- 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
paintBorder(oracle.cabo.image.painter.PaintContext, java.awt.Graphics, int, int, int, int)
public final Painter getPainterAt(PaintContext context, int availableWidth, int availableHeight, int x, int y, Painter proxyPainter)
getPainterAt
in interface Painter
getPainterAt
in class AbstractWrappingPainter
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
public final ImmInsets getInsets(PaintContext context)
getInsets
in interface BorderPainter
context
- PaintContext to use when getting the insets
getOwnInsets(oracle.cabo.image.painter.PaintContext)
public final ImmInsets getFillInsets(PaintContext context)
getFillInsets
in interface BorderPainter
context
- the context for paintingprotected ImmInsets getOwnInsets(PaintContext context)
context
- PaintContext to use when getting our own Insets
getInsets(oracle.cabo.image.painter.PaintContext)
protected ImmInsets getOwnFillInsets(PaintContext context)
context
- the context for painting
getFillInsets(oracle.cabo.image.painter.PaintContext)
protected void paintBorder(PaintContext context, java.awt.Graphics g, int x, int y, int width, int height)
Painters that modify the Graphics context are responsible for returning it to its initial state when done painting. Further Painters that paint outside the bounds of x, y, width, and height or inside the area inset by their insets are responsible for clipping themselves.
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
paint(oracle.cabo.image.painter.PaintContext, java.awt.Graphics, int, int, int, int)
public final boolean isTransparent(PaintContext context)
isTransparent
in interface Painter
isTransparent
in class AbstractWrappingPainter
context
- PaintContext to use when determining transparency.
isBorderTransparent(oracle.cabo.image.painter.PaintContext)
protected Painter getContentPainterAt(PaintContext context, int availableWidth, int availableHeight, int x, int y, Painter proxyPainter)
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
#getPainterAt
protected Painter getBorderPainterAt(PaintContext context, int availableWidth, int availableHeight, int x, int y, Painter proxyPainter)
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
getPainterAt(oracle.cabo.image.painter.PaintContext, int, int, int, int, oracle.cabo.image.painter.Painter)
public final boolean contentContains(PaintContext context, int availableWidth, int availableHeight, int x, int y)
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.
Painter.contains(oracle.cabo.image.painter.PaintContext, int, int, int, int)
,
getContentPainterAt(oracle.cabo.image.painter.PaintContext, int, int, int, int, oracle.cabo.image.painter.Painter)
public final boolean borderContains(PaintContext context, int availableWidth, int availableHeight, int x, int y)
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.
Painter.contains(oracle.cabo.image.painter.PaintContext, int, int, int, int)
,
getBorderPainterAt(oracle.cabo.image.painter.PaintContext, int, int, int, int, oracle.cabo.image.painter.Painter)
protected abstract boolean isBorderTransparent(PaintContext context)
context
- PaintContext to use when determining transparency.
isTransparent(oracle.cabo.image.painter.PaintContext)
|
Oracle UIX API Reference Release 2.1.22.0.0 B12196-01 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |