|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
com.samskivert.swing.CollapsiblePanel
public class CollapsiblePanel
A panel that contains a button which will collapse the rest of the content.
| Nested Class Summary |
|---|
| 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.BltBufferStrategy, Component.FlipBufferStrategy |
| Field Summary | |
|---|---|
protected JPanel |
_content
The who in the what now? |
protected Icon |
_downIcon
The icons for collapsed and uncollapsed. |
protected AbstractButton |
_trigger
The button that triggers collapsion. |
protected Icon |
_upIcon
The icons for collapsed and uncollapsed. |
| 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 java.awt.image.ImageObserver |
|---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
|---|---|
CollapsiblePanel()
Create a collapsible panel to which the trigger button will be added later. |
|
CollapsiblePanel(JButton trigger)
Construct a collapsible panel with the specified button as the trigger. |
|
CollapsiblePanel(String triggertext)
Construct a collapsible panel with the specified button text. |
|
| Method Summary | |
|---|---|
void |
actionPerformed(ActionEvent e)
|
JPanel |
getContent()
Get the content panel for filling in with sweet content goodness. |
boolean |
isCollapsed()
Is the panel collapsed? |
void |
setCollapsed(boolean collapse)
Set the collapsion state. |
void |
setGap(int gap)
Set the gap between the trigger button and the rest of the content. |
void |
setTrigger(AbstractButton trigger,
Icon collapsed,
Icon uncollapsed)
Set the trigger button. |
void |
setTriggerContainer(JComponent comp)
Set a component which contains the trigger button. |
void |
setTriggerContainer(JComponent comp,
JPanel content)
Set a component which contains the trigger button. |
| Methods inherited from class javax.swing.JPanel |
|---|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected AbstractButton _trigger
protected Icon _upIcon
protected Icon _downIcon
protected JPanel _content
| Constructor Detail |
|---|
public CollapsiblePanel(JButton trigger)
public CollapsiblePanel(String triggertext)
public CollapsiblePanel()
| Method Detail |
|---|
public void setTriggerContainer(JComponent comp)
public void setTriggerContainer(JComponent comp,
JPanel content)
public void setTrigger(AbstractButton trigger,
Icon collapsed,
Icon uncollapsed)
public void setGap(int gap)
public JPanel getContent()
public void actionPerformed(ActionEvent e)
actionPerformed in interface ActionListenerpublic boolean isCollapsed()
public void setCollapsed(boolean collapse)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||