|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.formaria.swing.painter.GradientBackground
public class GradientBackground
Paints a background with a linear gradient
Copyright (c) Formaria Ltd., 2008
License: see license.txt
$Revision: 1.3 $
| Field Summary | |
|---|---|
protected boolean |
blend
|
protected Project |
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 org.formaria.swing.painter.TitlePainter |
|---|
BOTTOM, LEFT, RIGHT, TOP |
| Constructor Summary | |
|---|---|
GradientBackground()
|
|
| 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. |
void |
paint(java.awt.Graphics2D g,
java.lang.Object object,
int width,
int height)
|
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 Project currentProject
| Constructor Detail |
|---|
public GradientBackground()
| Method Detail |
|---|
public void paint(java.awt.Graphics2D g,
java.lang.Object object,
int width,
int height)
public void paint(java.awt.Graphics2D g,
javax.swing.JComponent obj,
int w,
int h)
g - the graphics contextobj - The object/component being paintedw - the width coordinateh - the height coordinate
Copyright: Copyright (c) Formaria Ltd., 2008
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 TitlePainterc - the colorpublic void setTitleTextColor(java.awt.Color c)
setTitleTextColor in interface TitlePainterc - the colorpublic void setTitleFont(java.awt.Font f)
setTitleFont in interface TitlePainterf - the fontpublic void setBlend(boolean b)
setBlend in interface TitlePainterb - 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 TitlePaintertext - the new titlepublic void setTitlePosition(int pos)
setTitlePosition in interface TitlePainterpos - the title position
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||