com.jidesoft.gauge
Class DialValueMarker
java.lang.Object
com.jidesoft.gauge.DialValueMarker
- All Implemented Interfaces:
- Drawable
public class DialValueMarker
- extends Object
- implements Drawable
A class to use as a marker for a value on a dial. The position property marks the value along the dial axis
at which the marker appears. For the shape of the marker use the MarkerShape enum, or some other custom
implementation of the MarkerShapeFactory interface.
You can fill the marker with a plain color or a Paint. Paint patterns are not rotated (but the shapes that they
fill are rotated according to their position on the dial axis), so you might consider
using a DialRadialPaint to highlight the tip of a triangular marker.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DialValueMarker
public DialValueMarker(Dial dial)
DialValueMarker
public DialValueMarker(Dial dial,
double position,
double radius)
getDial
public Dial getDial()
setDial
public void setDial(Dial dial)
getPosition
public double getPosition()
setPosition
public void setPosition(double position)
getRadius
public double getRadius()
setRadius
public void setRadius(double radius)
getFill
public Paint getFill()
setFill
public void setFill(Paint fill)
getBorderColor
public Color getBorderColor()
setBorderColor
public void setBorderColor(Color borderColor)
getBorderStroke
public Stroke getBorderStroke()
setBorderStroke
public void setBorderStroke(Stroke borderStroke)
getHeight
public double getHeight()
setHeight
public void setHeight(double height)
getWidth
public double getWidth()
setWidth
public void setWidth(double width)
setSize
public void setSize(double size)
- Simultaneously set the width and height to be the same. Good for circles and equilateral triangles
- Parameters:
size
- the size of the shape as a proportion of the radius of the dial
getShape
public MarkerShapeFactory getShape()
setShape
public void setShape(MarkerShapeFactory shapeFactory)
draw
public void draw(Graphics g)
- Description copied from interface:
Drawable
- Draw the object implementing this interface onto the supplied Graphics context
- Specified by:
draw
in interface Drawable
- Parameters:
g
- the Graphics context