JBCSolutions - JbcBeans v1.5

This document is the API specification for the JbcBeans, version 1.5


jbc.beans
Class JbcNeedleIndicator

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by jbc.beans.JbcNeedleIndicator
All Implemented Interfaces:
java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable
Direct Known Subclasses:
JbcNeedleGauge

public class JbcNeedleIndicator
extends javax.swing.JComponent

A component that lets the user graphically show a value within a bounded interval. The NeedleIndicator can show both major tick marks and minor tick marks between them. The number of values between the tick marks is controlled with setMajorTickSpacing and setMinorTickSpacing. You may use a simple or a large needle, change their color, use one or two red lines, change their color, change the color of the area between two red lines, change the color of the tracking needle, and so on...

Author:
Copyright © 1999-2004, JBC. All Rights Reserved.
Licensed Materials - Property of JBC.
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Field Summary
 
Fields inherited from class javax.swing.JComponent
TOOL_TIP_TEXT_KEY, 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
JbcNeedleIndicator()
          Default needle gauge constructor.
 
Method Summary
 java.lang.String getAbout()
          Application code will not use these methods explicitly.
 java.awt.Color getBackground()
          Gets the background color of this component.
 int getBevelSize()
          Gets the size of the bevel.
 int getDecimals()
          Returns the decimals value.
 java.awt.Color getForeground()
          Gets the foreground color of this component.
 java.awt.Color getLargeNeedleColor()
          Gets the large needle color of this component.
 java.awt.Color getLeftHightRedLineColor()
          Gets the left hightRedLine color of this component.
 int getLeftRedLine()
          Returns the left red line value supported by the needle gauge.
 java.awt.Color getLeftRedLineColor()
          Gets the left redLine color of this component.
 java.awt.Color getLeftWarningColor()
          Gets the left warning color of this component.
 int getLeftWarningLine()
          Returns the left warning line value supported by the needle gauge.
 int getMajorTickSpacing()
          Returns the major tick spacing.
 int getMaximum()
          Returns the maximum value supported by the needle gauge.
 int getMinimum()
          Returns the minimum value supported by the needle gauge.
 int getMinorTickSpacing()
          Returns the minor tick spacing.
 java.awt.Color getRightHightRedLineColor()
          Gets the right hightRedLine color of this component.
 int getRightRedLine()
          Returns the right red line value supported by the needle gauge.
 java.awt.Color getRightRedLineColor()
          Gets the right redLine color of this component.
 java.awt.Color getRightWarningColor()
          Gets the right warning color of this component.
 int getRightWarningLine()
          Returns the right warning line value supported by the needle gauge.
 java.awt.Color getSimpleNeedleColor()
          Gets the simple needle color of this component.
 int getStartTrackingPosition()
          Returns the startTrackingPosition value.
 java.awt.Color getTextColor()
          Gets the text color of this component.
 java.awt.Color getTrackingColor()
          Gets the tracking color of this component.
 int getValue()
          Returns the needle gauge value.
 boolean isLargeNeedle()
          Returns whether the large needle should be painted.
 boolean isLeftRedLinePainted()
          Returns whether the left red line should be painted.
 boolean isLeftWarningLinePainted()
          Returns whether the left warning line should be painted.
 boolean isNeedlePainted()
          Returns whether the needle should be painted.
 boolean isPaintTicks()
          Returns whether ticks should be painted or not.
 boolean isRightRedLinePainted()
          Returns whether the right red line should be painted.
 boolean isRightWarningLinePainted()
          Returns whether the right warning line should be painted.
 boolean isShadowOnNeedle()
          Returns whether the shadow on Needle should be painted.
 boolean isTrackingNeedlePainted()
          Returns whether the trackingNeedle should be painted.
 boolean isValuePrinted()
          Returns whether the value should be painted or not.
 void paint(java.awt.Graphics g)
          Paints this component.
 void paintInterface(java.awt.Graphics g)
           
 void setAbout(java.lang.String text)
          Application code will not use these methods explicitly.
 void setBackground(java.awt.Color color)
          Sets the background color of this component.
 void setBevelSize(int size)
          Sets the size of the bevel.
 void setDecimals(int value)
          Sets the decimals property.
 void setForeground(java.awt.Color color)
          Sets the foreground color of this component.
 void setLargeNeedle(boolean b)
          Sets whether the large needle should be painted.
 void setLargeNeedleColor(java.awt.Color color)
          Sets the large needle color of this component.
 void setLeftHightRedLineColor(java.awt.Color color)
          Sets the left hightRedLine color of this component.
 void setLeftRedLine(int value)
          Sets the left red line property.
 void setLeftRedLineColor(java.awt.Color color)
          Sets the left redLine color of this component.
 void setLeftRedLinePainted(boolean b)
          Sets whether the left red line should be painted.
 void setLeftWarningColor(java.awt.Color color)
          Sets the left warning color of this component.
 void setLeftWarningLine(int value)
          Sets the left warning line property.
 void setLeftWarningLinePainted(boolean b)
          Sets whether the left warning line should be painted.
 void setLocale(java.util.Locale locale)
          Sets the locale of this component.
 void setMajorTickSpacing(int n)
          Sets the major tick spacing.
 void setMaximum(int value)
          Sets the maximum property.
 void setMinimum(int value)
          Sets the minimum property.
 void setMinorTickSpacing(int n)
          Sets the minor tick spacing.
 void setNeedlePainted(boolean b)
          Sets whether the needle should be painted.
 void setPaintTicks(boolean b)
          Sets whether ticks should be painted or not.
 void setRightHightRedLineColor(java.awt.Color color)
          Sets the right hightRedLine color of this component.
 void setRightRedLine(int value)
          Sets the right red line property.
 void setRightRedLineColor(java.awt.Color color)
          Sets the redLine color of this component.
 void setRightRedLinePainted(boolean b)
          Sets whether the right red line should be painted.
 void setRightWarningColor(java.awt.Color color)
          Sets the right warning color of this component.
 void setRightWarningLine(int value)
          Sets the right warning line property.
 void setRightWarningLinePainted(boolean b)
          Sets whether the right warning line should be painted.
 void setShadowOnNeedle(boolean b)
          Sets whether the shadow on Needle should be painted.
 void setSimpleNeedleColor(java.awt.Color color)
          Sets the simple needle color of this component.
 void setStartTrackingPosition(int value)
          Sets the startTrackingPosition property.
 void setTextColor(java.awt.Color color)
          Sets the text color of this component.
 void setTrackingColor(java.awt.Color color)
          Sets the tracking color of this component.
 void setTrackingNeedlePainted(boolean b)
          Sets whether the trackingNeedle should be painted.
 void setValue(int value)
          Sets the current value of the needle gauge.
 void setValuePrinted(boolean b)
          Sets whether the value is printed inside the component.
 void updateUI()
          Notification from the UIFactory that the L&F has changed.
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, getAccessibleContext, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, 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, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paintImmediately, paintImmediately, print, printAll, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, 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, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, 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, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, createImage, createImage, createVolatileImage, createVolatileImage, dispatchEvent, enable, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, 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, 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, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JbcNeedleIndicator

