Package com.portal.bas.comp
Class PIAScrollPane
java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JScrollPane
com.portal.bas.comp.PIAScrollPane
- All Implemented Interfaces:
PAppComponent,PClientComponent,PCollectDataListener,PComponent,PComponentAttribute,PViewDataChangeListener,ImageObserver,MenuContainer,Serializable,EventListener,Accessible,ScrollPaneConstants
public class PIAScrollPane
extends JScrollPane
implements PAppComponent, PComponentAttribute, PCollectDataListener, Serializable
PIAScrollPane is a Swing-compatible, Portal-aware
JPanel class. Used to pass certain method calls through to
its view component. Otherwise, to traverse components you would have
to specifically look for scroll panes and get their view components
yourself.- Version:
- %version: 18 % %date_modified: Mon Oct 22 09:46:12 2001 %
- Author:
- Kapono Carter
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class javax.swing.JScrollPane
JScrollPane.AccessibleJScrollPane, JScrollPane.ScrollBarNested classes/interfaces inherited from class javax.swing.JComponent
JComponent.AccessibleJComponentNested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainerNested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy -
Field Summary
FieldsFields inherited from class javax.swing.JScrollPane
columnHeader, horizontalScrollBar, horizontalScrollBarPolicy, lowerLeft, lowerRight, rowHeader, upperLeft, upperRight, verticalScrollBar, verticalScrollBarPolicy, viewportFields inherited from class javax.swing.JComponent
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOWFields inherited from class java.awt.Component
accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENTFields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTHFields inherited from interface javax.swing.ScrollPaneConstants
COLUMN_HEADER, HORIZONTAL_SCROLLBAR, HORIZONTAL_SCROLLBAR_ALWAYS, HORIZONTAL_SCROLLBAR_AS_NEEDED, HORIZONTAL_SCROLLBAR_NEVER, HORIZONTAL_SCROLLBAR_POLICY, LOWER_LEADING_CORNER, LOWER_LEFT_CORNER, LOWER_RIGHT_CORNER, LOWER_TRAILING_CORNER, ROW_HEADER, UPPER_LEADING_CORNER, UPPER_LEFT_CORNER, UPPER_RIGHT_CORNER, UPPER_TRAILING_CORNER, VERTICAL_SCROLLBAR, VERTICAL_SCROLLBAR_ALWAYS, VERTICAL_SCROLLBAR_AS_NEEDED, VERTICAL_SCROLLBAR_NEVER, VERTICAL_SCROLLBAR_POLICY, VIEWPORT -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new scrollable panel.PIAScrollPane(Component view) Creates a new scrollable panel that contains the given component. -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()A convenience method that clears every field on the descendants of this panel'sviewPortcomponent.voidcollectData(PCollectDataEvent event) OverridesPCollectDataListener.Retrieves the class name of this component's controller.Retrieves thePModelHandlefor this component.Gets a reference to the remote component for this object.Gets the base resource name used in resource look up.getTools()Gets a list of actions supported by this component.protected voidInitializes the scrolling behavior for this component.booleanisClean()Determines if the view component is clean.booleanDetermines whether theviewPortcomponent currently displays currency data.booleanisDirty()Determines if the view component's DIRTY attribute is set.booleanisError()Determines if the view component's ERROR attribute is set.booleanDetermines ifinputTrackingis on for this panel.booleanisLight()Determines if this component defersPModelHandleknowledge to its parent container.booleanDetermines if the view component is required in its current context.voidA convenience method that resets the value of every field on the descendants of this panel'sviewPortcomponent.voidrevertToPrimary(int primary) Causes the widget to display its data in the primary currency.voidsetClean()A convenience method that marks allPFieldComponentcomponents in this panel as CLEAN.voidsetCurrencyDisplay(boolean b) Determines if a component currently displays currency data.voidPasses thesetDefault()method call to the view component.voidsetError(boolean b) Passes thesetErrormethod call to the view component.voidsetInputTracking(boolean b) A convenience method to toggle theinputTrackingproperty for all descendants of this panel.voidsetModelHandle(PModelHandle data) Establishes thePModelHandlefor this component.voidsetRequired(boolean b) Passes thesetRequiredmethod call to the view component.voidsetResourceName(String name) Sets the base resource name used in resource look up.togglePrimaryToSecondary(int primary, int secondary) Walks through the component hierarchy and, for those components that display currency (isCurrencyDisplayreturns true), converts the displayed data to the new currency type.voidDisassociates the controller from the componentvoidOverridesPViewDataChangeListener.Methods inherited from class javax.swing.JScrollPane
createHorizontalScrollBar, createVerticalScrollBar, createViewport, getAccessibleContext, getColumnHeader, getCorner, getHorizontalScrollBar, getHorizontalScrollBarPolicy, getRowHeader, getUI, getUIClassID, getVerticalScrollBar, getVerticalScrollBarPolicy, getViewport, getViewportBorder, getViewportBorderBounds, isValidateRoot, isWheelScrollingEnabled, paramString, setColumnHeader, setColumnHeaderView, setComponentOrientation, setCorner, setHorizontalScrollBar, setHorizontalScrollBarPolicy, setLayout, setRowHeader, setRowHeaderView, setUI, setVerticalScrollBar, setVerticalScrollBarPolicy, setViewport, setViewportBorder, setViewportView, setWheelScrollingEnabled, updateUIMethods inherited from class javax.swing.JComponent
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, 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, 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, updateMethods inherited from class java.awt.Container
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, transferFocusDownCycle, validate, validateTreeMethods inherited from class java.awt.Component
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, 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, 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, requestFocus, requestFocus, requestFocusInWindow, resize, resize, setBounds, setBounds, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setMixingCutoutShape, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
-
Field Details
-
mImpl
-
isTracking
protected boolean isTracking
-
-
Constructor Details
-
PIAScrollPane
public PIAScrollPane()Creates a new scrollable panel. -
PIAScrollPane
Creates a new scrollable panel that contains the given component.- Parameters:
view- the component to scroll
-
-
Method Details
-
unregister
Disassociates the controller from the component- Specified by:
unregisterin interfacePClientComponent- Throws:
RemoteException
-
setModelHandle
Establishes thePModelHandlefor this component.- Specified by:
setModelHandlein interfacePComponent- Parameters:
data- the newPModelHandlefrom which to extract information- Throws:
RemoteException- thrown for errors
-
getModelHandle
Retrieves thePModelHandlefor this component.- Specified by:
getModelHandlein interfacePComponent- Returns:
- The
PModelHandleassociated with this component, or null if this is a lightweight component. - Throws:
RemoteException- thrown for errors
-
isLight
Determines if this component defersPModelHandleknowledge to its parent container. If so, the parent container passes thePModelHandleto 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.- Specified by:
isLightin interfacePComponent- Returns:
- True if this component defers knowledge, false otherwise.
- Throws:
RemoteException- thrown for errors
-
getControllerClassName
Retrieves the class name of this component's controller.- Specified by:
getControllerClassNamein interfacePComponent- Returns:
- "com.portal.bas.comp.PIAComponentCollectionBean", the default controller for this component.
- Throws:
RemoteException- thrown for errors
-
getTools
Gets a list of actions supported by this component. When subclassed, the overriding class should call its super class version, then add its actions to the returned list. This preserves actions supplied by base classes. The default, supplied here, includes help for this component.- Specified by:
getToolsin interfacePClientComponent- Returns:
- A
Vectorthat containsActionobjects.
-
setResourceName
Sets the base resource name used in resource look up. Basically, the resource name is this base, followed by a dot, followed by the local name (label).- Specified by:
setResourceNamein interfacePClientComponent- Parameters:
name- the new base resource name
-
getResourceName
Gets the base resource name used in resource look up.- Specified by:
getResourceNamein interfacePClientComponent- Returns:
- A
Stringwith the base resource name.
-
getRemoteComponent
Gets a reference to the remote component for this object. The remote component is used to interface with this component's controller.- Specified by:
getRemoteComponentin interfacePAppComponent- Returns:
- A
Remotecomponent.
-
togglePrimaryToSecondary
Walks through the component hierarchy and, for those components that display currency (isCurrencyDisplayreturns true), converts the displayed data to the new currency type.- Specified by:
togglePrimaryToSecondaryin interfacePComponentAttribute- Parameters:
primary- the primary Portal currency IDsecondary- the secondary Portal currency ID- Returns:
- By default, always returns null.
- Throws:
RemoteException- thrown for errors- Since:
- Release 6.2
-
revertToPrimary
Causes the widget to display its data in the primary currency.- Specified by:
revertToPrimaryin interfacePComponentAttribute- Parameters:
primary- The primary currency ID for an account.- Throws:
RemoteException
-
viewDataChange
OverridesPViewDataChangeListener. 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 appropriategetmethods on the controller to get the data, as the() PViewDataChangeEventparameter is no longer used.- Specified by:
viewDataChangein interfacePViewDataChangeListener- Parameters:
event- thePViewDataChangeEventevent that describes the change. No longer used. By default, the value passed in is always set to null.- Throws:
RemoteException- thrown for errors
-
setRequired
public void setRequired(boolean b) Passes thesetRequiredmethod call to the view component.- Specified by:
setRequiredin interfacePComponentAttribute- Parameters:
b- if true, puts the component in a REQUIRED state
-
isRequired
public boolean isRequired()Determines if the view component is required in its current context.- Specified by:
isRequiredin interfacePComponentAttribute- Returns:
- True if the view component is marked REQUIRED; false otherwise.
-
setError
public void setError(boolean b) Passes thesetErrormethod call to the view component.- Specified by:
setErrorin interfacePComponentAttribute- Parameters:
b- if true, puts the component in an ERROR state
-
isError
public boolean isError()Determines if the view component's ERROR attribute is set.- Specified by:
isErrorin interfacePComponentAttribute- Returns:
- True if the view component's ERROR attribute is set; false otherwise.
-
isDirty
public boolean isDirty()Determines if the view component's DIRTY attribute is set.- Specified by:
isDirtyin interfacePComponentAttribute- Returns:
- True if the view component's DIRTY attribute is set; false otherwise.
-
setDefault
public void setDefault()Passes thesetDefault()method call to the view component.- Specified by:
setDefaultin interfacePComponentAttribute
-
isClean
public boolean isClean()Determines if the view component is clean. A return of false means that the component's attribute is marked as DIRTY or ERROR.- Returns:
- True if the view component's DIRTY or ERROR attribute is not set; false otherwise.
-
setClean
public void setClean()A convenience method that marks allPFieldComponentcomponents in this panel as CLEAN. Useful if components are marked DIRTY becauseinputTrackingis on, and the data was modified.- Specified by:
setCleanin interfacePComponentAttribute
-
setInputTracking
public void setInputTracking(boolean b) A convenience method to toggle theinputTrackingproperty for all descendants of this panel.- Specified by:
setInputTrackingin interfacePComponentAttribute- Parameters:
b- a flag that indicates ifinputTrackingshould be supported
-
isInputTracking
public boolean isInputTracking()Determines ifinputTrackingis on for this panel.- Specified by:
isInputTrackingin interfacePComponentAttribute- Returns:
- True if
inputTrackingis on; false otherwise.
-
setCurrencyDisplay
public void setCurrencyDisplay(boolean b) Determines if a component currently displays currency data. Widgets that display currency data are capable of automatically toggling their data between a primary and secondary Portal currency type. This method is called on theviewPortcomponent.- Specified by:
setCurrencyDisplayin interfacePComponentAttribute- Parameters:
b- if true, indicates that the widget currently displays currency data- Since:
- Release 6.2
-
isCurrencyDisplay
public boolean isCurrencyDisplay()Determines whether theviewPortcomponent currently displays currency data.- Specified by:
isCurrencyDisplayin interfacePComponentAttribute- Returns:
- True if the
viewPortcomponent currently displays currency data; false otherwise. - Since:
- Release 6.2
-
clear
public void clear()A convenience method that clears every field on the descendants of this panel'sviewPortcomponent.- Specified by:
clearin interfacePComponentAttribute
-
resetToDefault
public void resetToDefault()A convenience method that resets the value of every field on the descendants of this panel'sviewPortcomponent.- Specified by:
resetToDefaultin interfacePComponentAttribute
-
collectData
OverridesPCollectDataListener. Forwarded to any contained GUI component that is also aPCollectDataListener.- Specified by:
collectDatain interfacePCollectDataListener- Parameters:
event- thePCollectDataEventdata event
-
initialize
protected void initialize()Initializes the scrolling behavior for this component. The unit increment for the vertical scrollbar is set to 15, and the unit increment for the horizontal scrollbar is set to 5.
-