com.imagero.gui.swing
Class BackgroundPainter
java.lang.Object
com.imagero.gui.swing.BackgroundPainter
- public class BackgroundPainter
- extends java.lang.Object
BackgroundPainter.
Basic support for drawing on Component's background.
Use with awt:
override update(Graphics g);
BackgroundPainter bp;
public void update(Graphics g) {
bp.paint(this, g);
paint(g);
}
use with swing:
setOpaque(false);
protected void paintComponent(Graphics g) {
backgroundPainter.paint(this, g);
super.paintComponent(g);
}
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BOTTOM
public static final int BOTTOM
- See Also:
- Constant Field Values
BOTTOM_LEFT
public static final int BOTTOM_LEFT
- See Also:
- Constant Field Values
BOTTOM_RIGHT
public static final int BOTTOM_RIGHT
- See Also:
- Constant Field Values
CENTER
public static final int CENTER
- See Also:
- Constant Field Values
CUSTOM
public static final int CUSTOM
- See Also:
- Constant Field Values
LEFT
public static final int LEFT
- See Also:
- Constant Field Values
RIGHT
public static final int RIGHT
- See Also:
- Constant Field Values
TILED
public static final int TILED
- See Also:
- Constant Field Values
TOP
public static final int TOP
- See Also:
- Constant Field Values
TOP_LEFT
public static final int TOP_LEFT
- See Also:
- Constant Field Values
TOP_RIGHT
public static final int TOP_RIGHT
- See Also:
- Constant Field Values
BackgroundPainter
public BackgroundPainter()
BackgroundPainter
public BackgroundPainter(java.awt.Image img)
BackgroundPainter
public BackgroundPainter(java.awt.Paint gp)
BackgroundPainter
public BackgroundPainter(java.awt.Paint gp,
java.awt.Image img)
getBgImage
public java.awt.Image getBgImage()
getPaint
public java.awt.Paint getPaint()
isEmpty
public boolean isEmpty()
paint
public void paint(java.awt.Component c,
java.awt.Graphics g)
setBgImage
public void setBgImage(java.awt.Image bgImage)
setImageJustification
public void setImageJustification(int justify)
setImageJustificationParams
public void setImageJustificationParams(float imgX,
float imgY,
float imgScaleX,
float imgScaleY)
setPaint
public void setPaint(java.awt.Paint gp)