public JbcNeedleIndicator()
Default needle gauge constructor.

Creates a JbcNeedleIndicator instance.

Method Detail

setAbout

public void setAbout(java.lang.String text)
Application code will not use these methods explicitly.


getAbout

public java.lang.String getAbout()
Application code will not use these methods explicitly.


paintInterface

public final void paintInterface(java.awt.Graphics g)

paint

public void paint(java.awt.Graphics g)
Paints this component. This method is called when the contents of the component should be painted.

Overrides:
paint in class javax.swing.JComponent
Parameters:
g - The graphics context to use for painting.

setBevelSize

public void setBevelSize(int size)
Sets the size of the bevel.

Parameters:
size - the size of the bevel.
See Also:
getBevelSize()

getBevelSize

public int getBevelSize()
Gets the size of the bevel.

Returns:
the size of the bevel.
See Also:
setBevelSize(int)

updateUI

public void updateUI()
Notification from the UIFactory that the L&F has changed.

Overrides:
updateUI in class javax.swing.JComponent
See Also:
JComponent.updateUI()

getBackground

public java.awt.Color getBackground()
Gets the background color of this component.

Overrides:
getBackground in class java.awt.Component
Returns:
This component's background color. If this component does not have a background color, the default background color is returned.
See Also:
setBackground(java.awt.Color)

setBackground

