public class WebAccordion extends WebPanel implements javax.swing.SwingConstants, com.alee.managers.settings.SettingsMethods
javax.swing.JPanel.AccessibleJPaneljavax.swing.JComponent.AccessibleJComponent| Modifier and Type | Field and Description |
|---|---|
protected boolean |
animate
Whether animate transition between states or not.
|
protected boolean |
fillSpace
Whether accordion must fill all available space with expanded panes or not.
|
protected int |
gap
Gap between panes for separated accordion style.
|
protected WebCollapsiblePane |
lastExpanded
Index of last expanded collapsible pane.
|
protected boolean |
multiplySelectionAllowed
Whether multiply expanded panes are allowed or not.
|
protected int |
orientation
Accordion orientation.
|
protected java.util.List<WebCollapsiblePane> |
panes
Accordion collapsible panes.
|
protected java.util.List<CollapsiblePaneListener> |
stateListeners
Accordion collapsible pane state listeners.
|
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_ALIGNMENTBOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WESTEMPTYEMPTYUNDEFINED| Constructor and Description |
|---|
WebAccordion()
Constructs empty accordion with default style.
|
WebAccordion(StyleId id)
Constructs empty accordion with specified style.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addAccordionListener(AccordionListener listener)
Adds accordion listener.
|
WebCollapsiblePane |
addPane(java.awt.Component title,
java.awt.Component content)
Adds new collapsible pane into accordion with the specified title component and content.
|
WebCollapsiblePane |
addPane(javax.swing.Icon icon,
java.lang.String title,
java.awt.Component content)
Adds new collapsible pane into accordion with the specified icon, title and content.
|
WebCollapsiblePane |
addPane(int index,
java.awt.Component title,
java.awt.Component content)
Adds new collapsible pane into accordion with the specified title component and content at the specified index.
|
WebCollapsiblePane |
addPane(int index,
javax.swing.Icon icon,
java.lang.String title,
java.awt.Component content)
Adds new collapsible pane into accordion with the specified icon, title and content at the specified index.
|
WebCollapsiblePane |
addPane(int index,
java.lang.String title,
java.awt.Component content)
Adds new collapsible pane into accordion with the specified title and content at the specified index.
|
protected WebCollapsiblePane |
addPane(int index,
WebCollapsiblePane pane)
Adds collapsible pane into accordion at the specified index.
|
WebCollapsiblePane |
addPane(java.lang.String title,
java.awt.Component content)
Adds new collapsible pane into accordion with the specified title and content.
|
protected void |
fireSelectionChanged()
Notifies when collapsible pane starts to expand.
|
java.util.List<WebCollapsiblePane> |
getActualPanesList()
Returns actual list of available collapsible panes.
|
java.awt.Component |
getContentAt(int index)
Returns collapsible pane content at the specified index.
|
int |
getFirstSelectedIndex()
Returns index of the first expanded collapsible pane or -1 if none expanded.
|
int |
getGap()
Returns gap between panes for separated accordion style.
|
javax.swing.Icon |
getIconAt(int index)
Returns collapsible pane icon at the specified index.
|
int |
getOrientation()
Returns accordion orientation.
|
WebCollapsiblePane |
getPane(int index)
Returns collapsible pane at the specified index.
|
java.util.List<WebCollapsiblePane> |
getPanes()
Returns list of available collapsible panes.
|
java.util.List<java.lang.Integer> |
getSelectedIndices()
Returns selected collapsible pane indices.
|
java.util.List<WebCollapsiblePane> |
getSelectedPanes()
Returns selected collapsible panes.
|
int |
getSelectionCount()
Returns amount of expanded collapsible panes.
|
java.lang.String |
getTitleAt(int index)
Returns collapsible pane title at the specified index.
|
java.awt.Component |
getTitleComponentAt(int index)
Returns collapsible pane title component at the specified index.
|
boolean |
isAnimate()
Returns whether animate transition between states or not.
|
boolean |
isAnySelected()
Returns whether any collapsible pane is expanded or not.
|
boolean |
isFillSpace()
Returns whether accordion must fill all available space with expanded panes or not.
|
boolean |
isMultiplySelectionAllowed()
Returns whether multiply expanded panes are allowed or not.
|
void |
loadSettings() |
void |
registerSettings(com.alee.managers.settings.SettingsProcessor settingsProcessor) |
void |
registerSettings(java.lang.String key) |
void |
registerSettings(java.lang.String key,
boolean loadInitialSettings,
boolean applySettingsChanges) |
<T extends com.alee.managers.settings.DefaultValue> |
registerSettings(java.lang.String key,
java.lang.Class<T> defaultValueClass) |
<T extends com.alee.managers.settings.DefaultValue> |
registerSettings(java.lang.String key,
java.lang.Class<T> defaultValueClass,
boolean loadInitialSettings,
boolean applySettingsChanges) |
void |
registerSettings(java.lang.String key,
java.lang.Object defaultValue) |
void |
registerSettings(java.lang.String key,
java.lang.Object defaultValue,
boolean loadInitialSettings,
boolean applySettingsChanges) |
void |
registerSettings(java.lang.String group,
java.lang.String key) |
<T extends com.alee.managers.settings.DefaultValue> |
registerSettings(java.lang.String group,
java.lang.String key,
java.lang.Class<T> defaultValueClass) |
<T extends com.alee.managers.settings.DefaultValue> |
registerSettings(java.lang.String group,
java.lang.String key,
java.lang.Class<T> defaultValueClass,
boolean loadInitialSettings,
boolean applySettingsChanges) |
void |
registerSettings(java.lang.String group,
java.lang.String key,
java.lang.Object defaultValue) |
void |
registerSettings(java.lang.String group,
java.lang.String key,
java.lang.Object defaultValue,
boolean loadInitialSettings,
boolean applySettingsChanges) |
void |
removeAccordionListener(AccordionListener listener)
Removes collapsible pane listener.
|
void |
removePane(int index)
Removes collapsible pane from the specified index from accordion.
|
protected void |
removePane(WebCollapsiblePane pane)
Removes collapsible pane from accordion.
|
void |
saveSettings() |
void |
setAnimate(boolean animate)
Sets whether animate transition between states or not.
|
void |
setContentAt(int index,
java.awt.Component content)
Sets collapsible pane content at the specified index.
|
void |
setFillSpace(boolean fillSpace)
Sets whether accordion must fill all available space with expanded panes or not.
|
void |
setGap(int gap)
Sets gap between panes for separated accordion style.
|
void |
setIconAt(int index,
javax.swing.Icon icon)
Sets collapsible pane icon at the specified index.
|
void |
setMultiplySelectionAllowed(boolean multiplySelectionAllowed)
Sets whether multiply expanded panes are allowed or not.
|
void |
setOrientation(int orientation)
Sets accordion orientation.
|
void |
setSelectedIndices(java.util.List<java.lang.Integer> indices)
Sets selected collapsible pane indices.
|
void |
setSelectedPanes(java.util.List<WebCollapsiblePane> selectedPanes)
Sets selected collapsible panes.
|
void |
setTitleAt(int index,
java.lang.String title)
Sets collapsible pane title at the specified index.
|
void |
setTitleComponentAt(int index,
java.awt.Component titleComponent)
Sets collapsible pane title component at the specified index.
|
void |
unregisterSettings() |
protected void |
updatePanesAnimation()
Updates collapsible panes animation property.
|
protected void |
updateSelections(int index,
boolean collapse)
Updates panes selection states.
|
add, add, add, add, add, add, addStyleListener, addToolTip, addToolTip, addToolTip, addToolTip, addToolTip, addToolTip, addToolTip, addToolTip, addToolTip, addToolTip, contains, equalizeComponentsHeight, equalizeComponentsSize, equalizeComponentsWidth, getCustomPainter, getCustomPainter, getCustomPainters, getFirstComponent, getLanguageContainerKey, getLastComponent, getMargin, getMaximumHeight, getMaximumWidth, getMinimumHeight, getMinimumWidth, getPadding, getPreferredHeight, getPreferredSize, getPreferredWidth, getSkin, getStyleId, onDoubleClick, onFocusGain, onFocusLoss, onKeyPress, onKeyPress, onKeyRelease, onKeyRelease, onKeyType, onKeyType, onMenuTrigger, onMouseClick, onMouseClick, onMouseDrag, onMouseDrag, onMouseEnter, onMouseExit, onMousePress, onMousePress, provideShape, remove, remove, removeAll, removeLanguageContainerKey, removeStyleListener, removeToolTip, removeToolTips, removeToolTips, removeToolTips, restoreDefaultPainters, restoreSkin, setCustomPainter, setCustomPainter, setLanguageContainerKey, setMargin, setMargin, setMargin, setMaximumHeight, setMaximumWidth, setMinimumHeight, setMinimumWidth, setPadding, setPadding, setPadding, setPreferredHeight, setPreferredSize, setPreferredWidth, setSkin, setSkin, setStyleId, setToolTip, setToolTip, setToolTip, setToolTip, setToolTip, setToolTip, setToolTip, setToolTip, setToolTip, setToolTip, updateUIgetAccessibleContext, getUI, getUIClassID, paramString, setUIaddAncestorListener, 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, 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 boolean animate
protected int orientation
protected boolean fillSpace
protected boolean multiplySelectionAllowed
protected int gap
protected java.util.List<WebCollapsiblePane> panes
protected java.util.List<CollapsiblePaneListener> stateListeners
protected WebCollapsiblePane lastExpanded
public WebAccordion()
public WebAccordion(StyleId id)
id - style IDpublic boolean isAnimate()
public void setAnimate(boolean animate)
animate - whether animate transition between states or notprotected void updatePanesAnimation()
public int getOrientation()
public void setOrientation(int orientation)
orientation - new accordion orientationpublic boolean isFillSpace()
public void setFillSpace(boolean fillSpace)
fillSpace - whether accordion must fill all available space with expanded panes or notpublic boolean isMultiplySelectionAllowed()
public void setMultiplySelectionAllowed(boolean multiplySelectionAllowed)
multiplySelectionAllowed - whether multiply expanded panes are allowed or notprotected void updateSelections(int index,
boolean collapse)
index - index of the pane that will be left expanded in case multiply expanded panes are not allowedcollapse - whether allow to collapse panes or notpublic int getGap()
public void setGap(int gap)
gap - new gap between panes for separated accordion stylepublic WebCollapsiblePane addPane(java.lang.String title, java.awt.Component content)
title - collapsible pane titlecontent - collapsible pane contentpublic WebCollapsiblePane addPane(int index, java.lang.String title, java.awt.Component content)
index - collapsible pane indextitle - collapsible pane titlecontent - collapsible pane contentpublic WebCollapsiblePane addPane(javax.swing.Icon icon, java.lang.String title, java.awt.Component content)
icon - collapsible pane icontitle - collapsible pane titlecontent - collapsible pane contentpublic WebCollapsiblePane addPane(int index, javax.swing.Icon icon, java.lang.String title, java.awt.Component content)
index - collapsible pane indexicon - collapsible pane icontitle - collapsible pane titlecontent - collapsible pane contentpublic WebCollapsiblePane addPane(java.awt.Component title, java.awt.Component content)
title - collapsible pane title componentcontent - collapsible pane contentpublic WebCollapsiblePane addPane(int index, java.awt.Component title, java.awt.Component content)
index - collapsible pane indextitle - collapsible pane title componentcontent - collapsible pane contentprotected WebCollapsiblePane addPane(int index, WebCollapsiblePane pane)
index - collapsible pane indexpane - collapsible pane to addpublic void removePane(int index)
index - collapsible pane indexprotected void removePane(WebCollapsiblePane pane)
pane - collapsible pane to removepublic java.util.List<WebCollapsiblePane> getPanes()
public java.util.List<WebCollapsiblePane> getActualPanesList()
public WebCollapsiblePane getPane(int index)
index - collapsible pane indexpublic boolean isAnySelected()
public int getFirstSelectedIndex()
public int getSelectionCount()
public javax.swing.Icon getIconAt(int index)
index - collapsible pane indexpublic void setIconAt(int index,
javax.swing.Icon icon)
index - collapsible pane indexicon - new collapsible pane iconpublic java.lang.String getTitleAt(int index)
index - collapsible pane indexpublic void setTitleAt(int index,
java.lang.String title)
index - collapsible pane indextitle - new collapsible pane titlepublic java.awt.Component getTitleComponentAt(int index)
index - collapsible pane indexpublic void setTitleComponentAt(int index,
java.awt.Component titleComponent)
index - collapsible pane indextitleComponent - new collapsible pane title componentpublic java.awt.Component getContentAt(int index)
index - collapsible pane indexpublic void setContentAt(int index,
java.awt.Component content)
index - collapsible pane indexcontent - new collapsible pane contentpublic java.util.List<WebCollapsiblePane> getSelectedPanes()
public void setSelectedPanes(java.util.List<WebCollapsiblePane> selectedPanes)
selectedPanes - selected collapsible panespublic java.util.List<java.lang.Integer> getSelectedIndices()
public void setSelectedIndices(java.util.List<java.lang.Integer> indices)
indices - selected collapsible pane indicespublic void addAccordionListener(AccordionListener listener)
listener - accordion listener to addpublic void removeAccordionListener(AccordionListener listener)
listener - collapsible pane listener to removeprotected void fireSelectionChanged()
public void registerSettings(java.lang.String key)
registerSettings in interface com.alee.managers.settings.SettingsMethodspublic <T extends com.alee.managers.settings.DefaultValue> void registerSettings(java.lang.String key,
java.lang.Class<T> defaultValueClass)
registerSettings in interface com.alee.managers.settings.SettingsMethodspublic void registerSettings(java.lang.String key,
java.lang.Object defaultValue)
registerSettings in interface com.alee.managers.settings.SettingsMethodspublic void registerSettings(java.lang.String group,
java.lang.String key)
registerSettings in interface com.alee.managers.settings.SettingsMethodspublic <T extends com.alee.managers.settings.DefaultValue> void registerSettings(java.lang.String group,
java.lang.String key,
java.lang.Class<T> defaultValueClass)
registerSettings in interface com.alee.managers.settings.SettingsMethodspublic void registerSettings(java.lang.String group,
java.lang.String key,
java.lang.Object defaultValue)
registerSettings in interface com.alee.managers.settings.SettingsMethodspublic void registerSettings(java.lang.String key,
boolean loadInitialSettings,
boolean applySettingsChanges)
registerSettings in interface com.alee.managers.settings.SettingsMethodspublic <T extends com.alee.managers.settings.DefaultValue> void registerSettings(java.lang.String key,
java.lang.Class<T> defaultValueClass,
boolean loadInitialSettings,
boolean applySettingsChanges)
registerSettings in interface com.alee.managers.settings.SettingsMethodspublic void registerSettings(java.lang.String key,
java.lang.Object defaultValue,
boolean loadInitialSettings,
boolean applySettingsChanges)
registerSettings in interface com.alee.managers.settings.SettingsMethodspublic <T extends com.alee.managers.settings.DefaultValue> void registerSettings(java.lang.String group,
java.lang.String key,
java.lang.Class<T> defaultValueClass,
boolean loadInitialSettings,
boolean applySettingsChanges)
registerSettings in interface com.alee.managers.settings.SettingsMethodspublic void registerSettings(java.lang.String group,
java.lang.String key,
java.lang.Object defaultValue,
boolean loadInitialSettings,
boolean applySettingsChanges)
registerSettings in interface com.alee.managers.settings.SettingsMethodspublic void registerSettings(com.alee.managers.settings.SettingsProcessor settingsProcessor)
registerSettings in interface com.alee.managers.settings.SettingsMethodspublic void unregisterSettings()
unregisterSettings in interface com.alee.managers.settings.SettingsMethodspublic void loadSettings()
loadSettings in interface com.alee.managers.settings.SettingsMethodspublic void saveSettings()
saveSettings in interface com.alee.managers.settings.SettingsMethods