DESY ACOP Beans Home

com.cosylab.gui.components
Class Gauger

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JPanel
                  extended by com.cosylab.gui.components.Gauger
All Implemented Interfaces:
StateOriginator, TickParameters, PopupManageable, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible

public class Gauger
extends javax.swing.JPanel
implements TickParameters, PopupManageable, StateOriginator

Gauger is a visual component that displays a value on a scale between minimum and maximum. Shape and visual layout of the component will change to best fit into the available space. Behaviour of the scale can be adjusted to fixed (lower and upper bound cannot change), constant span (scale will always span fixed ammount) or rescaling (lower and upper bound will adjust to accomodate current value). Supported scales are linear and logarithmic.

For accurate readouts, the currently set value is also displayed in custom formatted label.

Gauger is aimed to provide fastest possible response to value changes.

Version:
$id$
Author:
Ales Pucelj
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JPanel
javax.swing.JPanel.AccessibleJPanel
 
Nested classes/interfaces inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Nested classes/interfaces inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
static int CONSTANT_SPAN
          Deprecated. replaced by ShiftValuePolicy
static int FIXED_SCALE
          Deprecated. replaced by TrimValuePolicy
protected  Needle needle
           
static int STRETCH_SCALE
          Deprecated. replaced by RescalingValuePolicy
protected  RangedValueController userRangedValue
           
 
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
Gauger()
          Creates a new gauger and sets the default parameters.
 
Method Summary
 java.lang.String formatNumber(double x)
          Formats the input value to a specific print format.
 java.awt.Color getAlarmColor()
          Returns the color which indicates the alarm status.
 AbstractCustomizerPanel getCustomizer()
          Returns the Customizer intance for this displayer.
 java.lang.String getFormat()
          Returns format of value label.
 double getHighAlarmLimit()
          Returns the high alarm limit.
 double getHighWarningLimit()
          Returns the high warning limit.
 double getLowAlarmLimit()
          Returns the low alarm limit.
 double getLowWarningLimit()
          Returns the low warning limit.
 double getMaximum()
          Returns the current maximum value of the scale.
 double getMinimum()
          Returns the current minimum value of the scale.
protected  Needle getNeedle()
          Returns needle renderer.
 java.awt.Color getNeedleColor()
          Returns the color of the needle.
 java.awt.Color getOutOfBoundsColor()
          Returns the color which indicates out of bounds status.
 PopupManager getPopupManager()
          Returns popup manager for adding popup actions.
 RangedValueController getRangedValue()
          Returns RangedValueController.
 java.awt.Color getScaleColor()
          Returns color of scale background.
 int getScaleMode()
          Deprecated. use getValuePolicy()
 State getState()
          Will be called by the StateKeeper in the process of the application state saving.
 Tick[] getTicks()
          Returns the information about the scale ticks.
 java.awt.Font getTickTextFont()
          Returns font used to display tick labels.
protected  java.lang.String getTitle()
          Returns the title of this widget.
protected  int getTitleMaximumFontSize()
          Returns the maximum allowed font size of the title.
protected  int getTitleMinimumFontSize()
          Returns the minimum allowed font size of the title.
 ScaleTransform getTransform()
          Returns current transform used to render the scale.
 java.lang.String getUnits()
          Returns units string of value label.
 double getValue()
          Returns the current value of the scale.
protected  ValueLabel getValueLabel()
          Gets the instance of the value label used to display current value.
 java.awt.Font getValueLabelFont()
          Returns font for value label.
 RangedValuePolicy getValuePolicy()
          Returns the RangedValuePolicy.
 java.awt.Color getWarningColor()
          Returns the color which indicates warning status.
 boolean isLinearScale()
          Returns whether the scale is linear.
 boolean isLogarithmicScale()
          Returns whether the scale is logarithmic.
 boolean isPopupEnabled()
          Return true if the popup menu is enabled or false otherwise.