public void setBackground(java.awt.Color color)
Sets the background color of this component.

Overrides:
setBackground in class javax.swing.JComponent
Parameters:
color - The color to become this component's background color. If this parameter is null then this component will inherit the default background.
See Also:
getBackground()

getForeground

public java.awt.Color getForeground()
Gets the foreground color of this component.

Overrides:
getForeground in class java.awt.Component
Returns:
This component's foreground color. If this component does not have a foreground color, the default foreground color is returned.
See Also:
setForeground(java.awt.Color)

setForeground

public void setForeground(java.awt.Color color)
Sets the foreground color of this component. The foreground color is the color of the area between the two red lines.

Overrides:
setForeground in class javax.swing.JComponent
Parameters:
color - The color to become this component's foreground color. If this parameter is null then this component will inherit the default foreground.
See Also:
getForeground()

getTextColor

public java.awt.Color getTextColor()
Gets the text color of this component.

Returns:
This component's text color. If this component does not have a text color, the default text color is returned.
See Also:
setTextColor(java.awt.Color)

setTextColor

public void setTextColor(java.awt.Color color)
Sets the text color of this component.

Parameters:
color - The color to become this component's text color. If this parameter is null then this component will inherit the default text color.
See Also:
getTextColor(), setValuePrinted(boolean), setPaintTicks(boolean), setMinorTickSpacing(int), setMajorTickSpacing(int)

getSimpleNeedleColor

public java.awt.Color getSimpleNeedleColor()
Gets the simple needle color of this component.

Returns:
This component's needle color. If this component does not have a simple needle color, the default simple needle color is returned.
See Also:
setSimpleNeedleColor(java.awt.Color)

setSimpleNeedleColor

public void setSimpleNeedleColor(java.awt.Color color)
Sets the simple needle color of this component.

Parameters:
color - The color to become this component's needle color. If this parameter is null then this component will inherit the default simple needle color.
See Also:
getSimpleNeedleColor(), isLargeNeedle(), setLargeNeedle(boolean), setNeedlePainted(boolean)

getLargeNeedleColor

public java.awt.Color getLargeNeedleColor()
Gets the large needle color of this component.

Returns:
This component's needle color. If this component does not have a large needle color, the default large needle color is returned.
See Also:
setLargeNeedleColor(java.awt.Color)

setLargeNeedleColor

public void setLargeNeedleColor(java.awt.Color color)
Sets the large needle color of this component.

Parameters:
color - The color to become this component's needle color. If this parameter is null then this component will inherit the default large needle color.
See Also:
getLargeNeedleColor(), isLargeNeedle(), setLargeNeedle(boolean), setNeedlePainted(boolean)

getLeftRedLineColor

public java.awt.Color getLeftRedLineColor()
Gets the left redLine color of this component.

Returns:
This component's left redLine color. If this component does not have a left redLine color, the default left redLine color is returned.
See Also:
setLeftRedLineColor(java.awt.Color)

setLeftRedLineColor

public void setLeftRedLineColor(java.awt.Color color)
Sets the left redLine color of this component.

Parameters:
color - The color to become this component's left redLine color. If this parameter is null then this component will inherit the default left redLine color.
See Also:
getLeftRedLineColor(), setLeftRedLine(int), setLeftRedLinePainted(boolean)

getRightRedLineColor

public java.awt.Color getRightRedLineColor()
Gets the right redLine color of this component.

Returns:
This component's right redLine color. If this component does not have a rright edLine color, the default right redLine color is returned.
See Also:
setRightRedLineColor(java.awt.Color)

setRightRedLineColor

public void setRightRedLineColor(java.awt.Color color)
Sets the redLine color of this component.

Parameters:
color - The color to become this component's redLine color. If this parameter is null then this component will inherit the default redLine color.
See Also:
getRightRedLineColor(), setRightRedLine(int), setRightRedLinePainted(boolean)

getLeftHightRedLineColor

public java.awt.Color getLeftHightRedLineColor()
Gets the left hightRedLine color of this component. The left hightRedLine is used when the needle is over the left red line.

Returns:
This component's left hightRedLine color. If this component does not have a left hightRedLine color, the default left hightRedLine color is returned.
See Also:
setLeftHightRedLineColor(java.awt.Color)

setLeftHightRedLineColor

