Class CollapsiblePanel


  • public final class CollapsiblePanel
    extends java.lang.Object
    Collapsible panel. It represents collapsible Swing component. Collapsed component is represented by JLabel.
    • Field Detail

      • COLLAPSED_PROPERTY

        public static final java.lang.String COLLAPSED_PROPERTY
        See Also:
        Constant Field Values
    • Method Detail

      • getPanel

        public javax.swing.JPanel getPanel()
        Get collapsible component.
        Returns:
        collapsible component.
      • create

        public static CollapsiblePanel create​(java.awt.Component component,
                                              java.lang.String name,
                                              java.lang.String description)
        Factory for creating instance.
        Parameters:
        component - wrapped component.
        name - name of collapsible component.
        description - optional description which is shown when panel is collapsed. Might be null.
        Returns:
        an instance of CollapsiblePanel
      • create

        public static CollapsiblePanel create​(java.awt.Component component,
                                              java.lang.String name)
      • isCollapsed

        public boolean isCollapsed()
        Is component collapsed?
        Returns:
        true if component collapsed.
      • setCollapsed

        public void setCollapsed​(boolean value)
        Collapse or show component.
        Parameters:
        value - collapse on true.
      • addPropertyChangeListener

        public void addPropertyChangeListener​(java.beans.PropertyChangeListener listener)
      • removePropertyChangeListener

        public void removePropertyChangeListener​(java.beans.PropertyChangeListener listener)