public class PIAIntegerField extends IntegerTextField implements PAppFieldComponent, PLightComponent, PComponentAttribute, PCollectDataListener, Serializable
PIAIntegerField
is a Swing-compatible, Portal-aware
integer display class.JTextField.AccessibleJTextField
JTextComponent.AccessibleJTextComponent, JTextComponent.DropLocation, JTextComponent.KeyBinding
JComponent.AccessibleJComponent
Container.AccessibleAWTContainer
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
Modifier and Type | Field and Description |
---|---|
protected int |
mPrimaryCur |
protected Object |
mPrimaryData |
protected int |
mSecondaryCur |
notifyAction
DEFAULT_KEYMAP, FOCUS_ACCELERATOR_KEY
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor and Description |
---|
PIAIntegerField()
Creates a text field that only allows numeric input.
|
Modifier and Type | Method and Description |
---|---|
void |
clear()
Clears existing data from the component, and resets the value to zero.
|
void |
collectData(PCollectDataEvent event)
Overrides
PCollectDataListener . |
String |
getAssociatedClass()
Gets the associated class, if any, for this field.
|
String |
getControllerClassName()
Retrieves the class name of this component's controller.
|
String |
getDataDescriptor()
Gets the data field description used by the component.
|
String |
getDisplayFieldDescription()
Gets the data field description used by the component.
|
String |
getDisplayFieldFormat()
Gets the display field format used by this component.
|
Object |
getField()
Gets the value of the field referred to in the
displayFieldDescription . |
String |
getHelpID()
Gets the current help ID for this component.
|
String |
getJoinDescription() |
Object |
getLightData()
Gets the lightweight data object.
|
String |
getModelFieldDescription()
Gets the data field description used by the component.
|
PModelHandle |
getModelHandle()
Retrieves the
PModelHandle for this component. |
Remote |
getRemoteComponent()
Gets a reference to the remote component for this object.
|
String |
getResourceName()
Gets the base resource name used in resource look up.
|
Vector |
getTools()
Gets a list of actions supported by this component.
|
boolean |
isCurrencyDisplay()
Determines whether the component currently displays currency data.
|
boolean |
isDirty()
Determines if this component is currently in a DIRTY state.
|
boolean |
isError()
Determines if this component is currently in an ERROR state.
|
boolean |
isInputTracking()
Determines if
inputTracking is enabled. |
boolean |
isLight()
Determines if this component defers
PModelHandle
knowledge to its parent container. |
boolean |
isRequired()
Determines if this component is a required field in its current context.
|
protected boolean |
isValidInput(String str)
This method is overridden so that value beyond the
Integer.MIN_VALUE |
void |
resetToDefault()
Resets the component value to the original value (that which was
established by calling
setDefault() ). |
void |
revertToPrimary(int primary)
Causes the widget to display its data in the primary currency
|
void |
setAssociatedClass(String name)
Sets the associated class, if any, for this field.
|
void |
setClean()
Resets the component to the CLEAN state.
|
void |
setCurrencyDisplay(boolean b)
Determines whether this component currently displays currency data.
|
void |
setDefault()
Establishes the current value (or element count, depending on the
given component) as the default value.
|
void |
setDisplayFieldDescription(String fieldDisp)
Sets the description of the field(s) in the data model that
this component displays.
|
void |
setDisplayFieldFormat(String fieldForm)
Sets the
java.text.MessageFormat format used to display
data in this component. |
void |
setError(boolean b)
Marks that this component contains erroneous data in the current context,
or unmarks the ERROR state, depending on the parameter.
|
void |
setField(Object field)
Sets the value of the field referred to in the
modelFieldDescription . |
void |
setHelpID(String id)
Sets the help ID for this component.
|
void |
setInputTracking(boolean b)
If the
inputTracking property is enabled, any changes made by the
user to the component are tracked and the component is marked DIRTY. |
void |
setJoinDescription(String joinDesc)
Used in the search panel, specifies the join field in a complex search
|
void |
setLightData(Object field)
Sets the lightweight data object.
|
void |
setModelFieldDescription(String fieldDesc)
Sets the description of the field in the data model that this
component is interested in.
|
void |
setModelHandle(PModelHandle data)
Establishes the
PModelHandle for this component. |
void |
setRequired(boolean b)
Marks this component as required in its current context.
|
void |
setResourceName(String name)
Sets the base resource name used in resource look up.
|
Object |
togglePrimaryToSecondary(int primary,
int secondary)
Causes the component to use the
BEIDManager to
convert its data. |
void |
unregister()
Used to disassociate this component from its delegate (controller)
|
void |
viewDataChange(PViewDataChangeEvent event)
Overrides
PViewDataChangeListener . |
addNotify, coalesceEvents, getMaximumValue, getMinimumValue, getNumDigitsAllowed, getValue, isAllowEmptyValue, isAllowNegativeNumbers, replaceSelection, setAllowEmptyValue, setAllowNegativeNumbers, setMaximumValue, setMinimumValue, setNumDigitsAllowed, setText, valueChange
getSpecialChars, setSpecialChars
actionPropertyChanged, addActionListener, configurePropertiesFromAction, createActionPropertyChangeListener, createDefaultModel, fireActionPerformed, getAccessibleContext, getAction, getActionListeners, getActions, getColumns, getColumnWidth, getHorizontalAlignment, getHorizontalVisibility, getPreferredSize, getScrollOffset, getUIClassID, isValidateRoot, paramString, postActionEvent, removeActionListener, scrollRectToVisible, setAction, setActionCommand, setColumns, setDocument, setFont, setHorizontalAlignment, setScrollOffset
addCaretListener, addInputMethodListener, addKeymap, copy, cut, fireCaretUpdate, getCaret, getCaretColor, getCaretListeners, getCaretPosition, getDisabledTextColor, getDocument, getDragEnabled, getDropLocation, getDropMode, getFocusAccelerator, getHighlighter, getInputMethodRequests, getKeymap, getKeymap, getMargin, getNavigationFilter, getPreferredScrollableViewportSize, getPrintable, getScrollableBlockIncrement, getScrollableTracksViewportHeight, getScrollableTracksViewportWidth, getScrollableUnitIncrement, getSelectedText, getSelectedTextColor, getSelectionColor, getSelectionEnd, getSelectionStart, getText, getText, getToolTipText, getUI, isEditable, loadKeymap, modelToView, moveCaretPosition, paste, print, print, print, processInputMethodEvent, read, removeCaretListener, removeKeymap, removeNotify, restoreComposedText, saveComposedText, select, selectAll, setCaret, setCaretColor, setCaretPosition, setComponentOrientation, setDisabledTextColor, setDragEnabled, setDropMode, setEditable, setFocusAccelerator, setHighlighter, setKeymap, setMargin, setNavigationFilter, setSelectedTextColor, setSelectionColor, setSelectionEnd, setSelectionStart, setUI, updateUI, viewToModel, write
addAncestorListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTree
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, 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, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
protected Object mPrimaryData
protected int mPrimaryCur
protected int mSecondaryCur
public PIAIntegerField()
public void unregister() throws RemoteException
unregister
in interface PClientComponent
RemoteException
public void setModelHandle(PModelHandle data) throws RemoteException
PModelHandle
for this component.setModelHandle
in interface PComponent
data
- the new PModelHandle
from which to extract informationRemoteException
- thrown for errorspublic PModelHandle getModelHandle() throws RemoteException
PModelHandle
for this component.getModelHandle
in interface PComponent
PModelHandle
associated
with this component.RemoteException
- thrown for errorspublic boolean isLight() throws RemoteException
PModelHandle
knowledge to its parent container. If so, the parent container passes the
PModelHandle
to this component on the server side (by way of
the controller), which saves a client/server round trip for data exchange.
If specific processing is required, when PModelHandle
is called
subclass this component and override this method. Otherwise,
setModelHandle()
will not be called.
isLight
in interface PComponent
RemoteException
- thrown for errorspublic String getControllerClassName() throws RemoteException
getControllerClassName
in interface PComponent
String
with the value
"com.portal.bas.comp.PIAFieldBean".RemoteException
- thrown for errorspublic Vector getTools()
getTools
in interface PClientComponent
Vector
that contains Action
objects.public void setResourceName(String name)
setResourceName
in interface PClientComponent
name
- the new base resource namepublic String getResourceName()
getResourceName
in interface PClientComponent
String
with the base resource name.public Remote getRemoteComponent()
getRemoteComponent
in interface PAppComponent
Remote
component.public void setModelFieldDescription(String fieldDesc) throws RemoteException
setModelFieldDescription
in interface PFieldBean
fieldDesc
- a String
that describes the
field used by this componentRemoteException
- thrown for errorspublic String getModelFieldDescription() throws RemoteException
getModelFieldDescription
in interface PFieldBean
String
description of the
field used by this component.RemoteException
- thrown for errorspublic void setDisplayFieldDescription(String fieldDisp) throws RemoteException
setDisplayFieldDescription
in interface PFieldBean
fieldDisp
- a String
that describes the
field displayed by this componentRemoteException
- thrown for errorspublic String getDisplayFieldDescription() throws RemoteException
getDisplayFieldDescription
in interface PFieldBean
String
description of the
field used by this component.RemoteException
- thrown for errorspublic void setDisplayFieldFormat(String fieldForm) throws RemoteException
java.text.MessageFormat
format used to display
data in this component. This is typically (but not necessarily) directly tied
to the displayFieldDescription
property. For example, the value for
displayFieldDescription
might be
"FldNameinfo[any].FldFirstName, FldNameinfo[any].FldLastName"
and the DisplayFieldFormat
for that might be "{1}, {0}" to display the
last name, followed by a comma, and then the first name.setDisplayFieldFormat
in interface PAppFieldComponent
fieldForm
- the format used to display the dataRemoteException
- thrown for errorspublic String getDisplayFieldFormat() throws RemoteException
getDisplayFieldFormat
in interface PAppFieldComponent
String
representation of the
display field format.RemoteException
- thrown for errorspublic void setAssociatedClass(String name) throws RemoteException
setAssociatedClass
in interface PFieldBean
name
- the class nameRemoteException
- thrown for errorspublic String getAssociatedClass() throws RemoteException
getAssociatedClass
in interface PFieldBean
String
with the associated class name.RemoteException
- thrown for errorspublic void setJoinDescription(String joinDesc)
The
- join descriptionpublic String getJoinDescription()
public void setField(Object field) throws RemoteException
modelFieldDescription
.setField
in interface PFieldBean
value
- the field's valueRemoteException
- thrown for errorspublic Object getField() throws RemoteException
displayFieldDescription
.getField
in interface PFieldBean
RemoteException
- thrown for errorspublic String getDataDescriptor()
getDataDescriptor
in interface PLightComponent
String
description of the fields
used by this component or null if there is none.RemoteException
- thrown for errorspublic void setLightData(Object field)
setLightData
in interface PLightComponent
field
- the lightweight component's display datapublic Object getLightData()
getLightData
in interface PLightComponent
field
- the lightweight component's display valueObject
that represents a component's display data.public void setHelpID(String id)
setHelpID
in interface PAppFieldComponent
id
- the new help IDpublic String getHelpID()
getHelpID
in interface PAppFieldComponent
String
help ID.public void resetToDefault()
setDefault()
). If no default
value exists, the component data is cleared.resetToDefault
in interface PComponentAttribute
public void clear()
clear
in interface PComponentAttribute
public boolean isRequired()
isRequired
in interface PComponentAttribute
public void setRequired(boolean b)
setRequired
in interface PComponentAttribute
b
- if true, puts the component in REQUIRED statepublic boolean isError()
isError
in interface PComponentAttribute
public void setError(boolean b)
setError
in interface PComponentAttribute
b
- if true, puts the component in ERROR state; if false, removes the
ERROR statepublic void setInputTracking(boolean b)
inputTracking
property is enabled, any changes made by the
user to the component are tracked and the component is marked DIRTY.
If the user modifies the data and returns it to its default or original
state, the component is marked CLEAN or not DIRTY.setInputTracking
in interface PComponentAttribute
b
- the state of the inputTracking
propertypublic boolean isInputTracking()
inputTracking
is enabled.isInputTracking
in interface PComponentAttribute
inputTracking
is enabled; false otherwise.public void setClean()
setClean
in interface PComponentAttribute
public boolean isDirty()
isDirty
in interface PComponentAttribute
inputTracking
is not enabled.public void setDefault()
setDefault
in interface PComponentAttribute
public boolean isCurrencyDisplay()
isCurrencyDisplay
in interface PComponentAttribute
public void setCurrencyDisplay(boolean b)
setCurrencyDisplay
in interface PComponentAttribute
b
- if true, indicates that the component currently displays currency datapublic Object togglePrimaryToSecondary(int primary, int secondary) throws RemoteException
BEIDManager
to
convert its data.togglePrimaryToSecondary
in interface PComponentAttribute
togglePrimaryToSecondary
in interface PFieldBean
primary
- the current currency ID used to display the datasecondary
- the new currency ID to use to display the dataRemoteException
- thrown for errorspublic void revertToPrimary(int primary) throws RemoteException
revertToPrimary
in interface PComponentAttribute
revertToPrimary
in interface PFieldBean
primary
- The primary currency ID for an accountRemoteException
public void viewDataChange(PViewDataChangeEvent event) throws RemoteException
PViewDataChangeListener
. This method is
no longer called by the controller itself. To ensure backward compatibility,
it is called after the model is set, by any operation that causes a change in
the display data. Client code should call the appropriate
get()
methods on the controller to get the data, because the
PViewDataChangeEvent
parameter is no longer used.viewDataChange
in interface PViewDataChangeListener
event
- the PViewDataChangeEvent
event that
describes the change. No longer used. By default,
the value passed in is always set to null.RemoteException
- thrown for errorspublic void collectData(PCollectDataEvent event)
PCollectDataListener
. Causes the controller to
save changes back to the data model. Done prior to committing changes to
Portal.collectData
in interface PCollectDataListener
event
- the data collection eventprotected boolean isValidInput(String str)
Integer.MIN_VALUE and Integer.MAX_VALUE limit
is not allowed to be entered.
isValidInput
in class IntegerTextField
str
- the string to be validatedCopyright © 2003, 2023, Oracle and/or its affiliates.