|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.jidesoft.gauge.Pivot
public class Pivot
A pivot is similar to a DialIntervalMarker, except that it uses a fromAngle and toAngle (specified in degrees) where a DialIntervalMarker is configured by values on the primary axis. After creating a Pivot instance, you must add it to the Dial using the addDrawable() method of the dial. A pivot is usually used for just that - the pivot of a dial - but the class could be used as a decoration elsewhere on the dial.
Constructor Summary | |
---|---|
Pivot(Dial dial,
double radius,
double fromAngle,
double toAngle,
Paint fill)
Create a Pivot on the supplied dial instance that covers a range of angles from the supplied fromAngle to the toAngle, and using the supplied radius as a proportion of the radius of the dial. |
|
Pivot(Dial dial,
double radius,
Paint fill)
Create a circular Pivot on the supplied dial instance using the radius and filled by the supplied fill Paint. |
Method Summary | |
---|---|
void |
draw(Graphics g)
The draw() method of the Drawable that paints the Pivot onto the Graphics context |
protected Point2D |
getCenter()
|
Paint |
getFill()
Returns the Paint fill used for the Pivot |
double |
getFromAngle()
The start angle for the segment of the circle covered by the Pivot |
double |
getInnerRadius()
The inner radius of the segment, specified as a proportion of the radius of the dial |
double |
getOffsetAngle()
|
double |
getOffsetRadius()
|
double |
getOuterRadius()
The outer radius of the segment, specified as a proportion of the radius of the dial |
Color |
getOutlineColor()
The current outline color for the Pivot |
int |
getOutlineWidth()
Returns the width of the outline, in pixels |
double |
getToAngle()
The end angle for the segment of the circle covered by the Pivot |
int |
getZOrder()
Returns the z-order specification for the Pivot |
boolean |
isVisible()
Returns a boolean to indicate whether the Pivot is currently visible |
void |
setFill(Paint fill)
Specify the Paint fill to use for the Pivot |
void |
setFromAngle(double fromAngle)
Specify the start angle for the segment of the circle covered by the Pivot |
void |
setInnerRadius(double innerRadius)
Specifies the inner radius of the segment as a proportion of the radius of the dial |
void |
setOffsetAngle(double offsetAngle)
|
void |
setOffsetRadius(double offsetRadius)
|
void |
setOuterRadius(double outerRadius)
Specifies the outer radius of the segment as a proportion of the radius of the dial |
void |
setOutlineColor(Color outlineColor)
Specify the outline color for the Pivot |
void |
setOutlineWidth(int outlineWidth)
Specify the width of the outline, in pixels |
void |
setToAngle(double toAngle)
Specify the end angle for the segment of the circle covered by the Pivot |
void |
setVisible(boolean visible)
Specify whether the Pivot is to be visible |
void |
setZOrder(int zOrder)
Provide advice to the dial about whether to paint this on top or underneath the needles. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Pivot(Dial dial, double radius, Paint fill)
dial
- the dial to which the Pivot will be addedradius
- the radius of the pivot as a proportion of the radius of the dialfill
- the Paint used to fill the dialpublic Pivot(Dial dial, double radius, double fromAngle, double toAngle, Paint fill)
dial
- the dial instance to which the Pivot will be addedradius
- the radius of the pivot as a proportion of the radius of the dialfromAngle
- the start angle of the pivot circle segment.toAngle
- the end angle of the pivot circle segment.fill
- the Paint used to fill the dialMethod Detail |
---|
public Paint getFill()
public void setFill(Paint fill)
fill
- the Paint fill to use for the Pivotpublic double getFromAngle()
public void setFromAngle(double fromAngle)
fromAngle
- the start angle (in degrees) of the circle segment covered by the Pivotpublic double getInnerRadius()
public void setInnerRadius(double innerRadius)
innerRadius
- the inner radius of the segmentpublic double getOuterRadius()
public void setOuterRadius(double outerRadius)
outerRadius
- the outer radius of the segmentpublic double getToAngle()
public void setToAngle(double toAngle)
toAngle
- the end angle (in degrees) of the circle covered by the Pivotpublic int getZOrder()
getZOrder
in interface ZOrder
setZOrder(int)
public void setZOrder(int zOrder)
setZOrder
in interface ZOrder
zOrder
- a numeric specification for which vertical 'slice' to paint this onpublic Color getOutlineColor()
public void setOutlineColor(Color outlineColor)
outlineColor
- the outline color for the Pivotpublic int getOutlineWidth()
public void setOutlineWidth(int outlineWidth)
outlineWidth
- the width of the outline, in pixelspublic double getOffsetAngle()
public void setOffsetAngle(double offsetAngle)
public double getOffsetRadius()
public void setOffsetRadius(double offsetRadius)
public boolean isVisible()
public void setVisible(boolean visible)
visible
- whether the Pivot is to be visibleprotected Point2D getCenter()
public void draw(Graphics g)
draw()
method of the Drawable
that paints the Pivot onto the Graphics context
draw
in interface Drawable
g
- the Graphics context
|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |