|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.awt.Component java.awt.Container java.awt.Panel marf.gui.util.SmartSizablePanel marf.gui.util.ColoredStatusPanel
public class ColoredStatusPanel
Panel to be used as a status bar with color gradience.
TODO: refactor. $Id: ColoredStatusPanel.java,v 1.11 2007/12/18 03:46:08 mokhov Exp $
Nested Class Summary |
---|
Nested classes/interfaces inherited from class java.awt.Panel |
---|
java.awt.Panel.AccessibleAWTPanel |
Nested classes/interfaces inherited from class java.awt.Container |
---|
java.awt.Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
Field Summary | |
---|---|
static int |
GREEN_PERCENTAGE
From 41% (YELLOW_PERCENTAGE + 1) to 100% inclusively. |
protected int |
iCurrentStatus
Should be between lower and upper bounds. |
protected int |
iLowerBound
Lower bound. |
protected int |
iUpperBound
Upper bound. |
static int |
RED_PERCENTAGE
From 0% to 10% inclusively. |
static int |
YELLOW_PERCENTAGE
From 11% (RED_PERCENTAGE + 1) to 40% inclusively. |
Fields inherited from class marf.gui.util.SmartSizablePanel |
---|
iHeight, iWidth, iX, iY |
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 | |
---|---|
ColoredStatusPanel()
Default panel as ColoredStatusPanel(0, 0, 0, 0, 0, 100, 50) . |
|
ColoredStatusPanel(int piX,
int piY,
int piWidth,
int piHeight,
int piLowerBound,
int piUpperBound,
int piCurrentStatus)
Construction. |
Method Summary | |
---|---|
int |
getCurrentStatus()
|
int |
getLowerBound()
|
static java.lang.String |
getMARFSourceCodeRevision()
Retrieves class' revision. |
int |
getUpperBound()
|
void |
paint(java.awt.Graphics poGraphics)
Draws this panel. |
void |
setCurrentStatus(int piCurrentStatus)
Sets current status to a new value and repaints. |
void |
setLowerBound(int piLowerBound)
Sets lower bound. |
void |
setUpperBound(int piUpperBound)
Sets upper bound. |
Methods inherited from class marf.gui.util.SmartSizablePanel |
---|
getHeight, getWidth, getX, getY, setHeight, setWidth, setX, setY |
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, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, paramString, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, removeNotify, setComponentZOrder, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, setLayout, transferFocusBackward, transferFocusDownCycle, update, 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, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, 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, processKeyEvent, processMouseEvent, processMouseMotionEvent, 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, setMaximumSize, setMinimumSize, setName, setPreferredSize, 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 |
---|
protected int iLowerBound
protected int iUpperBound
protected int iCurrentStatus
public static final int RED_PERCENTAGE
public static final int YELLOW_PERCENTAGE
public static final int GREEN_PERCENTAGE
Constructor Detail |
---|
public ColoredStatusPanel(int piX, int piY, int piWidth, int piHeight, int piLowerBound, int piUpperBound, int piCurrentStatus)
piX
- x positionpiY
- y positionpiWidth
- panel widthpiHeight
- panel heightpiLowerBound
- lower boundpiUpperBound
- upper boundpiCurrentStatus
- current statuspublic ColoredStatusPanel()
ColoredStatusPanel(0, 0, 0, 0, 0, 100, 50)
.
ColoredStatusPanel(int, int, int, int, int, int, int)
Method Detail |
---|
public void paint(java.awt.Graphics poGraphics)
paint
in class java.awt.Container
poGraphics
- underlying graphics subsystem referenceComponent.paint(java.awt.Graphics)
public void setLowerBound(int piLowerBound)
piLowerBound
- new lower boundpublic void setUpperBound(int piUpperBound)
piUpperBound
- new upper boundpublic void setCurrentStatus(int piCurrentStatus)
piCurrentStatus
- possible new current statuspublic int getLowerBound()
public int getUpperBound()
public int getCurrentStatus()
public static java.lang.String getMARFSourceCodeRevision()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |