|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.Component | +--java.awt.Canvas | +--lcarsbeans.LcarsGauge
A gauge.
Inner classes inherited from class java.awt.Component |
java.awt.Component.AWTTreeLock |
Field Summary | |
protected java.awt.Color |
barColor
|
protected java.awt.Color |
boundsColor
|
static int |
gdDown
Direction of the gauge: down. |
static int |
gdLeft
Direction of the gauge: left. |
static int |
gdRight
Direction of the gauge: right. |
static int |
gdUp
Direction of the gauge: up. |
static int |
ggFour
Four grid rectangles. |
static int |
ggOne
One grid rectangle. |
static int |
ggThree
Three grid rectangles. |
static int |
ggTwo
Two grid rectangles. |
static int |
gsGridded
Gridded frame(s) around the gauge bar. |
static int |
gsNormal
No gridded frame(s) around the gauge bar. |
Fields inherited from class java.awt.Component |
actionListenerK,
adjustmentListenerK,
appContext,
background,
BOTTOM_ALIGNMENT,
CENTER_ALIGNMENT,
componentListener,
componentListenerK,
componentOrientation,
containerListenerK,
cursor,
dropTarget,
enabled,
eventMask,
focusListener,
focusListenerK,
font,
foreground,
hasFocus,
height,
incRate,
inputMethodListener,
inputMethodListenerK,
isInc,
isPacked,
itemListenerK,
keyListener,
keyListenerK,
LEFT_ALIGNMENT,
locale,
LOCK,
minSize,
mouseListener,
mouseListenerK,
mouseMotionListener,
mouseMotionListenerK,
newEventsOnly,
ownedWindowK,
parent,
peer,
peerFont,
popups,
prefSize,
RIGHT_ALIGNMENT,
textListenerK,
TOP_ALIGNMENT,
valid,
visible,
width,
windowListenerK,
x,
y |
Constructor Summary | |
LcarsGauge()
Constructs a new instance. |
Method Summary | |
void |
addActionListener(java.awt.event.ActionListener l)
Adds an Action Listener. |
void |
addLcarsGaugeProgressChangeListener(LcarsGaugeProgressChangeListener l)
Adds a listener for the LcarsGaugeProgressChangedEvent. |
void |
addProgress(int difference)
Adds or subtracts the difference to/from the current progress. |
protected void |
fireLcarsGaugeProgressChange()
Sends the Change-Event to all listeners. |
java.awt.Color |
getBarColor()
Returns the color of the gauge bar. |
java.awt.Color |
getBoundsColor()
Returns the color of the rectangle around the bar. |
java.awt.Color |
getFontColor()
Returns the color used for drawing the text. |
int |
getGaugeDirection()
Returns the direction of the gauge. |
int |
getGaugeGrids()
Returns the number of grid rectangles. |
int |
getGaugeStyle()
Returns the style of the gauge. |
int |
getGridFourAtPercent()
Returns the percentage at which the fourth grid rectangle starts. |
java.awt.Color |
getGridFourColor()
Returns the color of the fourth grid rectangle. |
int |
getGridLineEveryNPercent()
Returns how much percent place is between the thin lines inside the grids. |
java.awt.Color |
getGridOneColor()
Returns the color of the first grid rectangle. |
int |
getGridThreeAtPercent()
Returns the percentage at which the third grid rectangle starts. |
java.awt.Color |
getGridThreeColor()
Returns the color of the third grid rectangle. |
int |
getGridTwoAtPercent()
Returns the percentage at which the second grid rectangle starts. |
java.awt.Color |
getGridTwoColor()
Returns the color of the second grid rectangle. |
int |
getMaxValue()
Returns the maximal progress. |
int |
getMinValue()
Returns the minimal progress. |
java.awt.Dimension |
getPreferredSize()
Returns the preferred size of the component. |
int |
getProgress()
Returns the current progress. |
boolean |
isGaugeBounds()
Returns whether there is a rectangle around the bar. |
boolean |
isShowText()
Returns whether the current progress is shown beside the bar. |
void |
paint(java.awt.Graphics g)
Paints the control. |
void |
removeActionListener(java.awt.event.ActionListener l)
Removes an Action Listener. |
void |
removeLcarsGaugeProgressChangeListener(LcarsGaugeProgressChangeListener l)
Removes a listener for the LcarsGaugeProgressChangedEvent. |
void |
setBarColor(java.awt.Color newBarColor)
Sets the color of the the gauge bar. |
void |
setBoundsColor(java.awt.Color newBoundsColor)
Sets the color of the rectangle around the bar. |
void |
setFontColor(java.awt.Color newFontColor)
Sets the color used for drawing the text. |
void |
setGaugeBounds(boolean newGaugeBounds)
Sets whether there is a rectangle around the bar. |
void |
setGaugeDirection(int newGaugeDirection)
Sets the direction of the gauge. Possible values: gdUp, gdRight, gdDown, gdLeft If the new value is not in the range between 0 and 3 the property is set to gdUp. |
void |
setGaugeGrids(int newGaugeGrids)
Sets the number of grid rectangles. Possible values: ggOne, ggTwo, ggThree, ggFour If the new value is not in the range between 0 and 4 the property is set to ggOne. |
void |
setGaugeStyle(int newGaugeStyle)
Sets the style of the gauge. Possible values: gsNormal, gsGridded If the new value is not 0 or 1 the property is set to gsNormal. |
void |
setGridFourAtPercent(int newGridFourAtPercent)
Sets the percentage at which the fourth grid rectangle starts. The values of this property must be multiples of 5 (you can enter whatever you want, it will be rounded automatically). |
void |
setGridFourColor(java.awt.Color newGridFourColor)
Sets the color of the fourth grid rectangle. |
void |
setGridLineEveryNPercent(int newGridLineEveryNPercent)
Sets how much percent place is between the thin lines inside the grids. Values of this property may be either 5 or 10 (you can enter whatever you want. |
void |
setGridOneColor(java.awt.Color newGridOneColor)
Sets the color of the first grid rectangle. |
void |
setGridThreeAtPercent(int newGridThreeAtPercent)
Sets the percentage at which the third grid rectangle starts. The values of this property must be multiples of 5 (you can enter whatever you want, it will be rounded automatically). |
void |
setGridThreeColor(java.awt.Color newGridThreeColor)
Sets the color of the third grid rectangle. |
void |
setGridTwoAtPercent(int newGridTwoAtPercent)
Sets the percentage at which the second grid rectangle starts. The values of this property must be multiples of 5 (you can enter whatever you want, it will be rounded automatically). |
void |
setGridTwoColor(java.awt.Color newGridTwoColor)
Sets the color of the second grid rectangle. |
void |
setMaxValue(int newMaxValue)
Sets the maximal progress. Property should not be less than 0. |
void |
setMinValue(int newMinValue)
Sets the minimal progress. Property should not be less than 0. |
void |
setProgress(int newProgress)
Sets the current progress. |
void |
setShowText(boolean newShowText)
Sets whether the current progress is shown beside the bar. |
void |
update(java.awt.Graphics g)
An overwritten and because of this almost flicker-free version of update(). |
Methods inherited from class java.awt.Canvas |
|
Methods inherited from class java.awt.Component |
action,
add,
addComponentListener,
addFocusListener,
addInputMethodListener,
addKeyListener,
addMouseListener,
addMouseMotionListener,
addPropertyChangeListener,
addPropertyChangeListener,
areInputMethodsEnabled,
bounds,
checkImage,
checkImage,
coalesceEvents,
contains,
contains,
createImage,
createImage,
deliverEvent,
disable,
disableEvents,
dispatchEvent,
dispatchEventImpl,
doLayout,
enable,
enable,
enableEvents,
enableInputMethods,
eventEnabled,
firePropertyChange,
getAlignmentX,
getAlignmentY,
getBackground,
getBounds,
getBounds,
getColorModel,
getComponentAt,
getComponentAt,
getComponentOrientation,
getCursor,
getDropTarget,
getFont_NoClientCode,
getFont,
getFontMetrics,
getForeground,
getGraphics,
getHeight,
getInputContext,
getInputMethodRequests,
getLocale,
getLocation,
getLocation,
getLocationOnScreen,
getMaximumSize,
getMinimumSize,
getName,
getNativeContainer,
getParent_NoClientCode,
getParent,
getPeer,
getSize,
getSize,
getToolkit,
getToolkitImpl,
getTreeLock,
getWidth,
getX,
getY,
gotFocus,
handleEvent,
hasFocus,
hide,
imageUpdate,
inside,
invalidate,
isDisplayable,
isDoubleBuffered,
isEnabled,
isEnabledImpl,
isFocusTraversable,
isLightweight,
isOpaque,
isShowing,
isValid,
isVisible,
keyDown,
keyUp,
layout,
lightweightPrint,
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,
processInputMethodEvent,
processKeyEvent,
processMouseEvent,
processMouseMotionEvent,
remove,
removeComponentListener,
removeFocusListener,
removeInputMethodListener,
removeKeyListener,
removeMouseListener,
removeMouseMotionListener,
removeNotify,
removePropertyChangeListener,
removePropertyChangeListener,
repaint,
repaint,
repaint,
repaint,
requestFocus,
reshape,
resize,
resize,
setBackground,
setBounds,
setBounds,
setComponentOrientation,
setCursor,
setDropTarget,
setEnabled,
setFont,
setForeground,
setLocale,
setLocation,
setLocation,
setName,
setSize,
setSize,
setVisible,
show,
show,
size,
toString,
transferFocus,
validate |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Field Detail |
public static final int gsNormal
public static final int gsGridded
public static final int gdUp
public static final int gdRight
public static final int gdDown
public static final int gdLeft
public static final int ggOne
public static final int ggTwo
public static final int ggThree
public static final int ggFour
protected java.awt.Color boundsColor
protected java.awt.Color barColor
Constructor Detail |
public LcarsGauge()
Method Detail |
public void paint(java.awt.Graphics g)
public void update(java.awt.Graphics g)
public java.awt.Dimension getPreferredSize()
public java.awt.Color getFontColor()
public void setFontColor(java.awt.Color newFontColor)
public int getGaugeStyle()
public void setGaugeStyle(int newGaugeStyle)
public int getGaugeGrids()
public void setGaugeGrids(int newGaugeGrids)
public int getGridTwoAtPercent()
public void setGridTwoAtPercent(int newGridTwoAtPercent)
public int getGridThreeAtPercent()
public void setGridThreeAtPercent(int newGridThreeAtPercent)
public int getGridFourAtPercent()
public void setGridFourAtPercent(int newGridFourAtPercent)
public boolean isShowText()
public void setShowText(boolean newShowText)
public boolean isGaugeBounds()
public void setGaugeBounds(boolean newGaugeBounds)
public java.awt.Color getBoundsColor()
public void setBoundsColor(java.awt.Color newBoundsColor)
public java.awt.Color getBarColor()
public void setBarColor(java.awt.Color newBarColor)
public java.awt.Color getGridOneColor()
public void setGridOneColor(java.awt.Color newGridOneColor)
public java.awt.Color getGridTwoColor()
public void setGridTwoColor(java.awt.Color newGridTwoColor)
public java.awt.Color getGridThreeColor()
public void setGridThreeColor(java.awt.Color newGridThreeColor)
public java.awt.Color getGridFourColor()
public void setGridFourColor(java.awt.Color newGridFourColor)
public int getGaugeDirection()
public void setGaugeDirection(int newGaugeDirection)
public int getGridLineEveryNPercent()
public void setGridLineEveryNPercent(int newGridLineEveryNPercent)
public int getMinValue()
public void setMinValue(int newMinValue)
public int getMaxValue()
public void setMaxValue(int newMaxValue)
public int getProgress()
public void setProgress(int newProgress)
public void addProgress(int difference)
protected void fireLcarsGaugeProgressChange()
public void addLcarsGaugeProgressChangeListener(LcarsGaugeProgressChangeListener l)
public void removeLcarsGaugeProgressChangeListener(LcarsGaugeProgressChangeListener l)
public void addActionListener(java.awt.event.ActionListener l)
public void removeActionListener(java.awt.event.ActionListener l)
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |