ElegantJ Gauges Java API Specification v1.1

com.elegantj.gauges.dial
Class Dial

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byjava.awt.Panel
              extended bycom.elegantj.gauges.dial.Dial
All Implemented Interfaces:
javax.accessibility.Accessible, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable
Direct Known Subclasses:
NumericDialGauge

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

Base class for NumericDialGauge it uses Circle to render part of a Dial

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
static int ARROW_NEEDLE
          Arrow Needle
static int BALLS_NEEDLE
          Balls Needle
static int BLOCK_DECREMENT
          Specifies the block decrement of an angle
static int BLOCK_INCREMENT
          Specifies the block increment of an angle
protected  Circle circle
          Specifies circle to render the dial
static int CIRCULAR_GRAD
          Circular Grad
protected  java.awt.Image dialImage
          Specifies off-screen image of the dial
static int LINEAR_ARROW_NEEDLE
          Linear Arrow Needle
static int LINEAR_CIRCLE_NEEDLE
          Linear Circle Needle
static int LINEAR_GRAD
          Linear Grad
static int LINEAR_NEEDLE
          Linear Needle
static int LOWERED
          Lowered border
static int MAXIMUM
          Specifies the maximum angle
static int MINIMUM
          Specifies the minimum angle
static int MOVE_OFF
          Does not move needle on any mouse activity
static int MOVE_ON_MOUSE_DRAG
          Moves needle on mouse click
static int MOVE_ON_MOUSE_PRESS
          Moves needle on mouse drag
static int NONE
          No border
static int POINT1
          point 1 border width
static int POINT2
          point 2 border width
static int POINT3
          point 3 border width
static int POINT4
          point 4 border width
static int POINT5
          point 5 border width
static int RAISED
          Raised border
static int SIMPLE
          Simple border
static int UNIT_DECREMENT
          Specifies the unit decrement of an angle
static int UNIT_INCREMENT
          Specifies the unit increment of an angle
 
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
Dial()
           
Dial(int diameter)
          Creates a Dial with specified diameter.
 
Method Summary
 void adjustAngle(int type)
          Adjusts the angle with given adjustment angle constant.
protected  void allocImage()
          Initialize the off-screen dial image.
protected  int extraHeight()
          extraHeight lets subclasses reserve some extra height to render above and below the dial face.
protected  int extraWidth()
          extraWidth lets subclasses reserve some extra width to render left and right the dial face.
 int getActiveNeedleOn()
          Gets the mouse activity to move the needle
 java.awt.Color getBaseColor()
          Gets the base circle's
 GaugeBorder getBaseDialBorder()
          Gets the border of the base circle
 double getBlockIncrement(int direction)
          Returns the amount to change the angle's value by, given a block (usually "page") up/down request.
 java.awt.Color getDisabledAreaColor()
          Gets the needle color
 GaugeBorder getDisplayBoxBorder()
          Gets the border style of the display box
 java.awt.Color getDisplayBoxColor()
          Gets the background color of the box
 java.lang.String getDisplayText()
          Gets the text displayed on the display box
 java.awt.Color getDisplayTextColor()
          Gets the background color of the box
 java.awt.Font getDisplayTextFont()
          Gets the font of the text displayed on the display box
 java.awt.Color getFooterBackground()
          Gets the footer background color
 java.awt.Font getFooterFont()
          Gets the footer font
 java.awt.Color getFooterForeground()
          Gets the footer foreground color
 double getFooterHeight()
          Returns the footer height, 0 if header is not visible
 double getFooterSpacing()
          Gets the spacing above and below the footer text
 java.lang.String getFooterText()
          Gets the text to be displayed on footer
 java.awt.Color getGradColor()
          Gets the grad color
 double getGradLength()
          Gets the grad length
 int getGradType()
          Gets the grad type
 double getGradWidth()
          Gets the grad width
 java.awt.Color getHeaderBackground()
          Gets the header background color
 java.awt.Font getHeaderFont()
          Gets the header font
 java.awt.Color getHeaderForeground()
          Gets the header foreground color
 double getHeaderHeight()
          Returns the header height, 0 if header is not visible
 double getHeaderSpacing()
          Gets the spacing above and below the header text
 java.lang.String getHeaderText()
          Gets the text to be displayed on header
 GaugeBorder getInnerDialBorder()
          Gets the border of the inner dial gauge
 java.awt.Color getInnerDialColor()
          Gets the grad color
 GaugeBorder getNeedleBorder()
          Gets the border of the needle
 java.awt.Color getNeedleColor()
          Gets the needle color
 double getNeedleLength()
          Gets the needle length
 double getNeedleTail()
          Gets the needle tail length
 int getNeedleType()
          Gets the needle type
 double getNeedleWidth()
          Gets the needle width
 GaugeBorder getOuterDialBorder()
          Gets the border of the outer dial gauge
 java.awt.Dimension getPreferredSize()
          Gets the preferred size of this bean.
 java.awt.Color getSubGradColor()
          Gets the grad color
 double getSubGradLength()
          Gets the subgrad length
 int getSubGradType()
          Gets the subgrad type
 double getSubGradWidth()
          Gets the subgrad width
 java.lang.String getUnit()
          Gets the name or the handle of the unit
 java.awt.Color getUnitColor()
          Gets the color of the unit text
 java.awt.Font getUnitFont()
          Gets the font of the unit text
 double getUnitIncrement(int direction)
          Returns the amount to change the angle's value by, given a unit up/down request.
 java.awt.Point getUnitLocation()
          Gets the Unit text location
 boolean isDisplayBoxVisible()
          Gets the visibility of the display box
 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 isFooterVisible()
          Gets the footer visibility
 boolean isGradValuesVisible()
          Gets the intermediate values visibility of the zone
 boolean isHeaderVisible()
          Gets the header visibility
 boolean isKeyboardEnabled()
          Gets the enability to increase or decrease the angle value by keyboard navigation
 boolean isLightweight()
          Returns true if this Component is displayable
 boolean isNeedleVisible()
          Gets the needle visibility
 void paint(java.awt.Graphics g)
          Paints this component.
protected  void processKeyEvent(java.awt.event.KeyEvent e)
           
protected  void processMouseEvent(java.awt.event.MouseEvent e)
           
protected  void processMouseMotionEvent(java.awt.event.MouseEvent e)
           
protected  void renderCustomFeatures(java.awt.Graphics g)
          Renders any extra gadgets or embellishments to the dial.
 void renderDial()
          Renders dial.
 void setActiveNeedleOn(int value)
          Sets the mouse activity to move the needle
 void setBaseColor(java.awt.Color theColor)
          Sets the base circle's color
 void setBaseDialBorder(GaugeBorder border)
          Sets the border of the base circle
 void setDisabledAreaColor(java.awt.Color theColor)
          Sets the box color
 void setDisplayBoxBorder(GaugeBorder border)
          Sets the border of the display box
 void setDisplayBoxColor(java.awt.Color theColor)
          Sets the background color of the box
 void setDisplayBoxVisible(boolean value)
          Sets the visibility of the display box
 void setDisplayText(java.lang.String text)
          Sets the text displayed on the display box
 void setDisplayTextColor(java.awt.Color theColor)
          Sets the foreground color of the box
 void setDisplayTextFont(java.awt.Font theFont)
          Sets the font of the text displayed on the display box
 void setFooterBackground(java.awt.Color theColor)
          Sets the footer background color
 void setFooterFont(java.awt.Font theFont)
          Sets the footer font
 void setFooterForeground(java.awt.Color theColor)
          Sets the footer foreground color
 void setFooterSpacing(double value)
          Sets the spacing above and below the footer text
 void setFooterText(java.lang.String value)
          Sets the text to be displayed on footer
 void setFooterVisible(boolean value)
          Sets the footer visibility
 void setGradColor(java.awt.Color theColor)
          Sets the grad color
 void setGradLength(double val)
          Sets the grad length
 void setGradType(int val)
          Sets the grad type such as linear or circular
 void setGradValuesVisible(boolean value)
          Sets the intermediate values visibility of the zone
 void setGradWidth(double val)
          Sets the grad width
 void setHeaderBackground(java.awt.Color theColor)
          Sets the header background color
 void setHeaderFont(java.awt.Font theFont)
          Sets the header font
 void setHeaderForeground(java.awt.Color theColor)
          Sets the header foreground color
 void setHeaderSpacing(double value)
          Sets the spacing above and below the header text
 void setHeaderText(java.lang.String value)
          Sets the text to be displayed on header
 void setHeaderVisible(boolean value)
          Sets the header visibility
 void setInnerDialBorder(GaugeBorder border)
          Sets the border of the inner dial gauge
 void setInnerDialColor(java.awt.Color theColor)
          Sets the grad color
 void setKeyboardEnabled(boolean value)
          Sets the enability to increase or decrease the angle value by keyboard navigation
 void setNeedleBorder(GaugeBorder border)
          Sets the border of the needle
 void setNeedleColor(java.awt.Color theColor)
          Sets the needle color
 void setNeedleLength(double val)
          Sets the needle length
 void setNeedleTail(double val)
          Sets the needle tail length
 void setNeedleType(int val)
          Sets the needle type
 void setNeedleVisible(boolean value)
          Sets the needle visibility
 void setNeedleWidth(double val)
          Sets the needle width
 void setNewValues(int size)
           
 void setNewValues(int size, boolean autofit)
          Set new values and new circle radius and fits gauge to the new size
 void setOuterDialBorder(GaugeBorder border)
          Sets the border of the outer dial gauge
 void setPointValue(int x, int y)
          Sets the value of the given point co-ordinates
 void setSubGradColor(java.awt.Color theColor)
          Sets the grad color
 void setSubGradLength(double val)
          Sets the subgrad length
 void setSubGradType(int val)
          Sets the subgrad type such as linear or circular
 void setSubGradWidth(double val)
          Sets the subgrad width
 void setUnit(java.lang.String n)
          Sets the Unit
 void setUnitColor(java.awt.Color theColor)
          Sets the Unit text color
 void setUnitFont(java.awt.Font font)
          Sets the Unit Font
 void setUnitLocation(java.awt.Point thePoint)
          Sets the Unit text location
 void update(java.awt.Graphics g)
          Updates this component
 
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, 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, 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, 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

POINT1

public static final int POINT1
point 1 border width

See Also:
Constant Field Values

POINT2

public static final int POINT2
point 2 border width

See Also:
Constant Field Values

POINT3

public static final int POINT3
point 3 border width

See Also:
Constant Field Values

POINT4

public static final int POINT4
point 4 border width

See Also:
Constant Field Values

POINT5

public static final int POINT5
point 5 border width

See Also:
Constant Field Values

NONE

public static final int NONE
No border

See Also:
Constant Field Values

SIMPLE

public static final int SIMPLE
Simple border

See Also:
Constant Field Values

RAISED

public static final int RAISED
Raised border

See Also:
Constant Field Values

LOWERED

public static final int LOWERED
Lowered border

See Also:
Constant Field Values

ARROW_NEEDLE

public static final int ARROW_NEEDLE
Arrow Needle

See Also:
Constant Field Values

LINEAR_NEEDLE

public static final int LINEAR_NEEDLE
Linear Needle

See Also:
Constant Field Values

LINEAR_ARROW_NEEDLE

public static final int LINEAR_ARROW_NEEDLE
Linear Arrow Needle

See Also:
Constant Field Values

LINEAR_CIRCLE_NEEDLE

public static final int LINEAR_CIRCLE_NEEDLE
Linear Circle Needle

See Also:
Constant Field Values

BALLS_NEEDLE

public static final int BALLS_NEEDLE
Balls Needle

See Also:
Constant Field Values

LINEAR_GRAD

public static final int LINEAR_GRAD
Linear Grad

See Also:
Constant Field Values

CIRCULAR_GRAD

public static final int CIRCULAR_GRAD
Circular Grad

See Also:
Constant Field Values

MOVE_ON_MOUSE_DRAG

public static final int MOVE_ON_MOUSE_DRAG
Moves needle on mouse click

See Also:
Constant Field Values

MOVE_ON_MOUSE_PRESS

public static final int MOVE_ON_MOUSE_PRESS
Moves needle on mouse drag

See Also:
Constant Field Values

MOVE_OFF

public static final int MOVE_OFF
Does not move needle on any mouse activity

See Also:
Constant Field Values

UNIT_INCREMENT

public static final int UNIT_INCREMENT
Specifies the unit increment of an angle

See Also:
Constant Field Values

UNIT_DECREMENT

public static final int UNIT_DECREMENT
Specifies the unit decrement of an angle

See Also:
Constant Field Values

BLOCK_INCREMENT

public static final int BLOCK_INCREMENT
Specifies the block increment of an angle

See Also:
Constant Field Values

BLOCK_DECREMENT

public static final int BLOCK_DECREMENT
Specifies the block decrement of an angle

See Also:
Constant Field Values

MAXIMUM

public static final int MAXIMUM
Specifies the maximum angle

See Also:
Constant Field Values

MINIMUM

public static final int MINIMUM
Specifies the minimum angle

See Also:
Constant Field Values

circle

protected Circle circle
Specifies circle to render the dial


dialImage

protected transient java.awt.Image dialImage
Specifies off-screen image of the dial

Constructor Detail

Dial

public Dial()

Dial

public Dial(int diameter)
Creates a Dial with specified diameter.

Parameters:
diameter - dial diameter, default 60 pixels
Method Detail

processKeyEvent

protected void processKeyEvent(java.awt.event.KeyEvent e)

processMouseEvent

protected void processMouseEvent(java.awt.event.MouseEvent e)

processMouseMotionEvent

protected void processMouseMotionEvent(java.awt.event.MouseEvent e)

setNewValues

public void setNewValues(int size)

setNewValues

public void setNewValues(int size,
                         boolean autofit)
Set new values and new circle radius and fits gauge to the new size

Parameters:
size - value fo cirlce radius
autofit - true to fits the gauge to the new dimension

extraWidth

protected int extraWidth()
extraWidth lets subclasses reserve some extra width to render left and right the dial face.

Returns:
int type specifies the new extra width

extraHeight

protected int extraHeight()
extraHeight lets subclasses reserve some extra height to render above and below the dial face.

Returns:
int type specifies the new extra height

getHeaderHeight

public double getHeaderHeight()
Returns the header height, 0 if header is not visible


getFooterHeight

public double getFooterHeight()
Returns the footer height, 0 if header is not visible


setGradValuesVisible

public void setGradValuesVisible(boolean value)
Sets the intermediate values visibility of the zone

Parameters:
value - the intermediate values visibility of the zone . If it is true, intermediate values will be visible

isGradValuesVisible

public boolean isGradValuesVisible()
Gets the intermediate values visibility of the zone

Returns:
true, if intermediate values of the zone are visible, otherwise false

renderDial

public void renderDial()
Renders dial.


renderCustomFeatures

protected void renderCustomFeatures(java.awt.Graphics g)
Renders any extra gadgets or embellishments to the dial. Another method for subclasses to override.


allocImage

protected void allocImage()
Initialize the off-screen dial image.


update

public void update(java.awt.Graphics g)
Updates this component


paint

public void paint(java.awt.Graphics g)
Paints this component. This method is called when the contents of the bean should be painted in response to the bean first being shown or damage needing repair. The clip rectangle in the Graphics parameter will be set to the area which needs to be painted. For performance reasons, Beans with zero width or height aren't considered to need painting when they are first shown, and also aren't considered to need repair.

Parameters:
g - the graphics context to use for painting.

setUnit

public void setUnit(java.lang.String n)
Sets the Unit


getUnit

public java.lang.String getUnit()
Gets the name or the handle of the unit

Returns:
String type of unit

setUnitFont

public void setUnitFont(java.awt.Font font)
Sets the Unit Font

Parameters:
font - a unit's font

getUnitFont

public java.awt.Font getUnitFont()
Gets the font of the unit text

Returns:
font of unit

setUnitColor

public void setUnitColor(java.awt.Color theColor)
Sets the Unit text color

Parameters:
theColor - a unit text color

getUnitColor

public java.awt.Color getUnitColor()
Gets the color of the unit text

Returns:
color of unit

setUnitLocation

public void setUnitLocation(java.awt.Point thePoint)
Sets the Unit text location

Parameters:
thePoint - a unit text location

getUnitLocation

public java.awt.Point getUnitLocation()
Gets the Unit text location

Returns:
the Unit text location

setDisplayBoxVisible

public void setDisplayBoxVisible(boolean value)
Sets the visibility of the display box

Parameters:
value - the visibility of the display box

isDisplayBoxVisible

public boolean isDisplayBoxVisible()
Gets the visibility of the display box

Returns:
true, if display box is visible

setDisplayBoxColor

public void setDisplayBoxColor(java.awt.Color theColor)
Sets the background color of the box

Parameters:
theColor - the background color of the box

getDisplayBoxColor

public java.awt.Color getDisplayBoxColor()
Gets the background color of the box

Returns:
the background color of the box

setDisplayTextColor

public void setDisplayTextColor(java.awt.Color theColor)
Sets the foreground color of the box

Parameters:
theColor - the foreground color of the box

getDisplayTextColor

public java.awt.Color getDisplayTextColor()
Gets the background color of the box

Returns:
the background color of the box

setDisplayTextFont

public void setDisplayTextFont(java.awt.Font theFont)
Sets the font of the text displayed on the display box

Parameters:
theFont - the font of the text displayed on the display box

getDisplayTextFont

public java.awt.Font getDisplayTextFont()
Gets the font of the text displayed on the display box

Returns:
the font of the text displayed on the display box

setDisplayText

public void setDisplayText(java.lang.String text)
Sets the text displayed on the display box

Parameters:
text - the text displayed on the display box

getDisplayText

public java.lang.String getDisplayText()
Gets the text displayed on the display box

Returns:
the text displayed on the display box

setDisplayBoxBorder

public void setDisplayBoxBorder(GaugeBorder border)
Sets the border of the display box

Parameters:
border - the border of the display box

getDisplayBoxBorder

public GaugeBorder getDisplayBoxBorder()
Gets the border style of the display box

Returns:
the border style of the display box

setDisabledAreaColor

public void setDisabledAreaColor(java.awt.Color theColor)
Sets the box color

Parameters:
theColor - the color from the graphics context

getDisabledAreaColor

public java.awt.Color getDisabledAreaColor()
Gets the needle color

Returns:
color from the graphics context

setNeedleVisible

public void setNeedleVisible(boolean value)
Sets the needle visibility

Parameters:
value - the needle visibility . If it is true, needle will be visible

isNeedleVisible

public boolean isNeedleVisible()
Gets the needle visibility

Returns:
true if needle is visible

setNeedleColor

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

Parameters:
theColor - the color from the graphics context

getNeedleColor

public java.awt.Color getNeedleColor()
Gets the needle color

Returns:
the color from the graphics context

setNeedleLength

public void setNeedleLength(double val)
Sets the needle length

Parameters:
val - the needle length

getNeedleLength

public double getNeedleLength()
Gets the needle length

Returns:
the needle length

setNeedleWidth

public void setNeedleWidth(double val)
Sets the needle width

Parameters:
val - the needle width

getNeedleWidth

public double getNeedleWidth()
Gets the needle width

Returns:
the needle width

setNeedleTail

public void setNeedleTail(double val)
Sets the needle tail length

Parameters:
val - the needle tail length

getNeedleTail

public double getNeedleTail()
Gets the needle tail length

Returns:
the needle tail length

setNeedleType

public void setNeedleType(int val)
Sets the needle type

Parameters:
val - the needle type

getNeedleType

