jfig.gui
Class ValueDialog
java.lang.Object
java.awt.Component
java.awt.Container
java.awt.Window
java.awt.Frame
jfig.gui.ValueDialog
- All Implemented Interfaces:
- javax.accessibility.Accessible, java.awt.event.ActionListener, java.util.EventListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable
- public class ValueDialog
- extends java.awt.Frame
- implements java.awt.event.ActionListener
Class ValueDialog. A generic popup dialog to set numerical
(integer values). The dialog consists of a text label, typically
used for a status prompt, a textfield for direct input of the
required value, and several buttons ("++", "--", "*2", and "/2".
The dialog is closed with the "OK" button or the or keys.
- See Also:
- Serialized Form
Nested classes inherited from class java.awt.Frame |
java.awt.Frame.AccessibleAWTFrame |
Nested classes inherited from class java.awt.Window |
java.awt.Window.AccessibleAWTWindow |
Nested classes inherited from class java.awt.Container |
java.awt.Container.AccessibleAWTContainer |
Nested classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
Field Summary |
(package private) boolean |
debug
|
(package private) java.awt.Dimension |
dm
|
(package private) java.awt.Button |
m05Button
|
(package private) java.awt.Button |
m2Button
|
(package private) java.awt.Button |
mmButton
|
(package private) java.lang.String |
name
|
(package private) java.awt.Button |
okButton
|
(package private) java.awt.event.ActionListener |
parent
|
(package private) java.awt.Button |
ppButton
|
(package private) java.lang.String |
prompt
|
(package private) java.awt.Label |
SF
|
(package private) java.awt.TextField |
TF
|
(package private) int |
value
|
(package private) int |
vdefault
|
(package private) int |
vmax
|
(package private) int |
vmin
|
Fields inherited from class java.awt.Frame |
CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSOR |
Fields inherited from class java.awt.Window |
|
Fields inherited from class java.awt.Container |
|
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 |
ValueDialog(java.awt.event.ActionListener parent,
java.lang.String name,
java.lang.String title,
java.lang.String prompt,
int vdefault,
int vmin,
int vmax,
java.awt.Dimension dm)
The valueDialog constructor. |
Methods inherited from class java.awt.Frame |
addNotify, finalize, getAccessibleContext, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, paramString, remove, removeNotify, setCursor, setExtendedState, setIconImage, setMaximizedBounds, setMenuBar, setResizable, setState, setTitle, setUndecorated |
Methods inherited from class java.awt.Window |
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getGraphicsConfiguration, getInputContext, getListeners, getLocale, getMostRecentFocusOwner, getOwnedWindows, getOwner, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindowStateListeners, hide, isActive, isFocusableWindow, isFocusCycleRoot, isFocused, isShowing, pack, postEvent, processEvent, processWindowEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, setCursor, setFocusableWindowState, setFocusCycleRoot, setLocationRelativeTo, show, toBack, toFront |
Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, addImpl, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, remove, removeAll, removeContainerListener, setFocusTraversalKeys, setFocusTraversalPolicy, 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, getBackground, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isOpaque, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, 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, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, size, toString, transferFocus, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.awt.MenuContainer |
getFont, postEvent |
parent
java.awt.event.ActionListener parent
SF
java.awt.Label SF
TF
java.awt.TextField TF
okButton
java.awt.Button okButton
ppButton
java.awt.Button ppButton
mmButton
java.awt.Button mmButton
m2Button
java.awt.Button m2Button
m05Button
java.awt.Button m05Button
name
java.lang.String name
prompt
java.lang.String prompt
value
int value
vdefault
int vdefault
vmax
int vmax
vmin
int vmin
debug
boolean debug
dm
java.awt.Dimension dm
ValueDialog
public ValueDialog(java.awt.event.ActionListener parent,
java.lang.String name,
java.lang.String title,
java.lang.String prompt,
int vdefault,
int vmin,
int vmax,
java.awt.Dimension dm)
- The valueDialog constructor.
- Parameters:
parent
- The parent to call backname
- The name of this dialog (used in callback)title
- The window title to use on the popup windowprompt
- The message label for this dialogvdefault
- The vdefault (initial) value for the parametervmin
- The required minimal value for the parametervmax
- The required maximal value for the parameterdm
- The desired dimension for this dialog
getValue
public int getValue()
- retrieve the actual parameter value
setMessage
public void setMessage(java.lang.String prompt)
- set a new prompt text
setParameters
public void setParameters(int vdefault,
int vmax,
int vmin)
- set new parameter values
requestTextFieldFocus
public void requestTextFieldFocus()
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent evt)
- handle local button events
- Specified by:
actionPerformed
in interface java.awt.event.ActionListener