|
ElegantJ Gauges Java API Specification v1.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
java.awt.Panel
com.elegantj.gauges.dial.Dial
Base class for NumericDialGauge it uses Circle to render part of a Dial
| 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 |
public static final int POINT1
public static final int POINT2
public static final int POINT3
public static final int POINT4
public static final int POINT5
public static final int NONE
public static final int SIMPLE
public static final int RAISED
public static final int LOWERED
public static final int ARROW_NEEDLE
public static final int LINEAR_NEEDLE
public static final int LINEAR_ARROW_NEEDLE
public static final int LINEAR_CIRCLE_NEEDLE
public static final int BALLS_NEEDLE
public static final int LINEAR_GRAD
public static final int CIRCULAR_GRAD
public static final int MOVE_ON_MOUSE_DRAG
public static final int MOVE_ON_MOUSE_PRESS
public static final int MOVE_OFF
public static final int UNIT_INCREMENT
public static final int UNIT_DECREMENT
public static final int BLOCK_INCREMENT
public static final int BLOCK_DECREMENT
public static final int MAXIMUM
public static final int MINIMUM
protected Circle circle
protected transient java.awt.Image dialImage
| Constructor Detail |
public Dial()
public Dial(int diameter)
diameter - dial diameter, default 60 pixels| Method Detail |
protected void processKeyEvent(java.awt.event.KeyEvent e)
protected void processMouseEvent(java.awt.event.MouseEvent e)
protected void processMouseMotionEvent(java.awt.event.MouseEvent e)
public void setNewValues(int size)
public void setNewValues(int size,
boolean autofit)
size - value fo cirlce radiusautofit - true to fits the gauge to the new dimensionprotected int extraWidth()
protected int extraHeight()
public double getHeaderHeight()
public double getFooterHeight()
public void setGradValuesVisible(boolean value)
value - the intermediate values visibility of the zone .
If it is true, intermediate values will be visiblepublic boolean isGradValuesVisible()
public void renderDial()
protected void renderCustomFeatures(java.awt.Graphics g)
protected void allocImage()
public void update(java.awt.Graphics g)
public void paint(java.awt.Graphics g)
g - the graphics context to use for painting.public void setUnit(java.lang.String n)
public java.lang.String getUnit()
public void setUnitFont(java.awt.Font font)
font - a unit's fontpublic java.awt.Font getUnitFont()
public void setUnitColor(java.awt.Color theColor)
theColor - a unit text colorpublic java.awt.Color getUnitColor()
public void setUnitLocation(java.awt.Point thePoint)
thePoint - a unit text locationpublic java.awt.Point getUnitLocation()
public void setDisplayBoxVisible(boolean value)
value - the visibility of the display boxpublic boolean isDisplayBoxVisible()
public void setDisplayBoxColor(java.awt.Color theColor)
theColor - the background color of the boxpublic java.awt.Color getDisplayBoxColor()
public void setDisplayTextColor(java.awt.Color theColor)
theColor - the foreground color of the boxpublic java.awt.Color getDisplayTextColor()
public void setDisplayTextFont(java.awt.Font theFont)
theFont - the font of the text displayed on the display boxpublic java.awt.Font getDisplayTextFont()
public void setDisplayText(java.lang.String text)
text - the text displayed on the display boxpublic java.lang.String getDisplayText()
public void setDisplayBoxBorder(GaugeBorder border)
border - the border of the display boxpublic GaugeBorder getDisplayBoxBorder()
public void setDisabledAreaColor(java.awt.Color theColor)
theColor - the color from the graphics contextpublic java.awt.Color getDisabledAreaColor()
public void setNeedleVisible(boolean value)
value - the needle visibility . If it is true, needle will be visiblepublic boolean isNeedleVisible()
public void setNeedleColor(java.awt.Color theColor)
theColor - the color from the graphics contextpublic java.awt.Color getNeedleColor()
public void setNeedleLength(double val)
val - the needle lengthpublic double getNeedleLength()
public void setNeedleWidth(double val)
val - the needle widthpublic double getNeedleWidth()
public void setNeedleTail(double val)
val - the needle tail lengthpublic double getNeedleTail()
public void setNeedleType(int val)
val - the needle typepublic int getNeedleType()
public void setNeedleBorder(GaugeBorder border)
border - the border of the needlepublic GaugeBorder getNeedleBorder()
public void setBaseColor(java.awt.Color theColor)
theColor - the color from the graphics contextpublic java.awt.Color getBaseColor()
public void setBaseDialBorder(GaugeBorder border)
border - the border of the base circlepublic GaugeBorder getBaseDialBorder()
public void setGradColor(java.awt.Color theColor)
theColor - the color from the graphics contextpublic java.awt.Color getGradColor()
public void setGradLength(double val)
val - the grad lengthpublic double getGradLength()
public void setGradWidth(double val)
val - the grad widthpublic double getGradWidth()
public void setGradType(int val)
val - the grad typepublic int getGradType()
public void setSubGradColor(java.awt.Color theColor)
theColor - the color from the graphics contextpublic java.awt.Color getSubGradColor()
public void setSubGradLength(double val)
val - the subgrad lengthpublic double getSubGradLength()
public void setSubGradWidth(double val)
val - the subgrad widthpublic double getSubGradWidth()
public void setSubGradType(int val)
val - the subgrad typepublic int getSubGradType()
public void setInnerDialColor(java.awt.Color theColor)
theColor - the color from the graphics contextpublic java.awt.Color getInnerDialColor()
public void setInnerDialBorder(GaugeBorder border)
border - the border of the inner dial gaugepublic GaugeBorder getInnerDialBorder()
public void setHeaderVisible(boolean value)
value - true to visible the headerpublic boolean isHeaderVisible()
public void setHeaderText(java.lang.String value)
value - the header textpublic java.lang.String getHeaderText()
public void setHeaderBackground(java.awt.Color theColor)
theColor - the header background colorpublic java.awt.Color getHeaderBackground()
public void setHeaderForeground(java.awt.Color theColor)
theColor - the header foreground colorpublic java.awt.Color getHeaderForeground()
public void setHeaderFont(java.awt.Font theFont)
theFont - the header fontpublic java.awt.Font getHeaderFont()
public void setHeaderSpacing(double value)
value - the spacing above and below the header textpublic double getHeaderSpacing()
public void setFooterVisible(boolean value)
value - true to visible the footerpublic boolean isFooterVisible()
public void setFooterText(java.lang.String value)
value - the footer textpublic java.lang.String getFooterText()
public void setFooterBackground(java.awt.Color theColor)
theColor - the footer background colorpublic java.awt.Color getFooterBackground()
public void setFooterForeground(java.awt.Color theColor)
theColor - the footer foreground colorpublic java.awt.Color getFooterForeground()
public void setFooterFont(java.awt.Font theFont)
theFont - the footer fontpublic java.awt.Font getFooterFont()
public void setFooterSpacing(double value)
value - the spacing above and below the footer textpublic double getFooterSpacing()
public void setActiveNeedleOn(int value)
value - the mouse activity to move the needlepublic int getActiveNeedleOn()
public void setKeyboardEnabled(boolean value)
value - true to enable the keyboard navigationpublic boolean isKeyboardEnabled()
public void setOuterDialBorder(GaugeBorder border)
border - the border of the outer dial gaugepublic GaugeBorder getOuterDialBorder()
public void setPointValue(int x,
int y)
public void adjustAngle(int type)
type - the one of the constants : UNIT_INCREMENT, UNIT_DECREMENT, BLOCK_INCREMENT,
BLOCK_DECREMENT, MAXIMUM, MINIMUMpublic double getUnitIncrement(int direction)
public double getBlockIncrement(int direction)
public boolean isFocusTraversable()
public boolean isLightweight()
public java.awt.Dimension getPreferredSize()
|
ElegantJ Gauges Java API Specification v1.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||