edu.neu.ccs.gui
Class TextFieldView

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byjavax.swing.JComponent
              extended byjavax.swing.text.JTextComponent
                  extended byjavax.swing.JTextField
                      extended byedu.neu.ccs.gui.TextFieldView
All Implemented Interfaces:
Accessible, Displayable, Fragile, GeneralView, ImageObserver, JPTConstants, MenuContainer, Scrollable, Serializable, SwingConstants, TypedView
Direct Known Subclasses:
PathNodeView

public class TextFieldView
extends JTextField
implements GeneralView, Fragile, JPTConstants

A GeneralView for input of Stringable objects or elements of the data state of a Stringable object.

Since:
1.0
Version:
2.3.3
See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class javax.swing.JTextField
JTextField.AccessibleJTextField
 
Nested classes inherited from class javax.swing.text.JTextComponent
JTextComponent.AccessibleJTextComponent, JTextComponent.KeyBinding
 
Nested classes inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
 
Nested classes inherited from class java.awt.Container
Container.AccessibleAWTContainer
 
Nested classes inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy
 
Field Summary
static String AUTO_SELECT
          Bound property name for the auto select property.
protected  boolean autoSelect
          Autoselect policy for this view.
static boolean DEFAULT_AUTOSELECT_POLICY
          Default autoselect policy for a text field view.
static int DEFAULT_WIDTH
          The default preferred width used in constructors if there is no other data with which to set the width.
protected  GeneralViewSupport delegate
          The GeneralViewSupport object.
static int EXTRA_WIDTH
          Extra width for setting the preferred width.
static String PREFERRED_WIDTH
          Bound property name for the set preferred width property.
protected  int preferredWidth
          The current preferred width if one is enabled or -1 if preferred width is disabled.
 
Fields inherited from class javax.swing.JTextField
notifyAction
 
Fields inherited from class javax.swing.text.JTextComponent
DEFAULT_KEYMAP, FOCUS_ACCELERATOR_KEY
 
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_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 edu.neu.ccs.gui.TypedView
DATA_TYPE
 
Fields inherited from interface edu.neu.ccs.gui.Displayable
DEFAULT_VIEW_STATE, VIEW_STATE
 
Fields inherited from interface edu.neu.ccs.util.JPTConstants
ABOVE, ALIGNMENT, BELOW, BOTTOM_LEFT, BOTTOM_RIGHT, DEFAULT, FONT, INPUT_PROPERTIES, MANDATORY, OPTIONAL, ORIENTATION, TOP_LEFT, TOP_RIGHT, VALUE
 
Fields inherited from interface javax.swing.SwingConstants
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
TextFieldView()
          Constructs an empty text field view.
TextFieldView(Document document)
          Constructs a text field view with the given document as its data model.
TextFieldView(Document document, int width)
          Constructs a text field view with the given document as its data model and whose preferred width is the given width.
TextFieldView(Document document, String errorPrompt, String dialogTitle)
          Constructs a text field view with the given document as its data model for which the provided error prompt and dialog title will be used by the error recovery strategy.
TextFieldView(Document document, String errorPrompt, String dialogTitle, int width)
          Constructs a text field view with the given document as its data model for which the provided error prompt and dialog title will be used by the error recovery strategy and whose preferred width is the given width.
TextFieldView(Document document, String errorPrompt, String dialogTitle, String suggestion)
          Constructs a text field view with the given document as its data model for which the provided error prompt, dialog title, and suggestion will be used by the error recovery strategy.
TextFieldView(Document document, String errorPrompt, String dialogTitle, String suggestion, int width)
          Constructs a text field view with the given document as its data model for which the provided error prompt, dialog title, and suggestion will be used by the error recovery strategy and whose preferred width is the given width.
TextFieldView(Font font)
          Constructs an empty text field view using the given font.
TextFieldView(Font font, int width)
          Constructs an empty text field view using the given font whose preferred width is the given width.
TextFieldView(int width)
          Constructs an empty text field view whose preferred width is the given width.
TextFieldView(String text)
          Constructs a text field view with the given default text.
TextFieldView(String text, Font font)
          Constructs an empty text field view using the given font with the given default text.
TextFieldView(String text, Font font, int width)
          Constructs an empty text field view using the given font with the given default text whose preferred width is maximum of the given width and the width of the default text.
TextFieldView(String text, int width)
          Constructs a text field view with the given default text whose preferred width is maximum of the given width and the width of the default text.
TextFieldView(String text, String errorPrompt, String dialogTitle)
          Constructs a text field view with the given default text, for which the provided error prompt and dialog title will be used by the error recovery strategy.
TextFieldView(String text, String errorPrompt, String dialogTitle, Font font)
          Constructs an empty text field view using the given font with the given default text, for which the provided error prompt and dialog title will be used by the error recovery strategy.
TextFieldView(String text, String errorPrompt, String dialogTitle, Font font, int width)
          Constructs an empty text field view using the given font with the given default text, for which the provided error prompt and dialog title will be used by the error recovery strategy and whose preferred width is maximum of the given width and the width of the default text.
TextFieldView(String text, String errorPrompt, String dialogTitle, int width)
          Constructs a text field view with the given default text, for which the provided error prompt and dialog title will be used by the error recovery strategy and whose preferred width is maximum of the given width and the width of the default text.
TextFieldView(String text, String errorPrompt, String dialogTitle, String suggestion)
          Constructs a text field view with the given default text, for which the provided error prompt, dialog title, and suggestion will be used by the error recovery strategy.
TextFieldView(String text, String errorPrompt, String dialogTitle, String suggestion, Font font)
          Constructs an empty text field view using the given font with the given default text, for which the provided error prompt, dialog title, and suggestion will be used by the error recovery strategy.
TextFieldView(String text, String errorPrompt, String dialogTitle, String suggestion, Font font, int width)
          Constructs an empty text field view using the given font with the given default text, for which the provided error prompt, dialog title, and suggestion will be used by the error recovery strategy and whose preferred width is maximum of the given width and the width of the default text.
TextFieldView(String text, String errorPrompt, String dialogTitle, String suggestion, int width)
          Constructs a text field view with the given default text, for which the provided error prompt, dialog title, and suggestion will be used by the error recovery strategy and whose preferred width is maximum of the given width and the width of the default text.
 
