|
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.Canvas
com.elegantj.gauges.dial.Circle
This is used for rendering Dial
| Nested Class Summary |
| Nested classes inherited from class java.awt.Canvas |
java.awt.Canvas.AccessibleAWTCanvas |
| Nested classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
| Field Summary |
| 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 | |
Circle(double cx,
double cy,
double radius,
java.util.Vector new_Zones,
double theMaximum,
double theMinimum,
double maxAngle)
|
|
Circle(double cx,
double cy,
double radius,
java.util.Vector new_Zones,
double theMaximum,
double theMinimum,
double minAngle,
double maxAngle)
|
|
Circle(double cx,
double cy,
double radius,
java.util.Vector new_Zones,
double theMaximum,
double theMinimum,
double minAngle,
double maxAngle,
boolean clockwise)
Creates a Circle with specified location, radious, zones, minimum value, maximum value and maximum angle. |
|
Circle(double cx,
double cy,
java.util.Vector new_Zones,
double theMaximum,
double theMinimum,
double maxAngle)
|
|
| Method Summary | |
double |
calAngleValue(double angle)
Calculates the value for given angle degree |
double |
calPointAngle(int x,
int y)
Calculates the angle value for given point |
double |
calValueAngle(double value)
Calculates the value angle for each value |
void |
draw(java.awt.Graphics g,
java.awt.Color color,
GaugeBorder border)
Basic circle renderer |
void |
drawBox(java.awt.Graphics g,
java.lang.String str,
java.awt.Color bColor,
java.awt.Color fColor,
java.awt.Font font,
GaugeBorder border)
Draws a rectangular box to display the given text |
void |
drawFooter(java.awt.Graphics g,
java.lang.String text,
java.awt.Font font,
java.awt.Color bColor,
java.awt.Color fColor,
java.awt.Rectangle bounds)
Draws the footer area |
void |
drawGrad(java.awt.Graphics g,
int gradType,
java.awt.Color gradColor,
double gradLength,
double gradWidth,
int subGradType,
java.awt.Color subGradColor,
double subGradLength,
double subGradWidth,
GaugeBorder border)
Draws the graduations of the circle |
void |
drawHeader(java.awt.Graphics g,
java.lang.String text,
java.awt.Font font,
java.awt.Color bColor,
java.awt.Color fColor,
java.awt.Rectangle bounds)
Draws the header area |
void |
drawInner(java.awt.Graphics g,
java.awt.Color baseColor,
GaugeBorder baseDialBorder)
Draws the innermost filled circle |
void |
drawNeedle(java.awt.Graphics g,
int needleType,
java.awt.Color needleColor,
double needleWidth,
double needleLength,
double needleTail,
GaugeBorder needleBorder)
Draws a Needle |
void |
drawRadial(java.awt.Graphics g,
double angle,
int gradType,
java.awt.Color gradColor,
double gradLength,
double gradWidth,
int borderWidth)
Draw a single radial. |
void |
drawRadialValues(java.awt.Graphics g,
java.awt.Font font,
java.awt.Color fontColor)
Draws the intermediate values of each zone |
void |
drawStaticZone(java.awt.Graphics g,
java.awt.Color dColor,
java.awt.Color bColor,
GaugeBorder border)
Draws a static zone of gray color when the maximum angle is less than 360 |
void |
drawSubRadial(java.awt.Graphics g,
double angle,
int subGradType,
java.awt.Color subGradColor,
double subGradLength,
double subGradWidth,
int borderWidth)
Draw a single subradial. |
void |
drawUnit(java.awt.Graphics g,
java.lang.String unit,
java.awt.Font font,
java.awt.Color fontColor,
java.awt.Point location)
Draws the unit text |
void |
drawValues(java.awt.Graphics g,
java.awt.Font font,
java.awt.Color fontColor)
Draws the low and high values of each zone |
void |
drawZone(java.awt.Graphics g,
java.awt.Color color,
int borderWidth)
Draws the various zones of the circle |
java.lang.String |
fp2ScaleString(double value)
Convert a double value to a scale String representation. |
double |
getAdjustedBaseRadius()
Gets the base circle's radius adjusted to the gauge |
java.awt.Rectangle |
getAdjustedDisplayBoxBounds()
Gets the display box boundaries adjusted to the gauge |
double |
getAdjustedGradLength(int gradType,
double gradLength)
Gets the grad length adjusted to the gauge |
double |
getAdjustedGradRadius()
Gets the grad radius adjusted to the gauge |
int |
getAdjustedGradType(int gradType)
Gets the grad type adjusted to the gauge |
double |
getAdjustedGradWidth(int gradType,
double gradWidth)
Gets the grad width adjusted to the gauge |
int |
getAdjustedInt(double value)
Gets the adjusted integer value for the given double value |
double |
getAdjustedNeedleLength(double needleType,
double needleLength)
Gets the needle length adjusted to the gauge |
double |
getAdjustedNeedleTail(int needleType,
double needleTail)
Gets the needle tail adjusted to the gauge |
int |
getAdjustedNeedleType(int needleType)
Gets the needle type adjusted to the gauge |
double |
getAdjustedNeedleWidth(int needleType,
double needleWidth)
Gets the needle width adjusted to the gauge |
double |
getAdjustedSubGradLength(int subGradType,
double subGradLength)
Gets the subgrad length adjusted to the gauge |
int |
getAdjustedSubGradType(int subGradType)
Gets the subgrad type adjusted to the gauge |
double |
getAdjustedSubGradWidth(int subGradType,
double subGradWidth)
Gets the subgrad width adjusted to the gauge |
java.awt.Point |
getAdjustedUnitLocation(java.awt.Font font,
java.lang.String unit,
java.awt.Point location)
Gets the unit location adjusted to the gauge |
double |
getAdjustedValueRadius()
Gets the value radius adjusted to the gauge |
double |
getBaseRadius()
Gets the length of a arrow radial. |
double |
getDialRadius()
Gets the radius of the dial to be displayed. |
java.awt.Rectangle |
getDisplayBoxBounds()
Gets the display box boundaries |
int |
getFraction()
Gets the length of the fraction part of the value |
double |
getGradRadius()
Gets the radius of the grads to be displayed. |
double |
getMaximum()
Returns maximum value of the needle gauge |
double |
getMaximumAngle()
Returns maximum angle value of the needle gauge |
double |
getMinimum()
Returns minimum value of the needle gauge |
double |
getMinimumAngle()
Returns minimum angle value of the needle gauge |
double |
getValue()
Gets the current value of the needle guage |
double |
getValueRadius()
Gets the radius of the values to be displayed. |
java.util.Vector |
getZones()
Returns zones of the dial |
boolean |
isClockwise()
Gets the direction of the dial rotation clockwise or anticlockwise |
void |
setBaseRadius(double val)
Sets the radius of a base circle's radial. |
void |
setClockwise(boolean value)
Sets the direction of the dial rotation clockwise or anticlockwise |
void |
setDialRadius(double val)
Sets the radius of the dial to be displayed. |
void |
setDisplayBoxBounds(java.awt.Rectangle rect)
Sets the display box boundaries, considers default values, if the rectangle is -1,-1,-1,-1 |
void |
setFraction(int len)
Sets the length of the fraction part of the value |
void |
setGradRadius(double val)
Sets the radius of the grads to be displayed. |
void |
setInnerRadius(double smallRadiusPct)
Define the length of a inner radial by defining the radii it has to fit in. |
void |
setMaximum(double theMaximum)
Sets the maximum value of the needle guage |
void |
setMaximumAngle(double angle)
Sets the maximum angle value of the needle guage |
void |
setMinimum(double theMinimum)
Sets the minimum value of the needle guage |
void |
setMinimumAngle(double angle)
Sets the minimum angle value of the needle guage |
void |
setNewValues(double cx,
double cy,
double val)
Sets new values for the dial. |
void |
setOuterRadius(double largeRadiusPct)
Define the length of a outer radial by defining the radii it has to fit in. |
void |
setRadialSize(double smallRadiusPct,
double largeRadiusPct)
Define the length of a inner radial and outer radial by defining the radii it has to fit in. |
void |
setValue(double theValue)
Sets the current value of the needle guage |
void |
setValueRadius(double val)
Sets the radius of the values to be displayed. |
void |
setZonesToNewValue(java.util.Vector v)
Sets the new zone values |
void |
totalDiv1()
Calculating the total divisions |
| Methods inherited from class java.awt.Canvas |
addNotify, createBufferStrategy, createBufferStrategy, getAccessibleContext, getBufferStrategy, paint, update |
| Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, deliverEvent, disable, disableEvents, dispatchEvent, doLayout, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, getAlignmentX, getAlignmentY, getBackground, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeys, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getMinimumSize, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusCycleRoot, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, paramString, postEvent, preferredSize, prepareImage, prepareImage, print, printAll, processComponentEvent, processEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setFont, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle, validate |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public Circle(double cx,
double cy,
java.util.Vector new_Zones,
double theMaximum,
double theMinimum,
double maxAngle)
public Circle(double cx,
double cy,
double radius,
java.util.Vector new_Zones,
double theMaximum,
double theMinimum,
double maxAngle)
public Circle(double cx,
double cy,
double radius,
java.util.Vector new_Zones,
double theMaximum,
double theMinimum,
double minAngle,
double maxAngle)
public Circle(double cx,
double cy,
double radius,
java.util.Vector new_Zones,
double theMaximum,
double theMinimum,
double minAngle,
double maxAngle,
boolean clockwise)
cx - x-cordinate of the circle's centerradius - radius of the circle, default 100.0new_Zones - zones descriptiontheMaximum - maximum valuetheMinimum - minimum valueminAngle - minimum angle of the circlemaxAngle - maximum angle of the circleclockwise - rotation of the circle's value| Method Detail |
public void setNewValues(double cx,
double cy,
double val)
cx - it is used to set x-coordinate of the center pointcy - it is used to set y-coordinate of the center pointval - it is used to set the inner radius, outer radius, arrow radiuspublic void setBaseRadius(double val)
val - the base circle's radiuspublic double getBaseRadius()
public void setValueRadius(double val)
val - the value radiuspublic double getValueRadius()
public void setGradRadius(double val)
val - the grad radiuspublic double getGradRadius()
public void setDialRadius(double val)
val - the dial radiuspublic double getDialRadius()
public void setInnerRadius(double smallRadiusPct)
smallRadiusPct - inner radius valuepublic void setOuterRadius(double largeRadiusPct)
largeRadiusPct - outer radius value
public void setRadialSize(double smallRadiusPct,
double largeRadiusPct)
smallRadiusPct - inner radius valuelargeRadiusPct - outer radius valuepublic java.util.Vector getZones()
public void setZonesToNewValue(java.util.Vector v)
v - zone new valuespublic void setClockwise(boolean value)
value - boolean type true specifies double clockwise directionpublic boolean isClockwise()
public java.lang.String fp2ScaleString(double value)
value - Specifies double value to be convertedpublic void totalDiv1()
public void draw(java.awt.Graphics g,
java.awt.Color color,
GaugeBorder border)
public void drawZone(java.awt.Graphics g,
java.awt.Color color,
int borderWidth)
g - color - inner color of the dial
public void drawGrad(java.awt.Graphics g,
int gradType,
java.awt.Color gradColor,
double gradLength,
double gradWidth,
int subGradType,
java.awt.Color subGradColor,
double subGradLength,
double subGradWidth,
GaugeBorder border)
public void drawValues(java.awt.Graphics g,
java.awt.Font font,
java.awt.Color fontColor)
public void drawRadialValues(java.awt.Graphics g,
java.awt.Font font,
java.awt.Color fontColor)
public void drawBox(java.awt.Graphics g,
java.lang.String str,
java.awt.Color bColor,
java.awt.Color fColor,
java.awt.Font font,
GaugeBorder border)
public void drawUnit(java.awt.Graphics g,
java.lang.String unit,
java.awt.Font font,
java.awt.Color fontColor,
java.awt.Point location)
public void drawStaticZone(java.awt.Graphics g,
java.awt.Color dColor,
java.awt.Color bColor,
GaugeBorder border)
public void drawInner(java.awt.Graphics g,
java.awt.Color baseColor,
GaugeBorder baseDialBorder)
public void drawRadial(java.awt.Graphics g,
double angle,
int gradType,
java.awt.Color gradColor,
double gradLength,
double gradWidth,
int borderWidth)
g - graphics contextangle - angle value to draw a radialgradType - grad type such as linear or circulargradColor - grad colorgradLength - grad lengthgradWidth - grad widthborderWidth - inner border width
public void drawSubRadial(java.awt.Graphics g,
double angle,
int subGradType,
java.awt.Color subGradColor,
double subGradLength,
double subGradWidth,
int borderWidth)
g - graphics contextangle - angle value to draw a subradialsubGradType - subgrad type such as linear or circularsubGradColor - subgrad colorsubGradLength - subgrad lengthsubGradWidth - subgrad widthborderWidth - inner border width
public void drawNeedle(java.awt.Graphics g,
int needleType,
java.awt.Color needleColor,
double needleWidth,
double needleLength,
double needleTail,
GaugeBorder needleBorder)
public void drawHeader(java.awt.Graphics g,
java.lang.String text,
java.awt.Font font,
java.awt.Color bColor,
java.awt.Color fColor,
java.awt.Rectangle bounds)
public void drawFooter(java.awt.Graphics g,
java.lang.String text,
java.awt.Font font,
java.awt.Color bColor,
java.awt.Color fColor,
java.awt.Rectangle bounds)
public double calValueAngle(double value)
public double calPointAngle(int x,
int y)
public double calAngleValue(double angle)
public void setFraction(int len)
len - the length of the fraction part of the valuepublic int getFraction()
public void setValue(double theValue)
theValue - current valuepublic double getValue()
public void setMinimum(double theMinimum)
theMinimum - lowest value the meter can indicatepublic double getMinimum()
public void setMaximum(double theMaximum)
theMaximum - highest value the meter can indicatepublic double getMaximum()
public void setMinimumAngle(double angle)
angle - lowest angle value the meter can rotatepublic double getMinimumAngle()
public void setMaximumAngle(double angle)
angle - highest angle value the meter can rotatepublic double getMaximumAngle()
public void setDisplayBoxBounds(java.awt.Rectangle rect)
rect - the rectangle contains the display box boundariespublic java.awt.Rectangle getDisplayBoxBounds()
public java.awt.Rectangle getAdjustedDisplayBoxBounds()
public double getAdjustedBaseRadius()
public double getAdjustedValueRadius()
public double getAdjustedGradRadius()
public int getAdjustedNeedleType(int needleType)
public double getAdjustedNeedleLength(double needleType,
double needleLength)
public double getAdjustedNeedleWidth(int needleType,
double needleWidth)
public double getAdjustedNeedleTail(int needleType,
double needleTail)
public java.awt.Point getAdjustedUnitLocation(java.awt.Font font,
java.lang.String unit,
java.awt.Point location)
public int getAdjustedGradType(int gradType)
public double getAdjustedGradLength(int gradType,
double gradLength)
public double getAdjustedGradWidth(int gradType,
double gradWidth)
public int getAdjustedSubGradType(int subGradType)
public double getAdjustedSubGradLength(int subGradType,
double subGradLength)
public double getAdjustedSubGradWidth(int subGradType,
double subGradWidth)
public int getAdjustedInt(double value)
|
ElegantJ Gauges Java API Specification v1.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||