SilverStream
Application Server 3.5

com.sssw.rt.jform
Class AgcJIntegerField

java.lang.Object
 |
 +--java.awt.Component
       |
       +--java.awt.Container
             |
             +--javax.swing.JComponent
                   |
                   +--javax.swing.text.JTextComponent
                         |
                         +--javax.swing.JTextField
                               |
                               +--com.sssw.rt.jform.AgcJTextField
                                     |
                                     +--com.sssw.rt.jform.AgcJValueField
                                           |
                                           +--com.sssw.rt.jform.AgcJIntegerField
All Implemented Interfaces:
Accessible, AgiHelpInfo, ImageObserver, MenuContainer, Scrollable, Serializable, SwingConstants

public class AgcJIntegerField
extends AgcJValueField

A lightweight component that displays an integer and accepts integer input from the user. It can be bound to a database column.

SilverStream associates the PlainDocument model with AgcJIntegerField.

See Also:
Serialized Form

Inner classes inherited from class javax.swing.JTextField
JTextField.AccessibleJTextField
 
Inner classes inherited from class javax.swing.text.JTextComponent
JTextComponent.AccessibleJTextComponent, JTextComponent.KeyBinding
 
Inner classes inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
 
Field Summary
static int NO_LIMIT
          Used to remove a limit on the allowed values.
 
Fields inherited from class com.sssw.rt.jform.AgcJTextField
NO_LIMIT
 
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.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Constructor Summary
AgcJIntegerField()
          Creates an empty field that accepts integer input.
 
Method Summary
 Integer getIntegerValue()
          Gets the field value as an Integer object.
 int getMaxValue()
          Gets the maximum value that the user is allowed to enter.
 int getMinValue()
          Gets the minimum value that the user is allowed to enter.
 int getValue()
          Gets the field value as a primitive int.
 void setIntegerValue(Integer n)
          Sets the field value with an Integer object.
 void setMaxValue(int value)
          Sets the maximum value that the user is allowed to enter.
 void setMinValue(int value)
          Sets the minimum value that the user is allowed to enter.
 void setValue(int value)
          Sets the field value with a primitive int.
 
Methods inherited from class com.sssw.rt.jform.AgcJValueField
format, getDisplayPattern, getDisplayStyle, parse, setDisplayPattern, setDisplayStyle
 
Methods inherited from class com.sssw.rt.jform.AgcJTextField
getEmptyStringIsNull, getMaxLength, getMinLength, setEmptyStringIsNull, setMaxLength, setMinLength
 
Methods inherited from class javax.swing.JTextField
addActionListener, createDefaultModel, fireActionPerformed, getAccessibleContext, getActions, getColumns, getColumnWidth, getHorizontalAlignment, getHorizontalVisibility, getPreferredSize, getScrollOffset, getUIClassID, isValidateRoot, paramString, postActionEvent, removeActionListener, scrollRectToVisible, setActionCommand, setColumns, setFont, setHorizontalAlignment, setScrollOffset
 