Method Summary
 void addMalformedDataListener(MalformedDataListener l)
          Registers the given MalformedDataListener to receive MalformedDataEvents when the view state data is found to be malformed and when the view state data is returned to a well-formed value.
 BigDecimal demandBigDecimal()
          Returns a BigDecimal extracted from the field using the mandatory model.
 BigDecimal demandBigDecimal(StringableFilter f)
          Returns a BigDecimal extracted from the field using the mandatory model, with the given filter.
 BigInteger demandBigInteger()
          Returns a BigInteger extracted from the field using the mandatory model.
 BigInteger demandBigInteger(StringableFilter f)
          Returns a BigInteger extracted from the field using the mandatory model, with the given filter.
 boolean demandBoolean()
          Returns a boolean extracted from the field using the mandatory model.
 boolean demandBoolean(StringableFilter f)
          Returns a boolean extracted from the field using the mandatory model, with the given filter.
 byte demandByte()
          Returns a byte extracted from the field using the mandatory model.
 byte demandByte(StringableFilter f)
          Returns a byte extracted from the field using the mandatory model with the given filter.
 byte demandByteAsHex()
          Returns a byte extracted from the field as hexidecimal data using the mandatory model.
 byte demandByteAsHex(StringableFilter f)
          Returns a byte extracted from the field as hexidecimal data using the mandatory model with the given filter.
 char demandChar()
          Returns a char extracted from the field using the mandatory model.
 char demandChar(StringableFilter f)
          Returns a char extracted from the field using the mandatory model, with the given filter.
 Color demandColor()
          Returns a Color extracted from the field using the mandatory model.
 Color demandColor(StringableFilter f)
          Returns a Color extracted from the field using the mandatory model, with the given filter.
 double demandDouble()
          Returns a double extracted from the field using the mandatory model.
 double demandDouble(StringableFilter f)
          Returns a double extracted from the field using the mandatory model with the given filter.
 double demandDoubleAsHex()
          Returns a double extracted from the field as hexidecimal data using the mandatory model.
 double demandDoubleAsHex(StringableFilter f)
          Returns a double extracted from the field as hexidecimal data using the mandatory model with the given filter.
 float demandFloat()
          Returns a float extracted from the field using the mandatory model.
 float demandFloat(StringableFilter f)
          Returns a float extracted from the field using the mandatory model with the given filter.
 float demandFloatAsHex()
          Returns a float extracted from the field as hexidecimal data using the mandatory model.
 float demandFloatAsHex(StringableFilter f)
          Returns a float extracted from the field as hexidecimal data using the mandatory model with the given filter.
 int demandInt()
          Returns an int extracted from the field using the mandatory model.
 int demandInt(StringableFilter f)
          Returns an int extracted from the field using the mandatory model with the given filter.
 int demandIntAsHex()
          Returns an int extracted from the field as hexidecimal data using the mandatory model.
 int demandIntAsHex(StringableFilter f)
          Returns an int extracted from the field as hexidecimal data using the mandatory model with the given filter.
 long demandLong()
          Returns a long extracted from the field using the mandatory model.
 long demandLong(StringableFilter f)
          Returns a long extracted from the field using the mandatory model with the given filter.
 long demandLongAsHex()
          Returns a long extracted from the field as hexidecimal data using the mandatory model.
 long demandLongAsHex(StringableFilter f)
          Returns a long extracted from the field as hexidecimal data using the mandatory model with the given filter.
 Stringable demandObject()
          Returns a Stringable object based on the view state of the view using the mandatory model.
 Stringable demandObject(Class dataType, StringableFilter filter)
          Returns a Stringable object based on the view state of the view, the temporary data type and filter, and the mandatory model.
 Stringable demandObject(StringableFilter filter)
          Returns a Stringable object based on the view state of the view, the temporary filter, and the mandatory model.
 short demandShort()
          Returns a short extracted from the field using the mandatory model.
 short demandShort(StringableFilter f)
          Returns a short extracted from the field using the mandatory model with the given filter.
 short demandShortAsHex()
          Returns a short extracted from the field as hexidecimal data using the mandatory model.
 short demandShortAsHex(StringableFilter f)
          Returns a short extracted from the field as hexidecimal data using the mandatory model with the given filter.
 String demandString()
          Returns a String extracted from the field using the mandatory model.
 String demandString(StringableFilter f)
          Returns a String extracted from the field using the mandatory model, with the given filter.
 boolean getAutoSelect()
          Returns whether or not the contents of this field will be selected when it gains focus.
 Class getDataType()
          Returns the current class of objects returned when a model object is demanded or requested.
static Font getDefaultFont()
          Returns the default font for a JTextField.
 String getDefaultViewState()
          Returns a String representation of the default view state for this object.
 StringableFilter getFilter()
          Returns the current filter used by this view.
 InputProperties getInputProperties()
          Returns the input properties for this view.
 Dimension getPreferredSize()
          Returns the preferred size of this view.
 int getPreferredWidth()
          Returns the preferred width setting of this view.
static int getSampleWidth(Font font, String sample)
          Returns the width of a JLabel constucted using the given font and sample string with the value EXTRA_WIDTH added to allow for extra white space.
static int getSampleWidth(int N, char c)
          Returns the sample width of a JLabel constucted using a sample string consisting of N instances of the given character c; the value EXTRA_WIDTH is added to allow for extra white space.
static int getSampleWidth(String sample)
          Returns the width of a JLabel constucted using the given sample string with the value EXTRA_WIDTH added to allow for extra white space.
 String getViewState()
          Returns a String representation of the view state for this object.
static int getWidthEstimate(Font font, String[] strings)
          Returns the maximum sample width of the strings in the given strings array relative to the given font.
static int getWidthEstimate(String[] strings)
          Returns the maximum sample width of the strings in the given strings array.
private  void initialize(String errorPrompt, String dialogTitle, String suggestion, Font font, int width)
          Performs the tasks common for constructors of this class.
protected  void installFocusActions()
          Installs a focus listener implementing the autoselect functionality for this text field.
 GeneralView makeCopy()
          Returns a new text field view with the same font, preferred width, data type, view state, default view state, initial input properties, stringable filter, and auto-select setting as this text field view.
 void refreshComponent()
          Refreshes the component by repacking the parent window.
 void removeMalformedDataListener(MalformedDataListener l)
          De-registers the given MalformedDataListener from receiving MalformedDataEvents when the view state data is found to be malformed and when the view state data is returned to a well-formed value.
 BigDecimal requestBigDecimal()
          Returns a BigDecimal extracted from the field using the optional model.
 BigDecimal requestBigDecimal(StringableFilter f)
          Returns a BigDecimal extracted from the field using the optional model, with the given filter.
 BigInteger requestBigInteger()
          Returns a BigInteger extracted from the field using the optional model.
 BigInteger requestBigInteger(StringableFilter f)
          Returns a BigInteger extracted from the field using the optional model, with the given filter.
 boolean requestBoolean()
          Returns a boolean extracted from the field using the optional model.
 boolean requestBoolean(StringableFilter f)
          Returns a boolean extracted from the field using the optional model, with the given filter.
 byte requestByte()
          Returns a byte extracted from the field using the optional model.
 byte requestByte(StringableFilter f)
          Returns a byte extracted from the field using the optional model with the given filter.
 byte requestByteAsHex()
          Returns a byte extracted from the field as hexidecimal data using the optional model.
 byte requestByteAsHex(StringableFilter f)
          Returns a byte extracted from the field as hexidecimal data using the optional model with the given filter.
 char requestChar()
          Returns a char extracted from the field using the optional model.
 char requestChar(StringableFilter f)
          Returns a char extracted from the field using the optional model, with the given filter.
 Color requestColor()
          Returns a Color extracted from the field using the optional model.
 Color requestColor(StringableFilter f)
          Returns a Color extracted from the field using the optional model, with the given filter.
 double requestDouble()
          Returns a double extracted from the field using the optional model.
 double requestDouble(StringableFilter f)
          Returns a double extracted from the field using the optional model with the given filter.
 double requestDoubleAsHex()
          Returns a double extracted from the field as hexidecimal data using the optional model.
 double requestDoubleAsHex(StringableFilter f)
          Returns a double extracted from the field as hexidecimal data using the optional model with the given filter.
 float requestFloat()
          Returns a float extracted from the field using the optional model.
 float requestFloat(StringableFilter f)
          Returns a float extracted from the field using the optional model with the given filter.
 float requestFloatAsHex()
          Returns a float extracted from the field as hexidecimal data using the optional model.
 float requestFloatAsHex(StringableFilter f)
          Returns a float extracted from the field as hexidecimal data using the optional model with the given filter.
 int requestInt()
          Returns an int extracted from the field using the optional model.
 int requestInt(StringableFilter f)
          Returns an int extracted from the field using the optional model with the given filter.
 int requestIntAsHex()
          Returns an int extracted from the field as hexidecimal data using the optional model.
 int requestIntAsHex(StringableFilter f)
          Returns an int extracted from the field as hexidecimal data using the optional model with the given filter.
 long requestLong()
          Returns a long extracted from the field using the optional model.
 long requestLong(StringableFilter f)
          Returns a long extracted from the field using the optional model with the given filter.
 long requestLongAsHex()
          Returns a long extracted from the field as hexidecimal data using the optional model.
 long requestLongAsHex(StringableFilter f)
          Returns a long extracted from the field as hexidecimal data using the optional model with the given filter.
 Stringable requestObject()
          Returns a Stringable object based on the view state of the view using the optional model; throws an exception if the input operation is cancelled by the user.
 Stringable requestObject(Class dataType, StringableFilter filter)
          Returns a Stringable object based on the view state of the view, the temporary data type and filter, and the optional model.
 Stringable requestObject(StringableFilter filter)
          Returns a Stringable object based on the view state of the view, the temporary filter, and the optional model.
 short requestShort()
          Returns a short extracted from the field using the optional model.
 short requestShort(StringableFilter f)
          Returns a short extracted from the field using the optional model with the given filter.
 short requestShortAsHex()
          Returns a short extracted from the field as hexidecimal data using the optional model.
 short requestShortAsHex(StringableFilter f)
          Returns a short extracted from the field as hexidecimal data using the optional model with the given filter.
 String requestString()
          Returns a String extracted from the field using the optional model.
 String requestString(StringableFilter f)
          Returns a String extracted from the field using the optional model, with the given filter.
 void reset()
          Resets the view state of this object to the default view state for this object.
 void setAutoSelect(boolean b)
          Sets whether or not the contents of this field will be selected when it gains focus.
 void setDataType(Class dataType)
          Sets the current class of objects returned when a model object is demanded or requested.
 void setDefaultViewState(String data)
          Sets the default view state for this object to the data state represented by the given String data.
 void setErrorPromptTitleSuggestion(String errorPrompt, String dialogTitle, String suggestion)
          Sets the three input property Strings for an error dialog in a single method.
 void setFilter(StringableFilter filter)
          Sets the current filter used by the view to the given StringableFilter.
 void setFont(Font font)
          Sets the font for this component.
 void setInputProperties(InputProperties properties)
          Sets the input properties for this view to the provided input properties.
 void setPreferredWidth(int width)
          Sets the preferred width of the view to the given width if the given width is positive.
 void setPreferredWidth(int minWidth, String sample)
          Sets the preferred width of the view using the given minimum width and sample string.
 void setViewState(String data)
          Sets the view state for this object to the data state represented by the given String data.
 
Methods inherited from class javax.swing.JTextField
addActionListener, configurePropertiesFromAction, createActionPropertyChangeListener, createDefaultModel, fireActionPerformed, getAccessibleContext, getAction, getActionListeners, getActions, getColumns, getColumnWidth, getHorizontalAlignment, getHorizontalVisibility, getScrollOffset, getUIClassID, isValidateRoot, paramString, postActionEvent, removeActionListener, scrollRectToVisible, setAction, setActionCommand, setColumns, setDocument, setHorizontalAlignment, setScrollOffset
 
Methods inherited from class javax.swing.text.JTextComponent
addCaretListener, addInputMethodListener, addKeymap, copy, cut, fireCaretUpdate, getCaret, getCaretColor, getCaretListeners, getCaretPosition, getDisabledTextColor, getDocument, getDragEnabled, getFocusAccelerator, getHighlighter, getInputMethodRequests, getKeymap, getKeymap, getMargin, getNavigationFilter, getPreferredScrollableViewportSize, getScrollableBlockIncrement, getScrollableTracksViewportHeight, getScrollableTracksViewportWidth, getScrollableUnitIncrement, getSelectedText, getSelectedTextColor, getSelectionColor, getSelectionEnd, getSelectionStart, getText, getText, getToolTipText, getUI, isEditable, loadKeymap, modelToView, moveCaretPosition, paste, processInputMethodEvent, read, removeCaretListener, removeKeymap, removeNotify, replaceSelection, select, selectAll, setCaret, setCaretColor, setCaretPosition, setComponentOrientation, setDisabledTextColor, setDragEnabled, setEditable, setFocusAccelerator, setHighlighter, setKeymap, setMargin, setNavigationFilter, setSelectedTextColor, setSelectionColor, setSelectionEnd, setSelectionStart, setText, setUI, updateUI, viewToModel, write
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processMouseEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface edu.neu.ccs.gui.GeneralView
addActionListener, removeActionListener
 
Methods inherited from interface edu.neu.ccs.gui.Displayable
setEnabled
 

Field Detail

PREFERRED_WIDTH

public static final String PREFERRED_WIDTH
Bound property name for the set preferred width property.

See Also:
Constant Field Values

AUTO_SELECT

public static final String AUTO_SELECT
Bound property name for the auto select property.

See Also:
Constant Field Values

DEFAULT_WIDTH

public static final int DEFAULT_WIDTH
The default preferred width used in constructors if there is no other data with which to set the width.

See Also:
Constant Field Values

EXTRA_WIDTH

public static final int EXTRA_WIDTH

Extra width for setting the preferred width.

If the preferred width is set with a sample string, this value is added to the width of the sample string to allow some extra space.

See Also:
Constant Field Values

preferredWidth

protected int preferredWidth
The current preferred width if one is enabled or -1 if preferred width is disabled.


DEFAULT_AUTOSELECT_POLICY

public static final boolean DEFAULT_AUTOSELECT_POLICY
Default autoselect policy for a text field view.

See Also:
Constant Field Values

autoSelect

protected boolean autoSelect
Autoselect policy for this view.


delegate

protected GeneralViewSupport delegate
The GeneralViewSupport object.

Constructor Detail

TextFieldView

public TextFieldView()
Constructs an empty text field view.

Other constructors:

Since:
1.1

TextFieldView

public TextFieldView(int width)
Constructs an empty text field view whose preferred width is the given width.

Parameters:
width - the minimum width of the text field
Since:
1.1
See Also:
TextFieldView()

TextFieldView

public TextFieldView(String text)
Constructs a text field view with the given default text.

Parameters:
text - the default text for the text field
Since:
1.1
See Also:
TextFieldView()

TextFieldView

public TextFieldView(String text,
                     int width)
Constructs a text field view with the given default text whose preferred width is maximum of the given width and the width of the default text.

Parameters:
text - the default text for the text field
width - the minimum width of the text field
Since:
1.1
See Also:
TextFieldView()

TextFieldView

public TextFieldView(String text,
                     String errorPrompt,
                     String dialogTitle)
Constructs a text field view with the given default text, for which the provided error prompt and dialog title will be used by the error recovery strategy.

Parameters:
text - the default text for the text field
errorPrompt - the prompt to use in error recovery
dialogTitle - the dialog title to use in error recovery
Since:
1.1
See Also:
TextFieldView()

TextFieldView

public TextFieldView(String text,
                     String errorPrompt,
                     String dialogTitle,
                     int width)
Constructs a text field view with the given default text, for which the provided error prompt and dialog title will be used by the error recovery strategy and whose preferred width is maximum of the given width and the width of the default text.

Parameters:
text - the default text for the text field
errorPrompt - the prompt to use in error recovery
dialogTitle - the dialog title to use in error recovery
width - the minimum width of the text field
Since:
1.1
See Also:
TextFieldView()

TextFieldView

public TextFieldView(String text,
                     String errorPrompt,
                     String dialogTitle,
                     String suggestion)
Constructs a text field view with the given default text, for which the provided error prompt, dialog title, and suggestion will be used by the error recovery strategy.

Parameters:
text - the default text for the text field
errorPrompt - the prompt to use in error recovery
dialogTitle - the dialog title to use in error recovery
suggestion - the optional suggestion to use in error recovery
Since:
1.1
See Also:
TextFieldView()

TextFieldView

public TextFieldView(String text,
                     String errorPrompt,
                     String dialogTitle,
                     String suggestion,
                     int width)
Constructs a text field view with the given default text, for which the provided error prompt, dialog title, and suggestion will be used by the error recovery strategy and whose preferred width is maximum of the given width and the width of the default text.

Parameters:
text - the default text for the text field
errorPrompt - the prompt to use in error recovery
dialogTitle - the dialog title to use in error recovery
suggestion - the optional suggestion to use in error recovery
width - the minimum width of the text field
Since:
1.1
See Also:
TextFieldView()

TextFieldView

public TextFieldView(Font font)
Constructs an empty text field view using the given font.

Parameters:
font - the font for the text field
Since:
2.3.3
See Also:
TextFieldView()

TextFieldView

public TextFieldView(Font font,
                     int width)
Constructs an empty text field view using the given font whose preferred width is the given width.

Parameters:
font - the font for the text field
width - the minimum width of the text field
Since:
2.3.3
See Also:
TextFieldView()

TextFieldView

public TextFieldView(String text,
                     Font font)
Constructs an empty text field view using the given font with the given default text.

Parameters:
text - the default text for the text field
font - the font for the text field
Since:
2.3.3
See Also:
TextFieldView()

TextFieldView

public TextFieldView(String text,
                     Font font,
                     int width)
Constructs an empty text field view using the given font with the given default text whose preferred width is maximum of the given width and the width of the default text.

Parameters:
text - the default text for the text field
font - the font for the text field
width - the minimum width of the text field
Since:
2.3.3
See Also:
TextFieldView()

TextFieldView

public TextFieldView(String text,
                     String errorPrompt,
                     String dialogTitle,
                     Font font)
Constructs an empty text field view using the given font with the given default text, for which the provided error prompt and dialog title will be used by the error recovery strategy.

Parameters:
text - the default text for the text field
errorPrompt - the prompt to use in error recovery
dialogTitle - the dialog title to use in error recovery
font - the font for the text field
Since:
2.3.3
See Also:
TextFieldView()

TextFieldView

public TextFieldView(String text,
                     String errorPrompt,
                     String dialogTitle,
                     Font font,
                     int width)
Constructs an empty text field view using the given font with the given default text, for which the provided error prompt and dialog title will be used by the error recovery strategy and whose preferred width is maximum of the given width and the width of the default text.

Parameters:
text - the default text for the text field
errorPrompt - the prompt to use in error recovery
dialogTitle - the dialog title to use in error recovery
font - the font for the text field
width - the minimum width of the text field
Since:
2.3.3
See Also:
TextFieldView()

TextFieldView

public TextFieldView(String text,
                     String errorPrompt,
                     String dialogTitle,
                     String suggestion,
                     Font font)
Constructs an empty text field view using the given font with the given default text, for which the provided error prompt, dialog title, and suggestion will be used by the error recovery strategy.

Parameters:
text - the default text for the text field
errorPrompt - the prompt to use in error recovery
dialogTitle - the dialog title to use in error recovery
suggestion - the optional suggestion to use in error recovery
font - the font for the text field
Since:
2.3.3
See Also:
TextFieldView()

TextFieldView

public TextFieldView(String text,
                     String errorPrompt,
                     String dialogTitle,
                     String suggestion,
                     Font font,
                     int width)
Constructs an empty text field view using the given font with the given default text, for which the provided error prompt, dialog title, and suggestion will be used by the error recovery strategy and whose preferred width is maximum of the given width and the width of the default text.

Parameters:
text - the default text for the text field
errorPrompt - the prompt to use in error recovery
dialogTitle - the dialog title to use in error recovery
suggestion - the optional suggestion to use in error recovery
font - the font for the text field
width - the minimum width of the text field
Since:
2.3.3
See Also:
TextFieldView()

TextFieldView

public TextFieldView(Document document)
Constructs a text field view with the given document as its data model.

Parameters:
document - the document to use as the data model
Since:
1.1
See Also:
TextFieldView()

TextFieldView

public TextFieldView(Document document,
                     int width)
Constructs a text field view with the given document as its data model and whose preferred width is the given width.

Parameters:
document - the document to use as the data model
width - the minimum width of the text field
Since:
1.1
See Also:
TextFieldView()

TextFieldView

public TextFieldView(Document document,
                     String errorPrompt,
                     String dialogTitle)
Constructs a text field view with the given document as its data model for which the provided error prompt and dialog title will be used by the error recovery strategy.

Parameters:
document - the document to use as the data model
errorPrompt - the prompt to use in error recovery
dialogTitle - the dialog title to use in error recovery
Since:
1.1
See Also:
TextFieldView()

TextFieldView

public TextFieldView(Document document,
                     String errorPrompt,
                     String dialogTitle,
                     int width)
Constructs a text field view with the given document as its data model for which the provided error prompt and dialog title will be used by the error recovery strategy and whose preferred width is the given width.

Parameters:
document - the document to use as the data model
errorPrompt - the prompt to use in error recovery
dialogTitle - the dialog title to use in error recovery
width - the minimum width of the text field
Since:
1.1
See Also:
TextFieldView()

TextFieldView

public TextFieldView(Document document,
                     String errorPrompt,
                     String dialogTitle,
                     String suggestion)
Constructs a text field view with the given document as its data model for which the provided error prompt, dialog title, and suggestion will be used by the error recovery strategy.

Parameters:
document - the document to use as the data model
errorPrompt - the prompt to use in error recovery
dialogTitle - the dialog title to use in error recovery
suggestion - the optional suggestion to use in error recovery
Since:
1.1
See Also:
TextFieldView()

TextFieldView

public TextFieldView(Document document,
                     String errorPrompt,
                     String dialogTitle,
                     String suggestion,
                     int width)
Constructs a text field view with the given document as its data model for which the provided error prompt, dialog title, and suggestion will be used by the error recovery strategy and whose preferred width is the given width.

Parameters:
document - the document to use as the data model
errorPrompt - the prompt to use in error recovery
dialogTitle - the dialog title to use in error recovery
suggestion - the optional suggestion to use in error recovery
width - the minimum width of the text field
Since:
1.1
See Also:
TextFieldView()
Method Detail

initialize

private void initialize(String errorPrompt,
                        String dialogTitle,
                        String suggestion,
                        Font font,
                        int width)
Performs the tasks common for constructors of this class.

Parameters:
errorPrompt - the prompt to use in error recovery
dialogTitle - the dialog title to use in error recovery
suggestion - the optional suggestion to use in error recovery
font - the font for the text field
width - the minimum width of the text field
Since:
2.3.3

getPreferredSize

public Dimension getPreferredSize()

Returns the preferred size of this view.

This method proceeds as follows.

The preferred size is calculated by the super class method. Then, if the preferred width set in this class is positive, it is used to replace the width field of the dimension returned by the super class method. Then, the revised preferred size is returned.

Returns:
the value of the preferredSize property

getPreferredWidth

public int getPreferredWidth()

Returns the preferred width setting of this view.

The value returned is positive or -1.

If the value is -1 then it is not used to compute the preferred size.

Returns:
the current preferred width of this view

setPreferredWidth

public void setPreferredWidth(int width)

Sets the preferred width of the view to the given width if the given width is positive.

If the given width is equal to zero, then the preferred width is set to DEFAULT_WIDTH.

If the given width is less than zero, then the preferred width is set to -1 and the preferred size of the view is computed entirely from the data of the super class.

Refreshes the component in its parent view.

Fires property change PREFERRED_WIDTH.

Parameters:
width - the desired preferred width

setPreferredWidth

public void setPreferredWidth(int minWidth,
                              String sample)

Sets the preferred width of the view using the given minimum width and sample string.

This method proceeds as follows.

If the sample string is null or of length zero, then the preferred width is set via the call: setPreferredWidth(minWidth).

Otherwise, if minWidth is zero, it is set to DEFAULT_WIDTH. Then, the method getSampleWidth is called using the current font of the view and the sample string. The preferred width is then set to be the maximum of minWidth and the sample width.

Refreshes the component in its parent view.

Fires property change PREFERRED_WIDTH.

Parameters:
minWidth - the minimum preferred width
sample - the sample string used to calculate the width

getSampleWidth

public static int getSampleWidth(int N,
                                 char c)

Returns the sample width of a JLabel constucted using a sample string consisting of N instances of the given character c; the value EXTRA_WIDTH is added to allow for extra white space.

Returns 0 if N is less than or equal to zero

Parameters:
N - the number of zero characters to use in the sample

getSampleWidth

public static int getSampleWidth(String sample)

Returns the width of a JLabel constucted using the given sample string with the value EXTRA_WIDTH added to allow for extra white space.

Returns 0 if the sample string is null or is of length zero.

Parameters:
sample - the sample string used to calculate the width

getSampleWidth

public static int getSampleWidth(Font font,
                                 String sample)

Returns the width of a JLabel constucted using the given font and sample string with the value EXTRA_WIDTH added to allow for extra white space.

Returns 0 if the sample string is null or is of length zero.

Ignores the font if it is null.

Parameters:
font - the font to use for the sample string
sample - the sample string used to calculate the width

getWidthEstimate

public static int getWidthEstimate(String[] strings)

Returns the maximum sample width of the strings in the given strings array.

Returns 0 if strings is null, has no objects, or only has objects that are null or of length 0.

Parameters:
strings - the array of strings to measure for sample width

getWidthEstimate

public static int getWidthEstimate(Font font,
                                   String[] strings)

Returns the maximum sample width of the strings in the given strings array relative to the given font.

Returns 0 if strings is null, has no objects, or only has objects that are null or of length 0.

Ignores the font if it is null.

Parameters:
font - the font to use for the sample strings
strings - the array of strings to measure for sample width

setFont

public void setFont(Font font)

Sets the font for this component.

If the given font is null then it is set to getDefaultFont().

Calls the super setFont method and then refreshes the component in its parent view.

Fires property change FONT.

Parameters:
font - the font to set for this view

getDefaultFont

public static Font getDefaultFont()
Returns the default font for a JTextField.