public void setLeftHightRedLineColor(java.awt.Color color)
Sets the left hightRedLine color of this component. The left hightRedLine is used when the needle is over the left red line.

Parameters:
color - The color to become this component's left hightRedLine color. If this parameter is null then this component will inherit the default left hightRedLine color.
See Also:
getLeftHightRedLineColor(), setLeftRedLine(int), setLeftRedLinePainted(boolean)

getRightHightRedLineColor

public java.awt.Color getRightHightRedLineColor()
Gets the right hightRedLine color of this component. The right hightRedLine is used when the needle is over the right red line.

Returns:
This component's roght hightRedLine color. If this component does not have a right hightRedLine color, the default right hightRedLine color is returned.
See Also:
setRightHightRedLineColor(java.awt.Color)

setRightHightRedLineColor

public void setRightHightRedLineColor(java.awt.Color color)
Sets the right hightRedLine color of this component. The right hightRedLine is used when the needle is over the right red line.

Parameters:
color - The color to become this component's right ightRedLine color. If this parameter is null then this component will inherit the default right hightRedLine color.
See Also:
getRightHightRedLineColor(), setRightRedLine(int), setRightRedLinePainted(boolean)

getTrackingColor

public java.awt.Color getTrackingColor()
Gets the tracking color of this component. The tracking area is the area between the current value and the start tracking position value. This color is used according to the tracking needle property.

Returns:
This component's tracking color. If this component does not have a tracking color, the default tracking color is returned.
See Also:
setTrackingColor(java.awt.Color), setStartTrackingPosition(int), setTrackingNeedlePainted(boolean)

setTrackingColor

public void setTrackingColor(java.awt.Color color)
Sets the tracking color of this component. The tracking area is the area between the current value and the start tracking position value. This color is used according to the tracking needle property.

Parameters:
color - The color to become this component's tracking color. If this parameter is null then this component will inherit the default tracking color.
See Also:
getTrackingColor(), setStartTrackingPosition(int), setTrackingNeedlePainted(boolean)

getLeftWarningColor

public java.awt.Color getLeftWarningColor()
Gets the left warning color of this component.

Returns:
This component's tracking color. If this component does not have a warning color, the default warning color is returned.
See Also:
setLeftWarningColor(java.awt.Color)

setLeftWarningColor

public void setLeftWarningColor(java.awt.Color color)
Sets the left warning color of this component. This color is used according to the Left WarningLinePainted property.

Parameters:
color - The color to become this component's left warning color. If this parameter is null then this component will inherit the default left warning color.
See Also:
getLeftWarningColor(), setLeftWarningLine(int), setLeftWarningLinePainted(boolean)

getRightWarningColor

public java.awt.Color getRightWarningColor()
Gets the right warning color of this component.

Returns:
This component's right color. If this component does not have a right warning color, the default right warning color is returned.
See Also:
setRightWarningColor(java.awt.Color)

setRightWarningColor

public void setRightWarningColor(java.awt.Color color)
Sets the right warning color of this component. This color is used according to the Right WarningLinePainted property.

Parameters:
color - The color to become this component's right warning color. If this parameter is null then this component will inherit the default warning color.
See Also:
getRightWarningColor(), setRightWarningLine(int), setRightWarningLinePainted(boolean)

isPaintTicks

public boolean isPaintTicks()
Returns whether ticks should be painted or not. Otherwise, it returns false.

Parameters:
if - true the ticks should be painted, false otherwise
See Also:
setPaintTicks(boolean)

setPaintTicks

public void setPaintTicks(boolean b)
Sets whether ticks should be painted or not.

If you need to change the decimal symbol, you can set the locale property of this component by using the setLocale method. The decimal symbol initial value is the VM's default locale.

Parameters:
b - if true the ticks should be painted, false otherwise
See Also:
isPaintTicks(), setMajorTickSpacing(int), setMinorTickSpacing(int), getDecimals(), setLocale(java.util.Locale)

isValuePrinted

public boolean isValuePrinted()
Returns whether the value should be painted or not. Otherwise, it returns false.

If you need to change the decimal symbol, you can set the locale property of this component by using the setLocale method. The decimal symbol initial value is the VM's default locale.

Parameters:
if - true the value should be painted, false otherwise
See Also:
setValuePrinted(boolean), getDecimals(), setLocale(java.util.Locale)

