@Test public void testSetCollapsed() { panel.setCollapsed(true); assertTrue(panel.isCollapsed()); panel.setCollapsed(false); assertFalse(panel.isCollapsed()); }
public void setCollapsed(boolean collapse) { if (collapse) { getContentPane().setVisible(false); getArrowBtn().setIcon(UIManager.getIcon("Tree.collapsedIcon")); } else { getContentPane().setVisible(true); getArrowBtn().setIcon(UIManager.getIcon("Tree.expandedIcon")); } collapsed = collapse; updateUI(); if (collapseListeners != null) { for (CollapseListener listener : collapseListeners) { if (collapse) listener.collapsed(); else listener.expanded(); } } }
BasicCollapsiblePanel extends JPanel { public void setCollapsed(boolean collapse) { if (collapse) { getContentPane().setVisible(false); getArrowBtn().setIcon(UIManager.getIcon("Tree.collapsedIcon")); } else { getContentPane().setVisible(true); getArrowBtn().setIcon(UIManager.getIcon("Tree.expandedIcon")); } collapsed = collapse; updateUI(); if (collapseListeners != null) { for (CollapseListener listener : collapseListeners) { if (collapse) listener.collapsed(); else listener.expanded(); } } } }
BasicCollapsiblePanel extends JPanel { public void setCollapsed(boolean collapse) { if (collapse) { getContentPane().setVisible(false); getArrowBtn().setIcon(UIManager.getIcon("Tree.collapsedIcon")); } else { getContentPane().setVisible(true); getArrowBtn().setIcon(UIManager.getIcon("Tree.expandedIcon")); } collapsed = collapse; updateUI(); if (collapseListeners != null) { for (CollapseListener listener : collapseListeners) { if (collapse) listener.collapsed(); else listener.expanded(); } } } BasicCollapsiblePanel(JRadioButton component);  BasicCollapsiblePanel(String text); private  BasicCollapsiblePanel(final AbstractButton titleComponent, final boolean collapsed); }
BasicCollapsiblePanel extends JPanel { public void setCollapsed(boolean collapse) { if (collapse) { getContentPane().setVisible(false); getArrowBtn().setIcon(UIManager.getIcon("Tree.collapsedIcon")); } else { getContentPane().setVisible(true); getArrowBtn().setIcon(UIManager.getIcon("Tree.expandedIcon")); } collapsed = collapse; updateUI(); if (collapseListeners != null) { for (CollapseListener listener : collapseListeners) { if (collapse) listener.collapsed(); else listener.expanded(); } } } BasicCollapsiblePanel(JRadioButton component);  BasicCollapsiblePanel(String text); private  BasicCollapsiblePanel(final AbstractButton titleComponent, final boolean collapsed); void setTitleComponentText(String text); JPanel getContentPane(); @Override Component add(Component comp); @Override Component add(Component comp, int index); @Override void add(Component comp, Object constraints); @Override void add(Component comp, Object constraints, int index); @Override Component add(String name, Component comp); void setCollapsed(boolean collapse); boolean isCollapsed(); @Override void setToolTipText(final String text); void addCollapseListener(CollapseListener listener); boolean removeCollapeListener(CollapseListener listener); }
BasicCollapsiblePanel extends JPanel { public void setCollapsed(boolean collapse) { if (collapse) { getContentPane().setVisible(false); getArrowBtn().setIcon(UIManager.getIcon("Tree.collapsedIcon")); } else { getContentPane().setVisible(true); getArrowBtn().setIcon(UIManager.getIcon("Tree.expandedIcon")); } collapsed = collapse; updateUI(); if (collapseListeners != null) { for (CollapseListener listener : collapseListeners) { if (collapse) listener.collapsed(); else listener.expanded(); } } } BasicCollapsiblePanel(JRadioButton component);  BasicCollapsiblePanel(String text); private  BasicCollapsiblePanel(final AbstractButton titleComponent, final boolean collapsed); void setTitleComponentText(String text); JPanel getContentPane(); @Override Component add(Component comp); @Override Component add(Component comp, int index); @Override void add(Component comp, Object constraints); @Override void add(Component comp, Object constraints, int index); @Override Component add(String name, Component comp); void setCollapsed(boolean collapse); boolean isCollapsed(); @Override void setToolTipText(final String text); void addCollapseListener(CollapseListener listener); boolean removeCollapeListener(CollapseListener listener);  }