public class PSectionHeader extends JPanel
| Modifier and Type | Class and Description |
|---|---|
static class |
PSectionHeader.CollapsedIcon
The plus sign button icon
|
static class |
PSectionHeader.ExpandedIcon
The minus sign button icon
|
JPanel.AccessibleJPanelJComponent.AccessibleJComponentContainer.AccessibleAWTContainerComponent.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy| Modifier and Type | Field and Description |
|---|---|
protected com.portal.ctrl.ButtonAdapter |
adapter |
protected static int |
FULL_SIZE |
protected static int |
HALF_SIZE |
protected JComponent |
mComp |
protected boolean |
mExpandable |
protected boolean |
mExpandState |
protected JComponent[] |
mHeaderComps |
protected JComponent |
mHeaderLabel |
protected Border |
mOldBorder |
protected boolean |
mSubHeader |
protected static Dimension |
PREFERRED_SIZE |
protected static FontMetrics |
sFm |
protected static int |
SIZE |
protected static JButton |
SIZER |
protected static ButtonUI |
UI |
listenerList, 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 |
|---|
PSectionHeader()
Creates a standard header component.
|
PSectionHeader(JComponent c)
Creates a collapsable header component, with the passed in
component being designated as the 'collapsable' component
|
| Modifier and Type | Method and Description |
|---|---|
void |
addNotify()
Overridden to apply the font style to the header label, and the correct
look and feel color to the components in the header
|
JComponent |
getComponentToCollapse()
Retrieves the collapsable component
|
Dimension |
getPreferredSize()
Returns the preferred size for a PSectionHeader.
|
boolean |
isExpanded()
Returns the visible state of the component to collapse
|
boolean |
isHeaderExpandable()
Determines if this header component contains an expand control
|
boolean |
isSubHeader()
Retrieves the subheader status of this component
|
void |
setComponentToCollapse(JComponent c)
Specifies the component to collapse
|
void |
setExpanded(boolean b)
This gets invoked by the look&feel when the user selects the +/-
button.
|
void |
setHeaderComponents(JComponent[] comps) |
void |
setHeaderExpandable(boolean b)
Identifies this header instance as being expandable or not.
|
void |
setHeaderLabel(JComponent l)
Identifies the component that displays the title for this header.
|
void |
setSubHeader(boolean b)
Used to turn this section header into a subheader.
|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUIaddAncestorListener, 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, 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, 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, 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, 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, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycleprotected JComponent mHeaderLabel
protected boolean mExpandState
protected boolean mSubHeader
protected boolean mExpandable
protected JComponent mComp
protected Border mOldBorder
protected com.portal.ctrl.ButtonAdapter adapter
protected JComponent[] mHeaderComps
protected static final JButton SIZER
protected static final ButtonUI UI
protected static final Dimension PREFERRED_SIZE
protected static FontMetrics sFm
protected static final int HALF_SIZE
protected static final int FULL_SIZE
protected static final int SIZE
public PSectionHeader()
public PSectionHeader(JComponent c)
c - The component that should be collapsed when requested by
the user.public Dimension getPreferredSize()
getPreferredSize in class JComponentpublic void setComponentToCollapse(JComponent c)
c - The component that should be collapsed when requested by
the user.public JComponent getComponentToCollapse()
public void setHeaderExpandable(boolean b)
b - public boolean isHeaderExpandable()
public void setSubHeader(boolean b)
b - If true, make a subheader; if false, make this a regular headerpublic boolean isSubHeader()
public void setExpanded(boolean b)
b - When true, expand the component; when false, collapse itpublic boolean isExpanded()
public void setHeaderLabel(JComponent l)
The - label componentpublic void setHeaderComponents(JComponent[] comps)
public void addNotify()
addNotify in class JComponentCopyright © 2003, 2023, Oracle and/or its affiliates.