|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.swfm.mica.core.MiPart
com.swfm.mica.core.MiContainer
com.swfm.mica.layouts.MiLayout
com.swfm.mica.core.MiVisibleContainer
com.swfm.mica.widgets.MiWidget
com.swfm.mica.widgets.MiAdjuster
com.swfm.mica.widgets.MiSlider
com.swfm.mica.widgets.MiGauge
A MiGauge is a vertical or horizontally oriented thermometer-like widget that is usually used to display a percentage of some quantity.
The 'fluid' filling the gauge can either be solid or seperate 'LED' like rectangles. The spacing between LEDs is controlled by the alley spacing (see MiLayout#setAlleySpacing);
The size of the LED rectangles when there are multiple LEDs is determined by the length of this gauge, the number of LEDs, and the alley spacing.
| Field Summary | |
static java.lang.String |
Mi_GAUGE_PROTOTYPE_CLASS_NAME
|
| Constructor Summary | |
MiGauge()
Constructs a new MiGauge. |
|
MiGauge(int orientation)
Constructs a new MiGauge with the given orientation. |
|
| Method Summary | |
static MiWidget |
create()
Creates a new widget from the prototype. |
int |
drag(MiEvent event)
Handles the user 'dragging' on the gauge when changing the value. |
MiPart |
getLabel()
Gets the label. |
MiPart |
getLED()
Gets the MiPart that is used to draw the 'LEDs' (i.e. |
int |
getNumberOfLEDs()
Gets the number of 'LEDs' along the length of this gauge. |
boolean |
getPartialLEDsAreOK()
Gets whether partial LEDs can be drawn or just full size LEDs. |
static MiWidget |
getPrototype()
Gets the prototype that is to be copied when the #create method is called and to have it's attributes and handlers copied whenever any widget of this type is created. |
boolean |
isPercentage()
Gets whether the label, if any, displays the percentage or current values. |
void |
setIsPercentage(boolean flag)
Sets whether the label, if any, displays the percentage or current values. |
void |
setLabel(MiPart label)
Sets the label. |
void |
setLED(MiPart part)
Sets the MiPart that is used to draw the 'LEDs' (i.e. |
void |
setNormalizedValue(double value)
Sets the value of this MiGauge. |
void |
setNumberOfLEDs(int number)
Sets the number of 'LEDs' along the length of this gauge. |
void |
setPartialLEDsAreOK(boolean flag)
Sets whether partial LEDs can be drawn or just full size LEDs. |
static void |
setPrototype(MiGauge p)
Sets the prototype that is to be copied when the #create method is called and to have it's attributes and handlers copied whenever any widget of this type is created. |
| Methods inherited from class com.swfm.mica.widgets.MiSlider |
adjustValueFromVector, calcMinimumSize, calcPreferredSize, getNormalizedLengthOfThumb, getOrientation, getSlotWidth, getThumb, getThumbWidth, getValue, layoutParts, moveOneChunkTowardsLocation, refreshLookAndFeel, setNormalizedLengthOfThumb, setNormalizedPositionOfThumb, setOrientation, setPrototype, setSlotWidth, setThumb, setThumbWidth, setValue, setValueFromLocation |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface com.swfm.mica.layouts.MiiLayout |
getMinimumSize, getPreferredSize, invalidateLayout |
| Field Detail |
public static final java.lang.String Mi_GAUGE_PROTOTYPE_CLASS_NAME
| Constructor Detail |
public MiGauge()
public MiGauge(int orientation)
orientation - Mi_HORIZONTAL or Mi_VERTICAL| Method Detail |
public static MiWidget create()
setPrototype(com.swfm.mica.widgets.MiGauge)public void setLabel(MiPart label)
setIsPercentage(boolean),
MiAdjuster.setMinimumValue(double),
MiAdjuster.setMaximumValue(double)public MiPart getLabel()
public void setNumberOfLEDs(int number)
number - the number of LEDS (must be >= 1).
java.lang.IllegalArgumentException - if number < 1public int getNumberOfLEDs()
public void setIsPercentage(boolean flag)
flag - true if to display the percentagepublic boolean isPercentage()
public MiPart getLED()
public void setLED(MiPart part)
part - the LEDpublic void setPartialLEDsAreOK(boolean flag)
flag - true if partially drawn LEDs are OKpublic boolean getPartialLEDsAreOK()
public static void setPrototype(MiGauge p)
p - the new prototypegetPrototype(),
create(),
MiPart.copy()public static MiWidget getPrototype()
setPrototype(com.swfm.mica.widgets.MiGauge),
create(),
MiPart.copy()public void setNormalizedValue(double value)
setNormalizedValue in interface MiiAdjustersetNormalizedValue in class MiSlidervalue - the value (between 0.0 and 1.0)MiAdjuster.setCurrentValue(double)public int drag(MiEvent event)
drag in interface MiiDraggabledrag in class MiSliderevent - the drag event
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||