|
NetCharts Pro | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnetcharts.pro.common.NFBaseClass
netcharts.pro.common.NFFillPattern
public class NFFillPattern
This object represents a single fill pattern configuration. There are three types of fill patterns: Overlay pattern, gradient, and image. The overlay patterns available include forward slashes, gridded patterns and so on. Gradients provide the ability to "fade" from one color to another. The image fill uses the given image in the fill area. An example of the NFFillPattern object's use is shown here:
... NFLinechart chart = new NFLinechart(); NFLineSet lineSet = new NFLineSet(); NFFillPattern fp = new NFFillPattern(NFFillPattern.FSLASH, Color.green, Color.white); lineSet.setFillPattern(fp); // load dummy data into the line set object for (int j=0; j < 20; j++) lineSet.addElement(new Double(Math.random()*100)); chart.addLineSet(lineSet); // add this lineset. ...
Field Summary | |
---|---|
static int |
BSLASH
Backward Slash |
static int |
DGRID
Diagonal Grid |
static java.util.Hashtable |
fillTypeMap
fillTypeMap hashtable |
static int |
FSLASH
Forward Slash |
static int |
GRADIENTBDIAG
Bottom left to top right gradient |
static int |
GRADIENTCENTERHORIZONTAL
Center out horizontal gradient pattern |
static int |
GRADIENTCENTERVERTICAL
Center out vertical gradient pattern |
static int |
GRADIENTFDIAG
Top left to bottom right gradient |
static int |
GRADIENTHORIZONTAL
Left to right gradient |
static int |
GRADIENTRADIAL
Radial gradient pattern |
static int |
GRADIENTVERTICAL
Top to bottom gradient |
static int |
GRID
Horizontal/Vertical Grid |
static int |
HORIZONTAL
Horizontal lines |
static int |
IMAGE
Image fill |
static int |
NONE
No fill |
static int |
VERTICAL
Vertical lines |
Constructor Summary | |
---|---|
NFFillPattern()
Constructs a default fill pattern |
|
NFFillPattern(int type)
Constructs a fill pattern with the given fill type |
|
NFFillPattern(int type,
java.awt.Color foreground,
java.awt.Color background)
Constructs a fill pattern with the given fill type and colors |
Method Summary | |
---|---|
java.awt.Color |
getBackground()
Gets the background color (or secondary color for gradients). |
java.lang.String |
getCDL()
Generate CDL parameters representing this pattern fill |
void |
getCDL(java.lang.StringBuffer sb,
boolean includeParens)
Append CDL parameters representing this pattern fill to the given StringBuffer. |
java.awt.Color |
getForeground()
Gets the foreground color (or initial color for gradients). |
java.lang.String |
getImageURL()
Gets url string used for the fill image |
int |
getType()
Gets the fill type |
void |
setBackground(java.awt.Color background)
Sets the background color (or secondary color for gradients). |
void |
setCDL(java.lang.Object cdlObject)
Configures this object from a CDL parameter object. |
void |
setCDL(java.lang.String cdl)
Configures this object from a CDL parameter representation. |
int |
setCDL(java.lang.String[] elements,
int offset)
Configures this object from a CDL parameter representation. |
void |
setForeground(java.awt.Color foreground)
Sets the foreground color (or initial color for gradients). |
void |
setImageURL(java.lang.String imageURL)
Sets url string to use for the fill image |
void |
setType(int type)
Sets the fill type |
java.lang.String |
toString()
Returns a new String object representing this pattern fill. |
Methods inherited from class netcharts.pro.common.NFBaseClass |
---|
clone, getModified, getUserObject, setModified, setUserObject |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int NONE
public static final int FSLASH
public static final int BSLASH
public static final int DGRID
public static final int HORIZONTAL
public static final int VERTICAL
public static final int GRID
public static final int GRADIENTVERTICAL
public static final int GRADIENTHORIZONTAL
public static final int GRADIENTFDIAG
public static final int GRADIENTBDIAG
public static final int GRADIENTRADIAL
public static final int GRADIENTCENTERHORIZONTAL
public static final int GRADIENTCENTERVERTICAL
public static final int IMAGE
public static java.util.Hashtable fillTypeMap
Constructor Detail |
---|
public NFFillPattern()
public NFFillPattern(int type)
type
- One of NONE, FSLASH, BSLASH, DGRID, HORIZONTAL,
VERTICAL, GRID, GRADIENTVERTICAL, GRADIENTHORIZONTAL, GRADIENTFDIAG,
GRADIENTBDIAG, GRADIENTRADIAL, GRADIENTCENTERHORIZONTAL,
GRADIENTCENTERVERTICAL, IMAGE
.public NFFillPattern(int type, java.awt.Color foreground, java.awt.Color background)
type
- One of NONE, FSLASH, BSLASH, DGRID, HORIZONTAL,
VERTICAL, GRID, GRADIENTVERTICAL, GRADIENTHORIZONTAL, GRADIENTFDIAG,
GRADIENTBDIAG, GRADIENTRADIAL, GRADIENTCENTERHORIZONTAL,
GRADIENTCENTERVERTICAL, IMAGE
.foreground
- Foreground color (or initial color for gradients)background
- Background color (or secondary color for gradients)Method Detail |
---|
public void setType(int type)
type
- One of NONE, FSLASH, BSLASH, DGRID, HORIZONTAL,
VERTICAL, GRID, GRADIENTVERTICAL, GRADIENTHORIZONTAL, GRADIENTFDIAG,
GRADIENTBDIAG, GRADIENTRADIAL, GRADIENTCENTERHORIZONTAL,
GRADIENTCENTERVERTICAL, IMAGE
.public int getType()
NONE, FSLASH, BSLASH, DGRID, HORIZONTAL,
VERTICAL, GRID, GRADIENTVERTICAL, GRADIENTHORIZONTAL, GRADIENTFDIAG,
GRADIENTBDIAG, GRADIENTRADIAL, GRADIENTCENTERHORIZONTAL,
GRADIENTCENTERVERTICAL, IMAGE
.public void setForeground(java.awt.Color foreground)
IMAGE
.
foreground
- Foreground color.public java.awt.Color getForeground()
public void setBackground(java.awt.Color background)
IMAGE
.
background
- Background color.public java.awt.Color getBackground()
public void setImageURL(java.lang.String imageURL)
imageURL
- Only used if the type is set to Image.public java.lang.String getImageURL()
public java.lang.String getCDL()
getCDL
in interface NFCDLGenerator
(type, foreground, background, imageURL)
public void getCDL(java.lang.StringBuffer sb, boolean includeParens)
sb
- Target buffer to append the CDL parametersincludeParens
- If true, this will cause the parameters to be delimited
with parenthesis.public void setCDL(java.lang.Object cdlObject)
cdlObject
- CDL in a String form or in a user object.public void setCDL(java.lang.String cdl)
setCDL
in interface NFCDLGenerator
cdl
- CDL in the form: (type, foreground, background, imageURL)
public int setCDL(java.lang.String[] elements, int offset)
elements
- Array of parameter elements. This array is expected
to contain consecutive elements containing filltype, foreground, background,
and imageURL information.offset
- Offset into the elements array.public java.lang.String toString()
toString
in interface NFCDLGenerator
toString
in class java.lang.Object
|
NetCharts Pro | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Visual Mining, Inc. | Copyright © Visual Mining, Inc. 1996 - 2011 |
Last Modified: Jun 28, 2011 |