|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--sos.reports.DefaultFill
A default implementation of Fill.
| Field Summary |
| Fields inherited from interface sos.reports.Fill |
BLACK, BLUE, CYAN, DARK_GRAY, GRAY, GREEN, LIGHT_GRAY, MAGENTA, NONE, ORANGE, PINK, RED, WHITE, YELLOW |
| Constructor Summary | |
DefaultFill(java.awt.Color color)
Creates a DefaultFill that paints the entire region with the
specified color. |
|
DefaultFill(java.awt.Color[] colors,
double[] offsets,
boolean[] absoluteOffsets,
int direction)
Create a DefaultFill representing a linear gradient
through the specified colors at the specified offsets, in the specified
direction. |
|
DefaultFill(java.awt.Color startColor,
java.awt.Color stopColor,
int direction)
Create a DefaultFill representing a linear gradient
starting with startColor and
ending with stopColor in the direction given by direction. |
|
| Method Summary | |
boolean |
equals(java.lang.Object obj)
Returns true if this fill is equivalent to the specified object. |
java.awt.Color |
getColor(int index)
Returns the fill color at the specified index. |
int |
getColorCount()
Returns the number of colors this fill uses. |
int |
getDirection()
Returns the direction of this fill. |
double |
getOffset(int index)
Returns the offset at the specified index. |
int |
hashCode()
Returns a hash code value for this fill. |
boolean |
isAbsolute(int index)
Returns false if the offset at the specified index should be interpreted
relative to the previous offset. |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public DefaultFill(java.awt.Color color)
DefaultFill that paints the entire region with the
specified color.
color - color to paint the region
java.lang.NullPointerException - if color is null
public DefaultFill(java.awt.Color startColor,
java.awt.Color stopColor,
int direction)
DefaultFill representing a linear gradient
starting with startColor and
ending with stopColor in the direction given by direction.
startColor - starting colorstopColor - ending colordirection - the direction of the fill
java.lang.IllegalArgumentException - if direction is not one of
SwingConstants.EAST, SwingConstants.SOUTH,
SwingConstants.SOUTH_EAST, SwingConstants.NORTH_EAST
java.lang.NullPointerException - if startColor or stopColor
is null
public DefaultFill(java.awt.Color[] colors,
double[] offsets,
boolean[] absoluteOffsets,
int direction)
DefaultFill representing a linear gradient
through the specified colors at the specified offsets, in the specified
direction.
colors - the fill's colorsoffsets - the starting positions of the fill's colorsabsoluteOffsets - false for index i
if offsets[i] should be treated as relative to the previous offsetdirection - the direction of the fill
java.lang.IllegalArgumentException - if direction is not one of
SwingConstants.EAST, SwingConstants.SOUTH,
SwingConstants.SOUTH_EAST, SwingConstants.NORTH_EAST,
or if the arrays are not the same length
java.lang.NullPointerException - if colors, offsets,
or any element of colors is null| Method Detail |
public boolean equals(java.lang.Object obj)
true if this fill is equivalent to the specified object.
equals in class java.lang.Objectobj - object to test for equivalence
true if this fill equals objpublic int getColorCount()
Fill
getColorCount in interface Fillpublic int getDirection()
Fill
getDirection in interface FillSwingConstants.EAST,
SwingConstants.SOUTH, SwingConstants.SOUTH_EAST,
and SwingConstants.NORTH_EAST)public java.awt.Color getColor(int index)
Fill
getColor in interface Fillindex - index of the color to retrieve
indexpublic double getOffset(int index)
Fill
getOffset in interface Fillindex - index of the offset to retrieve
indexpublic int hashCode()
hashCode in class java.lang.Objectpublic boolean isAbsolute(int index)
Fillfalse if the offset at the specified index should be interpreted
relative to the previous offset.
isAbsolute in interface Fillindex - index of the offset in consideration
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||