setValuePrinted

public void setValuePrinted(boolean b)
Sets whether the value is printed inside the component.

Parameters:
b - if true the value should be painted, false otherwise
See Also:
isValuePrinted()

setValue

public void setValue(int value)
Sets the current value of the needle gauge. Values are always expressed in the smallest unit you may use. For further information, see the setDecimals property.

See Also:
getValue(), setDecimals(int), getDecimals()

getValue

public int getValue()
Returns the needle gauge value. Values are always expressed in the smallest unit you may use. For further information, see the setDecimals property.

Returns:
the value property
See Also:
setValue(int), setDecimals(int), getDecimals()

getMaximum

public int getMaximum()
Returns the maximum value supported by the needle gauge. Values are always expressed in the smallest unit you may use. For further information, see the setDecimals property.

Returns:
the maximum property
See Also:
setMaximum(int), setDecimals(int), getDecimals()

setMaximum

public void setMaximum(int value)
Sets the maximum property. Values are always expressed in the smallest unit you may use. For further information, see the setDecimals property.

See Also:
getMaximum(), setDecimals(int), getDecimals()

getMinimum

public int getMinimum()
Returns the minimum value supported by the needle gauge. Values are always expressed in the smallest unit you may use. For further information, see the setDecimals property.

Returns:
the minimum property
See Also:
setMinimum(int), setDecimals(int), getDecimals()

setMinimum

public void setMinimum(int value)
Sets the minimum property. Values are always expressed in the smallest unit you may use. For further information, see the setDecimals property.

See Also:
getMinimum(), setDecimals(int), getDecimals()

getLeftRedLine

public int getLeftRedLine()
Returns the left red line value supported by the needle gauge. Values are always expressed in the smallest unit you may use. For further information, see the setDecimals property.

Returns:
the value of the left red line property
See Also:
setLeftRedLine(int), setDecimals(int), getDecimals(), setLeftRedLineColor(java.awt.Color), setLeftRedLinePainted(boolean)

setLeftRedLine

public void setLeftRedLine(int value)
Sets the left red line property. Values are always expressed in the smallest unit you may use. For further information, see the setDecimals property.

See Also:
getLeftRedLine(), setDecimals(int), getDecimals(), setLeftRedLine(int), setLeftRedLinePainted(boolean)

getRightRedLine

public int getRightRedLine()
Returns the right red line value supported by the needle gauge. Values are always expressed in the smallest unit you may use. For further information, see the setDecimals property.

Returns:
the value of the right red line property
See Also:
setRightRedLine(int), setRightRedLineColor(java.awt.Color), setRightRedLinePainted(boolean), setDecimals(int), getDecimals()

setRightRedLine

public void setRightRedLine(int value)
Sets the right red line property. Values are always expressed in the smallest unit you may use. For further information, see the setDecimals property.

See Also:
getRightRedLine(), setDecimals(int), getDecimals(), setRightRedLineColor(java.awt.Color), setRightRedLinePainted(boolean)

getLeftWarningLine

public int getLeftWarningLine()
Returns the left warning line value supported by the needle gauge. Values are always expressed in the smallest unit you may use. For further information, see the setDecimals property.

Returns:
the value of the left warning line property
See Also:
setDecimals(int), getDecimals(), setLeftWarningColor(java.awt.Color), setLeftWarningLine(int), setLeftWarningLinePainted(boolean)

setLeftWarningLine

public void setLeftWarningLine(int value)
Sets the left warning line property. Values are always expressed in the smallest unit you may use. For further information, see the setDecimals property.

See Also:
setDecimals(int), getDecimals(), setLeftWarningColor(java.awt.Color), getLeftWarningLine(), setLeftWarningLinePainted(boolean)

getRightWarningLine

public int getRightWarningLine()
Returns the right warning line value supported by the needle gauge. Values are always expressed in the smallest unit you may use. For further information, see the setDecimals property.

Returns:
the value of the right warningline property
See Also:
setRightWarningLine(int), setDecimals(int), getDecimals()

setRightWarningLine

public void setRightWarningLine(int value)
Sets the right warning line property. Values are always expressed in the smallest unit you may use. For further information, see the setDecimals property.

See Also:
setDecimals(int), getDecimals(), setRightWarningColor(java.awt.Color), getRightWarningLine(), setRightWarningLinePainted(boolean)

getStartTrackingPosition

public int getStartTrackingPosition()
Returns the startTrackingPosition value. Values are always expressed in the smallest unit you may use. For further information, see the setDecimals property.

Returns:
the value of the startTrackingPosition
See Also:
setStartTrackingPosition(int), setDecimals(int), getDecimals()

setStartTrackingPosition

public void setStartTrackingPosition(int value)
Sets the startTrackingPosition property. This componenet is able to paint an area included between the current value of the needle and the startTrackingPosition value. Values are always expressed in the smallest unit you may use. For further information, see the setDecimals property.

See Also:
getStartTrackingPosition(), setTrackingColor(java.awt.Color), setTrackingNeedlePainted(boolean), setDecimals(int), getDecimals()

getDecimals

public int getDecimals()
Returns the decimals value.

Returns:
the value of the decimals
See Also:
setDecimals(int)

setDecimals

public void setDecimals(int value)
Sets the decimals property. If you need to visualize decimals in the needleIndicator, you should use the decimals property, but all the needleIndicator values will be expressed in the smallest unit. In other words, the needleIndicator always works with integers and the decimals property is used only to display values.

If you need to change the decimal symbol, you can set the locale property of this component by using the setLocale method. The decimal symbol initial value is the VM's default locale.

See Also:
getDecimals(), setLocale(java.util.Locale)

setLocale

public void setLocale(java.util.Locale locale)
Sets the locale of this component. If you need to change the decimal symbol, you can set the locale property of this component.

Overrides:
setLocale in class java.awt.Component
Parameters:
locale - the locale to become this component's locale
See Also:
Component.getLocale(), setDecimals(int)

getMinorTickSpacing

public int getMinorTickSpacing()
Returns the minor tick spacing. The number that is returned represents the distance, measured in values, between each minor tick mark. If you have a needleIndicator with a range from 0 to 50 and the minor tick spacing is set to 5, you will get minor ticks next to the following values: 0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50.

Returns:
the number of values between minor ticks
See Also:
setMinorTickSpacing(int)

setMinorTickSpacing

public void setMinorTickSpacing(int n)
Sets the minor tick spacing. The number that is passed-in represents the distance, measured in values, between each minor tick mark. If you have a needleIndicator with a range from 0 to 50 and the minor tick spacing is set to 5, you will get minor ticks next to the following values: 0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50.

Values are always expressed in the smallest unit you may use. For further information, see the setDecimals property.

See Also:
getMinorTickSpacing(), setPaintTicks(boolean), setDecimals(int), setMajorTickSpacing(int)

getMajorTickSpacing

public int getMajorTickSpacing()
Returns the major tick spacing. The number that is returned represents the distance, measured in values, between each major tick mark. If you have a needleIndicator with a range from 0 to 50 and the major tick spacing is set to 10, you will get major ticks next to the following values: 0, 10, 20, 30, 40, 50.

Returns:
the number of values between major ticks
See Also:
setMajorTickSpacing(int)

setMajorTickSpacing

public void setMajorTickSpacing(int n)
Sets the major tick spacing. The number that is passed-in represents the distance, measured in values, between each major tick mark. If you have a needleIndicator with a range from 0 to 50 and the major tick spacing is set to 10, you will get major ticks next to the following values: 0, 10, 20, 30, 40, 50.

Values are always expressed in the smallest unit you may use. For further information, see the setDecimals property.

See Also:
getMajorTickSpacing(), setPaintTicks(boolean), setDecimals(int), setMinorTickSpacing(int)

isLargeNeedle

public boolean isLargeNeedle()
Returns whether the large needle should be painted.

Returns:
true if the large needle should be painted, false otherwise
See Also:
setLargeNeedle(boolean)

setLargeNeedle

public void setLargeNeedle(boolean b)
Sets whether the large needle should be painted.

Parameters:
b - if true the large needle is painted, false otherwise
See Also:
isLargeNeedle(), setNeedlePainted(boolean)

isTrackingNeedlePainted

public boolean isTrackingNeedlePainted()
Returns whether the trackingNeedle should be painted.

Returns:
true if the trackingNeedle should be painted, false otherwise
See Also:
setTrackingNeedlePainted(boolean)