public int getNeedleType()
Gets the needle type

Returns:
the needle type

setNeedleBorder

public void setNeedleBorder(GaugeBorder border)
Sets the border of the needle

Parameters:
border - the border of the needle

getNeedleBorder

public GaugeBorder getNeedleBorder()
Gets the border of the needle

Returns:
the border of the needle

setBaseColor

public void setBaseColor(java.awt.Color theColor)
Sets the base circle's color

Parameters:
theColor - the color from the graphics context

getBaseColor

public java.awt.Color getBaseColor()
Gets the base circle's

Returns:
the color from the graphics context

setBaseDialBorder

public void setBaseDialBorder(GaugeBorder border)
Sets the border of the base circle

Parameters:
border - the border of the base circle

getBaseDialBorder

public GaugeBorder getBaseDialBorder()
Gets the border of the base circle

Returns:
the border of the base circle

setGradColor

public void setGradColor(java.awt.Color theColor)
Sets the grad color

Parameters:
theColor - the color from the graphics context

getGradColor

public java.awt.Color getGradColor()
Gets the grad color

Returns:
color from the graphics context

setGradLength

public void setGradLength(double val)
Sets the grad length

Parameters:
val - the grad length

getGradLength

public double getGradLength()
Gets the grad length

Returns:
the grad length

setGradWidth

public void setGradWidth(double val)
Sets the grad width

Parameters:
val - the grad width

getGradWidth

public double getGradWidth()
Gets the grad width

Returns:
the grad width

setGradType

public void setGradType(int val)
Sets the grad type such as linear or circular

Parameters:
val - the grad type

getGradType

public int getGradType()
Gets the grad type

Returns:
the grad type

setSubGradColor

public void setSubGradColor(java.awt.Color theColor)
Sets the grad color

Parameters:
theColor - the color from the graphics context

getSubGradColor

public java.awt.Color getSubGradColor()
Gets the grad color

Returns:
color from the graphics context

setSubGradLength

public void setSubGradLength(double val)
Sets the subgrad length

Parameters:
val - the subgrad length

getSubGradLength

public double getSubGradLength()
Gets the subgrad length

Returns:
the subgrad length

setSubGradWidth

public void setSubGradWidth(double val)
Sets the subgrad width

Parameters:
val - the subgrad width

getSubGradWidth

public double getSubGradWidth()
Gets the subgrad width

Returns:
the subgrad width

setSubGradType

public void setSubGradType(int val)
Sets the subgrad type such as linear or circular

Parameters:
val - the subgrad type

getSubGradType

public int getSubGradType()
Gets the subgrad type

Returns:
the subgrad type

setInnerDialColor

public void setInnerDialColor(java.awt.Color theColor)
Sets the grad color

Parameters:
theColor - the color from the graphics context

getInnerDialColor

public java.awt.Color getInnerDialColor()
Gets the grad color

Returns:
color from the graphics context

setInnerDialBorder

public void setInnerDialBorder(GaugeBorder border)
Sets the border of the inner dial gauge

Parameters:
border - the border of the inner dial gauge

getInnerDialBorder

public GaugeBorder getInnerDialBorder()
Gets the border of the inner dial gauge

Returns:
the border of the inner dial gauge

setHeaderVisible

public void setHeaderVisible(boolean value)
Sets the header visibility

Parameters:
value - true to visible the header

isHeaderVisible

public boolean isHeaderVisible()
Gets the header visibility

Returns:
true if the header is visible

setHeaderText

public void setHeaderText(java.lang.String value)
Sets the text to be displayed on header

Parameters:
value - the header text

getHeaderText

public java.lang.String getHeaderText()
Gets the text to be displayed on header

Returns:
the header text

setHeaderBackground

public void setHeaderBackground(java.awt.Color theColor)
Sets the header background color

Parameters:
theColor - the header background color

getHeaderBackground

public java.awt.Color getHeaderBackground()
Gets the header background color

Returns:
the header background color

setHeaderForeground

public void setHeaderForeground(java.awt.Color theColor)
Sets the header foreground color

Parameters:
theColor - the header foreground color

getHeaderForeground

public java.awt.Color getHeaderForeground()
Gets the header foreground color

Returns:
the header foreground color

setHeaderFont

public void setHeaderFont(java.awt.Font theFont)
Sets the header font

Parameters:
theFont - the header font

getHeaderFont

public java.awt.Font getHeaderFont()
Gets the header font

Returns:
the header font

setHeaderSpacing

public void setHeaderSpacing(double value)
Sets the spacing above and below the header text

Parameters:
value - the spacing above and below the header text

getHeaderSpacing

public double getHeaderSpacing()
Gets the spacing above and below the header text

Returns:
the spacing above and below the header text

setFooterVisible

public void setFooterVisible(boolean value)
Sets the footer visibility

Parameters:
value - true to visible the footer

isFooterVisible

public boolean isFooterVisible()
Gets the footer visibility

Returns:
true if the footer is visible

setFooterText

public void setFooterText(java.lang.String value)
Sets the text to be displayed on footer

Parameters:
value - the footer text

getFooterText

public java.lang.String getFooterText()
Gets the text to be displayed on footer

Returns:
the footer text

setFooterBackground

public void setFooterBackground(java.awt.Color theColor)
Sets the footer background color

Parameters:
theColor - the footer background color

getFooterBackground

public java.awt.Color getFooterBackground()
Gets the footer background color

Returns:
the footer background color

setFooterForeground

public void setFooterForeground(java.awt.Color theColor)
Sets the footer foreground color

Parameters:
theColor - the footer foreground color

getFooterForeground

public java.awt.Color getFooterForeground()
Gets the footer foreground color

Returns:
the footer foreground color

setFooterFont

public void setFooterFont(java.awt.Font theFont)
Sets the footer font

Parameters:
theFont - the footer font

getFooterFont

public java.awt.Font getFooterFont()
Gets the footer font

Returns:
the footer font

setFooterSpacing

public void setFooterSpacing(double value)
Sets the spacing above and below the footer text

Parameters:
value - the spacing above and below the footer text

getFooterSpacing

public double getFooterSpacing()
Gets the spacing above and below the footer text

Returns:
the spacing above and below the footer text

setActiveNeedleOn

public void setActiveNeedleOn(int value)
Sets the mouse activity to move the needle

Parameters:
value - the mouse activity to move the needle

getActiveNeedleOn

public int getActiveNeedleOn()
Gets the mouse activity to move the needle

Returns:
the mouse activity to move the needle

setKeyboardEnabled

public void setKeyboardEnabled(boolean value)
Sets the enability to increase or decrease the angle value by keyboard navigation

Parameters:
value - true to enable the keyboard navigation

isKeyboardEnabled

public boolean isKeyboardEnabled()
Gets the enability to increase or decrease the angle value by keyboard navigation

Returns:
true if keyboard navigation is enabled, otherwise false

setOuterDialBorder

public void setOuterDialBorder(GaugeBorder border)
Sets the border of the outer dial gauge

Parameters:
border - the border of the outer dial gauge

getOuterDialBorder

public GaugeBorder getOuterDialBorder()
Gets the border of the outer dial gauge

Returns:
the border of the outer dial gauge

setPointValue

public void setPointValue(int x,
                          int y)
Sets the value of the given point co-ordinates


adjustAngle

public void adjustAngle(int type)
Adjusts the angle with given adjustment angle constant.

Parameters:
type - the one of the constants : UNIT_INCREMENT, UNIT_DECREMENT, BLOCK_INCREMENT, BLOCK_DECREMENT, MAXIMUM, MINIMUM

getUnitIncrement

public double getUnitIncrement(int direction)
Returns the amount to change the angle's value by, given a unit up/down request.

Returns:
direction - is -1 or 1 for up/down respectively

getBlockIncrement

public double getBlockIncrement(int direction)
Returns the amount to change the angle's value by, given a block (usually "page") up/down request.

Returns:
direction - is -1 or 1 for up/down respectively

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.

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.