ElegantJ Gauges Java API Specification v1.1

com.elegantj.gauges.thermo
Class ThermometerGauge

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

public class ThermometerGauge
extends java.awt.Panel
implements java.io.Externalizable

This bean represents the demo of thermometer and is implemented as a bean component. A visual component displays an indicating data value within the specified range of values.

This bean provides powerful designing aspects by providing following user friendly properties
Name the name of the gauge
Caption the caption of the gauge
Maximum the maximum value of the thermometer
Minimum the minimum value of the thermometer
CaptionFont represents the font which is used to display the caption
NumberFont represents the font which is used to display the number
PanelColor represents the color of the background panel under which this bean resides
BulbColor represents the color of the bulb which is used to display the value of the gauge
IndicatorWidth represents the width of the thermometer value indicator
MajorTick represents the basic scale system
MinorTick represents the sub scale system

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
 com.elegantj.editors.C1 c1
           
 
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
ThermometerGauge()
          Creates a ThermometerGauge
 
Method Summary
 void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
          Add a PropertyChangeListener to the listener list.
protected  void firePropertyChange(java.lang.String propertyName, java.lang.Object oldValue, java.lang.Object newValue)
          Support for reporting bound property This method can be called when a bound property has changed and it will send the appropriate PropertyChangeEvent to any registered PropertyChangeListeners.
 java.awt.Color getBulbColor()
          Gets the bulb color
 java.lang.String getCaption()
          Gets the caption string of the thermometer
 java.awt.Font getCaptionFont()
          Gets the font of the caption
 int getIndicatorWidth()
          Gets the thermometer indicator's width value
 java.lang.String getLicenseKey()
          Gets the license key
 java.util.Locale getLocale()
          Returns the value of locale.
 double getMajorTick()
          Gets the major tick spacing of thermometer indicator
 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.lang.String getName()
          Gets the name or the handle of the object
 java.awt.Font getNumbersFont()
          Gets the font of the numbers
 java.awt.Color getPanelColor()
          Gets the panel color
 java.awt.Dimension getPreferredSize()
          Gets the preferred size of this bean.
 double getValue()
          Gets the current indicative value of the thermometer
 boolean isFocusTraversable()
          Returns the value of a flag that indicates whether this component can be traversed using Tab or Shift-Tab keyboard focus traversal.
 boolean isLightweight()
          Returns true if this Component is displayable
 void readExternal(java.io.ObjectInput in)
           
 void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
          Remove a PropertyChangeListener from the listener list.
 void setBackground(java.awt.Color c)
          Sets the Background color.
 void setBounds(int x, int y, int width, int height)
          Moves and resizes this bean.
 void setBulbColor(java.awt.Color theColor1)
          Sets the bulb color
 void setCaption(java.lang.String s)
          Sets the caption of the for the thermometer gauge
 void setCaptionFont(java.awt.Font f)
          Sets the font of the caption
 void setCursor(java.awt.Cursor c)
          Sets value of the cursor.
 void setEnabled(boolean b)
          sets Enablity.
 void setFont(java.awt.Font f)
          Sets the font.
 void setForeground(java.awt.Color c)
          Sets the Foreground color.
 void setIndicatorWidth(int nValue)
          Sets the thermometer indicator's width value and refreshes the entire thermometer
 void setLicenseKey(java.lang.String key)
          Sets the license key
 void setLocale(java.util.Locale l)
          Sets value of the locale.
 void setMajorTick(double sGrad)
          Sets the thermometer indicator's major tick spacing
 void setMaximum(double max)
          Sets the maximum value of the gauge for each zone
 void setMinimum(double min)
          Sets the minimum value of the gauge for each zone
 void setMinorTick(double sGrad)
          Sets the thermometer indicator's minor tick spacing
 void setName(java.lang.String s)
          Sets the name or the handle of the object
 void setNumbersFont(java.awt.Font f)
          Sets the font of the numbers
 void setPanelColor(java.awt.Color theColor)
          Sets the panel color
 void setValue(double val)
          Sets the current indicative value of the thermometer
 void setVisible(boolean b)
          sets Visiblity.
 void writeExternal(java.io.ObjectOutput out)
           
 
Methods inherited from class java.awt.Panel
addNotify, getAccessibleContext
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners, getMaximumSize, getMinimumSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, paramString, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, removeNotify, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setLayout, transferFocusBackward, transferFocusDownCycle, update, 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, getBackground, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFontSet, isForegroundSet, 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, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBounds, setComponentOrientation, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocation, setLocation, 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

c1

public transient com.elegantj.editors.C1 c1
Constructor Detail

ThermometerGauge

public ThermometerGauge()
Creates a ThermometerGauge

Method Detail

setLicenseKey

public void setLicenseKey(java.lang.String key)
Sets the license key

Parameters:
key - the license key

getLicenseKey

public java.lang.String getLicenseKey()
Gets the license key

Returns:
the license key

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

setMajorTick

public void setMajorTick(double sGrad)
Sets the thermometer indicator's major tick spacing

Parameters:
sGrad - the major tick spacing

getMajorTick

public double getMajorTick()
Gets the major tick spacing of thermometer indicator

Returns:
the major tick spacing

setIndicatorWidth

public void setIndicatorWidth(int nValue)
Sets the thermometer indicator's width value and refreshes the entire thermometer

Parameters:
nValue - the indicator width

getIndicatorWidth

public int getIndicatorWidth()
Gets the thermometer indicator's width value

Returns:
the indicator width 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:
the 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:
the bulb color

setCaptionFont

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

Parameters:
f - the caption font style

getCaptionFont

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

Returns:
the caption font style

setNumbersFont

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

Parameters:
f - the numbers font style

getNumbersFont

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

Returns:
the numbers font style

setName

public void setName(java.lang.String s)
Sets the name or the handle of the object

Parameters:
s - the name of this bean

getName

public java.lang.String getName()
Gets the name or the handle of the object

Returns:
the name of this bean

setCaption

public void setCaption(java.lang.String s)
Sets the caption of the for the thermometer gauge

Parameters:
s - the caption string

getCaption

public java.lang.String getCaption()
Gets the caption string of the thermometer

Returns:
String type specifies the caption string of the object

setValue

public void setValue(double val)
Sets the current indicative value of the thermometer

Parameters:
val - the current value

getValue

public double getValue()
Gets the current indicative value of the thermometer

Returns:
the current value

setMinimum

public void setMinimum(double min)
Sets the minimum value of the gauge for each zone

Parameters:
min - the minimum value.

setMaximum

public void setMaximum(double max)
Sets the maximum value of the gauge for each zone

Parameters:
max - the maximum value.

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

setBounds

public void setBounds(int x,
                      int y,
                      int width,
                      int height)
Moves and resizes this bean. The new location of the top-left corner is specified by x and y, and the new size is specified by width and height.

Parameters:
x - x-coordinate of this bean.
y - y-coordinate of this bean.
width - the new width of this bean.
height - the new height of this bean.

setForeground

public void setForeground(java.awt.Color c)
Sets the Foreground color.


setBackground

public void setBackground(java.awt.Color c)
Sets the Background color.


setFont

public void setFont(java.awt.Font f)
Sets the font.


setVisible

public void setVisible(boolean b)
sets Visiblity.

Parameters:
b - flag representing visibility of bean.

setEnabled

public void setEnabled(boolean b)
sets Enablity.

Parameters:
b - flag representing enability of bean.

setLocale

public void setLocale(java.util.Locale l)
Sets value of the locale.

Parameters:
l - current value of the locale.

getLocale

public java.util.Locale getLocale()
Returns the value of locale.

Returns:
the current value of locale

setCursor

public void setCursor(java.awt.Cursor c)
Sets value of the cursor.

Parameters:
c - current value of the cursor.

isFocusTraversable

public boolean isFocusTraversable()
Returns the value of a flag that indicates whether this component can be traversed using Tab or Shift-Tab keyboard focus traversal.

Returns:
true if this component is focus-traverable, false otherwise.

isLightweight

public boolean isLightweight()
Returns true if this Component is displayable

Returns:
true if this component has a lightweight peer; false if it has a native peer or no peer.

getPreferredSize

public java.awt.Dimension getPreferredSize()
Gets the preferred size of this bean.

Returns:
a dimension object indicating this bean's preferred size.

addPropertyChangeListener

public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Add a PropertyChangeListener to the listener list. The listener is registered for all properties.

A PropertyChangeEvent will get fired in response to an explicit setFont, setBackground, or SetForeground on the current component. Note that if the current component is inheriting its foreground, background, or font from its container, then no event will be fired in response to a change in the inherited property. If listener is null, no exception is thrown and no action is performed.

Parameters:
listener - The PropertyChangeListener to be added

removePropertyChangeListener

public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Remove a PropertyChangeListener from the listener list. This removes a PropertyChangeListener that was registered for all properties. If listener is null, no exception is thrown and no action is performed.

Parameters:
listener - The PropertyChangeListener to be removed

firePropertyChange

protected void firePropertyChange(java.lang.String propertyName,
                                  java.lang.Object oldValue,
                                  java.lang.Object newValue)
Support for reporting bound property This method can be called when a bound property has changed and it will send the appropriate PropertyChangeEvent to any registered PropertyChangeListeners.


writeExternal

public void writeExternal(java.io.ObjectOutput out)
                   throws java.io.IOException
Specified by:
writeExternal in interface java.io.Externalizable
Throws:
java.io.IOException

readExternal

public void readExternal(java.io.ObjectInput in)
                  throws java.io.IOException,
                         java.lang.ClassNotFoundException
Specified by:
readExternal in interface java.io.Externalizable
Throws:
java.io.IOException
java.lang.ClassNotFoundException

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.