|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jdesktop.beans.AbstractBean
org.jdesktop.swingx.painter.AbstractPainter<T>
org.jdesktop.swingx.painter.BusyPainter<T>
public class BusyPainter<T>
A specific painter that paints an "infinite progress" like animation. For more details see JXBusyLabel
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.jdesktop.swingx.painter.AbstractPainter |
---|
AbstractPainter.Interpolation |
Constructor Summary | |
---|---|
BusyPainter()
Creates new busy painter initialized to the shape of circle and bounds size 26x26 points. |
|
BusyPainter(int height)
Creates new painter initialized to the shape of circle and bounds of square of specified height. |
|
BusyPainter(java.awt.Shape point,
java.awt.Shape trajectory)
Initializes painter to the specified trajectory and and point shape. |
Method Summary | |
---|---|
protected void |
doPaint(java.awt.Graphics2D g,
T t,
int width,
int height)
Subclasses must implement this method and perform custom painting operations here. |
java.awt.Color |
getBaseColor()
Gets base color. |
JXBusyLabel.Direction |
getDirection()
Gets current direction of spinning. |
int |
getFrame()
Gets current frame. |
java.awt.Color |
getHighlightColor()
Gets highlight color. |
int |
getPoints()
Gets total amount of distinct points in spinner. |
java.awt.Shape |
getPointShape()
Gets shape of current point. |
protected static java.awt.Shape |
getScaledDefaultPoint(int height)
|
protected static java.awt.Shape |
getScaledDefaultTrajectory(int height)
|
int |
getTrailLength()
Gets length of trail in number of points. |
java.awt.Shape |
getTrajectory()
Gets current trajectory. |
static java.awt.geom.Point2D.Float |
getXY(float t,
java.awt.geom.Point2D.Float begin,
java.awt.geom.Point2D.Float ctrl,
java.awt.geom.Point2D.Float end)
Calculates relative position of the point on the quad curve in time t<0,1>. |
protected void |
init(java.awt.Shape point,
java.awt.Shape trajectory,
java.awt.Color baseColor,
java.awt.Color highlightColor)
Initializes painter to provided shapes and default colors. |
protected java.awt.Shape |
provideShape(java.awt.Graphics2D g,
T comp,
int width,
int height)
|
void |
setBaseColor(java.awt.Color baseColor)
Sets new base color. |
void |
setDirection(JXBusyLabel.Direction dir)
Sets new spinning direction. |
void |
setFrame(int frame)
Sets current frame. |
void |
setHighlightColor(java.awt.Color highlightColor)
Sets new highlight color. |
void |
setPaintCentered(boolean paintCentered)
Centers shape in the area covered by the painter. |
void |
setPoints(int points)
Sets total amount of points in spinner. |
void |
setPointShape(java.awt.Shape pointShape)
Sets new point shape. |
void |
setTrailLength(int trailLength)
Sets length of the trail in points. |
void |
setTrajectory(java.awt.Shape trajectory)
Sets new trajectory. |
Methods inherited from class org.jdesktop.swingx.painter.AbstractPainter |
---|
clearCache, configureGraphics, getFilters, getInterpolation, isAntialiasing, isCacheable, isDirty, isVisible, paint, setAntialiasing, setCacheable, setDirty, setFilters, setInterpolation, setVisible, shouldUseCache, validate |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BusyPainter()
public BusyPainter(int height)
height
- Painter height.public BusyPainter(java.awt.Shape point, java.awt.Shape trajectory)
point
- Point shape.trajectory
- Trajectory shape.Method Detail |
---|
protected static java.awt.Shape getScaledDefaultTrajectory(int height)
protected static java.awt.Shape getScaledDefaultPoint(int height)
protected void init(java.awt.Shape point, java.awt.Shape trajectory, java.awt.Color baseColor, java.awt.Color highlightColor)
point
- Point shape.trajectory
- Trajectory shape.protected void doPaint(java.awt.Graphics2D g, T t, int width, int height)
AbstractPainter
doPaint
in class AbstractPainter<T>
g
- The Graphics2D object in which to paintpublic static java.awt.geom.Point2D.Float getXY(float t, java.awt.geom.Point2D.Float begin, java.awt.geom.Point2D.Float ctrl, java.awt.geom.Point2D.Float end)
t
- distance on the curvectrl
- Control point in rel coordsend
- End point in rel coords
public int getFrame()
public void setFrame(int frame)
frame
- Current frame.public java.awt.Color getBaseColor()
public void setBaseColor(java.awt.Color baseColor)
baseColor
- Base color.public java.awt.Color getHighlightColor()
public void setHighlightColor(java.awt.Color highlightColor)
highlightColor
- New highlight color.public int getPoints()
public void setPoints(int points)
points
- Total amount of points.public int getTrailLength()
public void setTrailLength(int trailLength)
trailLength
- Trail length in points.public final java.awt.Shape getPointShape()
public final void setPointShape(java.awt.Shape pointShape)
pointShape
- new Shape.public final java.awt.Shape getTrajectory()
public final void setTrajectory(java.awt.Shape trajectory)
trajectory
- New trajectory.public void setDirection(JXBusyLabel.Direction dir)
dir
- Spinning direction.public JXBusyLabel.Direction getDirection()
protected java.awt.Shape provideShape(java.awt.Graphics2D g, T comp, int width, int height)
public void setPaintCentered(boolean paintCentered)
paintCentered
- Centering hint.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |