Package com.portal.bas.comp
Class PIAPanelGroup
java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
com.portal.pfc.ui.ImagePanel
com.portal.bas.comp.PIAPanel
com.portal.bas.comp.PIAPanelGroup
- All Implemented Interfaces:
PClientComponent
,PCollectDataListener
,PComponent
,PComponentAttribute
,PViewComponent
,PViewDataChangeListener
,ContainerListener
,ImageObserver
,MenuContainer
,Serializable
,EventListener
,Accessible
- Direct Known Subclasses:
PExtendedServicePanel
PIAPanelGroup
is a Swing-compatible, Portal-aware
Panel
with a built in cardLayout
.- Author:
- Kapono Carter
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class javax.swing.JPanel
JPanel.AccessibleJPanel
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
FieldsModifier and TypeFieldDescriptionprotected com.portal.bas.comp.ResizedCardLayout
The layout used by this panelprotected String[]
protected Component[]
The components added to this panelprotected String[]
The names of the components added to this panelFields inherited from class com.portal.bas.comp.PIAPanel
collectDataFromInvisiblePanels, isTracking, mIAList, mImpl
Fields inherited from class com.portal.pfc.ui.ImagePanel
IMAGE_CENTERED, IMAGE_SCALE_TO_HEIGHT, IMAGE_SCALE_TO_WIDTH, IMAGE_SCALED, IMAGE_TILED, mImageIcon, mScaledImage
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
-
Constructor Summary
ConstructorsConstructorDescriptionThis component represents a set of panels stacked on top of each other. -
Method Summary
Modifier and TypeMethodDescriptionAdds a component for layout management by this panel.void
Adds components for layout management by this panel.void
Adds components for layout management by this panel, given their respective class names.Adds the given component to the panel group after that component's name property is set to the given name.void
clear()
Calls removeAll() and then sets the internal component reference to null.int
For the given component, retrieves the associated indexboolean
Determines if this panel group contains a component whose name matches the named component.getComponentAt
(int i) For the given index, retrieves the associated component.int
Returns the total number of components.Retrieves the class name of this component's controller.String[]
getNames()
Returns the names of the components contained in this group.Returns the name of the panel that is currently visible.Returns the panel that is currently visible.int
Returns the index of the panel that is currently visible.nameToComponent
(String name) For the given name, retrieves the associated component.int
nameToIndex
(String name) For the given name, retrieves the index of the associated componentvoid
Removes all components contained within this panel group.void
Removes the specified component from the panel group.void
removeComponent
(String name) Removes the named component from the panel group.void
Overridden so the base class' layout cannot be changed.void
setOpaque
(boolean opaque) Sets the opacity for this panel, as well as all its children.void
setVisiblePanel
(int index) Flips to the panel that was added to this group at the specified index.void
setVisiblePanel
(String name) Flips to the panel that was added to this group with the specified name.void
Disassociates the controller from the component.Methods inherited from class com.portal.bas.comp.PIAPanel
collectData, componentAdded, componentRemoved, containsError, firePropertyChange, fireVetoableChange, getBackgroundImageSource, getBundle, getModelHandle, getRemoteComponent, getResourceName, getTools, isClean, isCurrencyDisplay, isDirty, isError, isInputTracking, isLight, isRequired, processError, resetToDefault, revertToPrimary, setBackgroundImageMode, setBackgroundImageSource, setClean, setCurrencyDisplay, setDefault, setError, setInputTracking, setModelHandle, setRequired, setResourceName, togglePrimaryToSecondary, viewDataChange
Methods inherited from class com.portal.pfc.ui.ImagePanel
getBackgroundImageIcon, getBackgroundImageMode, imageUpdate, paintComponent, setBackgroundImageIcon
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
Methods inherited from class javax.swing.JComponent
addAncestorListener, 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, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
Methods inherited from class java.awt.Container
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, 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, 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, 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, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setMixingCutoutShape, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
-
Field Details
-
cardLayout
protected transient com.portal.bas.comp.ResizedCardLayout cardLayoutThe layout used by this panel -
mNames
The names of the components added to this panel -
mComponents
The components added to this panel -
mClasses
-
-
Constructor Details
-
PIAPanelGroup
public PIAPanelGroup()This component represents a set of panels stacked on top of each other.
-
-
Method Details
-
getControllerClassName
Retrieves the class name of this component's controller.- Specified by:
getControllerClassName
in interfacePComponent
- Overrides:
getControllerClassName
in classPIAPanel
- Returns:
- A
String
with the value "com.portal.bas.comp.PIAPanelController". - Throws:
RemoteException
- thrown for errors
-
setLayout
Overridden so the base class' layout cannot be changed. -
setOpaque
public void setOpaque(boolean opaque) Sets the opacity for this panel, as well as all its children.- Overrides:
setOpaque
in classJComponent
- Parameters:
opaque
- an indication of whether or not to set opacity for this panel
-
add
Adds the given component to the panel group after that component's name property is set to the given name. -
add
Adds a component for layout management by this panel. -
add
Adds components for layout management by this panel.- Parameters:
names
- the names of the components to addcomps
- the components to add
-
add
Adds components for layout management by this panel, given their respective class names.- Parameters:
names
- the names of the components to addclasses
- the class names of the components to add
-
unregister
Disassociates the controller from the component. Call this after you call removeAll(). This walks through each component within the PIAPanelGroup and attempts to call unregister() on it. Therefore you need not explicitely unregister the pages yourself.- Specified by:
unregister
in interfacePClientComponent
- Overrides:
unregister
in classPIAPanel
- Throws:
RemoteException
-
clear
public void clear()Calls removeAll() and then sets the internal component reference to null. Use this if you are completely throwing away this PIAPanelGroup and want to free everything up for garbage collection.- Specified by:
clear
in interfacePComponentAttribute
- Overrides:
clear
in classPIAPanel
-
removeAll
public void removeAll()Removes all components contained within this panel group. -
removeComponent
Removes the named component from the panel group.- Parameters:
name
- the name of the component to remove
-
removeComponent
Removes the specified component from the panel group.- Parameters:
c
- the component to remove
-
getNames
Returns the names of the components contained in this group.- Returns:
- The names of the components in this group; null if there are no components present in the group.
-
contains
Determines if this panel group contains a component whose name matches the named component.- Parameters:
name
- a string that contains the component name to match- Returns:
- True if there is a component whose name matches in this panel group, false otherwise.
-
setVisiblePanel
public void setVisiblePanel(int index) Flips to the panel that was added to this group at the specified index. If no such panel exists, then nothing happens.- Parameters:
index
- the index location of the panel to display
-
setVisiblePanel
Flips to the panel that was added to this group with the specified name. If no such panel exists, then nothing happens.- Parameters:
name
- the name of the panel to display.
-
getVisiblePanel
Returns the name of the panel that is currently visible.- Returns:
- The name of the panel that is currently visible.
-
getVisiblePanelIndex
public int getVisiblePanelIndex()Returns the index of the panel that is currently visible.- Returns:
- The index of the panel that is currently visible.
-
getVisiblePanelComponent
Returns the panel that is currently visible.- Returns:
- The panel that is currently visible, or null if there isn't one.
-
nameToComponent
For the given name, retrieves the associated component.- Parameters:
name
- the component name to look up- Returns:
- The associated component, or null if there isn't one.
-
componentToIndex
For the given component, retrieves the associated index- Parameters:
c
- the component to look up- Returns:
- The index of the component found, or -1 if not found.
-
nameToIndex
For the given name, retrieves the index of the associated component- Parameters:
name
- the component name to look up- Returns:
- The index of the component found, or -1 if not found.
-
getComponentsCount
public int getComponentsCount()Returns the total number of components.- Returns:
- The total number of components.
-
getComponentAt
For the given index, retrieves the associated component.- Parameters:
i
- the index to look up- Returns:
- The component, if found; null if not found.
-