EspressReport
v 5.5

quadbase.common.util.internal
Class QbPattern

java.lang.Object
  |
  +--java.awt.Color
        |
        +--quadbase.common.util.internal.QbPattern
All Implemented Interfaces:
java.awt.Paint, java.io.Serializable, java.awt.Transparency

public class QbPattern
extends java.awt.Color

Class used to hold and make patterns for chart data How to use it: QbPattern pattern = new QbPattern(color, PatternID); BufferedImpage bImage = pattern.getPatternIMage();

See Also:
Serialized Form

Field Summary
static int CUSTOMPATTERN
           
static long serialVersionUID
           
 
Fields inherited from class java.awt.Color
black, blue, cyan, darkGray, gray, green, lightGray, magenta, orange, pink, red, white, yellow
 
Fields inherited from interface java.awt.Transparency
BITMASK, OPAQUE, TRANSLUCENT
 
Constructor Summary
QbPattern(java.awt.Color color)
          Dummy constructor.
QbPattern(java.awt.Color color, int patternTypeID)
          Create a new QbPattern Object having the and using the predefined pattern ID
 
Method Summary
 java.awt.image.BufferedImage getPatternImage()
          Light weight method to obtain a reference of the pattern BufferedImage
 int getPatternTypeID()
           
 void setPatternImage(java.awt.image.BufferedImage bImage)
          For API use only.
 java.lang.String toString()
           
 
Methods inherited from class java.awt.Color
brighter, createContext, darker, decode, equals, getAlpha, getBlue, getColor, getColor, getColor, getColorComponents, getColorComponents, getColorSpace, getComponents, getComponents, getGreen, getHSBColor, getRed, getRGB, getRGBColorComponents, getRGBComponents, getTransparency, hashCode, HSBtoRGB, RGBtoHSB
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

serialVersionUID

public static final long serialVersionUID

CUSTOMPATTERN

public static int CUSTOMPATTERN
Constructor Detail

QbPattern

public QbPattern(java.awt.Color color)
Dummy constructor. It will create a QbPattern Object, but it doesn't have the pattern Image available for apply. Use the method getPatternImage(int ID) to assign the image later when the ID is available. Use QbPattern(Color, int) if possible. Create new QbPattern if you want to change the pattern color

QbPattern

public QbPattern(java.awt.Color color,
                 int patternTypeID)
Create a new QbPattern Object having the and using the predefined pattern ID
Parameters:
color: - the color for the pattern
patternTypeID: - the ID of the predefined pattern type if patternTypeID == 0, it doesn't have the pattern image
Method Detail

getPatternImage

public java.awt.image.BufferedImage getPatternImage()
Light weight method to obtain a reference of the pattern BufferedImage
Returns:
- the image, if it has one, nullif nothing. Use getPatternImage(int) in such a case

setPatternImage

public void setPatternImage(java.awt.image.BufferedImage bImage)
For API use only. If the user would like to pick the image by themselves instead of using the pre-defined image patterns He can create a empty QbPattern with a Color using the constructor QbPattern(Color). (This color is used as an alternative when Graphics2D is not supported) But it is not garenteed that the image will be rendered as what the user would think.
Parameters:
bImage -  

getPatternTypeID

public int getPatternTypeID()
Returns:
the patternID currently this QbPattern Object is using

toString

public java.lang.String toString()
Overrides:
toString in class java.awt.Color
Returns:
a string of the format: [r=?,g=?,b=?] ID=?

EspressReport
v 5.5