public class PIACustomizablePanel extends ImagePanel implements PAppComponent, PComponentAttribute, PCollectDataListener, ContainerListener, Serializable
JPanel.AccessibleJPanelJComponent.AccessibleJComponentContainer.AccessibleAWTContainerComponent.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy| Modifier and Type | Field and Description |
|---|---|
protected boolean |
isTracking |
protected LinkedList |
mIAList |
protected PIAComponentCollection |
mImpl |
protected LinkedList |
unregList |
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 |
|---|
PIACustomizablePanel()
Creates a
PIACustomizablePanel that contains some knowledge of Portal. |
PIACustomizablePanel(ImageIcon img,
int mode)
Creates a
PIACustomizablePanel that contains some knowledge of Portal. |
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
A convenience method that clears all Portal-aware descendants 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)
This method is not implemented in this class, but provides a mechanism
to pass error data to subclasses.
|
String |
getBackgroundImageSource()
Gets the supplied background image.
|
static ResourceBundle |
getBundle(String name)
Used by
PIAPanel subclasses set up for use in Borland JBuilder. |
String |
getControllerClassName()
Retrieves the class name of this component's controller, in this case, null.
|
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 lookup.
|
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 component in the widget tree currently displays 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()
Serves as a convenience method to toggle the
inputTracking property
for all descendants of this panel. |
boolean |
isLight()
Determines if this component delegates
PModelHandle
processing 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.
|
void |
resetToDefault()
A convenience method that resets every field on this panel.
|
void |
revertToPrimary(int primary)
Causes previously toggled data to be reverted back to the
primary currency.
|
void |
setBackgroundImageMode(int drawMode)
Sets the drawing mode for the background image.
|
void |
setBackgroundImageSource(String loc)
Sets the supplied background image.
|
void |
setClean()
A convenience method that marks all
PFieldComponent
components in this panel as CLEAN. |
void |
setCurrencyDisplay(boolean b)
Determines if this component currently displays 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)
Delegates the
setRequired() method call to all Portal-aware
descendants. |
void |
setResourceName(String name)
Sets the base resource name used in resource lookup.
|
Object |
togglePrimaryToSecondary(int pri,
int sec)
Walks through the component hierarchy and, for those components that
display currency (
isCurrencyDisplay returns true), converts
the displayed data to the new currency type. |
void |
unregister()
Used to disconnect the controller from the component for all
child widgets contained within this panel.
|
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, 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, 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, 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 LinkedList unregList
protected transient PIAComponentCollection mImpl
protected boolean isTracking
public PIACustomizablePanel()
PIACustomizablePanel that contains some knowledge of Portal.
This panel can display a default image centered in the background.public PIACustomizablePanel(ImageIcon img, int mode)
PIACustomizablePanel that contains some knowledge of Portal.
This panel can display a specified image in the background.img - the image to displaymode - an indicator of 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
processing 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() is not called.
isLight in interface PComponentRemoteException - thrown for errorspublic String getControllerClassName() throws RemoteException
getControllerClassName in interface PComponentString.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 Remote getRemoteComponent()
getRemoteComponent in interface PAppComponentRemote component.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. The 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 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)
loc - the location of the image sourcepublic String getBackgroundImageSource()
String with the location of the image source.public void setBackgroundImageMode(int drawMode)
setBackgroundImageMode in class ImagePaneldrawMode - the mode to use for drawing the background imagepublic 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 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 ERROR statepublic boolean isError()
isError in interface PComponentAttributepublic boolean isDirty()
isDirty in interface PComponentAttributepublic void setDefault()
setDefault in interface PComponentAttributepublic boolean isCurrencyDisplay()
isCurrencyDisplay in interface PComponentAttributepublic void setCurrencyDisplay(boolean b)
setCurrencyDisplay on every child componentsetCurrencyDisplay in interface PComponentAttributeb - if true, indicates that the widget currently displays currency datapublic Object togglePrimaryToSecondary(int pri, int sec) throws RemoteException
isCurrencyDisplay returns true), converts
the displayed data to the new currency type.togglePrimaryToSecondary in interface PComponentAttributepri - The primary Portal currency IDsec - The secondary Portal currency IDfrom - the current currency ID used to display the datato - the new currency ID to use to display the dataRemoteException - thrown for errorspublic void revertToPrimary(int primary)
throws RemoteException
revertToPrimary in interface PComponentAttributeprimary - The primary currencyRemoteExceptionpublic boolean isClean()
public void setClean()
PFieldComponent
components in this panel as CLEAN. Useful if components have been marked DIRTY
because InputTracking is enabled, and the data has been modified.setClean in interface PComponentAttributepublic void setInputTracking(boolean b)
inputTracking property for all
descendants of this panel.setInputTracking in interface PComponentAttributeb - a flag indicating whether inputTracking should be supportedpublic boolean isInputTracking()
inputTracking property
for all descendants of this panel.isInputTracking in interface PComponentAttributeb - a flag that indicates whether inputTracking is supportedpublic void clear()
clear in interface PComponentAttributepublic void resetToDefault()
resetToDefault in interface PComponentAttributepublic void collectData(PCollectDataEvent event)
PCollectDataListener. Forwarded to all
contained GUIComponents that are also PCollectDataListeners.collectData in interface PCollectDataListenerevent - the PCollectDataEvent eventpublic boolean containsError(Object obj)
Typically the argument to this method is an array of
CustomerValErrorData objects, but you can use it
for other types as well.
obj - a generic parameter used to pass error data to the panelpublic static ResourceBundle getBundle(String name)
PIAPanel subclasses set up for use in Borland JBuilder.
JBuilder requires use of the ResourceBundle.getBundle() method to
statically load resource bundles: however, at runtime the BAS methodology should
be used. This method differentiates between design time and run time to ensure
the correct methodology is used.name - the name of the ResourceBundle to retrieveResourceBundle, if it is design time;
otherwise, the resource bundle associated with the current
PClientContext.protected Object processError(PModelHandle err)
collectData() to pass
along "other" data. If an error occurs, the subclass needs to
check 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.