Package com.im.commons.ui
Class CollapsiblePanel
- java.lang.Object
-
- com.im.commons.ui.CollapsiblePanel
-
public final class CollapsiblePanel extends java.lang.Object
Collapsible panel. It represents collapsible Swing component. Collapsed component is represented byJLabel
.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
COLLAPSED_PROPERTY
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addPropertyChangeListener(java.beans.PropertyChangeListener listener)
static CollapsiblePanel
create(java.awt.Component component, java.lang.String name)
static CollapsiblePanel
create(java.awt.Component component, java.lang.String name, java.lang.String description)
Factory for creating instance.javax.swing.JPanel
getPanel()
Get collapsible component.boolean
isCollapsed()
Is component collapsed?void
removePropertyChangeListener(java.beans.PropertyChangeListener listener)
void
setCollapsed(boolean value)
Collapse or show component.
-
-
-
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 benull
.- 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)
-
-