setTrackingNeedlePainted

public void setTrackingNeedlePainted(boolean b)
Sets whether the trackingNeedle should be painted. This property allows to paint or not the area included between the needle and the startTrackingPosition value.

Parameters:
b - if true the trackingNeedle is painted, false otherwise
See Also:
isTrackingNeedlePainted(), setStartTrackingPosition(int)

isNeedlePainted

public boolean isNeedlePainted()
Returns whether the needle should be painted.

Returns:
true if the needle should be painted, false otherwise
See Also:
setNeedlePainted(boolean)

setNeedlePainted

public void setNeedlePainted(boolean b)
Sets whether the needle should be painted.

Parameters:
b - if true the needle is painted, false otherwise
See Also:
isNeedlePainted()

isShadowOnNeedle

public boolean isShadowOnNeedle()
Returns whether the shadow on Needle should be painted.

Returns:
true if the shadow on Needle should be painted, false otherwise
See Also:
setShadowOnNeedle(boolean), isNeedlePainted(), setNeedlePainted(boolean)

setShadowOnNeedle

public void setShadowOnNeedle(boolean b)
Sets whether the shadow on Needle should be painted. if true when the needle is on the right bottom corner, the needle will be painted with a darker color.

Parameters:
b - if true the shadow on Needle is painted, false otherwise
See Also:
isShadowOnNeedle()

isLeftRedLinePainted

public boolean isLeftRedLinePainted()
Returns whether the left red line should be painted.

Returns:
true if the left red line should be painted, false otherwise
See Also:
setLeftRedLinePainted(boolean), setLeftRedLine(int), setLeftRedLineColor(java.awt.Color)

setLeftRedLinePainted

public void setLeftRedLinePainted(boolean b)
Sets whether the left red line should be painted. This property allows to paint or not the area included between the minimum and the left red line value.

Parameters:
b - if true the left red line is painted, false otherwise
See Also:
isLeftRedLinePainted(), setLeftRedLine(int), setLeftRedLineColor(java.awt.Color), setMinimum(int)

isRightRedLinePainted

public boolean isRightRedLinePainted()
Returns whether the right red line should be painted.

Returns:
true if the right red line should be painted, false otherwise
See Also:
setRightRedLinePainted(boolean), setRightRedLine(int), setRightRedLineColor(java.awt.Color)

setRightRedLinePainted

public void setRightRedLinePainted(boolean b)
Sets whether the right red line should be painted. This property allows to paint or not the area included between the maximum and the right red line value.

Parameters:
b - if true the right red line is painted, false otherwise
See Also:
isRightRedLinePainted(), setRightRedLine(int), setRightRedLineColor(java.awt.Color), setMaximum(int)

isLeftWarningLinePainted

public boolean isLeftWarningLinePainted()
Returns whether the left warning line should be painted.

Returns:
true if the left warning line should be painted, false otherwise
See Also:
setLeftWarningLinePainted(boolean), setLeftWarningColor(java.awt.Color), setLeftWarningLine(int)

setLeftWarningLinePainted

public void setLeftWarningLinePainted(boolean b)
Sets whether the left warning line should be painted. This property allows to paint or not the area included between the left red line and the left warning line value.

Parameters:
b - if true the left warning line is painted, false otherwise
See Also:
isLeftWarningLinePainted(), setLeftWarningColor(java.awt.Color), setLeftWarningLine(int), setLeftRedLinePainted(boolean), setLeftRedLine(int)

isRightWarningLinePainted

public boolean isRightWarningLinePainted()
Returns whether the right warning line should be painted.

Returns:
true if the right warning line should be painted, false otherwise
See Also:
setRightWarningLinePainted(boolean), setRightWarningColor(java.awt.Color), setRightWarningLine(int)

setRightWarningLinePainted

public void setRightWarningLinePainted(boolean b)
Sets whether the right warning line should be painted. This property allows to paint or not the area included between the right red line and the right warning line value.

Parameters:
b - if true the right warning line is painted, false otherwise
See Also:
isRightWarningLinePainted(), setRightWarningColor(java.awt.Color), setRightWarningLine(int), setRightRedLinePainted(boolean), setRightRedLine(int)

JBCSolutions - JbcBeans v1.5

JBCSolutions - JbcBeans v1.5