JIDE 3.5.15

com.jidesoft.pane
Class CollapsiblePane

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JPanel
                  extended by com.jidesoft.pane.CollapsiblePane
All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible, SwingConstants, WindowConstants

public class CollapsiblePane
extends JPanel
implements SwingConstants, WindowConstants

CollapsiblePane, as the name indicates, is a pane which can be collapsed. Users can expand the pane so that they can work on it. When it is done, they can collapse it to save place.

All you need to do is to create a CollapsiblePane by passing in the title and icon (if any), and set the content panel which will be expanded or collapsed.

CollapsiblePane has several different styles built-in. They are

It might be difficult to understand what each style looks like so if you run the CollapsiblePaneDemo, it would be easy to see all four styles.

CollapsiblePane also supports sliding in all four directions. Typically, the sliding direction is south just like Windows XP's task pane. But sliding in other directions is also useful. For example, if the CollapsiblePane is on the left and there is only one, you can make it sliding east to create an effect like the auto-hidden feature in JIDE Docking Framework.

See Also:
Serialized Form

Nested Class Summary
protected  class CollapsiblePane.AccessibleCollapsiblePane
          This class implements accessibility support for the CollapsiblePane class.
 
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
protected  boolean _collapsed
          true if the pane is collapsed.
protected  int _collapsedPercentage
           
protected  int _contentPaneHeight
          The height of content pane.
protected  int _contentPaneWidth
          The width of content pane.
protected  boolean _rollover
           
static String COLLAPSED_PROPERTY
          Constrained property name indicating that the CollapsiblePane is collapsed.
static String CONTENT_PANE_PROPERTY
          Bound property name.
static int DROPDOWN_STYLE
           
static String EMPHASIZED_PROPERTY
           
static String HORIZONTAL_ALIGNMENT_PROPERTY
           
static String HORIZONTAL_TEXTPOSITION_PROPERTY
           
static String ICON_PROPERTY
          Bound property name.
static String ICONTEXTGAP_PROPERTY
           
static int PLAIN_STYLE
           
static String PROPERTY_AUTO_EXPAND_ON_DRAGOVER
           
static String PROPERTY_COLLAPSE_ON_TITLE_CLICK
           
static String PROPERTY_COLLAPSED_ICON
           
static String PROPERTY_COLLAPSED_PERCENTAGE
           
static String PROPERTY_COLLAPSIBLE
           
static String PROPERTY_CONTENT_BORDER_VISIBLE
           
static String PROPERTY_CONTENTAREA_FILLED
           
static String PROPERTY_EXPANDED_ICON
           
static String PROPERTY_FOCUS_PAINTED
           
static String PROPERTY_SHOW_EXPAND_BUTTON
           
static String PROPERTY_SHOW_TITLE_BAR
           
static String PROPERTY_SLIDING_DIRECTION
           
static String PROPERTY_TITLE_COMPONENT
           
static String PROPERTY_TITLE_ICON
          Bound property name.
static String PROPERTY_TITLE_LABEL_COMPONENT
           
static String PROPERTY_TITLE_PANE_OPAQUE
           
static String PROPERTY_TOGGLE_ACTION
           
static int SEPARATOR_STYLE
           
static String STYLE_PROPERTY
           
static String TITLE_PROPERTY
          Bound property name.
static int TREE_STYLE
           
static String VERTICAL_ALIGNMENT_PROPERTY
           
static String VERTICAL_TEXTPOSITION_PROPERTY
           
 
Fields inherited from class javax.swing.JComponent
accessibleContext, 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
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface javax.swing.SwingConstants
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST
 
Fields inherited from interface javax.swing.WindowConstants
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, EXIT_ON_CLOSE, HIDE_ON_CLOSE
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
CollapsiblePane()
          Create an CollapsiblePane with no name and default icon.
CollapsiblePane(String title)
          Create an CollapsiblePane with title and default icon.
CollapsiblePane(String title, Icon icon)
          Create an CollapsiblePane with title and icon.
CollapsiblePane(String title, Icon icon, int slidingDirection)
          Create an CollapsiblePane with title and icon.
CollapsiblePane(String title, Icon icon, int initDelay, int stepDelay, int steps)
           
CollapsiblePane(String title, Icon icon, int initDelay, int stepDelay, int steps, int slidingDirection)
           
CollapsiblePane(String title, int slidingDirection)
           
 
Method Summary
 void addCollapsiblePaneListener(CollapsiblePaneListener l)
          Adds the specified listener to receive collapsible pane events from this collapsible frame.
protected  void addImpl(Component comp, Object constraints, int index)
          Ensures that, by default, children cannot be added directly to this component.
protected  int checkHorizontalKey(int key, String message)
          Verify that key is a legal value for the horizontalAlignment properties.
protected  int checkVerticalKey(int key, String message)
          Verify that key is a legal value for the verticalAlignment or verticalTextPosition properties.
 void collapse(boolean collapse)
          Expands or collapses the CollapsiblePane.
 void fireCollapsiblePaneEvent(int eventID)
          Fires an collapsible pane event.
 AccessibleContext getAccessibleContext()
          Gets the AccessibleContext associated with this CollapsiblePane.
 JComponent getActualComponent()
          Gets the scroll pane used internally.
 Function getAnimationFunction()
          Gets the animation function that is used to animate the showing effect of the content.
 Icon getCollapsedIcon()
          Gets the collapsed icon which is used for the expand button.
 int getCollapsedPercentage()
          Gets the collapsed percentage.
 CollapsiblePaneListener[] getCollapsiblePaneListeners()
          Returns an array of all the CollapsiblePaneListeners added to this CollapsiblePane with addCollapsiblePaneListener.
 JComponent getContentPane()
          Returns the content pane for this collapsible pane.
 int getContentPaneHeight()
          Gets the height of content pane.
 int getContentPaneWidth()
          Gets the width of content pane.
 Icon getExpandedIcon()
          Gets the expanded icon which is used for the expand button.
 int getHorizontalAlignment()
          Returns the alignment of the label's contents along the X axis.
 int getHorizontalTextPosition()
          Returns the horizontal position of the label's text, relative to its image.
 Icon getIcon()
          Returns the image displayed in the title bar of this collapsible pane (usually in the top-left corner).
 int getIconTextGap()
          Returns the amount of space between the text and the icon displayed in this label.
 int getInitDelay()
          Gets the initial delay when starts to animate.
 String getResourceString(String key)
          Gets the resource string used in CollapsiblePane.
 int getSlidingDirection()
          Gets the sliding direction.
 int getStepDelay()
          Gets the delay in each step during animation.
 int getSteps()
          Gets how many steps in the animation.
 int getStyle()
          Gets the style.
 String getTitle()
          Returns the title of the CollapsiblePane.
 Component getTitleComponent()
          Gets the title component that is displayed on the title pane of CollapsiblePane.
 Icon getTitleIcon()
          Returns the image displayed in the title bar of this collapsible pane (usually in the top-left corner).
 JComponent getTitleLabelComponent()
          Gets the component which is used to replace the default title.
 int getTitleLabelGap()
          Get the gap between the title label and the title component or the collapse icon in TREE_STYLE or PLAIN_STYLE

The default value is 4.

 Action getToggleAction()
          Gets the toggle action.
 PanelUI getUI()
          Returns the look-and-feel object that renders this component.
 String getUIClassID()
          Returns the name of the look-and-feel class that renders this component.
 int getVerticalAlignment()
          Returns the alignment of the label's contents along the Y axis.
 int getVerticalTextPosition()
          Returns the vertical position of the label's text, relative to its image.
 boolean isAutoExpandOnDragover()
          Gets the autoExpandOnDragover property.
 boolean isCollapsed()
          Checks if the CollapsiblePane is collapsed.
 boolean isCollapseOnTitleClick()
          Get the flag indicating if the pane will be collapsed while mouse clicking on the title.
 boolean isCollapsible()
          Checks if CollapsiblePane is collapsible.
 boolean isContentAreaFilled()
          Gets the contentAreaFilled property.
 boolean isContentBorderVisible()
          Checks if the content border is visible.
protected  boolean isContentPaneCheckingEnabled()
          Returns whether calls to add and setLayout cause an exception to be thrown.
 boolean isEmphasized()
          Checks if CollapsiblePane is in emphasized mode.
 boolean isExpanded()
          Checks if the CollapsiblePane is expanded.
 boolean isFocusPainted()
          Gets the focusPainted property.
 boolean isRollover()
          Checks if the mouse is over the title pane.
 boolean isRotateIcon()
          Gets the flag indicating if the icon should be rotated.
 boolean isShowExpandButton()
          Checks if the expand/collapse button is visible.
 boolean isShowTitleBar()
          Checks if the title bar is visible.
 boolean isTitlePaneOpaque()
          Gets the titlePaneOpaque property.
 void remove(Component comp)
          Removes the specified component from this container.
 void removeCollapsiblePaneListener(CollapsiblePaneListener l)
          Removes the specified collapsible pane listener so that it no longer receives collapsible pane events from this collapsible pane .
 Icon rotateIcon(Icon originalIcon)
          Rotates the icon according to the sliding direction of the CollapsiblePane.
 void setAnimationFunction(Function animationFunction)
          Sets the animation function.
 void setAutoExpandOnDragover(boolean b)
          Sets the autoExpandOnDragover property.
 void setCollapsed(boolean b)
           
 void setCollapsedIcon(Icon icon)
          Sets the collapsed icon which is used for the expand button.
 void setCollapsedPercentage(int percentage)
          Sets the collapsed percentage.
 void setCollapseOnTitleClick(boolean collapseOnTitleClick)
          Set the flag indicating if the pane will be collapsed while mouse clicking on the title.
 void setCollapsible(boolean collapsible)
          Sets collapsible flag.
 void setContentAreaFilled(boolean contentAreaFilled)
          Sets the contentAreaFilled property.
 void setContentBorderVisible(boolean visible)
          Sets if the content border is visible.
 void setContentPane(JComponent c)
          Sets this CollapsiblePane's contentPane property.
protected  void setContentPaneCheckingEnabled(boolean enabled)
          Determines whether calls to add and setLayout cause an exception to be thrown.
 void setContentPaneHeight(int contentPaneHeight)
          Set the height of content pane.
 void setContentPaneWidth(int contentPaneWidth)
          Set the width of content pane.
 void setEmphasized(boolean emphasized)
          When there are several CollapsiblePane in a group, in case you want to emphasize one of them, you can call setEmphasized(true).
 void setExpandedIcon(Icon icon)
          Sets the expanded icon which is used for the expand button.
 void setFocusPainted(boolean b)
          Sets the focusPainted property, which must be true for the focus state to be painted.
 void setHorizontalAlignment(int alignment)
          Sets the alignment of the label's contents along the X axis.
 void setHorizontalTextPosition(int textPosition)
          Sets the horizontal position of the label's text, relative to its image.
 void setIcon(Icon icon)
          Sets an image to be displayed in the title bar of this collapsible pane (usually in the top-left corner).
 void setIconTextGap(int iconTextGap)
          If both the icon and text properties are set, this property defines the space between them.
 void setInitDelay(int initDelay)
          Sets the initial delay when the button is pressed before it starts to switch, in ms.
 void setLayout(LayoutManager manager)
          Ensures that, by default, the layout of this component cannot be set.
 void setRollover(boolean rollover)
          Sets rollover.
 void setRotateIcon(boolean rotateIcon)
          Sets the flag indicating if the icon should be rotated.
 void setShowExpandButton(boolean showExpandButton)
          Sets the visibility of expand/collapse button.
 void setShowTitleBar(boolean showTitleBar)
          Sets the visibility of title bar.
 void setSlidingDirection(int slidingDirection)
          Sets the sliding direction.
 void setStepDelay(int stepDelay)
          Sets the delay in each step during animation, in ms.
 void setSteps(int steps)
          Sets how many steps in the animation, default is 10 steps.
 void setStyle(int style)
          Sets the style.
 void setTitle(String title)
          Sets the CollapsiblePane title.
 void setTitleComponent(Component titleComponent)
          Sets the title components.
 void setTitleIcon(Icon icon)
          Sets an image to be displayed in the title bar of this collapsible pane (usually in the top-left corner).
 void setTitleLabelComponent(JComponent component)
          Sets a component which will be used to replace the default title.
 void setTitleLabelGap(int titleLabelGap)
          Set the gap between the title label and the title component or the collapse icon in TREE_STYLE or PLAIN_STYLE
 void setTitlePaneOpaque(boolean opaque)
          Sets the titlePaneOpaque property.
 void setToggleAction(Action action)
          Sets the action when the title pane or the expand/collapse button is clicked.
 void setUI(CollapsiblePaneUI ui)
          Sets the UI delegate for this CollapsiblePane.
 void setVerticalAlignment(int alignment)
          Sets the alignment of the label's contents along the Y axis.
 void setVerticalTextPosition(int textPosition)
          Sets the vertical position of the label's text, relative to its image.
 void updateUI()
          Notification from the UIManager that the look and feel has changed.
 
Methods inherited from class javax.swing.JPanel
paramString, setUI
 
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, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, 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, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, 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, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, transferFocusBackward, 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, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, 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, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

CONTENT_PANE_PROPERTY

public static final String CONTENT_PANE_PROPERTY
Bound property name.

See Also:
Constant Field Values

TITLE_PROPERTY

public static final String TITLE_PROPERTY
Bound property name.

See Also:
Constant Field Values

ICON_PROPERTY

public static final String ICON_PROPERTY
Bound property name.

See Also:
Constant Field Values

PROPERTY_TITLE_ICON

public static final String PROPERTY_TITLE_ICON
Bound property name.

See Also:
Constant Field Values

COLLAPSED_PROPERTY

public static final String COLLAPSED_PROPERTY
Constrained property name indicating that the CollapsiblePane is collapsed.

See Also:
Constant Field Values

STYLE_PROPERTY

public static final String STYLE_PROPERTY
See Also:
Constant Field Values

PROPERTY_COLLAPSED_ICON

public static final String PROPERTY_COLLAPSED_ICON
See Also:
Constant Field Values

PROPERTY_EXPANDED_ICON

public static final String PROPERTY_EXPANDED_ICON
See Also:
Constant Field Values

_collapsed

protected boolean _collapsed
true if the pane is collapsed.


_collapsedPercentage

protected int _collapsedPercentage

_contentPaneHeight

protected int _contentPaneHeight
The height of content pane. You can set it if you want to override the default value getting from the content pane. If you haven't set it, it will be the preferred size of content pane.


_contentPaneWidth

protected int _contentPaneWidth
The width of content pane. You can set it if you want to override the default value getting from the content pane. If you haven't set it, it will be the preferred size of content pane.


DROPDOWN_STYLE

public static final int DROPDOWN_STYLE
See Also:
Constant Field Values

TREE_STYLE

public static final int TREE_STYLE
See Also:
Constant Field Values

PLAIN_STYLE

public static final int PLAIN_STYLE
See Also:
Constant Field Values

SEPARATOR_STYLE

public static final int SEPARATOR_STYLE
See Also:
Constant Field Values

EMPHASIZED_PROPERTY

public static final String EMPHASIZED_PROPERTY
See Also:
Constant Field Values

_rollover

protected boolean _rollover

ICONTEXTGAP_PROPERTY

public static final String ICONTEXTGAP_PROPERTY
See Also:
Constant Field Values

VERTICAL_ALIGNMENT_PROPERTY

public static final String VERTICAL_ALIGNMENT_PROPERTY
See Also:
Constant Field Values

HORIZONTAL_ALIGNMENT_PROPERTY

public static final String HORIZONTAL_ALIGNMENT_PROPERTY
See Also:
Constant Field Values

VERTICAL_TEXTPOSITION_PROPERTY

public static final String VERTICAL_TEXTPOSITION_PROPERTY
See Also:
Constant Field Values

HORIZONTAL_TEXTPOSITION_PROPERTY

public static final String HORIZONTAL_TEXTPOSITION_PROPERTY
See Also:
Constant Field Values

PROPERTY_COLLAPSIBLE

public static final String PROPERTY_COLLAPSIBLE
See Also:
Constant Field Values

PROPERTY_SHOW_TITLE_BAR

public static final String PROPERTY_SHOW_TITLE_BAR
See Also:
Constant Field Values

PROPERTY_SHOW_EXPAND_BUTTON

public static final String PROPERTY_SHOW_EXPAND_BUTTON
See Also:
Constant Field Values

PROPERTY_SLIDING_DIRECTION

public static final String PROPERTY_SLIDING_DIRECTION
See Also:
Constant Field Values

PROPERTY_FOCUS_PAINTED

public static final String PROPERTY_FOCUS_PAINTED
See Also:
Constant Field Values

PROPERTY_CONTENTAREA_FILLED

public static final String PROPERTY_CONTENTAREA_FILLED
See Also:
Constant Field Values

PROPERTY_TITLE_PANE_OPAQUE

public static final String PROPERTY_TITLE_PANE_OPAQUE
See Also:
Constant Field Values

PROPERTY_AUTO_EXPAND_ON_DRAGOVER

public static final String PROPERTY_AUTO_EXPAND_ON_DRAGOVER
See Also:
Constant Field Values

PROPERTY_TITLE_COMPONENT

public static final String PROPERTY_TITLE_COMPONENT
See Also:
Constant Field Values

PROPERTY_TITLE_LABEL_COMPONENT

public static final String PROPERTY_TITLE_LABEL_COMPONENT
See Also:
Constant Field Values

PROPERTY_COLLAPSE_ON_TITLE_CLICK

public static final String PROPERTY_COLLAPSE_ON_TITLE_CLICK
See Also:
Constant Field Values

PROPERTY_COLLAPSED_PERCENTAGE

public static final String PROPERTY_COLLAPSED_PERCENTAGE
See Also:
Constant Field Values

PROPERTY_TOGGLE_ACTION

public static final String PROPERTY_TOGGLE_ACTION
See Also:
Constant Field Values

PROPERTY_CONTENT_BORDER_VISIBLE

public static final String PROPERTY_CONTENT_BORDER_VISIBLE
See Also:
Constant Field Values
Constructor Detail

CollapsiblePane

public CollapsiblePane()
Create an CollapsiblePane with no name and default icon.


CollapsiblePane

public CollapsiblePane(String title)
Create an CollapsiblePane with title and default icon.

Parameters:
title - title of the collapsible pane

CollapsiblePane

public CollapsiblePane(String title,
                       int slidingDirection)

CollapsiblePane

public CollapsiblePane(String title,
                       Icon icon,
                       int initDelay,
                       int stepDelay,
                       int steps)

CollapsiblePane

public CollapsiblePane(String title,
                       Icon icon,
                       int initDelay,
                       int stepDelay,
                       int steps,
                       int slidingDirection)

CollapsiblePane

public CollapsiblePane(String title,
                       Icon icon)
Create an CollapsiblePane with title and icon.

Parameters:
title - title of the collapsible pane
icon - icon of the collapsible pane

CollapsiblePane

public CollapsiblePane(String title,
                       Icon icon,
                       int slidingDirection)
Create an CollapsiblePane with title and icon.

Parameters:
title - title of the collapsible pane
icon - icon of the collapsible pane
slidingDirection - the sliding direction.
Method Detail

getUI

public PanelUI getUI()
Returns the look-and-feel object that renders this component.

Overrides:
getUI in class JPanel
Returns:
the CollapsiblePaneUI object that renders this component

setUI

public void setUI(CollapsiblePaneUI ui)
Sets the UI delegate for this CollapsiblePane.

Parameters:
ui - the UI delegate

updateUI

public void updateUI()
Notification from the UIManager that the look and feel has changed. Replaces the current UI object with the latest version from the UIManager.

Overrides:
updateUI in class JPanel
See Also:
JComponent.updateUI()

getUIClassID

public String getUIClassID()
Returns the name of the look-and-feel class that renders this component.

Overrides:
getUIClassID in class JPanel
Returns:
the string "CollapsiblePaneUI"
See Also:
JComponent.getUIClassID(), UIDefaults.getUI(javax.swing.JComponent)

isContentPaneCheckingEnabled

protected boolean isContentPaneCheckingEnabled()
Returns whether calls to add and setLayout cause an exception to be thrown.

Returns:
true if add and setLayout are checked
See Also:
addImpl(java.awt.Component, java.lang.Object, int), setLayout(java.awt.LayoutManager), setContentPaneCheckingEnabled(boolean)

setContentPaneCheckingEnabled

protected void setContentPaneCheckingEnabled(boolean enabled)
Determines whether calls to add and setLayout cause an exception to be thrown.

Parameters:
enabled - a boolean value, true if checking is to be enabled, which cause the exceptions to be thrown
See Also:
addImpl(java.awt.Component, java.lang.Object, int), setLayout(java.awt.LayoutManager), isContentPaneCheckingEnabled()

addImpl

protected void addImpl(Component comp,
                       Object constraints,
                       int index)
Ensures that, by default, children cannot be added directly to this component. Instead, children must be added to its content pane. For example:
 thisComponent.getContentPane().add(child)
 
An attempt to add to directly to this component will cause a runtime exception to be thrown. Subclasses can disable this behavior.

Overrides:
addImpl in class Container
Parameters:
comp - the Component to be added
constraints - the object containing the constraints, if any
index - the index
Throws:
Error - if called with isRootPaneChecking true
See Also:
setContentPaneCheckingEnabled(boolean)

remove

public void remove(Component comp)
Removes the specified component from this container.

Overrides:
remove in class Container
Parameters:
comp - the component to be removed
See Also:
Container.add(java.awt.Component)

setLayout

public void setLayout(LayoutManager manager)
Ensures that, by default, the layout of this component cannot be set. Instead, the layout of its content pane should be set. For example:
 thisComponent.getContentPane().setLayout(new GridLayout(1,2))
 
An attempt to set the layout of this component will cause an runtime exception to be thrown. Subclasses can disable this behavior.

Overrides:
setLayout in class Container
Parameters:
manager - the LayoutManager
Throws:
Error - if called with isRootPaneChecking true
See Also:
setContentPaneCheckingEnabled(boolean)

getContentPane

public JComponent getContentPane()
Returns the content pane for this collapsible pane.

Returns:
the content pane

setContentPane

public void setContentPane(JComponent c)
Sets this CollapsiblePane's contentPane property.

Parameters:
c - the content pane for this collapsible pane
Throws:
IllegalComponentStateException - (a runtime exception) if the content pane parameter is null
See Also:
RootPaneContainer.getContentPane()

setCollapsed

public void setCollapsed(boolean b)
                  throws PropertyVetoException
Parameters:
b - a boolean value, where true means this collapsible pane is collapsed
Throws:
PropertyVetoException - if the property change is vetoed.

isCollapsed

public boolean isCollapsed()
Checks if the CollapsiblePane is collapsed.

Returns:
true if this collapsible pane is collapsed.

isExpanded

public boolean isExpanded()
Checks if the CollapsiblePane is expanded.

Returns:
true if this collapsible pane is expanded.

getTitle

public String getTitle()
Returns the title of the CollapsiblePane.

Returns:
a String containing this collapsible pane's title
See Also:
Component.setName(java.lang.String)

setTitle

public void setTitle(String title)
Sets the CollapsiblePane title. title may have a null value.

Parameters:
title - the String to display in the title bar

setIcon

public void setIcon(Icon icon)
Sets an image to be displayed in the title bar of this collapsible pane (usually in the top-left corner).

Parameters:
icon - the Icon to display in the title bar
See Also:
getIcon()

getIcon

public Icon getIcon()
Returns the image displayed in the title bar of this collapsible pane (usually in the top-left corner).

Returns:
the Icon displayed in the title bar
See Also:
setIcon(javax.swing.Icon)

setTitleIcon

public void setTitleIcon(Icon icon)
Sets an image to be displayed in the title bar of this collapsible pane (usually in the top-left corner).

Parameters:
icon - the Icon to display in the title bar
See Also:
getIcon()

getTitleIcon

public Icon getTitleIcon()
Returns the image displayed in the title bar of this collapsible pane (usually in the top-left corner).

Returns:
the Icon displayed in the title bar
See Also:
setIcon(javax.swing.Icon)

checkHorizontalKey

protected int checkHorizontalKey(int key,
                                 String message)
Verify that key is a legal value for the horizontalAlignment properties.

Parameters:
key - the property value to check
message - the IllegalArgumentException detail message
Returns:
the key if it is a valid horizontal key. Otherwise IllegalArgumentException will be thrown.
Throws:
IllegalArgumentException - if key isn't LEFT, CENTER, RIGHT, LEADING or TRAILING.
See Also:
setHorizontalTextPosition(int), setHorizontalAlignment(int)

checkVerticalKey

protected int checkVerticalKey(int key,
                               String message)
Verify that key is a legal value for the verticalAlignment or verticalTextPosition properties.

Parameters:
key - the property value to check
message - the IllegalArgumentException detail message
Returns:
the key if it is a valid vertical key. Otherwise IllegalArgumentException will be thrown.
Throws:
IllegalArgumentException - if key isn't TOP, CENTER, or BOTTOM.
See Also:
setVerticalAlignment(int), setVerticalTextPosition(int)

getIconTextGap

public int getIconTextGap()
Returns the amount of space between the text and the icon displayed in this label.

Returns:
an int equal to the number of pixels between the text and the icon.
See Also:
setIconTextGap(int)

setIconTextGap

public void setIconTextGap(int iconTextGap)
If both the icon and text properties are set, this property defines the space between them.

The default value of this property is 4 pixels.

This is a JavaBeans bound property.

attribute: visualUpdate true description: If both the icon and text properties are set, this property defines the space between them.

Parameters:
iconTextGap - the new gap between icon and text.
See Also:
getIconTextGap()

getVerticalAlignment

public int getVerticalAlignment()
Returns the alignment of the label's contents along the Y axis.

Returns:
The value of the verticalAlignment property, one of the following constants defined in SwingConstants: TOP, CENTER, or BOTTOM.
See Also:
SwingConstants, setVerticalAlignment(int)

setVerticalAlignment

public void setVerticalAlignment(int alignment)
Sets the alignment of the label's contents along the Y axis.

The default value of this property is CENTER.

Parameters:
alignment - One of the following constants defined in SwingConstants: TOP, CENTER (the default), or BOTTOM. enum: TOP SwingConstants.TOP CENTER SwingConstants.CENTER BOTTOM SwingConstants.BOTTOM attribute: visualUpdate true description: The alignment of the label's contents along the Y axis.
See Also:
SwingConstants, getVerticalAlignment()

getHorizontalAlignment

public int getHorizontalAlignment()
Returns the alignment of the label's contents along the X axis.

Returns:
The value of the horizontalAlignment property, one of the following constants defined in SwingConstants: LEFT, CENTER, RIGHT, LEADING or TRAILING.
See Also:
setHorizontalAlignment(int), SwingConstants

setHorizontalAlignment

public void setHorizontalAlignment(int alignment)
Sets the alignment of the label's contents along the X axis.

This is a JavaBeans bound property.

Parameters:
alignment - One of the following constants defined in SwingConstants: LEFT, CENTER (the default for image-only labels), RIGHT, LEADING (the default for text-only labels) or TRAILING. enum: LEFT SwingConstants.LEFT CENTER SwingConstants.CENTER RIGHT SwingConstants.RIGHT LEADING SwingConstants.LEADING TRAILING SwingConstants.TRAILING attribute: visualUpdate true description: The alignment of the label's content along the X axis.
See Also:
SwingConstants, getHorizontalAlignment()

getVerticalTextPosition

public int getVerticalTextPosition()
Returns the vertical position of the label's text, relative to its image.

Returns:
One of the following constants defined in SwingConstants: TOP, CENTER, or BOTTOM.
See Also:
setVerticalTextPosition(int), SwingConstants

setVerticalTextPosition

public void setVerticalTextPosition(int textPosition)
Sets the vertical position of the label's text, relative to its image.

The default value of this property is CENTER.

This is a JavaBeans bound property.

Parameters:
textPosition - One of the following constants defined in SwingConstants: TOP, CENTER (the default), or BOTTOM. enum: TOP SwingConstants.TOP CENTER SwingConstants.CENTER BOTTOM SwingConstants.BOTTOM expert: true attribute: visualUpdate true description: The vertical position of the text relative to it's image.
See Also:
SwingConstants, getVerticalTextPosition()

getHorizontalTextPosition

public int getHorizontalTextPosition()
Returns the horizontal position of the label's text, relative to its image.

Returns:
One of the following constants defined in SwingConstants: LEFT, CENTER, RIGHT, LEADING or TRAILING.
See Also:
SwingConstants

setHorizontalTextPosition

public void setHorizontalTextPosition(int textPosition)
Sets the horizontal position of the label's text, relative to its image.

Parameters:
textPosition - One of the following constants defined in SwingConstants: LEFT, CENTER, RIGHT, LEADING, or TRAILING (the default).
Throws:
IllegalArgumentException - bound: true enum: LEFT SwingConstants.LEFT CENTER SwingConstants.CENTER RIGHT SwingConstants.RIGHT LEADING SwingConstants.LEADING TRAILING SwingConstants.TRAILING attribute: visualUpdate true description: The horizontal position of the label's text, relative to its image.
See Also:
SwingConstants

addCollapsiblePaneListener

public void addCollapsiblePaneListener(CollapsiblePaneListener l)
Adds the specified listener to receive collapsible pane events from this collapsible frame.

Parameters:
l - the collapsible pane listener

removeCollapsiblePaneListener

public void removeCollapsiblePaneListener(CollapsiblePaneListener l)
Removes the specified collapsible pane listener so that it no longer receives collapsible pane events from this collapsible pane .

Parameters:
l - the collapsible pane listener

getCollapsiblePaneListeners

public CollapsiblePaneListener[] getCollapsiblePaneListeners()
Returns an array of all the CollapsiblePaneListeners added to this CollapsiblePane with addCollapsiblePaneListener.

Returns:
all of the CollapsiblePaneListeners added or an empty array if no listeners have been added
Since:
1.4
See Also:
addCollapsiblePaneListener(com.jidesoft.pane.event.CollapsiblePaneListener)

fireCollapsiblePaneEvent

public void fireCollapsiblePaneEvent(int eventID)
Fires an collapsible pane event.

Parameters:
eventID - the event id

getAccessibleContext

public AccessibleContext getAccessibleContext()
Gets the AccessibleContext associated with this CollapsiblePane. For collapsible pane, the AccessibleContext takes the form of an AccessibleCollapsiblePane object. A new AccessibleCollapsiblePane instance is created if necessary.

Specified by:
getAccessibleContext in interface Accessible
Overrides:
getAccessibleContext in class JPanel
Returns:
an AccessibleCollapsiblePane that serves as the AccessibleContext of this CollapsiblePane
See Also:
CollapsiblePane.AccessibleCollapsiblePane

isCollapseOnTitleClick

public boolean isCollapseOnTitleClick()
Get the flag indicating if the pane will be collapsed while mouse clicking on the title.

By default, the value is true. You can set it to false if you only want the pane to be collapsible when collapse button is hit.

Returns:
the flag.

setCollapseOnTitleClick

public void setCollapseOnTitleClick(boolean collapseOnTitleClick)
Set the flag indicating if the pane will be collapsed while mouse clicking on the title.

Parameters:
collapseOnTitleClick - the flag
See Also:
isCollapseOnTitleClick()

getTitleLabelGap

public int getTitleLabelGap()
Get the gap between the title label and the title component or the collapse icon in TREE_STYLE or PLAIN_STYLE

The default value is 4.

Returns:
the gap.

setTitleLabelGap

public void setTitleLabelGap(int titleLabelGap)
Set the gap between the title label and the title component or the collapse icon in TREE_STYLE or PLAIN_STYLE

Parameters:
titleLabelGap - the gap
See Also:
getTitleLabelGap()

getContentPaneHeight

public int getContentPaneHeight()
Gets the height of content pane. If user sets the content pane height before, it will be what value user set. If not, it will be the preferred height of the content pane.

Returns:
the height of content pane.

setContentPaneHeight

public void setContentPaneHeight(int contentPaneHeight)
Set the height of content pane. If the height is smaller then the preferred height, based on the layout of the content pane, portion of the content pane may not be visible.

If the input parameter is a negative value, that means the content pane's preferred height will be used.

Parameters:
contentPaneHeight - the new height of content pane

getContentPaneWidth

public int getContentPaneWidth()
Gets the width of content pane. If user sets the content pane width before, it will be what value user set. If not, it will be the preferred width of the content pane.

Returns:
the width of content pane.

setContentPaneWidth

public void setContentPaneWidth(int contentPaneWidth)
Set the width of content pane. If the width is smaller then the preferred width, based on the layout of the content pane, portion of the content pane may not be visible.

If the input parameter is a negative value, that means the content pane's preferred width will be used.

Parameters:
contentPaneWidth - the new width of content pane

getActualComponent

public JComponent getActualComponent()
Gets the scroll pane used internally. Note: This method is only used internally. We have to leave it public since we used outside package. PLEASE DO NOT USE IT DIRECTLY.

Returns:
the scroll pane used internally.

getInitDelay

public int getInitDelay()
Gets the initial delay when starts to animate.

Returns:
the initial delay

setInitDelay

public void setInitDelay(int initDelay)
Sets the initial delay when the button is pressed before it starts to switch, in ms. Default is 50ms.

Parameters:
initDelay - the initial delay

getStepDelay

public int getStepDelay()
Gets the delay in each step during animation.

Returns:
the delay in each step

setStepDelay

public void setStepDelay(int stepDelay)
Sets the delay in each step during animation, in ms. Default is 5ms.

Parameters:
stepDelay - the delay in each step

getSteps

public int getSteps()
Gets how many steps in the animation.

Returns:
number of the steps

setSteps

public void setSteps(int steps)
Sets how many steps in the animation, default is 10 steps.

Parameters:
steps - number of the steps

getStyle

public int getStyle()
Gets the style.

Returns:
style

setStyle

public void setStyle(int style)
Sets the style. There are three styles available - DROPDOWN_STYLE, TREE_STYLE, PLAIN_STYLE or SEPARATOR_STYLE.

Parameters:
style - the new style

getSlidingDirection

public int getSlidingDirection()
Gets the sliding direction. In current release, it could be either SOUTH, NORTH, EAST or WEST. Default is SOUTH, meaning content sliding to south direction when expanding.

Returns:
sliding direction.

setSlidingDirection

public void setSlidingDirection(int slidingDirection)
Sets the sliding direction. It could be either SwingConstants.NORTH, SwingConstants.SOUTH, SwingConstants.EAST or SwingConstants.WEST. Default is SwingConstants.SOUTH.

Parameters:
slidingDirection - the sliding direction.

isEmphasized

public boolean isEmphasized()
Checks if CollapsiblePane is in emphasized mode.

Returns:
true if the CollapsiblePane is in emphasized mode. Otherwise false.

setEmphasized

public void setEmphasized(boolean emphasized)
When there are several CollapsiblePane in a group, in case you want to emphasize one of them, you can call setEmphasized(true). It will make that CollapsiblePane's title pane has different background.

Parameters:
emphasized - true or false.

isCollapsible

public boolean isCollapsible()
Checks if CollapsiblePane is collapsible. By default it is true.

Returns:
true if the CollapsiblePane is collapsible.

setCollapsible

public void setCollapsible(boolean collapsible)
Sets collapsible flag. By default, it is true.

Parameters:
collapsible - true or false

isShowTitleBar

public boolean isShowTitleBar()
Checks if the title bar is visible.

Returns:
true if title bar is visible.

setShowTitleBar

public void setShowTitleBar(boolean showTitleBar)
Sets the visibility of title bar.

Parameters:
showTitleBar - true to show title bar.

isShowExpandButton

public boolean isShowExpandButton()
Checks if the expand/collapse button is visible.

Returns:
true if expand/collapse button is visible.

setShowExpandButton

public void setShowExpandButton(boolean showExpandButton)
Sets the visibility of expand/collapse button.

Parameters:
showExpandButton - true to show expand/collapse button.

collapse

public void collapse(boolean collapse)
Expands or collapses the CollapsiblePane. Different from setCollapsed(boolean) method which is to set the state, this method is an action which will use the animation to expand/collapse this CollapsiblePane.

Parameters:
collapse - true or false.

isFocusPainted

public boolean isFocusPainted()
Gets the focusPainted property.

Returns:
the focusPainted property
See Also:
setFocusPainted(boolean)

setFocusPainted

public void setFocusPainted(boolean b)
Sets the focusPainted property, which must be true for the focus state to be painted. The default value for the focusPainted property is true. Some look and feels might not paint focus state; they will ignore this property.

Parameters:
b - if true, the focus state should be painted
See Also:
isFocusPainted()

isContentAreaFilled

public boolean isContentAreaFilled()
Gets the contentAreaFilled property.

Returns:
the contentAreaFilled property
See Also:
setContentAreaFilled(boolean)

setContentAreaFilled

public void setContentAreaFilled(boolean contentAreaFilled)
Sets the contentAreaFilled property. The default value for the contentAreaFilled property is true. Some look and feels might not paint focus state; they will ignore this property.

Parameters:
contentAreaFilled - true or false.
See Also:
isContentAreaFilled()

isTitlePaneOpaque

public boolean isTitlePaneOpaque()
Gets the titlePaneOpaque property.

Returns:
the titlePaneOpaque property
See Also:
setTitlePaneOpaque(boolean)

setTitlePaneOpaque

public void setTitlePaneOpaque(boolean opaque)
Sets the titlePaneOpaque property. The default value for the titlePaneOpaque property is true. If false, the title pane will not paint the background.

Parameters:
opaque - true or false.
See Also:
isContentAreaFilled()

getTitleComponent

public Component getTitleComponent()
Gets the title component that is displayed on the title pane of CollapsiblePane.

Returns:
the title component.

setTitleComponent

public void setTitleComponent(Component titleComponent)
Sets the title components. CollapsiblePane will display the title component as the last component on the title pane before the expand button. It will always use the preferred size by default although it depends on the specific L&F implementation.

Parameters:
titleComponent - the title component

setTitleLabelComponent

public void setTitleLabelComponent(JComponent component)
Sets a component which will be used to replace the default title. The default title label is used to display the title and the icon. So if you use your own component, you have to set the title as the text on your component. You can pass in null so that the default title label will be used.

Parameters:
component - title label component

getTitleLabelComponent

public JComponent getTitleLabelComponent()
Gets the component which is used to replace the default title. Null if you never set it before.

Returns:
the title label component.

isAutoExpandOnDragover

public boolean isAutoExpandOnDragover()
Gets the autoExpandOnDragover property.

Returns:
the autoExpandOnDropping property
See Also:
setAutoExpandOnDragover(boolean)

setAutoExpandOnDragover

public void setAutoExpandOnDragover(boolean b)
Sets the autoExpandOnDragover property. The default value for the autoExpandOnDropping property is true. If false, the collapsible pane will not expand when something is dragged over the title pane.

Parameters:
b - true or false.

isRollover

public boolean isRollover()
Checks if the mouse is over the title pane.

Returns:
true if the mouse is over the title pane.

setRollover

public void setRollover(boolean rollover)
Sets rollover. It means the mouse is over the title pane of the CollapsiblePane.

Parameters:
rollover - true or false

setExpandedIcon

public void setExpandedIcon(Icon icon)
Sets the expanded icon which is used for the expand button.

Parameters:
icon - the ExpandedIcon for the expand button
See Also:
getExpandedIcon()

getExpandedIcon

public Icon getExpandedIcon()
Gets the expanded icon which is used for the expand button. It is null by default unless you set it. If null, it means the default icon will be used depending on the look and feel. Please note, this icon is only used if the collapsible pane style is TREE_STYLE or PLAIN_STYLE.

Returns:
the ExpandedIcon for the expand button.
See Also:
setExpandedIcon(javax.swing.Icon)

setCollapsedIcon

public void setCollapsedIcon(Icon icon)
Sets the collapsed icon which is used for the expand button.

Parameters:
icon - the CollapsedIcon for the expand button
See Also:
getCollapsedIcon()

getCollapsedIcon

public Icon getCollapsedIcon()
Gets the collapsed icon which is used for the expand button. It is null by default unless you set it. If null, it means the default icon will be used depending on the look and feel. Please note, this icon is only used if the collapsible pane style is TREE_STYLE or PLAIN_STYLE.

Returns:
the Icon for the expand button.
See Also:
setCollapsedIcon(javax.swing.Icon)

setCollapsedPercentage

public void setCollapsedPercentage(int percentage)
Sets the collapsed percentage. By default is 0 which means when collapsed, no content will be shown. You can set it to a value between 0 and 100 if you want the content to be partially shown when collapsed.

Parameters:
percentage - the CollapsedPercentage, valid value is from 0 to 100.
See Also:
getCollapsedPercentage()

getCollapsedPercentage

public int getCollapsedPercentage()
Gets the collapsed percentage. By default is 0 which means when collapsed, no content will be shown. You can set it to a value between 0 and 100 if you want the content to be partially shown when collapsed.

Returns:
the collapsed percentage
See Also:
setCollapsedPercentage(int)

setToggleAction

public void setToggleAction(Action action)
Sets the action when the title pane or the expand/collapse button is clicked. Setting this action will override the default action we have which will expand/collapse the CollapsiblePane.

Parameters:
action - the ToggleAction
See Also:
getToggleAction()

getToggleAction

public Action getToggleAction()
Gets the toggle action. If setToggleAction(javax.swing.Action) is never called, this method will return the default action defined in the CollapsiblePaneUI.

Returns:
the toggle action.
See Also:
setToggleAction(javax.swing.Action)

isContentBorderVisible

public boolean isContentBorderVisible()
Checks if the content border is visible.

Returns:
true or false.

setContentBorderVisible

public void setContentBorderVisible(boolean visible)
Sets if the content border is visible. By default, there is a one pixel border around the content pane.

Parameters:
visible - true or false

getResourceString

public String getResourceString(String key)
Gets the resource string used in CollapsiblePane. Subclass can override it to provide their own strings.

Parameters:
key - the resource key
Returns:
the localized string.

getAnimationFunction

public Function getAnimationFunction()
Gets the animation function that is used to animate the showing effect of the content.

Returns:
the animation function.

setAnimationFunction

public void setAnimationFunction(Function animationFunction)
Sets the animation function.

Parameters:
animationFunction - the animation function.

rotateIcon

public Icon rotateIcon(Icon originalIcon)
Rotates the icon according to the sliding direction of the CollapsiblePane.

This method is called by the default implementation to rotate the icon according to the sliding direction. Override this method to obtain a custom rotation behavior.

Parameters:
originalIcon - the original icon
Returns:
the icon after rotated.
Since:
3.5.3

isRotateIcon

public boolean isRotateIcon()
Gets the flag indicating if the icon should be rotated.

Returns:
true if the icon should be rotated with the text. Otherwise false.
Since:
3.5.5

setRotateIcon

public void setRotateIcon(boolean rotateIcon)
Sets the flag indicating if the icon should be rotated.

By default the value is true.

Parameters:
rotateIcon - the flag
Since:
3.5.5

JIDE 3.5.15