|
Compiere 3.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.compiere.plaf.CompiereColor
public class CompiereColor
Compiere Background Color
| Nested Class Summary | |
|---|---|
class |
CompiereColor.ColorBackground
Background contains a Buffered Image with the background. |
| Field Summary | |
|---|---|
static KeyNamePair[] |
GRADIENT_SP
Gradient Starting Point |
static String[] |
GRADIENT_SP_NAMES
Gradient Starting Names |
static int[] |
GRADIENT_SP_VALUES
Gradient Starting Values |
static String |
TYPE_FLAT
Background type Flat |
static String |
TYPE_GRADIENT
Background type Gradient |
static String |
TYPE_LINES
Background type Lines |
static String[] |
TYPE_NAMES
Type Names |
static String |
TYPE_TEXTURE
Background type Texture |
static String[] |
TYPE_VALUES
Type Values |
static ValueNamePair[] |
TYPES
Types |
| Constructor Summary | |
|---|---|
CompiereColor()
Create Gradient Background Color (Window System Color - White) |
|
CompiereColor(Color bg)
Create Flat Background Color |
|
CompiereColor(Color bg,
boolean flat)
Create Background Color |
|
CompiereColor(Color upperColor,
Color lowerColor)
Set Background to Gradient colors. |
|
CompiereColor(Color lineColor,
Color backColor,
float lineWidth,
int lineDistance)
Set Background to Lines |
|
CompiereColor(Color upperColor,
Color lowerColor,
int startPoint,
int repeatDistance)
Set Background to Gradient colors |
|
CompiereColor(CompiereColor cc)
Copy Color |
|
CompiereColor(String type)
Create Default Background Colors of Type |
|
CompiereColor(String textureURL,
Color taint,
float compositeAlpha)
Set Background to Texture |
|
CompiereColor(URL textureURL,
Color taint,
float compositeAlpha)
Set Background to Texture |
|
| Method Summary | |
|---|---|
static CompiereColor |
getBackground(JComponent c)
Get Background Color of component |
static CompiereColor |
getDefaultBackground()
Get Default Background |
Color |
getFlatColor()
Get Flat Color |
Color |
getGradientLowerColor()
Gradient Lower Color |
int |
getGradientRepeatDistance()
Gradient Repeat Distance in point |
int |
getGradientStartPoint()
Gradient Starting Point |
Color |
getGradientUpperColor()
Gradient Upper Color |
Color |
getLineBackColor()
Line Background Color |
Color |
getLineColor()
Line Color |
int |
getLineDistance()
Background Line distance in pt |
float |
getLineWidth()
Background Line Width |
float |
getTextureCompositeAlpha()
Texture Composite Alpha |
BufferedImage |
getTextureImage()
Get Texture Image based on Texture URL |
Color |
getTextureTaintColor()
Texture Taint Color |
URL |
getTextureURL()
Texture Url |
String |
getType()
Get BackgroundType (Flat, Gradient, Lines, Texture) |
boolean |
isFlat()
Flat Background Type (default) |
boolean |
isGradient()
Gradient Background Type |
boolean |
isLine()
Line Background Type |
static boolean |
isSetDefault()
Is the Default Background set by default |
boolean |
isTexture()
Texture Background Type |
void |
paint(Graphics g,
JComponent c)
Fill with CompiereColor Background |
void |
paintRect(Graphics g,
JComponent c,
int x,
int y,
int w,
int h)
Fill with Compiere Background |
static CompiereColor |
parse(String attributes)
Parse attributes and return CompiereColor |
static void |
setBackground(JComponent c)
Set Background of Component to default color |
static void |
setBackground(JComponent c,
CompiereColor cc)
Set Background of Component |
static void |
setBackground(Window win)
Set Background of Window Content Pane to default color |
static void |
setBackground(Window win,
CompiereColor cc)
Set Background of Window Content Pane |
void |
setColor(CompiereColor cc)
Set CompiereColor from CompiereColor |
static void |
setDefaultBackground(CompiereColor bg)
Set Default Background |
void |
setFlatColor(Color color)
Set Flat Color |
void |
setGradientLowerColor(Color color)
Gradient Lower Color |
void |
setGradientRepeatDistance(int repeatDistance)
Gradient Repeat Distance. |
void |
setGradientRepeatDistance(String repeatDistanceString)
Gradient Repeat Distance. |
void |
setGradientStartPoint(int startPoint)
Gradient Starting Point |
void |
setGradientUpperColor(Color color)
Gradient Upper Color |
void |
setLineBackColor(Color color)
Line Background Color |
void |
setLineColor(Color color)
Line Color |
void |
setLineDistance(int distance)
Background Line distance in pt |
void |
setLineDistance(String distanceString)
Background Line distance in pt |
void |
setLineWidth(float width)
Background Line Width |
void |
setLineWidth(String widthString)
Background Line Width |
protected void |
setPrimaryColor(Color color)
Set Prinary Color |
static void |
setSetDefault(boolean setDefault)
Set Default Background |
void |
setTextureCompositeAlpha(float alpha)
Texture Composite Alpha |
void |
setTextureCompositeAlpha(String alphaString)
Texture Composite Alpha |
void |
setTextureTaintColor(Color color)
Texture Taint Color |
void |
setTextureURL(String urlString)
Texture Url |
void |
setTextureURL(URL url)
Texture Url |
String |
toString()
String representation |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final String TYPE_FLAT
public static final String TYPE_GRADIENT
public static final String TYPE_LINES
public static final String TYPE_TEXTURE
public static final String[] TYPE_VALUES
public static final String[] TYPE_NAMES
public static final ValueNamePair[] TYPES
public static final int[] GRADIENT_SP_VALUES
public static final String[] GRADIENT_SP_NAMES
public static final KeyNamePair[] GRADIENT_SP
| Constructor Detail |
|---|
public CompiereColor()
public CompiereColor(String type)
type - Background type (see constants TYPE_*)public CompiereColor(Color bg)
bg - background
public CompiereColor(Color bg,
boolean flat)
bg - Colorflat - if true create Flat color otherwise Gradient color with white lower color
public CompiereColor(Color upperColor,
Color lowerColor,
int startPoint,
int repeatDistance)
upperColor - upper ColorlowerColor - lower ColorstartPoint - Starting point - e.g. SOUTH_WEST see SwingConstants, default NORTH_WESTrepeatDistance - X/Y Distance to repeat gradient in points - 0 no repeats
public CompiereColor(Color upperColor,
Color lowerColor)
upperColor - upper colorlowerColor - lower color
public CompiereColor(URL textureURL,
Color taint,
float compositeAlpha)
textureURL - URL to a *.gif or *.jpg graphic filetaint - Color to taint the texture (use white for not tainting it)compositeAlpha - Value from 0(no) to 1(full) taining
public CompiereColor(String textureURL,
Color taint,
float compositeAlpha)
textureURL - URL to a *.gif or *.jpg graphic filetaint - Color to taint the texture (use white for not tainting it)compositeAlpha - Tainting value from 0 (no - FullGraph) to 1 (full - NoGraph)
public CompiereColor(Color lineColor,
Color backColor,
float lineWidth,
int lineDistance)
lineColor - line colorbackColor - background colorlineWidth - Stroke width in pointlineDistance - Distance between lines in pointspublic CompiereColor(CompiereColor cc)
cc - color| Method Detail |
|---|
public static void setBackground(JComponent c)
c - component
public static void setBackground(JComponent c,
CompiereColor cc)
c - Componentcc - Colorpublic static CompiereColor getBackground(JComponent c)
c - JComponent
public static void setBackground(Window win)
win - window
public static void setBackground(Window win,
CompiereColor cc)
win - windowcc - compiere colorpublic static void setDefaultBackground(CompiereColor bg)
bg - Background ColorCompierePanelUI.setDefaultBackground(org.compiere.plaf.CompiereColor)public static CompiereColor getDefaultBackground()
CompierePanelUI.getDefaultBackground()public static void setSetDefault(boolean setDefault)
setDefault - if true, the background will be set to the default colorCompierePanelUI.setSetDefault(boolean)public static boolean isSetDefault()
CompierePanelUI.isSetDefault()public static CompiereColor parse(String attributes)
attributes - attributes
public String getType()
public boolean isFlat()
public boolean isGradient()
public boolean isLine()
public boolean isTexture()
public Color getFlatColor()
public void setFlatColor(Color color)
color - flat colorpublic Color getGradientUpperColor()
public void setGradientUpperColor(Color color)
color - upper colorpublic Color getGradientLowerColor()
public void setGradientLowerColor(Color color)
color - lower colorpublic int getGradientStartPoint()
SwingConstantspublic void setGradientStartPoint(int startPoint)
startPoint - starting point - e.g. NORTHSwingConstantspublic int getGradientRepeatDistance()
public void setGradientRepeatDistance(int repeatDistance)
repeatDistance - repeat gradient after point x+repeat / y+repeat (depending on direction)public void setGradientRepeatDistance(String repeatDistanceString)
repeatDistanceString - repeat gradient after point x+repeat / y+repeat (depending on direction)public URL getTextureURL()
public BufferedImage getTextureImage()
public void setTextureURL(URL url)
url - URL to graphic file (jpg)public void setTextureURL(String urlString)
urlString - URL to graphic file (jpg)public Color getTextureTaintColor()
public void setTextureTaintColor(Color color)
color - taint colorpublic float getTextureCompositeAlpha()
public void setTextureCompositeAlpha(float alpha)
alpha - alpha valuepublic void setTextureCompositeAlpha(String alphaString)
alphaString - String to be parsedpublic Color getLineColor()
public void setLineColor(Color color)
color - line colorpublic Color getLineBackColor()
public void setLineBackColor(Color color)
color - background colorpublic float getLineWidth()
public void setLineWidth(float width)
width - line widthpublic void setLineWidth(String widthString)
widthString - line widthpublic int getLineDistance()
public void setLineDistance(int distance)
distance - line distancepublic void setLineDistance(String distanceString)
distanceString - line distanceprotected void setPrimaryColor(Color color)
color - primary colorpublic void setColor(CompiereColor cc)
cc - CompiereColor
public void paint(Graphics g,
JComponent c)
g - the Graphics context in which to paintc - the component being painted
public void paintRect(Graphics g,
JComponent c,
int x,
int y,
int w,
int h)
g - graphicsc - componentx - x posy - y posw - withh - heightpublic String toString()
toString in class Object
|
Compiere 3.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||