|
||||||||||
| 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
fr.ifremer.coser.ui.widgets.AccordionPane
public class AccordionPane
The AccordionPane class implements a vertical accordion container, similar to those seen in many AJAX/DHTML frameworks. Multiple child panels are added, but only one of those will be visible at a time. The user can switch between visible panels by clicking on the title area of one of the inactive panels.
| 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.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy |
| Field Summary | |
|---|---|
protected Color |
activePaneBackgroundColor
|
protected List<AccordionPaneSubPanel> |
children
|
protected Color |
paneBackgroundColor
|
protected int |
previouslySelected
|
protected int |
remainder
|
protected int |
selected
|
protected Timer |
timer
|
protected int |
transitionStep
|
| 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 | |
|---|---|
AccordionPane()
Create a new AccordionPane object. |
|
| Method Summary | |
|---|---|
void |
add(AccordionPaneSubPanel subPanel)
|
Component |
getComponentAt(int index)
Returns the component at index. |
int |
getPaneCount()
Get the number of panes in the AccordionPane. |
Component |
getSelectedComponent()
Returns the currently selected component for this AccordionPane. |
int |
getSelectedIndex()
Get the index of the currently selected pane. |
String |
getTitleAt(int index)
Get the text title at the specified location |
void |
paint(Graphics g)
|
void |
setIconAt(int index,
Icon icon)
Set the icon for the specified location. |
void |
setSelected(int num)
Set the currently active/selected pane. |
void |
setSelected(int num,
boolean showAnimation)
Set the currently active/selected pane. |
void |
setTitleAt(int index,
String newTitle)
Set the text title at the specified location |
void |
setTitleBackgroundColors(Color normalColor,
Color activeColor)
Set the background color for the active and inactive pane title areas. |
| 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 List<AccordionPaneSubPanel> children
protected int selected
protected int previouslySelected
protected Color paneBackgroundColor
protected Color activePaneBackgroundColor
protected Timer timer
protected int transitionStep
protected int remainder
| Constructor Detail |
|---|
public AccordionPane()
| Method Detail |
|---|
public void setTitleBackgroundColors(Color normalColor,
Color activeColor)
normalColor - The color to use for the non-active panelsactiveColor - The color to use for the currently selected panelpublic void add(AccordionPaneSubPanel subPanel)
public void paint(Graphics g)
paint in class JComponentpublic void setSelected(int num)
num - The pane number to select (0 is first)
public void setSelected(int num,
boolean showAnimation)
num - The pane number to select (0 is first)showAnimation - Show the animation transition from the previously selected pane to
the newly selected pane.public int getSelectedIndex()
public int getPaneCount()
public void setTitleAt(int index,
String newTitle)
index - the index number of the panenewTitle - the new title for the specified pane.public String getTitleAt(int index)
index - the index number of the pane
public void setIconAt(int index,
Icon icon)
index - icon - public Component getComponentAt(int index)
index - the index of the item being queried
public Component getSelectedComponent()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||