com.jidesoft.gauge
Class DialIndicator
java.lang.Object
com.jidesoft.gauge.DialIndicator
- All Implemented Interfaces:
- Drawable, ZOrder
public class DialIndicator
- extends Object
- implements Drawable, ZOrder
An indicator lamp with either an 'on' (or active) state or an 'off' (inactive) state.
You can specify the colour of the lamp and appropriate gradient fills are calculated to give a glassy
appearance to the lamp.
Constructor Summary |
DialIndicator(Dial dial,
float size,
float radius,
float angle,
Color color)
Creates a DialIndicator |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DialIndicator
public DialIndicator(Dial dial,
float size,
float radius,
float angle,
Color color)
- Creates a DialIndicator
- Parameters:
dial
- the dial to which this DialIndicator will be addedsize
- the size of the indicator as a proportion of the radius of the dialradius
- the offset radius from the pivot point of the dial (for positioning the indicator)angle
- the offset angle from the pivot point of the dial (for positioning the indicator)color
- the color of the indicator when switched off
getZOrder
public int getZOrder()
- Specified by:
getZOrder
in interface ZOrder
setZOrder
public void setZOrder(int zOrder)
- Specified by:
setZOrder
in interface ZOrder
isActive
public boolean isActive()
setActive
public void setActive(boolean active)
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