protected  boolean isResizable()
           
protected  boolean isTitleVisible()
          Returns true is title is visible.
 boolean isUnitsVisible()
          Returns unitsVisible of value label.
static void main(java.lang.String[] args)
          Simple test method for gauger.
 int measureTick(double position, java.lang.String text)
          Returns size of tick label when renderer.
protected  void paintComponent(java.awt.Graphics g)
          Paints the component.
 void setAlarmColor(java.awt.Color alarmColor)
          Sets the color which indicates the alarm status.
 void setFormat(java.lang.String format)
          Sets format string of value label.
 void setHighAlarmLimit(double v)
          Sets the high alarm limit.
 void setHighWarningLimit(double v)
          Sets the high warning limit.
 void setLinearScale()
          Sets scale to linear.
 void setLogarithmicScale()
          Sets scale to logarithmic.
 void setLowAlarmLimit(double v)
          Sets the low alarm limit.
 void setLowWarningLimit(double v)
          Sets the low warning limit.
 void setMaximum(double newMax)
          Sets the upper limit for the display.
 void setMinimum(double newMin)
          Sets the lower limit for the display.
 void setNeedleColor(java.awt.Color newNeedleColor)
          Sets the color of the needle.
 void setOutOfBoundsColor(java.awt.Color outOfBoundsColor)
          Sets the color which indicates out of bounds status.
 void setPopupEnabled(boolean enabled)
          Enables or disables the popup menu.
protected  void setResizable(boolean resizable)
           
 void setScaleColor(java.awt.Color newScaleColor)
          Sets color of scale background.
 void setScaleMode(int mode)
          Deprecated. use setValuePolicy(RangedValuePolicy)
 void setState(State state)
          Will be called by the StateKeepr when it reads State object which belongs to this component.
 void setTickTextFont(java.awt.Font tickText)
          Sets the font used to display tick labels.
protected  void setTitle(java.lang.String title)
          Sets the title of this widget.
protected  void setTitleMaximumFontSize(int titleMaximumFontSize)
          Sets the maximum allowed font size of the title.
protected  void setTitleMinimumFontSize(int titleMinimumFontSize)
          Sets the minimum allowed font size of the title.
protected  void setTitleVisible(boolean titleVisible)
          Sets the title visible/invisible.
 void setUnits(java.lang.String units)
          Sets units of value label.
 void setUnitsVisible(boolean b)
          Sets units visible of value label.
 void setValue(double newValue)
          Sets the new value to be displayed on this scale.
 void setValue(double newMin, double newMax, double newVal)
          Sets the value and limits for the displayer.
 void setValueLabelFont(java.awt.Font value)
          Sets font for value label.
 void setValueLabelPosition(java.awt.Point p)
          Sets position of value label.
 void setValuePolicy(RangedValuePolicy policy)
          Sets the RangedValuePolicy.
 void setWarningColor(java.awt.Color warningColor)
          Sets the color which indicates the warning status.
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

FIXED_SCALE

public static final int FIXED_SCALE
Deprecated. replaced by TrimValuePolicy
Fixed limits scale.

See Also:
setScaleMode(int), Constant Field Values

CONSTANT_SPAN

public static final int CONSTANT_SPAN
Deprecated. replaced by ShiftValuePolicy
Constant span scale.

See Also:
setScaleMode(int), Constant Field Values

STRETCH_SCALE

public static final int STRETCH_SCALE
Deprecated. replaced by RescalingValuePolicy
Resizable scale.

See Also:
setScaleMode(int), Constant Field Values

userRangedValue

protected RangedValueController userRangedValue

needle

protected Needle needle
Constructor Detail

Gauger

public Gauger()
Creates a new gauger and sets the default parameters.

Method Detail

setScaleMode

public void setScaleMode(int mode)
Deprecated. use setValuePolicy(RangedValuePolicy)

