public class JThermometer extends javax.swing.JPanel implements java.io.Serializable
javax.swing.JPanel.AccessibleJPaneljavax.swing.JComponent.AccessibleJComponentlistenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW| Constructor and Description |
|---|
JThermometer()
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addSubtitle(java.lang.String subtitle)
Adds a subtitle to the chart.
|
void |
addSubtitle(java.lang.String subtitle,
java.awt.Font font)
Adds a subtitle to the chart.
|
void |
addSubtitle(Title subtitle)
Adds a subtitle to the chart.
|
void |
changeTickFontSize(int delta)
Increases or decreases the tick font size.
|
int |
getShowAxisLocation()
Returns the location for the axis.
|
java.awt.Font |
getTickLabelFont()
Returns the tick label font.
|
java.lang.Number |
getValue()
Returns the value of the thermometer.
|
void |
setBackground(java.awt.Color bg)
Sets the background color.
|
void |
setFollowDataInSubranges(boolean flag)
Sets the flag that controls whether or not the display range follows the
data value.
|
void |
setForeground(java.awt.Color fg)
Sets the foreground color.
|
void |
setOutlinePaint(java.awt.Paint p)
Sets the outline paint.
|
void |
setRange(double lower,
double upper)
Sets the lower and upper bounds for the thermometer.
|
void |
setShowAxisLocation(int location)
Sets the location for the axis.
|
void |
setShowValueLines(boolean b)
Sets the flag that controls whether or not value lines are displayed.
|
void |
setSubrangeInfo(int range,
double displayLow,
double displayHigh)
Sets the range.
|
void |
setSubrangeInfo(int range,
double rangeLow,
double rangeHigh,
double displayLow,
double displayHigh)
Sets the range.
|
void |
setTickFontStyle(int style)
Sets the tick font style.
|
void |
setTickLabelFont(java.awt.Font font)
Sets the tick label font.
|
void |
setUnits(int i)
Sets the unit type.
|
void |
setValue(double value)
Sets the value of the thermometer.
|
void |
setValue(java.lang.Number value)
Sets the value of the thermometer.
|
void |
setValueFont(java.awt.Font f)
Sets the value font.
|
void |
setValueFormat(java.text.DecimalFormat df)
Sets the value format for the thermometer.
|
void |
setValueLocation(int loc)
Sets the location at which the temperature value is displayed.
|
void |
setValuePaint(java.awt.Paint paint)
Sets the value paint.
|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUIaddAncestorListener, 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, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, 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, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, updateadd, 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, transferFocusDownCycle, validate, validateTreeaction, 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, 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, transferFocusBackward, transferFocusUpCyclepublic JThermometer()
public void addSubtitle(Title subtitle)
subtitle - the subtitle.public void addSubtitle(java.lang.String subtitle)
subtitle - the subtitle.public void addSubtitle(java.lang.String subtitle, java.awt.Font font)
subtitle - the subtitle.font - the subtitle font.public void setValueFormat(java.text.DecimalFormat df)
df - the formatter.public void setRange(double lower, double upper)
lower - the lower bound.upper - the upper bound.public void setSubrangeInfo(int range, double displayLow, double displayHigh)
range - the range type.displayLow - the low value.displayHigh - the high value.public void setSubrangeInfo(int range, double rangeLow, double rangeHigh, double displayLow, double displayHigh)
range - the range type.rangeLow - the low value for the range.rangeHigh - the high value for the range.displayLow - the low value for display.displayHigh - the high value for display.public void setValueLocation(int loc)
loc - the location.public void setValuePaint(java.awt.Paint paint)
paint - the paint.public java.lang.Number getValue()
public void setValue(double value)
value - the value.public void setValue(java.lang.Number value)
value - the value.public void setUnits(int i)
i - the unit type.public void setOutlinePaint(java.awt.Paint p)
p - the paint.public void setForeground(java.awt.Color fg)
setForeground in class javax.swing.JComponentfg - the foreground color.public void setBackground(java.awt.Color bg)
setBackground in class javax.swing.JComponentbg - the background color.public void setValueFont(java.awt.Font f)
f - the font.public java.awt.Font getTickLabelFont()
public void setTickLabelFont(java.awt.Font font)
font - the font.public void changeTickFontSize(int delta)
delta - the change in size.public void setTickFontStyle(int style)
style - the style.public void setFollowDataInSubranges(boolean flag)
flag - the new value of the flag.public void setShowValueLines(boolean b)
b - the new flag value.public void setShowAxisLocation(int location)
location - the location.public int getShowAxisLocation()