JIDE 3.5.15

com.jidesoft.gauge
Class DialValueMarker

java.lang.Object
  extended by 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.


Constructor Summary
DialValueMarker(Dial dial)
           
DialValueMarker(Dial dial, double position, double radius)
           
 
Method Summary
 void draw(Graphics g)
          Draw the object implementing this interface onto the supplied Graphics context
 Color getBorderColor()
           
 Stroke getBorderStroke()
           
 Dial getDial()
           
 Paint getFill()
           
 double getHeight()
           
 double getPosition()
           
 double getRadius()
           
 MarkerShapeFactory getShape()
           
 double getWidth()
           
 void setBorderColor(Color borderColor)
           
 void setBorderStroke(Stroke borderStroke)
           
 void setDial(Dial dial)
           
 void setFill(Paint fill)
           
 void setHeight(double height)
           
 void setPosition(double position)
           
 void setRadius(double radius)
           
 void setShape(MarkerShapeFactory shapeFactory)
           
 void setSize(double size)
          Simultaneously set the width and height to be the same.
 void setWidth(double width)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DialValueMarker

public DialValueMarker(Dial dial)

DialValueMarker

public DialValueMarker(Dial dial,
                       double position,
                       double radius)
Method Detail

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

JIDE 3.5.15