Sets behaviour of the scale. This can take one of 3 possible modes.

FIXED_SCALE will fix the limits to any value regardless of the actual value displayed by needle. If value displayed is outside limits, it will be limited to either bound.

CONSTANT_SPAN will automatically move the scale based on needle movement. If needle moves outside current limits, they will move in the same direction, but span (maximum-minimum) of the scale will remain unchanged.

STRETCH_SCALE will change only one limit at the time whenever needle moves outside current limits. Scale will not shrink back when needle is within old bounds.

Parameters:
mode - New mode to set.

setValuePolicy

public void setValuePolicy(RangedValuePolicy policy)
Sets the RangedValuePolicy.

Parameters:
policy -
See Also:
setScaleMode(int)

getValuePolicy

public RangedValuePolicy getValuePolicy()
Returns the RangedValuePolicy.

Returns:
See Also:
getScaleMode()

getScaleMode

public int getScaleMode()
Deprecated. use getValuePolicy()

Returns current scale mode. Return value will be one of Gauger.FIXED_SCALE, Gauger.CONSTANT_SPAN or Gauger.STRETCH_SCALE.

Returns:
One of scale mode constants.
See Also:
setScaleMode(int)

getMaximum

public double getMaximum()
Returns the current maximum value of the scale.

Returns:
double

getMinimum

public double getMinimum()
Returns the current minimum value of the scale.

Returns:
double

getNeedle

protected Needle getNeedle()
Returns needle renderer. If needle does not exist, it will be created. This method uses lazy initialization, so setting the needle field to null will cause it to be recreated on next call.

Returns:
Needle needle renderer implementation.

getRangedValue

public RangedValueController getRangedValue()
Returns RangedValueController. This method can be used to gain access to more advanced aspects of RangedValueController Instance returned is not replacable.

Returns:
Instance of RangedValue

getValue

public double getValue()
Returns the current value of the scale. This is the value displayed by the needle. Regardles of the scale, this value is never log based.

Returns:
double

getValueLabel

protected ValueLabel getValueLabel()
Gets the instance of the value label used to display current value.

Returns:
ValueLabel

setFormat

public void setFormat(java.lang.String format)
Sets format string of value label.

Parameters:
format - C-Style format of value label.

getFormat

public java.lang.String getFormat()
Returns format of value label.

Returns:
C-Style format of value label.

setUnits

public void setUnits(java.lang.String units)
Sets units of value label.

Parameters:
units - String to be appended to value label. Can be null.

getUnits

public java.lang.String getUnits()
Returns units string of value label.

Returns:
String representing the units. Can be null.

setUnitsVisible

public void setUnitsVisible(boolean b)
Sets units visible of value label.

Parameters:
b - whether units should be displayed.

isUnitsVisible

public boolean isUnitsVisible()
Returns unitsVisible of value label.

Returns:
true if units are visible

setValue

public void setValue(double newValue)
Sets the new value to be displayed on this scale. In this implementation the value is shown by the needle and value label. The value is adjusted according to the set value policy.

Parameters:
newValue - double

getTicks

public Tick[] getTicks()
Returns the information about the scale ticks. This method is used internaly by renderers

Returns:
Tick[]

getTransform

public ScaleTransform getTransform()
Returns current transform used to render the scale. This transform is selected based on width and height of the component and is used when rendering Gauger.

Returns:
ScaleTransform

setMinimum

public void setMinimum(double newMin)
Sets the lower limit for the display. This value cannot be set above current maximum, it can be however set above current value.

Parameters:
newMin -

setMaximum

public void setMaximum(double newMax)
Sets the upper limit for the display. This value cannot be set below current minimum, it can be however set below current value.

Parameters:
newMax -

setValue

public void setValue(double newMin,
                     double newMax,
                     double newVal)
Sets the value and limits for the displayer.

Parameters:
newMin - New minimum.
newMax - New maximum.
newVal - New value.

setValueLabelPosition

public void setValueLabelPosition(java.awt.Point p)
Sets position of value label.

Parameters:
p - Center point of value label.

paintComponent

protected void paintComponent(java.awt.Graphics g)
Paints the component. This method only paints the gauger from background buffer, which is initialized elsewhere. If neccessary, active elements such as needle and value label are updated as well.

Overrides:
paintComponent in class javax.swing.JComponent
Parameters:
g - Context to paint to.

setLogarithmicScale

public void setLogarithmicScale()
Sets scale to logarithmic.


setLinearScale

public void setLinearScale()
Sets scale to linear.


isLogarithmicScale

public boolean isLogarithmicScale()
Returns whether the scale is logarithmic.

Returns:
True if scale is logarithmic.

isLinearScale

public boolean isLinearScale()
Returns whether the scale is linear.

Returns:
True if scale is linear.

measureTick

public int measureTick(double position,
                       java.lang.String text)
Returns size of tick label when renderer. Return value is ammount in pixels. This is the size of label in the direction along the scale.

Specified by:
measureTick in interface TickParameters
Parameters:
position - relative position of the tick on 0..1.
text - label to display, may be empty string or null.
Returns:
size of tick in pixels.
See Also:
com.cosylab.gui.components.range.TickCallback#measureTick(double, String)

getPopupManager

public PopupManager getPopupManager()
Returns popup manager for adding popup actions.

Specified by:
getPopupManager in interface PopupManageable
Returns:
returns popup manager, which manages popup menu
See Also:
PopupManageable.getPopupManager()

isPopupEnabled

public boolean isPopupEnabled()
Return true if the popup menu is enabled or false otherwise.

Returns:
true if popup is enabled

setPopupEnabled

public void setPopupEnabled(boolean enabled)
Enables or disables the popup menu.

Parameters:
enabled - true if enable or false if disableds

getCustomizer

public AbstractCustomizerPanel getCustomizer()
Returns the Customizer intance for this displayer.

Returns:
the Customizer intance for this displayer

getState

public State getState()
Description copied from interface: StateOriginator
Will be called by the StateKeeper in the process of the application state saving. The component which implements this interface will tipycally use StateFactory to create a State object and fill it with needed values. For example a component can use this snippet.
 
 public State getState() {
        State s = StateFactory.createState();
        s.putDouble("Min", getMinimum());
        s.putDouble("Max", getMaximum());
        s.putString("Format", getFormat());
        s.putString("Units", getUnits());
        return s;
 }
 
 

Specified by:
getState in interface StateOriginator
Returns:
state object

setState

public void setState(State state)
Description copied from interface: StateOriginator
Will be called by the StateKeepr when it reads State object which belongs to this component.

Specified by:
setState in interface StateOriginator
Parameters:
state - object previously created by this component

setTickTextFont

public void setTickTextFont(java.awt.Font tickText)
Sets the font used to display tick labels.

Parameters:
tickText - Font for tick labels.

getTickTextFont

public java.awt.Font getTickTextFont()
Returns font used to display tick labels.

Returns:
Current font for ticks.

getScaleColor

public java.awt.Color getScaleColor()
Returns color of scale background.

Returns:
Color of scale background.

setScaleColor

public void setScaleColor(java.awt.Color newScaleColor)
Sets color of scale background.

Parameters:
newScaleColor - Color of scale background.

getNeedleColor

public java.awt.Color getNeedleColor()
Returns the color of the needle.

Returns:
Color of needle.

setNeedleColor

public void setNeedleColor(java.awt.Color newNeedleColor)
Sets the color of the needle.

Parameters:
newNeedleColor - New color of needle.

getValueLabelFont

public java.awt.Font getValueLabelFont()
Returns font for value label.

Returns:
Font for value label.

setValueLabelFont

public void setValueLabelFont(java.awt.Font value)
Sets font for value label.

Parameters:
value - New font for value label.

setLowWarningLimit

public void setLowWarningLimit(double v)
Sets the low warning limit. The limit should be given in percentage of the current span of the gauger.

Parameters:
v - new low warning limit

getLowWarningLimit

public double getLowWarningLimit()
Returns the low warning limit.

Returns:
low warning limit

setLowAlarmLimit

public void setLowAlarmLimit(double v)
Sets the low alarm limit. The limit should be given in percentage of the current span of the gauger.

Parameters:
v - new low alarm limit.

getLowAlarmLimit

public double getLowAlarmLimit()
Returns the low alarm limit.

Returns:
low alarm limit

setHighWarningLimit

public void setHighWarningLimit(double v)
Sets the high warning limit. The limit should be given in percentage of the current span of the gauger.

Parameters:
v - new high warning limit

getHighWarningLimit

public double getHighWarningLimit()
Returns the high warning limit.

Returns:
high warning limit

setHighAlarmLimit

public void setHighAlarmLimit(double v)
Sets the high alarm limit. The limit should be given in percentage of the current span of the gauger.

Parameters:
v - new high alarm limit

getHighAlarmLimit

public double getHighAlarmLimit()
Returns the high alarm limit.

Returns:
high alarm limit

getAlarmColor

public java.awt.Color getAlarmColor()
Returns the color which indicates the alarm status.

Returns:
the alarmColor.

setAlarmColor

public void setAlarmColor(java.awt.Color alarmColor)
Sets the color which indicates the alarm status.

Parameters:
alarmColor - new alarm color

getOutOfBoundsColor

public java.awt.Color getOutOfBoundsColor()
Returns the color which indicates out of bounds status.

Returns:
the outOfBoundsColor.

setOutOfBoundsColor

public void setOutOfBoundsColor(java.awt.Color outOfBoundsColor)
Sets the color which indicates out of bounds status.

Parameters:
outOfBoundsColor - new out of bounds color

getWarningColor

public java.awt.Color getWarningColor()
Returns the color which indicates warning status.

Returns:
the warningColor.

setWarningColor

public void setWarningColor(java.awt.Color warningColor)
Sets the color which indicates the warning status.

Parameters:
warningColor - new warning color

getTitle

protected java.lang.String getTitle()
Returns the title of this widget.

Returns:

setTitle

protected void setTitle(java.lang.String title)
Sets the title of this widget.

Parameters:
title -

isTitleVisible

protected boolean isTitleVisible()
Returns true is title is visible.

Returns:

setTitleVisible

protected void setTitleVisible(boolean titleVisible)
Sets the title visible/invisible.

Parameters:
titleVisible -

isResizable

protected boolean isResizable()

setResizable

protected void setResizable(boolean resizable)

getTitleMaximumFontSize

protected int getTitleMaximumFontSize()
Returns the maximum allowed font size of the title.

Returns:
title maximum font size

setTitleMaximumFontSize

protected void setTitleMaximumFontSize(int titleMaximumFontSize)
Sets the maximum allowed font size of the title.

Parameters:
titleMaximumFontSize - new maximum font size

getTitleMinimumFontSize

protected int getTitleMinimumFontSize()
Returns the minimum allowed font size of the title.

Returns:
title minimum font size

setTitleMinimumFontSize

protected void setTitleMinimumFontSize(int titleMinimumFontSize)
Sets the minimum allowed font size of the title.

Parameters:
titleMinimumFontSize - new minimum font size

formatNumber

public java.lang.String formatNumber(double x)
Description copied from interface: TickParameters
Formats the input value to a specific print format. If return value is null use internal format specified by the caller of this method.

Specified by:
formatNumber in interface TickParameters
Parameters:
x - double to be formatted
Returns:
formatted value

main

public static void main(java.lang.String[] args)
Simple test method for gauger.

Parameters:
args - String[]


Copyright © 2010. All Rights Reserved.