|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.xoetrope.swing.XGradientBackground
public class XGradientBackground
Paints a background with a linear gradient
Copyright (c) Xoetrope Ltd., 2002-2006
License: see license.txt
$Revision: 1.3 $
| Field Summary | |
|---|---|
protected boolean |
blend
|
protected XProject |
currentProject
|
protected java.lang.String |
title
|
protected java.awt.Color |
titleColor
|
protected java.awt.Font |
titleFont
|
protected float |
titleHeight
|
protected int |
titlePos
|
protected java.awt.Color |
titleTextColor
|
| Fields inherited from interface net.xoetrope.swing.painter.XTitlePainter |
|---|
BOTTOM, LEFT, RIGHT, TOP |
| Constructor Summary | |
|---|---|
XGradientBackground()
|
|
| Method Summary | |
|---|---|
protected java.awt.Paint |
getBackgroundPaint(java.awt.Color start,
float wScreen,
float hScreen,
java.awt.Color end)
Get the paint operation for the background |
void |
paint(java.awt.Graphics2D g,
javax.swing.JComponent obj,
int w,
int h)
Paints a background with a watermark like logo. |
protected void |
paintBackground(java.awt.Graphics2D g2,
float w,
float h,
float wScreen,
float hScreen,
java.awt.Color start,
java.awt.Color end)
Paint an area of the background |
protected void |
paintExtras(java.awt.Graphics2D g2d,
java.lang.Object obj,
int w,
int h)
Paint any extra elements using the current transormation |
void |
setBlend(boolean b)
Set the blend flag. |
void |
setTitle(java.lang.String text)
Set the title text |
void |
setTitleColor(java.awt.Color c)
Set the title/underline color |
void |
setTitleFont(java.awt.Font f)
Set the title font |
void |
setTitlePosition(int pos)
Set the title position |
void |
setTitleTextColor(java.awt.Color c)
Set the title/underline text color |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.awt.Color titleColor
protected java.awt.Color titleTextColor
protected java.awt.Font titleFont
protected float titleHeight
protected boolean blend
protected java.lang.String title
protected int titlePos
protected XProject currentProject
| Constructor Detail |
|---|
public XGradientBackground()
| Method Detail |
|---|
public void paint(java.awt.Graphics2D g,
javax.swing.JComponent obj,
int w,
int h)
paint in interface Painterg - the graphics contextobj - The object/component being paintedw - the width coordinateh - the height coordinate
Copyright: Copyright (c) Xoetrope Ltd., 1998-2003
License: see license.txt
$Revision: 1.3 $
protected java.awt.Paint getBackgroundPaint(java.awt.Color start,
float wScreen,
float hScreen,
java.awt.Color end)
start - the starting colorwScreen - the widthhScreen - the heightend - the ending color
protected void paintBackground(java.awt.Graphics2D g2,
float w,
float h,
float wScreen,
float hScreen,
java.awt.Color start,
java.awt.Color end)
g2 - the graphics contextx - the left coordinatey - the top coordinatew - the width coordinateh - the height coordinatewScreen - the width of the gradienth - the height of the gradientstart - the start colorend - the end color
protected void paintExtras(java.awt.Graphics2D g2d,
java.lang.Object obj,
int w,
int h)
obj - The object/component being paintedg2d - the graphics contextw - the width coordinateh - the height coordinatepublic void setTitleColor(java.awt.Color c)
setTitleColor in interface XTitlePainterc - the colorpublic void setTitleTextColor(java.awt.Color c)
setTitleTextColor in interface XTitlePainterc - the colorpublic void setTitleFont(java.awt.Font f)
setTitleFont in interface XTitlePainterf - the fontpublic void setBlend(boolean b)
setBlend in interface XTitlePainterb - true to blend into the parent space so that siblings panels for a single painted area,
false to paint just this area without regard to other areaspublic void setTitle(java.lang.String text)
setTitle in interface XTitlePaintertext - the new titlepublic void setTitlePosition(int pos)
setTitlePosition in interface XTitlePainterpos - the title position
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||