Class | Tree | Deprecated | Index | Help | |||
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 | +--uk.co.ist.mwt.ShadowedComponent | +--uk.co.ist.mwt.Scale
Field Summary | |
static int | kUndefined
A constant to say that a resource setting is undefined. |
Fields inherited from class java.awt.Component | |
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Constructor Summary | |
Scale()
Creates a scale with a normal shadow thickness |
Method Summary | |
int | getDecimalPoints()
Gets the number of digits to the right of the decimal point if we've decided to show the value |
int | getMaximum()
Gets the maximum value for the scale |
int | getMinimum()
Gets the minimum value for the scale |
java.awt.Dimension | getMinimumSize()
Finds out the smallest possible size for the scale |
int | getMultiple()
What is the multiple's value? |
java.awt.Dimension | getPreferredSize()
Finds out the size the scale would like to be |
boolean | getShowValue()
Tells you whether this scale is showing its value |
int | getValue()
Gets the value of the scale |
boolean | getVertical()
Accessor for the current orientation |
boolean | isMaxTopRight()
Returns whether the top/right part of the scale is where its maximum value is |
void | onMouseDown(int x,
int y)
Event handler to start tracking mouse movements on mousedown; decides whether the button press is the start of a drag, or part of a paging action (ie. the user has clicked in the trough) |
void | onMouseDragged(int x,
int y)
Handles drags by updating the current value |
void | onMouseUp(int x,
int y)
Event handler to work out what to do when the user releases the mouse button; if we were dragging, then set the value to the appropriate value. |
void | paint(java.awt.Graphics g)
Draws the scale |
void | setBounds(int x,
int y,
int width,
int height)
Changes the size/position of the scale |
void | setDecimalPoints(int dp)
Sets the number of digits to the right of the decimal point if we've decided to show the value |
void | setMaximum(int max)
Sets the maximum value for the scale |
void | setMaxTopRight(boolean mtr)
Sets the scale up so that the minimum value is on the right/at the bottom (as appropriate for the orientation). |
void | setMinimum(int min)
Sets the minimum value for the scale |
void | setMultiple(int mult)
Sets the multiple's value. |
void | setShowValue(boolean whether)
Tell the scale to display its current value |
void | setValue(int val)
Sets the current value of the scale, rounded up or down to the minimum or maximum if appropriate |
void | setVertical(boolean vert)
Sets the current orientation to vertical (or horizontal, of course) |
Methods inherited from class uk.co.ist.mwt.ShadowedComponent | |
draw3DRect, draw3DRect, draw3DRect, draw3DRect, drawShadow, drawShadow, getBottomShadowColor, getShadowThickness, getTopShadowColor, setBottomShadowColor, setShadowThickness, setTopShadowColor |
Methods inherited from class java.awt.Canvas | |
addNotify, paint |
Methods inherited from class java.awt.Component | |
action, add, addComponentListener, addFocusListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, bounds, checkImage, checkImage, contains, contains, createImage, createImage, deliverEvent, disable, dispatchEvent, doLayout, enable, enable, enableInputMethods, getAlignmentX, getAlignmentY, getBackground, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getMinimumSize, getName, getParent, getPeer, getPreferredSize, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isDisplayable, isDoubleBuffered, isEnabled, isFocusTraversable, 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, paint, postEvent, preferredSize, prepareImage, prepareImage, printAll, print, 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, update, validate |
Methods inherited from class java.lang.Object | |
equals, getClass, hashCode, notifyAll, notify, toString, wait, wait, wait |
Field Detail |
public static final int kUndefined
Constructor Detail |
public Scale()
Method Detail |
public void setVertical(boolean vert)
public boolean getVertical()
public void setShowValue(boolean whether)
public boolean getShowValue()
public void setDecimalPoints(int dp)
public int getDecimalPoints()
public void setValue(int val)
public int getValue()
public void setMaxTopRight(boolean mtr)
public boolean isMaxTopRight()
public void setMaximum(int max)
public int getMaximum()
public void setMinimum(int min)
public int getMinimum()
public void setMultiple(int mult)
public int getMultiple()
public void setBounds(int x, int y, int width, int height)
public void paint(java.awt.Graphics g)
public java.awt.Dimension getPreferredSize()
public java.awt.Dimension getMinimumSize()
public void onMouseDown(int x, int y)
public void onMouseUp(int x, int y)
public void onMouseDragged(int x, int y)
Class | Tree | Deprecated | Index | Help | |||
PREV CLASS | NEXT CLASS | FRAMES | NO FRAMES | ||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |