public class PIAFieldComponent extends JComponent implements PAppFieldComponent, Serializable
PIAFieldComponent
is a Swing-compatible, Portal-aware
field component boilerplate code.JComponent.AccessibleJComponent
Container.AccessibleAWTContainer
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
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
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor and Description |
---|
PIAFieldComponent()
Constructs a
PIAFieldComponent and registers it with the
BAS server. |
Modifier and Type | Method and Description |
---|---|
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 this 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.
|
Object |
getLightData()
Gets the lightweight data object; in this implementation, an empty value.
|
String |
getModelFieldDescription()
Gets the data field description used by this component.
|
PModelHandle |
getModelHandle()
Retrieves the
PModelHandle for this component. |
Remote |
getRemoteComponent()
Gets a reference to the remote component (controller) for this object.
|
String |
getResourceName()
Returns the base resource name used to look up a resource.
|
Vector |
getTools()
Gets a list of actions supported by this component.
|
boolean |
isLight()
Determines whether this is a lightweight component.
|
void |
revertToPrimary(int primary)
Implement PFieldBean.revertToPrimary.
|
void |
setAssociatedClass(String name)
Sets the associated class, if any, for this field.
|
void |
setDisplayFieldDescription(String fieldDisp)
Sets the description of the field(s) in the data model for
this component to display.
|
void |
setDisplayFieldFormat(String fieldForm)
Sets the
java.text.MessageFormat used to display data in
this component. |
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 |
setLightData(Object field)
Sets the lightweight data object; in this implementation, an empty value.
|
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 |
setResourceName(String name)
Sets the base resource name used to look up resources.
|
Object |
togglePrimaryToSecondary(int primary,
int secondary)
Implement PFieldBean.togglePrimaryToSecondary.
|
void |
unregister()
Implement PClientComponent.unregister().
|
void |
viewDataChange(PViewDataChangeEvent event)
Overrides
PViewDataChangeListener . |
addAncestorListener, addNotify, 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, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, paramString, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update, updateUI
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, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAccessibleContext, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, 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, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
public PIAFieldComponent()
PIAFieldComponent
and registers it with the
BAS server.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,
or null if this is a lightweight
component.RemoteException
- thrown for errorspublic boolean isLight() throws RemoteException
getModelHandle
always
returns null, setModelHandle
is ignored, and no
property change events are generated.isLight
in interface PComponent
RemoteException
- thrown for errorspublic String getControllerClassName() throws RemoteException
getControllerClassName
in interface PComponent
String
with the controller's
class name.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 resource name.public Remote getRemoteComponent()
getRemoteComponent
in interface PAppComponent
Remote
object, which is the remote controller for this
View class.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
used to display data in
this component. This is typically (but not necessarily) directly tied
to the displayFieldDescription
. For this specific widget,
the format might be similar to the following:"{0,choice,0#First Label|1#2nd Label|2#Third Label}"
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
- a String
with 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 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 void setHelpID(String id)
setHelpID
in interface PAppFieldComponent
id
- the new help ID to setpublic String getHelpID()
getHelpID
in interface PAppFieldComponent
String
with the current help ID.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 String getDataDescriptor()
String
description of the fields
used by this component or null if there is none.RemoteException
- thrown for errorspublic void setLightData(Object field)
field
- the lightweight component's display datapublic Object getLightData()
public Object togglePrimaryToSecondary(int primary, int secondary) throws RemoteException
togglePrimaryToSecondary
in interface PFieldBean
primary
- the primary currency IDsecondary
- the secondary currency IDRemoteException
public void revertToPrimary(int primary) throws RemoteException
revertToPrimary
in interface PFieldBean
primary
- the primary currency IDRemoteException
public void unregister() throws RemoteException
unregister
in interface PClientComponent
RemoteException
Copyright © 2003, 2023, Oracle and/or its affiliates.