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.Container | +--java.awt.Panel | +--uk.co.ist.mwt.ScalePanel
Fields inherited from class java.awt.Component | |
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Constructor Summary | |
ScalePanel()
Create a new ScalePanel with default settings (vertical orientation, and default values for the Scale child). |
Method Summary | |
java.awt.Component | add(java.awt.Component comp,
int pos)
Add a component to the Panel; overriden so that any children added are put into the scaleChildPanel. |
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 |
int | getMultiple()
What is the multiple's value? |
int | getValue()
Gets the value of the scale |
boolean | isMaxTopRight()
Returns whether the top/right part of the scale is where its maximum value is |
boolean | isVertical()
Gets the Scale's orientation |
java.awt.Component | locate(int x,
int y)
Locate a component; as we're hiding the existence of the internal scaleChildPanel, we must return one of its children if the click is inside it. |
void | maxTopRightIf(boolean mtr)
Sets the scale up so that the minimum value is on the right/at the top (as appropriate for the orientation). |
void | removeAll()
Remove all components from the panel; actually removes those from the scaleChildPanel. |
void | remove(java.awt.Component comp)
Remove a component from the panel; overriden so that any children are removed from the scaleChildPanel. |
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 | setMinimum(int min)
Sets the minimum value for the scale |
void | setMultiple(int mult)
Sets the multiple's 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 Scale's orientation, and reorganise the children of this panel to reflect this. |
boolean | showingValue()
Are we showing the scale's value at the moment? |
void | showValueIf(boolean whether)
Tell the scale to display its current value |
Methods inherited from class java.awt.Panel | |
addNotify |
Methods inherited from class java.awt.Container | |
add, add, add, add, add, addContainerListener, addNotify, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponentAt, getComponentAt, getComponent, getComponentCount, getComponents, getInsets, getLayout, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, paint, preferredSize, printComponents, print, removeAll, remove, remove, removeContainerListener, removeNotify, setLayout, update, validate |
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 |
Constructor Detail |
public ScalePanel()
Method Detail |
public void setVertical(boolean vert)
vert
- if true, set the orientation to vertical; if false,
set orientation to horizontal.public boolean isVertical()
public void showValueIf(boolean whether)
whether
- if true, the value will be displayed; if false, it won'tpublic boolean showingValue()
public void setDecimalPoints(int dp)
public int getDecimalPoints()
public void setValue(int val)
val
- the new valuepublic int getValue()
public void maxTopRightIf(boolean mtr)
mtr
- true to set the maximum value to the right or top, false
for the maximum at the bottom or left.public boolean isMaxTopRight()
public void setMaximum(int max)
max
- the new maximumpublic int getMaximum()
public void setMinimum(int min)
min
- the new minimumpublic int getMinimum()
public void setMultiple(int mult)
mult
- the new multiplepublic int getMultiple()
public java.awt.Component add(java.awt.Component comp, int pos)
comp
- the component to add
pos
- the position in the list of children at which to add it;
-1 means 'at the end'.public void remove(java.awt.Component comp)
comp
- the component to removepublic void removeAll()
public java.awt.Component locate(int x, int y)
x
- the x co-ordinate within this component which the desired
component contains
y
- the y co-ordinate within this component which the desired
component containsClass | Tree | Deprecated | Index | Help | |||
PREV CLASS | NEXT CLASS | FRAMES | NO FRAMES | ||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |