ElegantJ Gauges Java API Specification v1.1

com.elegantj.gauges.thermo
Class Thermometer

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byjava.awt.Panel
              extended bycom.elegantj.gauges.thermo.Thermometer
All Implemented Interfaces:
javax.accessibility.Accessible, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable

public class Thermometer
extends java.awt.Panel
implements java.io.Serializable

This is implemented to represent thermometer specification , such as lowest value, highest value, scale grad and current value .

See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class java.awt.Panel
java.awt.Panel.AccessibleAWTPanel
 
Nested classes inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
protected  int bulbWidth
          Specifies bulb width
 
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
Thermometer(double lo, double hi, double grad, double val)
          Creates a Thermometer with specified minimum, maximum, grad and current values.
 
Method Summary
protected  void drawMeter(java.awt.Graphics g)
          Draws the Thermometer with mercury
 java.awt.Color getBulbColor()
          Gets the bulb color
 int getBulbWidth()
          Gets the bulb width
 java.awt.Font getCaptionFont()
          Gets the caption font
 double getMaximum()
          Gets the maximum value that the meter can indicate
 double getMinimum()
          Gets the minimum value that the meter can indicate
 double getMinorTick()
          Gets the minor tick spacing of thermometer indicator
 java.awt.Font getNumbersFont()
          Gets the numbers font
 java.awt.Color getPanelColor()
          Gets the panel color
 double getScaleGrad()
          Gets the scale grading value
 double getValue()
          Gets the value that the meter is indicating
 int getWidthIndicator()
          Gets the width of the mercury indicator
 void paint(java.awt.Graphics g)
          Paints the meter on the foreground
 void setBulbColor(java.awt.Color theColor1)
          Sets the bulb color
 void setBulbWidth(int nValue)
          Sets the bulb width
 void setCaption(java.lang.String theCaption)
          Sets the caption
 void setCaptionFont(java.awt.Font theFont)
          Sets the font of the caption
 void setMaximum(double hVal)
          Sets the maximum value that the meter can indicate
 void setMinimum(double lVal)
          Sets the minimum value that the meter can indicate
 void setMinorTick(double sGrad)
          Sets the thermometer indicator's minor tick spacing
 void setNumbersFont(java.awt.Font theFont)
          Sets the font of the numbers
 void setPanelColor(java.awt.Color theColor)
          Sets the panel color
 void setRange(int theMinimum, int theMaximum)
          Sets the valid range of the meter
 void setScaleGrad(double sGrad)
          Sets the scaling values of gradient
 void setValue(double theValue)
          Sets the value that meter should indicate
 void setWidthIndicator(int theValue)
          Sets the width of the mercury indicator
 void update(java.awt.Graphics g)
          Redefines inherited method to exclude screen clear
 
Methods inherited from class java.awt.Panel
addNotify, getAccessibleContext
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, paramString, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, removeNotify, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setFont, 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, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, 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

bulbWidth

protected int bulbWidth
Specifies bulb width

Constructor Detail

Thermometer

public Thermometer(double lo,
                   double hi,
                   double grad,
                   double val)
Creates a Thermometer with specified minimum, maximum, grad and current values.

Parameters:
lo - lowest value the thermometer can indicate
hi - highest value the thermometer can indicate
grad - graduations in which scale is marked
val - initial value
Method Detail

drawMeter

protected void drawMeter(java.awt.Graphics g)
Draws the Thermometer with mercury


setRange

public void setRange(int theMinimum,
                     int theMaximum)
Sets the valid range of the meter

Parameters:
theMinimum - lowest value the meter can indicate
theMaximum - highest value the meter can indicate

setValue

public void setValue(double theValue)
Sets the value that meter should indicate

Parameters:
theValue - the new value of the meter

setWidthIndicator

public void setWidthIndicator(int theValue)
Sets the width of the mercury indicator


getWidthIndicator

public int getWidthIndicator()
Gets the width of the mercury indicator

Returns:
the indicator width

setMinimum

public void setMinimum(double lVal)
Sets the minimum value that the meter can indicate


setMaximum

public void setMaximum(double hVal)
Sets the maximum value that the meter can indicate


getMinimum

public double getMinimum()
Gets the minimum value that the meter can indicate

Returns:
the lowest value

getMaximum

public double getMaximum()
Gets the maximum value that the meter can indicate

Returns:
the highest value

getValue

public double getValue()
Gets the value that the meter is indicating

Returns:
the current value

setPanelColor

public void setPanelColor(java.awt.Color theColor)
Sets the panel color

Parameters:
theColor - panel color

getPanelColor

public java.awt.Color getPanelColor()
Gets the panel color

Returns:
panel color

setBulbColor

public void setBulbColor(java.awt.Color theColor1)
Sets the bulb color


getBulbColor

public java.awt.Color getBulbColor()
Gets the bulb color

Returns:
bulb color

setCaption

public void setCaption(java.lang.String theCaption)
Sets the caption

Parameters:
theCaption - the caption string of thermometer

setCaptionFont

public void setCaptionFont(java.awt.Font theFont)
Sets the font of the caption

Parameters:
theFont - the font style of the caption string

getCaptionFont

public java.awt.Font getCaptionFont()
Gets the caption font

Returns:
the font style of the caption string

setNumbersFont

public void setNumbersFont(java.awt.Font theFont)
Sets the font of the numbers

Parameters:
theFont - the font style of the numbers string

getNumbersFont

public java.awt.Font getNumbersFont()
Gets the numbers font

Returns:
the font style of the numbers string

setMinorTick

public void setMinorTick(double sGrad)
Sets the thermometer indicator's minor tick spacing

Parameters:
sGrad - the minor tick spacing

getMinorTick

public double getMinorTick()
Gets the minor tick spacing of thermometer indicator

Returns:
the minor tick spacing

setBulbWidth

public void setBulbWidth(int nValue)
Sets the bulb width

Parameters:
nValue - the bulb width

getBulbWidth

public int getBulbWidth()
Gets the bulb width

Returns:
the bulb width

setScaleGrad

public void setScaleGrad(double sGrad)
Sets the scaling values of gradient

Parameters:
sGrad - indicates the grading values.

getScaleGrad

public double getScaleGrad()
Gets the scale grading value

Returns:
the graded value

paint

public void paint(java.awt.Graphics g)
Paints the meter on the foreground


update

public void update(java.awt.Graphics g)
Redefines inherited method to exclude screen clear


ElegantJ Gauges Java API Specification v1.1

Submit a bug or feature

Copyright(c)
Elegant Microweb Technologies Pvt. Ltd.
www.elegantmicroweb.com
www.elegantjcharts.com
All Rights Reserved.