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.ScrollBar
Nested classes/interfaces inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
Nested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainer
Nested 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, viewport
Fields inherited from class javax.swing.JComponent
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Fields inherited from class java.awt.Component
accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Fields 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 TypeMethodDescriptionvoid
clear()
A convenience method that clears every field on the descendants of this panel'sviewPort
component.void
collectData
(PCollectDataEvent event) OverridesPCollectDataListener
.Retrieves the class name of this component's controller.Retrieves thePModelHandle
for 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 void
Initializes the scrolling behavior for this component.boolean
isClean()
Determines if the view component is clean.boolean
Determines whether theviewPort
component currently displays currency data.boolean
isDirty()
Determines if the view component's DIRTY attribute is set.boolean
isError()
Determines if the view component's ERROR attribute is set.boolean
Determines ifinputTracking
is on for this panel.boolean
isLight()
Determines if this component defersPModelHandle
knowledge to its parent container.boolean
Determines if the view component is required in its current context.void
A convenience method that resets the value of every field on the descendants of this panel'sviewPort
component.void
revertToPrimary
(int primary) Causes the widget to display its data in the primary currency.void
setClean()
A convenience method that marks allPFieldComponent
components in this panel as CLEAN.void
setCurrencyDisplay
(boolean b) Determines if a component currently displays currency data.void
Passes thesetDefault()
method call to the view component.void
setError
(boolean b) Passes thesetError
method call to the view component.void
setInputTracking
(boolean b) A convenience method to toggle theinputTracking
property for all descendants of this panel.void
setModelHandle
(PModelHandle data) Establishes thePModelHandle
for this component.void
setRequired
(boolean b) Passes thesetRequired
method call to the view component.void
setResourceName
(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 (isCurrencyDisplay
returns true), converts the displayed data to the new currency type.void
Disassociates the controller from the componentvoid
OverridesPViewDataChangeListener
.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, updateUI
Methods 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, update
Methods 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, validateTree
Methods 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:
unregister
in interfacePClientComponent
- Throws:
RemoteException
-
setModelHandle
Establishes thePModelHandle
for this component.- Specified by:
setModelHandle
in interfacePComponent
- Parameters:
data
- the newPModelHandle
from which to extract information- Throws:
RemoteException
- thrown for errors
-
getModelHandle
Retrieves thePModelHandle
for this component.- Specified by:
getModelHandle
in interfacePComponent
- Returns:
- The
PModelHandle
associated with this component, or null if this is a lightweight component. - Throws:
RemoteException
- thrown for errors
-
isLight
Determines if this component defersPModelHandle
knowledge to its parent container. If so, the parent container passes thePModelHandle
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.- Specified by:
isLight
in 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:
getControllerClassName
in 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:
getTools
in interfacePClientComponent
- Returns:
- A
Vector
that containsAction
objects.
-
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:
setResourceName
in interfacePClientComponent
- Parameters:
name
- the new base resource name
-
getResourceName
Gets the base resource name used in resource look up.- Specified by:
getResourceName
in interfacePClientComponent
- Returns:
- A
String
with 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:
getRemoteComponent
in interfacePAppComponent
- Returns:
- A
Remote
component.
-
togglePrimaryToSecondary
Walks through the component hierarchy and, for those components that display currency (isCurrencyDisplay
returns true), converts the displayed data to the new currency type.- Specified by:
togglePrimaryToSecondary
in 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:
revertToPrimary
in 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 appropriateget
methods on the controller to get the data, as the() PViewDataChangeEvent
parameter is no longer used.- Specified by:
viewDataChange
in interfacePViewDataChangeListener
- Parameters:
event
- thePViewDataChangeEvent
event 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 thesetRequired
method call to the view component.- Specified by:
setRequired
in 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:
isRequired
in interfacePComponentAttribute
- Returns:
- True if the view component is marked REQUIRED; false otherwise.
-
setError
public void setError(boolean b) Passes thesetError
method call to the view component.- Specified by:
setError
in 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:
isError
in 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:
isDirty
in 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:
setDefault
in 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 allPFieldComponent
components in this panel as CLEAN. Useful if components are marked DIRTY becauseinputTracking
is on, and the data was modified.- Specified by:
setClean
in interfacePComponentAttribute
-
setInputTracking
public void setInputTracking(boolean b) A convenience method to toggle theinputTracking
property for all descendants of this panel.- Specified by:
setInputTracking
in interfacePComponentAttribute
- Parameters:
b
- a flag that indicates ifinputTracking
should be supported
-
isInputTracking
public boolean isInputTracking()Determines ifinputTracking
is on for this panel.- Specified by:
isInputTracking
in interfacePComponentAttribute
- Returns:
- True if
inputTracking
is 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 theviewPort
component.- Specified by:
setCurrencyDisplay
in interfacePComponentAttribute
- Parameters:
b
- if true, indicates that the widget currently displays currency data- Since:
- Release 6.2
-
isCurrencyDisplay
public boolean isCurrencyDisplay()Determines whether theviewPort
component currently displays currency data.- Specified by:
isCurrencyDisplay
in interfacePComponentAttribute
- Returns:
- True if the
viewPort
component 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'sviewPort
component.- Specified by:
clear
in interfacePComponentAttribute
-
resetToDefault
public void resetToDefault()A convenience method that resets the value of every field on the descendants of this panel'sviewPort
component.- Specified by:
resetToDefault
in interfacePComponentAttribute
-
collectData
OverridesPCollectDataListener
. Forwarded to any contained GUI component that is also aPCollectDataListener
.- Specified by:
collectData
in interfacePCollectDataListener
- Parameters:
event
- thePCollectDataEvent
data 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.
-