Methods inherited from class javax.swing.text.JTextComponent
addCaretListener, addInputMethodListener, addKeymap, copy, cut, fireCaretUpdate, getCaret, getCaretColor, getCaretPosition, getDisabledTextColor, getDocument, getFocusAccelerator, getHighlighter, getInputMethodRequests, getKeymap, getKeymap, getMargin, getPreferredScrollableViewportSize, getScrollableBlockIncrement, getScrollableTracksViewportHeight, getScrollableTracksViewportWidth, getScrollableUnitIncrement, getSelectedText, getSelectedTextColor, getSelectionColor, getSelectionEnd, getSelectionStart, getText, getText, getUI, isEditable, isFocusTraversable, isOpaque, loadKeymap, modelToView, moveCaretPosition, paste, processComponentKeyEvent, processInputMethodEvent, read, removeCaretListener, removeKeymap, removeNotify, replaceSelection, select, selectAll, setCaret, setCaretColor, setCaretPosition, setDisabledTextColor, setDocument, setEditable, setEnabled, setFocusAccelerator, setHighlighter, setKeymap, setMargin, setOpaque, setSelectedTextColor, setSelectionColor, setSelectionEnd, setSelectionStart, setText, setUI, updateUI, viewToModel, write
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getAlignmentX, getAlignmentY, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getGraphics, getHeight, getInsets, getInsets, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getVisibleRect, getWidth, getX, getY, grabFocus, hasFocus, isDoubleBuffered, isFocusCycleRoot, isLightweightComponent, isManagingFocus, isOptimizedDrawingEnabled, isPaintingTile, isRequestFocusEnabled, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, processFocusEvent, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, resetKeyboardActions, reshape, revalidate, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDoubleBuffered, setForeground, setMaximumSize, setMinimumSize, setNextFocusableComponent, setPreferredSize, setRequestFocusEnabled, setToolTipText, setUI, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getLayout, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setCursor, setLayout, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addKeyListener, addMouseListener, addMouseMotionListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getInputContext, getLocale, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hide, imageUpdate, inside, isDisplayable, isEnabled, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processMouseEvent, remove, removeComponentListener, removeFocusListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setDropTarget, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods implemented from interface com.sssw.rt.form.AgiHelpInfo
getHelpInfo, setHelpInfo
 

Field Detail

NO_LIMIT

public static final int NO_LIMIT
Used to remove a limit on the allowed values.
Constructor Detail

AgcJIntegerField

public AgcJIntegerField()
Creates an empty field that accepts integer input.
Method Detail

getValue

public int getValue()
Gets the field value as a primitive int.
Returns:
the int value displayed in the control. If the field is blank, returns 0.
See Also:
AgcJIntegerField.setValue(int), AgcJIntegerField.getIntegerValue()

getIntegerValue

public Integer getIntegerValue()
Gets the field value as an Integer object.
Returns:
an Integer object. If the field is blank, returns a null object reference.
See Also:
AgcJIntegerField.setIntegerValue(Integer), AgcJIntegerField.getValue()

setIntegerValue

public void setIntegerValue(Integer n)
Sets the field value with an Integer object.
Parameters:
n - an Integer object whose value you want to display in the field
See Also:
AgcJIntegerField.getIntegerValue(), AgcJIntegerField.setValue(int)

setValue

public void setValue(int value)
Sets the field value with a primitive int.
Parameters:
value - an int primitive whose value you want to display in the field
See Also:
AgcJIntegerField.getValue(), AgcJIntegerField.setIntegerValue(Integer)

getMaxValue

public int getMaxValue()
Gets the maximum value that the user is allowed to enter.
Returns:
an int specifying the maximum value allowed. If there is no maximum limit, returns the value defined by the NO_LIMIT constant.
See Also:
AgcJIntegerField.setMaxValue(int)

getMinValue

public int getMinValue()
Gets the minimum value that the user is allowed to enter.
Returns:
an int specifying the minimum value allowed. If there is no minimum limit, returns the value defined by the NO_LIMIT constant.
See Also:
AgcJIntegerField.setMinValue(int)

setMaxValue

public void setMaxValue(int value)
Sets the maximum value that the user is allowed to enter.
Parameters:
value - an int specifying the maximum input value. Use the constant NO_LIMIT to disable the limit.
Usage:
If the user tries to enter a larger value, a validationFailed event is fired.
See Also:
AgcJIntegerField.getMaxValue(), AgcJIntegerField.setMinValue(int)

setMinValue

public void setMinValue(int value)
Sets the minimum value that the user is allowed to enter.
Parameters:
value - an int specifying the minimum input value. Use the constant NO_LIMIT to disable the limit.
Usage:
If the user tries to enter a smaller value, a validationFailed event is fired.
See Also:
AgcJIntegerField.getMinValue(), AgcJIntegerField.setMaxValue(int)

SilverStream
Application Server 3.5