Since:
2.3.3

refreshComponent

public void refreshComponent()
Refreshes the component by repacking the parent window.


setAutoSelect

public void setAutoSelect(boolean b)

Sets whether or not the contents of this field will be selected when it gains focus.

Fires property change AUTO_SELECT.

Parameters:
b - whether or not the contents of this field will be selected upon a gain of focus
See Also:
getAutoSelect()

getAutoSelect

public boolean getAutoSelect()
Returns whether or not the contents of this field will be selected when it gains focus.

See Also:
setAutoSelect(boolean)

makeCopy

public GeneralView makeCopy()

Returns a new text field view with the same font, preferred width, data type, view state, default view state, initial input properties, stringable filter, and auto-select setting as this text field view.

The new text field view has its own document model.

Specified by:
makeCopy in interface GeneralView
Returns:
a copy of this text field view

setDataType

public void setDataType(Class dataType)
Description copied from interface: GeneralView
Sets the current class of objects returned when a model object is demanded or requested.

Specified by:
setDataType in interface GeneralView
Parameters:
dataType - the new class of objects for model objects

getDataType

public Class getDataType()
Description copied from interface: TypedView
Returns the current class of objects returned when a model object is demanded or requested.

Specified by:
getDataType in interface TypedView
Returns:
the current class of a model object

setFilter

public void setFilter(StringableFilter filter)
Description copied from interface: GeneralView
Sets the current filter used by the view to the given StringableFilter.

Specified by:
setFilter in interface GeneralView
Parameters:
filter - the filter to be used

getFilter

public StringableFilter getFilter()
Description copied from interface: GeneralView
Returns the current filter used by this view.

Specified by:
getFilter in interface GeneralView
Returns:
the current filter

demandObject

public Stringable demandObject()
Description copied from interface: TypedView
Returns a Stringable object based on the view state of the view using the mandatory model.

Specified by:
demandObject in interface TypedView
Returns:
a Stringable model object
See Also:
TypedView.requestObject()

requestObject

public Stringable requestObject()
                         throws CancelledException
Description copied from interface: TypedView
Returns a Stringable object based on the view state of the view using the optional model; throws an exception if the input operation is cancelled by the user.

Specified by:
requestObject in interface TypedView
Returns:
a Stringable model object
Throws:
CancelledException
See Also:
TypedView.demandObject()

demandObject

public Stringable demandObject(StringableFilter filter)
Description copied from interface: GeneralView
Returns a Stringable object based on the view state of the view, the temporary filter, and the mandatory model.

Specified by:
demandObject in interface GeneralView
Parameters:
filter - the temporary filter to use
Returns:
a Stringable model object
See Also:
TypedView.demandObject(), GeneralView.requestObject(Class, StringableFilter)

requestObject

public Stringable requestObject(StringableFilter filter)
                         throws CancelledException
Description copied from interface: GeneralView
Returns a Stringable object based on the view state of the view, the temporary filter, and the optional model.

Specified by:
requestObject in interface GeneralView
Parameters:
filter - the temporary filter to use
Returns:
a Stringable model object
Throws:
CancelledException
See Also:
TypedView.requestObject(), GeneralView.demandObject(Class, StringableFilter)

demandObject

public Stringable demandObject(Class dataType,
                               StringableFilter filter)
Description copied from interface: GeneralView
Returns a Stringable object based on the view state of the view, the temporary data type and filter, and the mandatory model.

Specified by:
demandObject in interface GeneralView
Returns:
a Stringable model object
See Also:
TypedView.demandObject(), GeneralView.requestObject(Class, StringableFilter)

requestObject

public Stringable requestObject(Class dataType,
                                StringableFilter filter)
                         throws CancelledException
Description copied from interface: GeneralView
Returns a Stringable object based on the view state of the view, the temporary data type and filter, and the optional model.

Specified by:
requestObject in interface GeneralView
Returns:
a Stringable model object
Throws:
CancelledException
See Also:
TypedView.requestObject(), GeneralView.demandObject(Class, StringableFilter)

setInputProperties

public void setInputProperties(InputProperties properties)
Description copied from interface: TypedView

Sets the input properties for this view to the provided input properties.

If the given input properties list is null, the property list for this view is set to the base property list containing default property values.

Specified by:
setInputProperties in interface TypedView
Parameters:
properties - the new input properties for the view
See Also:
TypedView.getInputProperties()

getInputProperties

public InputProperties getInputProperties()
Description copied from interface: TypedView
Returns the input properties for this view.

Specified by:
getInputProperties in interface TypedView
Returns:
the input properties
See Also:
TypedView.setInputProperties(InputProperties)

setErrorPromptTitleSuggestion

public void setErrorPromptTitleSuggestion(String errorPrompt,
                                          String dialogTitle,
                                          String suggestion)
Description copied from interface: GeneralView
Sets the three input property Strings for an error dialog in a single method.

Specified by:
setErrorPromptTitleSuggestion in interface GeneralView
Parameters:
errorPrompt - the error prompt of an error dialog
dialogTitle - the dialog title of an error dialog
suggestion - the suggestion for an error dialog

setViewState

public void setViewState(String data)
Description copied from interface: Displayable
Sets the view state for this object to the data state represented by the given String data.

Specified by:
setViewState in interface Displayable
Parameters:
data - the new view state for this object
See Also:
Displayable.getViewState()

getViewState

public String getViewState()
Description copied from interface: Displayable
Returns a String representation of the view state for this object.

Specified by:
getViewState in interface Displayable
Returns:
the view state as a String
See Also:
Displayable.setViewState(String)

setDefaultViewState

public void setDefaultViewState(String data)
Description copied from interface: Displayable
Sets the default view state for this object to the data state represented by the given String data.

Specified by:
setDefaultViewState in interface Displayable
Parameters:
data - the new default data state for this object
See Also:
Displayable.getDefaultViewState(), Displayable.reset()

getDefaultViewState

public String getDefaultViewState()
Description copied from interface: Displayable
Returns a String representation of the default view state for this object.

Specified by:
getDefaultViewState in interface Displayable
Returns:
the default view state as a String
See Also:
Displayable.setDefaultViewState(String), Displayable.reset()

reset

public void reset()
Description copied from interface: Displayable

Resets the view state of this object to the default view state for this object.

Equivalent to: setViewState(getDefaultViewState()).

Specified by:
reset in interface Displayable
See Also:
Displayable.setViewState(String), Displayable.getDefaultViewState()

addMalformedDataListener

public void addMalformedDataListener(MalformedDataListener l)
Description copied from interface: Fragile
Registers the given MalformedDataListener to receive MalformedDataEvents when the view state data is found to be malformed and when the view state data is returned to a well-formed value.

Specified by:
addMalformedDataListener in interface Fragile
Parameters:
l - the listener to register
See Also:
Fragile.removeMalformedDataListener(MalformedDataListener)

removeMalformedDataListener

public void removeMalformedDataListener(MalformedDataListener l)
Description copied from interface: Fragile
De-registers the given MalformedDataListener from receiving MalformedDataEvents when the view state data is found to be malformed and when the view state data is returned to a well-formed value.

Specified by:
removeMalformedDataListener in interface Fragile
Parameters:
l - the listener to de-register
See Also:
Fragile.addMalformedDataListener(MalformedDataListener)

demandByte

public byte demandByte()
Returns a byte extracted from the field using the mandatory model.

See Also:
demandByte(StringableFilter), demandByteAsHex(), demandByteAsHex(StringableFilter), requestByte(), requestByte(StringableFilter), requestByteAsHex(), requestByteAsHex(StringableFilter)

demandByte

public byte demandByte(StringableFilter f)
Returns a byte extracted from the field using the mandatory model with the given filter.

Parameters:
f - the filter to use for the input operation
See Also:
demandByte(), demandByteAsHex(), demandByteAsHex(StringableFilter), requestByte(), requestByte(StringableFilter), requestByteAsHex(), requestByteAsHex(StringableFilter)

demandByteAsHex

public byte demandByteAsHex()
Returns a byte extracted from the field as hexidecimal data using the mandatory model.

See Also:
demandByte(), demandByte(StringableFilter), demandByteAsHex(StringableFilter), requestByte(), requestByte(StringableFilter), requestByteAsHex(), requestByteAsHex(StringableFilter)

demandByteAsHex

public byte demandByteAsHex(StringableFilter f)
Returns a byte extracted from the field as hexidecimal data using the mandatory model with the given filter.

Parameters:
f - the filter to use for the input operation
See Also:
demandByte(), demandByte(StringableFilter), demandByteAsHex(), requestByte(), requestByte(StringableFilter), requestByteAsHex(), requestByteAsHex(StringableFilter)

requestByte

public byte requestByte()
                 throws CancelledException
Returns a byte extracted from the field using the optional model.

Throws:
CancelledException - if the user cancelled the input operation
See Also:
demandByte(), demandByte(StringableFilter), demandByteAsHex(), demandByteAsHex(StringableFilter), requestByte(StringableFilter), requestByteAsHex(), requestByteAsHex(StringableFilter)

requestByte

public byte requestByte(StringableFilter f)
                 throws CancelledException
Returns a byte extracted from the field using the optional model with the given filter.

Parameters:
f - the filter to use for the input operation
Throws:
CancelledException - if the user cancelled the input operation
See Also:
demandByte(), demandByte(StringableFilter), demandByteAsHex(), demandByteAsHex(StringableFilter), requestByte(), requestByteAsHex(), requestByteAsHex(StringableFilter)

requestByteAsHex

public byte requestByteAsHex()
                      throws CancelledException
Returns a byte extracted from the field as hexidecimal data using the optional model.

Throws:
CancelledException - if the user cancelled the input operation
See Also:
demandByte(), demandByte(StringableFilter), demandByteAsHex(), demandByteAsHex(StringableFilter), requestByte(), requestByte(StringableFilter), requestByteAsHex(StringableFilter)

requestByteAsHex

public byte requestByteAsHex(StringableFilter f)
                      throws CancelledException
Returns a byte extracted from the field as hexidecimal data using the optional model with the given filter.

Parameters:
f - the filter to use for the input operation
Throws:
CancelledException - if the user cancelled the input operation
See Also:
demandByte(), demandByte(StringableFilter), demandByteAsHex(), demandByteAsHex(StringableFilter), requestByte(), requestByte(StringableFilter), requestByteAsHex()

demandShort

public short demandShort()
Returns a short extracted from the field using the mandatory model.

See Also:
demandShort(StringableFilter), demandShortAsHex(), demandShortAsHex(StringableFilter), requestShort(), requestShort(StringableFilter), requestShortAsHex(), requestShortAsHex(StringableFilter)

demandShort

public short demandShort(StringableFilter f)
Returns a short extracted from the field using the mandatory model with the given filter.

Parameters:
f - the filter to use for the input operation
See Also:
demandShort(), demandShortAsHex(), demandShortAsHex(StringableFilter), requestShort(), requestShort(StringableFilter), requestShortAsHex(), requestShortAsHex(StringableFilter)

demandShortAsHex

public short demandShortAsHex()
Returns a short extracted from the field as hexidecimal data using the mandatory model.

See Also:
demandShort(), demandShort(StringableFilter), demandShortAsHex(StringableFilter), requestShort(), requestShort(StringableFilter), requestShortAsHex(), requestShortAsHex(StringableFilter)

demandShortAsHex

public short demandShortAsHex(StringableFilter f)
Returns a short extracted from the field as hexidecimal data using the mandatory model with the given filter.

Parameters:
f - the filter to use for the input operation
See Also:
demandShort(), demandShort(StringableFilter), demandShortAsHex(), requestShort(), requestShort(StringableFilter), requestShortAsHex(), requestShortAsHex(StringableFilter)

requestShort

public short requestShort()
                   throws CancelledException
Returns a short extracted from the field using the optional model.

Throws:
CancelledException - if the user cancelled the input operation
See Also:
demandShort(), demandShort(StringableFilter), demandShortAsHex(), demandShortAsHex(StringableFilter), requestShort(StringableFilter), requestShortAsHex(), requestShortAsHex(StringableFilter)

requestShort

public short requestShort(StringableFilter f)
                   throws CancelledException
Returns a short extracted from the field using the optional model with the given filter.

Parameters:
f - the filter to use for the input operation
Throws:
CancelledException - if the user cancelled the input operation
See Also:
demandShort(), demandShort(StringableFilter), demandShortAsHex(), demandShortAsHex(StringableFilter), requestShort(), requestShortAsHex(), requestShortAsHex(StringableFilter)

requestShortAsHex

public short requestShortAsHex()
                        throws CancelledException
Returns a short extracted from the field as hexidecimal data using the optional model.

Throws:
CancelledException - if the user cancelled the input operation
See Also:
demandShort(), demandShort(StringableFilter), demandShortAsHex(), demandShortAsHex(StringableFilter), requestShort(), requestShort(StringableFilter), requestShortAsHex(StringableFilter)

requestShortAsHex

public short requestShortAsHex(StringableFilter f)
                        throws CancelledException
Returns a short extracted from the field as hexidecimal data using the optional model with the given filter.

Parameters:
f - the filter to use for the input operation
Throws:
CancelledException - if the user cancelled the input operation
See Also:
demandShort(), demandShort(StringableFilter), demandShortAsHex(), demandShortAsHex(StringableFilter), requestShort(), requestShort(StringableFilter), requestShortAsHex()

demandInt

public int demandInt()
Returns an int extracted from the field using the mandatory model.

See Also:
demandInt(StringableFilter), demandIntAsHex(), demandIntAsHex(StringableFilter), requestInt(), requestInt(StringableFilter), requestIntAsHex(), requestIntAsHex(StringableFilter)

demandInt

public int demandInt(StringableFilter f)
Returns an int extracted from the field using the mandatory model with the given filter.

Parameters:
f - the filter to use for the input operation
See Also:
demandInt(), demandIntAsHex(), demandIntAsHex(StringableFilter), requestInt(), requestInt(StringableFilter), requestIntAsHex(), requestIntAsHex(StringableFilter)

demandIntAsHex

public int demandIntAsHex()
Returns an int extracted from the field as hexidecimal data using the mandatory model.

See Also:
demandInt(), demandInt(StringableFilter), demandIntAsHex(StringableFilter), requestInt(), requestInt(StringableFilter), requestIntAsHex(), requestIntAsHex(StringableFilter)

demandIntAsHex

public int demandIntAsHex(StringableFilter f)
Returns an int extracted from the field as hexidecimal data using the mandatory model with the given filter.

Parameters:
f - the filter to use for the input operation
See Also:
demandInt(), demandInt(StringableFilter), demandIntAsHex(), requestInt(), requestInt(StringableFilter), requestIntAsHex(), requestIntAsHex(StringableFilter)

requestInt

public int requestInt()
               throws CancelledException
Returns an int extracted from the field using the optional model.

Throws:
CancelledException - if the user cancelled the input operation
See Also:
demandInt(), demandInt(StringableFilter), demandIntAsHex(), demandIntAsHex(StringableFilter), requestInt(StringableFilter), requestIntAsHex(), requestIntAsHex(StringableFilter)

requestInt

public int requestInt(StringableFilter f)
               throws CancelledException
Returns an int extracted from the field using the optional model with the given filter.

Parameters:
f - the filter to use for the input operation
Throws:
CancelledException - if the user cancelled the input operation
See Also:
demandInt(), demandInt(StringableFilter), demandIntAsHex(), demandIntAsHex(StringableFilter), requestInt(), requestIntAsHex(), requestIntAsHex(StringableFilter)

requestIntAsHex

public int requestIntAsHex()
                    throws CancelledException
Returns an int extracted from the field as hexidecimal data using the optional model.

Throws:
CancelledException - if the user cancelled the input operation
See Also:
demandInt(), demandInt(StringableFilter), demandIntAsHex(), demandIntAsHex(StringableFilter), requestInt(), requestInt(StringableFilter), requestIntAsHex(StringableFilter)

requestIntAsHex

public int requestIntAsHex(StringableFilter f)
                    throws CancelledException
Returns an int extracted from the field as hexidecimal data using the optional model with the given filter.

Parameters:
f - the filter to use for the input operation
Throws:
CancelledException - if the user cancelled the input operation
See Also:
demandInt(), demandInt(StringableFilter), demandIntAsHex(), demandIntAsHex(StringableFilter), requestInt(), requestInt(StringableFilter), requestIntAsHex()

demandLong

public long demandLong()
Returns a long extracted from the field using the mandatory model.

See Also:
demandLong(StringableFilter), demandLongAsHex(), demandLongAsHex(StringableFilter), requestLong(), requestLong(StringableFilter), requestLongAsHex(), requestLongAsHex(StringableFilter)

demandLong

public long demandLong(StringableFilter f)
Returns a long extracted from the field using the mandatory model with the given filter.

Parameters:
f - the filter to use for the input operation
See Also:
demandLong(), demandLongAsHex(), demandLongAsHex(StringableFilter), requestLong(), requestLong(StringableFilter), requestLongAsHex(), requestLongAsHex(StringableFilter)

demandLongAsHex

public long demandLongAsHex()
Returns a long extracted from the field as hexidecimal data using the mandatory model.

See Also:
demandLong(), demandLong(StringableFilter), demandLongAsHex(StringableFilter), requestLong(), requestLong(StringableFilter), requestLongAsHex(), requestLongAsHex(StringableFilter)

demandLongAsHex

public long demandLongAsHex(StringableFilter f)
Returns a long extracted from the field as hexidecimal data using the mandatory model with the given filter.

Parameters:
f - the filter to use for the input operation
See Also:
demandLong(), demandLong(StringableFilter), demandLongAsHex(), requestLong(), requestLong(StringableFilter), requestLongAsHex(), requestLongAsHex(StringableFilter)

requestLong

public long requestLong()
                 throws CancelledException
Returns a long extracted from the field using the optional model.

Throws:
CancelledException - if the user cancelled the input operation
See Also:
demandLong(), demandLong(StringableFilter), demandLongAsHex(), demandLongAsHex(StringableFilter), requestLong(StringableFilter), requestLongAsHex(), requestLongAsHex(StringableFilter)

requestLong

public long requestLong(StringableFilter f)
                 throws CancelledException
Returns a long extracted from the field using the optional model with the given filter.

Parameters:
f - the filter to use for the input operation
Throws:
CancelledException - if the user cancelled the input operation
See Also:
demandLong(), demandLong(StringableFilter), demandLongAsHex(), demandLongAsHex(StringableFilter), requestLong(), requestLongAsHex(), requestLongAsHex(StringableFilter)

requestLongAsHex

public long requestLongAsHex()
                      throws CancelledException
Returns a long extracted from the field as hexidecimal data using the optional model.

Throws:
CancelledException - if the user cancelled the input operation
See Also:
demandLong(), demandLong(StringableFilter), demandLongAsHex(), demandLongAsHex(StringableFilter), requestLong(), requestLong(StringableFilter), requestLongAsHex(StringableFilter)

requestLongAsHex

public long requestLongAsHex(StringableFilter f)
                      throws CancelledException
Returns a long extracted from the field as hexidecimal data using the optional model with the given filter.

Parameters:
f - the filter to use for the input operation
Throws:
CancelledException - if the user cancelled the input operation
See Also:
demandLong(), demandLong(StringableFilter), demandLongAsHex(), demandLongAsHex(StringableFilter), requestLong(), requestLong(StringableFilter), requestLongAsHex()

demandFloat

public float demandFloat()
Returns a float extracted from the field using the mandatory model.

See Also:
demandFloat(StringableFilter), demandFloatAsHex(), demandFloatAsHex(StringableFilter), requestFloat(), requestFloat(StringableFilter), requestFloatAsHex(), requestFloatAsHex(StringableFilter)

demandFloat

public float demandFloat(StringableFilter f)
Returns a float extracted from the field using the mandatory model with the given filter.

Parameters:
f - the filter to use for the input operation
See Also:
demandFloat(), demandFloatAsHex(), demandFloatAsHex(StringableFilter), requestFloat(), requestFloat(StringableFilter), requestFloatAsHex(), requestFloatAsHex(StringableFilter)

demandFloatAsHex

public float demandFloatAsHex()
Returns a float extracted from the field as hexidecimal data using the mandatory model.

See Also:
demandFloat(), demandFloat(StringableFilter), demandFloatAsHex(StringableFilter), requestFloat(), requestFloat(StringableFilter), requestFloatAsHex(), requestFloatAsHex(StringableFilter)

demandFloatAsHex

public float demandFloatAsHex(StringableFilter f)
Returns a float extracted from the field as hexidecimal data using the mandatory model with the given filter.

Parameters:
f - the filter to use for the input operation
See Also:
demandFloat(), demandFloat(StringableFilter), demandFloatAsHex(), requestFloat(), requestFloat(StringableFilter), requestFloatAsHex(), requestFloatAsHex(StringableFilter)

requestFloat

public float requestFloat()
                   throws CancelledException
Returns a float extracted from the field using the optional model.

Throws:
CancelledException - if the user cancelled the input operation
See Also:
demandFloat(), demandFloat(StringableFilter), demandFloatAsHex(), demandFloatAsHex(StringableFilter), requestFloat(StringableFilter), requestFloatAsHex(), requestFloatAsHex(StringableFilter)

requestFloat

public float requestFloat(StringableFilter f)
                   throws CancelledException
Returns a float extracted from the field using the optional model with the given filter.

Parameters:
f - the filter to use for the input operation
Throws:
CancelledException - if the user cancelled the input operation
See Also:
demandFloat(), demandFloat(StringableFilter), demandFloatAsHex(), demandFloatAsHex(StringableFilter), requestFloat(), requestFloatAsHex(), requestFloatAsHex(StringableFilter)

requestFloatAsHex

public float requestFloatAsHex()
                        throws CancelledException
Returns a float extracted from the field as hexidecimal data using the optional model.

Throws:
CancelledException - if the user cancelled the input operation
See Also:
demandFloat(), demandFloat(StringableFilter), demandFloatAsHex(), demandFloatAsHex(StringableFilter), requestFloat(), requestFloat(StringableFilter), requestFloatAsHex(StringableFilter)

requestFloatAsHex

public float requestFloatAsHex(StringableFilter f)
                        throws CancelledException
Returns a float extracted from the field as hexidecimal data using the optional model with the given filter.

Parameters:
f - the filter to use for the input operation
Throws:
CancelledException - if the user cancelled the input operation
See Also:
demandFloat(), demandFloat(StringableFilter), demandFloatAsHex(), demandFloatAsHex(StringableFilter), requestFloat(), requestFloat(StringableFilter), requestFloatAsHex()

demandDouble

public double demandDouble()
Returns a double extracted from the field using the mandatory model.

See Also:
demandDouble(StringableFilter), demandDoubleAsHex(), demandDoubleAsHex(StringableFilter), requestDouble(), requestDouble(StringableFilter), requestDoubleAsHex(), requestDoubleAsHex(StringableFilter)

demandDouble

public double demandDouble(StringableFilter f)
Returns a double extracted from the field using the mandatory model with the given filter.

Parameters:
f - the filter to use for the input operation
See Also:
demandDouble(), demandDoubleAsHex(), demandDoubleAsHex(StringableFilter), requestDouble(), requestDouble(StringableFilter), requestDoubleAsHex(), requestDoubleAsHex(StringableFilter)

demandDoubleAsHex

public double demandDoubleAsHex()
Returns a double extracted from the field as hexidecimal data using the mandatory model.

See Also:
demandDouble(), demandDouble(StringableFilter), demandDoubleAsHex(StringableFilter), requestDouble(), requestDouble(StringableFilter), requestDoubleAsHex(), requestDoubleAsHex(StringableFilter)

demandDoubleAsHex

public double demandDoubleAsHex(StringableFilter f)
Returns a double extracted from the field as hexidecimal data using the mandatory model with the given filter.

Parameters:
f - the filter to use for the input operation
See Also:
demandDouble(), demandDouble(StringableFilter), demandDoubleAsHex(), requestDouble(), requestDouble(StringableFilter), requestDoubleAsHex(), requestDoubleAsHex(StringableFilter)

requestDouble

public double requestDouble()
                     throws CancelledException
Returns a double extracted from the field using the optional model.

Throws:
CancelledException - if the user cancelled the input operation
See Also:
demandDouble(), demandDouble(StringableFilter), demandDoubleAsHex(), demandDoubleAsHex(StringableFilter), requestDouble(StringableFilter), requestDoubleAsHex(), requestDoubleAsHex(StringableFilter)

requestDouble

public double requestDouble(StringableFilter f)
                     throws CancelledException
Returns a double extracted from the field using the optional model with the given filter.

Parameters:
f - the filter to use for the input operation
Throws:
CancelledException - if the user cancelled the input operation
See Also:
demandDouble(), demandDouble(StringableFilter), demandDoubleAsHex(), demandDoubleAsHex(StringableFilter), requestDouble(), requestDoubleAsHex(), requestDoubleAsHex(StringableFilter)

requestDoubleAsHex

public double requestDoubleAsHex()
                          throws CancelledException
Returns a double extracted from the field as hexidecimal data using the optional model.

Throws:
CancelledException - if the user cancelled the input operation
See Also:
demandDouble(), demandDouble(StringableFilter), demandDoubleAsHex(), demandDoubleAsHex(StringableFilter), requestDouble(), requestDouble(StringableFilter), requestDoubleAsHex(StringableFilter)

requestDoubleAsHex

public double requestDoubleAsHex(StringableFilter f)
                          throws CancelledException
Returns a double extracted from the field as hexidecimal data using the optional model with the given filter.

Parameters:
f - the filter to use for the input operation
Throws:
CancelledException - if the user cancelled the input operation
See Also:
demandDouble(), demandDouble(StringableFilter), demandDoubleAsHex(), demandDoubleAsHex(StringableFilter), requestDouble(), requestDouble(StringableFilter), requestDoubleAsHex()

demandChar

public char demandChar()
Returns a char extracted from the field using the mandatory model.

See Also:
demandChar(StringableFilter), requestChar(), requestChar(StringableFilter)

demandChar

public char demandChar(StringableFilter f)
Returns a char extracted from the field using the mandatory model, with the given filter.

Parameters:
f - the filter to use for the input operation
See Also:
demandChar(), requestChar(StringableFilter), requestChar()

requestChar

public char requestChar()
                 throws CancelledException
Returns a char extracted from the field using the optional model.

Throws:
CancelledException - if the user cancelled the input operation
See Also:
requestChar(StringableFilter), demandChar(), demandChar(StringableFilter)

requestChar

public char requestChar(StringableFilter f)
                 throws CancelledException
Returns a char extracted from the field using the optional model, with the given filter.

Parameters:
f - the filter to use for the input operation
Throws:
CancelledException - if the user cancelled the input operation
See Also:
requestChar(), demandChar(StringableFilter), demandChar()

demandBoolean

public boolean demandBoolean()
Returns a boolean extracted from the field using the mandatory model.

See Also:
demandBoolean(StringableFilter), requestBoolean(), requestBoolean(StringableFilter)

demandBoolean

public boolean demandBoolean(StringableFilter f)
Returns a boolean extracted from the field using the mandatory model, with the given filter.

Parameters:
f - the filter to use for the input operation
See Also:
demandBoolean(), requestBoolean(StringableFilter), requestBoolean()

requestBoolean

public boolean requestBoolean()
                       throws CancelledException
Returns a boolean extracted from the field using the optional model.

Throws:
CancelledException - if the user cancelled the input operation
See Also:
requestBoolean(StringableFilter), demandBoolean(), demandBoolean(StringableFilter)

requestBoolean

public boolean requestBoolean(StringableFilter f)
                       throws CancelledException
Returns a boolean extracted from the field using the optional model, with the given filter.

Parameters:
f - the filter to use for the input operation
Throws:
CancelledException - if the user cancelled the input operation
See Also:
requestBoolean(), demandBoolean(StringableFilter), demandBoolean()

demandString

public String demandString()
Returns a String extracted from the field using the mandatory model.

See Also:
demandString(StringableFilter), requestString(), requestString(StringableFilter)

demandString

public String demandString(StringableFilter f)
Returns a String extracted from the field using the mandatory model, with the given filter.

Parameters:
f - the filter to use for the input operation
See Also:
demandString(), requestString(StringableFilter), requestString()

requestString

public String requestString()
                     throws CancelledException
Returns a String extracted from the field using the optional model.

Throws:
CancelledException - if the user cancelled the input operation
See Also:
requestString(StringableFilter), demandString(), demandString(StringableFilter)

requestString

public String requestString(StringableFilter f)
                     throws CancelledException
Returns a String extracted from the field using the optional model, with the given filter.

Parameters:
f - the filter to use for the input operation
Throws:
CancelledException - if the user cancelled the input operation
See Also:
requestString(), demandString(StringableFilter), demandString()

demandColor

public Color demandColor()

Returns a Color extracted from the field using the mandatory model.

Although the Color input methods are available in this view, it is recommended that the class ColorView be used for color input.

See Also:
demandColor(StringableFilter), requestColor(), requestColor(StringableFilter)

demandColor

public Color demandColor(StringableFilter f)

Returns a Color extracted from the field using the mandatory model, with the given filter.

Although the Color input methods are available in this view, it is recommended that the class ColorView be used for color input.

Parameters:
f - the filter to use for the input operation
See Also:
demandColor(), requestColor(StringableFilter), requestColor()

requestColor

public Color requestColor()
                   throws CancelledException

Returns a Color extracted from the field using the optional model.

Although the Color input methods are available in this view, it is recommended that the class ColorView be used for color input.

Throws:
CancelledException - if the user cancelled the input operation
See Also:
requestColor(StringableFilter), demandColor(), demandColor(StringableFilter)

requestColor

public Color requestColor(StringableFilter f)
                   throws CancelledException

Returns a Color extracted from the field using the optional model, with the given filter.

Although the Color input methods are available in this view, it is recommended that the class ColorView be used for color input.

Parameters:
f - the filter to use for the input operation
Throws:
CancelledException - if the user cancelled the input operation
See Also:
requestColor(), demandColor(StringableFilter), demandColor()

demandBigInteger

public BigInteger demandBigInteger()
Returns a BigInteger extracted from the field using the mandatory model.

See Also:
demandBigInteger(StringableFilter), requestBigInteger(), requestBigInteger(StringableFilter)

demandBigInteger

public BigInteger demandBigInteger(StringableFilter f)
Returns a BigInteger extracted from the field using the mandatory model, with the given filter.

Parameters:
f - the filter to use for the input operation
See Also:
demandBigInteger(), requestBigInteger(StringableFilter), requestBigInteger()

requestBigInteger

public BigInteger requestBigInteger()
                             throws CancelledException
Returns a BigInteger extracted from the field using the optional model.

Throws:
CancelledException - if the user cancelled the input operation
See Also:
requestBigInteger(StringableFilter), demandBigInteger(), demandBigInteger(StringableFilter)

requestBigInteger

public BigInteger requestBigInteger(StringableFilter f)
                             throws CancelledException
Returns a BigInteger extracted from the field using the optional model, with the given filter.

Parameters:
f - the filter to use for the input operation
Throws:
CancelledException - if the user cancelled the input operation
See Also:
requestBigInteger(), demandBigInteger(StringableFilter), demandBigInteger()

demandBigDecimal

public BigDecimal demandBigDecimal()
Returns a BigDecimal extracted from the field using the mandatory model.

See Also:
demandBigDecimal(StringableFilter), requestBigDecimal(), requestBigDecimal(StringableFilter)

demandBigDecimal

public BigDecimal demandBigDecimal(StringableFilter f)
Returns a BigDecimal extracted from the field using the mandatory model, with the given filter.

Parameters:
f - the filter to use for the input operation
See Also:
demandBigDecimal(), requestBigDecimal(StringableFilter), requestBigDecimal()

requestBigDecimal

public BigDecimal requestBigDecimal()
                             throws CancelledException
Returns a BigDecimal extracted from the field using the optional model.

Throws:
CancelledException - if the user cancelled the input operation
See Also:
requestBigDecimal(StringableFilter), demandBigDecimal(), demandBigDecimal(StringableFilter)

requestBigDecimal

public BigDecimal requestBigDecimal(StringableFilter f)
                             throws CancelledException
Returns a BigDecimal extracted from the field using the optional model, with the given filter.

Parameters:
f - the filter to use for the input operation
Throws:
CancelledException
See Also:
requestBigDecimal(), demandBigDecimal(StringableFilter), demandBigDecimal()

installFocusActions

protected void installFocusActions()
Installs a focus listener implementing the autoselect functionality for this text field.