public class PIAPanel extends ImagePanel implements PViewComponent, PComponentAttribute, PCollectDataListener, ContainerListener, Serializable
PIAPanel is a Swing-compatible, Portal-aware Panel.
This component tracks the Portal-aware components that are added to it and
passes data (model handles) and method calls (for example, from
PComponentAttribute) to all of the children components.JPanel.AccessibleJPanelJComponent.AccessibleJComponentContainer.AccessibleAWTContainerComponent.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy| Modifier and Type | Field and Description |
|---|---|
protected boolean |
collectDataFromInvisiblePanels
Set this to true if you want invisible panels to participate
in data collection.
|
protected boolean |
isTracking |
protected LinkedList |
mIAList |
protected PComponentImpl |
mImpl |
IMAGE_CENTERED, IMAGE_SCALE_TO_HEIGHT, IMAGE_SCALE_TO_WIDTH, IMAGE_SCALED, IMAGE_TILED, mImageIcon, mScaledImagelistenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOWaccessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENTABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH| Constructor and Description |
|---|
PIAPanel()
Creates a
PIAPanel that contains some knowledge of Portal. |
PIAPanel(ImageIcon img,
int mode)
Creates a
PIAPanel that contains some knowledge of Portal. |
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
A convenience method to clear every Portal-aware descendant of
this panel.
|
void |
collectData(PCollectDataEvent event)
Overrides
PCollectDataListener. |
void |
componentAdded(ContainerEvent e)
Tracks all Portal-aware components that are added to this panel.
|
void |
componentRemoved(ContainerEvent e)
Tracks all Portal-aware components that are removed from this panel.
|
boolean |
containsError(Object obj)
Not implemented in this class, but provides a mechanism to pass
error data to subclasses.
|
void |
firePropertyChange(String prop,
Object oldV,
Object newV)
Fires a property change event to any registered listener.
|
void |
fireVetoableChange(String prop,
Object oldV,
Object newV)
Fires a vetoable property change event to any registered listener.
|
String |
getBackgroundImageSource() |
static ResourceBundle |
getBundle(String name)
Intended for use by
PIAPanel subclasses that are set up for use
in Borland JBuilder. |
String |
getControllerClassName()
Retrieves the class name of this component's controller.
|
PModelHandle |
getModelHandle()
Retrieves the
PModelHandle for this component. |
PRemoteComponent |
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 |
isClean()
Determines if any descendant is marked DIRTY or ERROR.
|
boolean |
isCurrencyDisplay()
Determines whether any descendants currently display currency data.
|
boolean |
isDirty()
Determines if any descendant is marked DIRTY in its current context.
|
boolean |
isError()
Determines if any descendant is marked ERROR in its current context.
|
boolean |
isInputTracking()
Determines if
inputTracking is on for this panel (itself). |
boolean |
isLight()
Determines if this component defers
PModelHandle
knowledge to its parent container. |
boolean |
isRequired()
Determines if any descendant is required in its current context.
|
protected Object |
processError(PModelHandle err)
Provides a hook for subclasses to react to errors if they choose
to do so.
|
void |
resetToDefault()
A convenience method to reset every field on this panel.
|
void |
revertToPrimary(int primary)
Causes the widget to display its data in the primary currency
|
void |
setBackgroundImageMode(int drawMode) |
void |
setBackgroundImageSource(String loc) |
void |
setClean()
A convenience method that marks all
PFieldComponent
components in this panel as CLEAN. |
void |
setCurrencyDisplay(boolean b)
A convenience method to mark whether all components in
this panel can display currency data.
|
void |
setDefault()
Establishes the current value of every Portal-aware descendant
as the default value for that component.
|
void |
setError(boolean b)
Passes the
setError() method call to all Portal-aware
descendants. |
void |
setInputTracking(boolean b)
A convenience method to toggle the
inputTracking property for all
descendants of this panel. |
void |
setModelHandle(PModelHandle data)
Establishes the
PModelHandle for this component and
all its descendants. |
void |
setRequired(boolean b)
Passes the
setRequired() method call to all Portal-aware
descendants. |
void |
setResourceName(String name)
Sets the base resource name used in resource look up.
|
Object |
togglePrimaryToSecondary(int primary,
int secondary)
This method is not implemented for
PIAPanel. |
void |
unregister()
Disassociates the controller from the component
|
void |
viewDataChange(PViewDataChangeEvent event)
Overrides
PViewDataChangeListener. |
getBackgroundImageIcon, getBackgroundImageMode, imageUpdate, paintComponent, setBackgroundImageIcongetAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUIaddAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, 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, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintImmediately, paintImmediately, 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, updateadd, 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, validateTreeaction, 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, 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, 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, transferFocusUpCycleprotected transient LinkedList mIAList
protected transient PComponentImpl mImpl
protected boolean isTracking
protected boolean collectDataFromInvisiblePanels
public PIAPanel()
PIAPanel that contains some knowledge of Portal.
This Panel displays an image, centered in the background.public PIAPanel(ImageIcon img, int mode)
PIAPanel that contains some knowledge of Portal.
This Panel also knows how to display an image in the background.img - the image to displaymode - indicates how to display the background imagepublic void unregister()
throws RemoteException
unregister in interface PClientComponentRemoteExceptionpublic void setModelHandle(PModelHandle data) throws RemoteException
PModelHandle for this component and
all its descendants.setModelHandle in interface PComponentdata - the new PModelHandle from
which to extract informationRemoteException - thrown for errorspublic PModelHandle getModelHandle() throws RemoteException
PModelHandle for this component.getModelHandle in interface PComponentPModelHandle 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.
Containers typically do not defer processing but instead handle it themselves.isLight in interface PComponentRemoteException - thrown for errorspublic String getControllerClassName() throws RemoteException
getControllerClassName in interface PComponentString with the name
of the controller.RemoteException - thrown for errorspublic Vector getTools()
getTools in interface PClientComponentVector that contains Action objects.public void setResourceName(String name)
setResourceName in interface PClientComponentname - the new base resource namepublic String getResourceName()
getResourceName in interface PClientComponentString with the base resource name.public void firePropertyChange(String prop, Object oldV, Object newV)
firePropertyChange in interface PViewComponentfirePropertyChange in class Componentprop - the property that has changedoldV - the old valuenewV - the new valuepublic void fireVetoableChange(String prop, Object oldV, Object newV) throws PropertyVetoException
fireVetoableChange in interface PViewComponentfireVetoableChange in class JComponentprop - the property that has changedoldV - the old valuenewV - the new valuePropertyVetoException - thrown when a proposed
change to a property represents an
unacceptable valuepublic PRemoteComponent getRemoteComponent()
getRemoteComponent in interface PViewComponentRemote component.public Object togglePrimaryToSecondary(int primary, int secondary) throws RemoteException
PIAPanel. Use
PIACustomizablePanel instead.togglePrimaryToSecondary in interface PComponentAttributefrom - the current Portal currency IDto - the new Portal currency IDprimary - The primary currency IDsecondary - The secondary currency IDRemoteExceptionpublic void revertToPrimary(int primary)
throws RemoteException
revertToPrimary in interface PComponentAttributeprimary - The primary currency ID for an accountRemoteExceptionpublic 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. The client code should call the appropriate
get() methods on the controller to get the data, as the
PViewDataChangeEvent parameter is no longer used.viewDataChange in interface PViewDataChangeListenerevent - 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 setBackgroundImageSource(String loc)
public String getBackgroundImageSource()
public void setBackgroundImageMode(int drawMode)
setBackgroundImageMode in class ImagePanelpublic void componentAdded(ContainerEvent e)
componentAdded in interface ContainerListenere - the event that indicates a child was addedpublic void componentRemoved(ContainerEvent e)
componentRemoved in interface ContainerListenere - the event that indicates a child was removedpublic void setRequired(boolean b)
setRequired() method call to all Portal-aware
descendants.setRequired in interface PComponentAttributeb - if true, puts the component in the REQUIRED statepublic boolean isRequired()
isRequired in interface PComponentAttributepublic void setError(boolean b)
setError() method call to all Portal-aware
descendants.setError in interface PComponentAttributeb - if true, puts the component in the ERROR statepublic boolean isError()
isError in interface PComponentAttributepublic boolean isDirty()
isDirty in interface PComponentAttributepublic void setDefault()
setDefault in interface PComponentAttributepublic boolean isClean()
public void setClean()
PFieldComponent
components in this panel as CLEAN. Useful if components were marked DIRTY
because inputTracking is on and the data was modified.setClean in interface PComponentAttributepublic void setInputTracking(boolean b)
inputTracking property for all
descendants of this panel.
If the 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 PComponentAttributeb - the state of the inputTracking propertypublic boolean isInputTracking()
inputTracking is on for this panel (itself).isInputTracking in interface PComponentAttributeinputTracking is on; false otherwise.public void clear()
clear in interface PComponentAttributepublic void resetToDefault()
resetToDefault in interface PComponentAttributepublic boolean isCurrencyDisplay()
isCurrencyDisplay in interface PComponentAttributepublic void setCurrencyDisplay(boolean b)
Widgets that display currency data are capable of automatically toggling their data between a primary and secondary Portal currency type.
Use this API if the application you are building allows the user to switch between multiple currencies. For each widget that displays currency data, set this property to true.
setCurrencyDisplay in interface PComponentAttributeb - if true, indicates that the widget currently displays currency datapublic void collectData(PCollectDataEvent event)
PCollectDataListener. Forewarded to all
contained GUI components that are also a PCollectDataListener.collectData in interface PCollectDataListenerevent - the PCollectDataEvent data eventpublic boolean containsError(Object obj)
Typically the argument to this method is an array of
CustomerValErrorData objects, but
the possibility for other types is left open.
obj - a generic parameter used to pass error data to the panelpublic static ResourceBundle getBundle(String name)
PIAPanel subclasses that are set up for use
in Borland JBuilder. JBuilder requires that resource bundles be statically
loaded using the ResourceBundle.getBundle() method, but at runtime,
the BAS methodology should be used. This method differentiates between
design time and run time and retrieves the appropriate resources.protected Object processError(PModelHandle err)
collectData() to pass
along other data. If an error occurs, that subclass needs to
check to determine if it is the cause of the error and respond to it appropriately.err - the error model handleCopyright © 2003, 2023, Oracle and/or its affiliates.