|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.awt.Component
java.awt.Canvas
rvl.awt.Bar
public class Bar
GUI object for implementing a bar-graph-style method
for I/O of nonnegative quantities. A single mouse click
in the active range will set its value.
Typically, several Bar objects will be stacked
in a single panel. They share a common scale determined
by the BarGroup object passed in the constructor.
You will probably want to add the associated BarGroup
to the same panel, since it shows the scale values.
BarGroup,
Serialized Form| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class java.awt.Canvas |
|---|
java.awt.Canvas.AccessibleAWTCanvas |
| Nested classes/interfaces inherited from class java.awt.Component |
|---|
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
| Field Summary | |
|---|---|
protected java.awt.event.ActionListener |
actionListener
|
| 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 | |
|---|---|
Bar(java.lang.Object ID,
double val,
BarGroup grp)
|
|
Bar(java.lang.Object ID,
int val,
BarGroup grp)
|
|
| Method Summary | |
|---|---|
void |
addActionListener(java.awt.event.ActionListener l)
|
int |
getIntVal()
|
double |
getValue()
|
java.awt.Dimension |
minimumSize()
|
boolean |
mouseDown(java.awt.Event e,
int x,
int y)
public boolean mouseMove(Event e, int x, int y) { if (isHot(x,y)) group.parentFrame.setCursor(Frame.CROSSHAIR_CURSOR); else group.parentFrame.setCursor(Frame.DEFAULT_CURSOR); return true; } |
boolean |
mouseDrag(java.awt.Event e,
int x,
int y)
|
boolean |
mouseEnter(java.awt.Event e,
int x,
int y)
|
boolean |
mouseExit(java.awt.Event e,
int x,
int y)
|
boolean |
mouseUp(java.awt.Event e,
int x,
int y)
|
void |
paint(java.awt.Graphics g)
|
java.awt.Dimension |
preferredSize()
|
void |
setValue(double v)
|
void |
setValue(int v)
|
| Methods inherited from class java.awt.Canvas |
|---|
addNotify, createBufferStrategy, createBufferStrategy, getAccessibleContext, getBufferStrategy, 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, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAlignmentX, getAlignmentY, getBackground, getBaseline, getBaselineResizeBehavior, 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, getMousePosition, 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, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, mouseMove, move, nextFocus, paintAll, paramString, postEvent, 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, setMaximumSize, setMinimumSize, setName, setPreferredSize, 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 |
| Field Detail |
|---|
protected transient java.awt.event.ActionListener actionListener
| Constructor Detail |
|---|
public Bar(java.lang.Object ID,
double val,
BarGroup grp)
ID - object that will be passed as event-handler argument
when a new value is selectedval - initial valuegrp - which bar group is used for scaling
public Bar(java.lang.Object ID,
int val,
BarGroup grp)
ID - object that will be passed as event-handler argument
when a new value is selectedval - initial valuegrp - which bar group is used for scaling| Method Detail |
|---|
public void addActionListener(java.awt.event.ActionListener l)
public double getValue()
public int getIntVal()
public void setValue(double v)
public void setValue(int v)
public java.awt.Dimension preferredSize()
preferredSize in class java.awt.Componentpublic java.awt.Dimension minimumSize()
minimumSize in class java.awt.Componentpublic void paint(java.awt.Graphics g)
paint in class java.awt.Canvas
public boolean mouseEnter(java.awt.Event e,
int x,
int y)
mouseEnter in class java.awt.Component
public boolean mouseExit(java.awt.Event e,
int x,
int y)
mouseExit in class java.awt.Component
public boolean mouseDown(java.awt.Event e,
int x,
int y)
mouseDown in class java.awt.Component
public boolean mouseUp(java.awt.Event e,
int x,
int y)
mouseUp in class java.awt.Component
public boolean mouseDrag(java.awt.Event e,
int x,
int y)
mouseDrag in class java.awt.Component
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||