@Test public void testSetTitleComponentText() { final String title ="Title text"; final String original = "original title"; panel = new BasicCollapsiblePanel(original); assertEquals(original, panel.titleComponent.getText()); panel.setTitleComponentText(title); assertEquals(title, panel.titleComponent.getText()); }
public void setTitleComponentText(String text) { if (titleComponent instanceof JButton) { titleComponent.setText(text); } }
BasicCollapsiblePanel extends JPanel { public void setTitleComponentText(String text) { if (titleComponent instanceof JButton) { titleComponent.setText(text); } } }
BasicCollapsiblePanel extends JPanel { public void setTitleComponentText(String text) { if (titleComponent instanceof JButton) { titleComponent.setText(text); } } BasicCollapsiblePanel(JRadioButton component);  BasicCollapsiblePanel(String text); private  BasicCollapsiblePanel(final AbstractButton titleComponent, final boolean collapsed); }
BasicCollapsiblePanel extends JPanel { public void setTitleComponentText(String text) { if (titleComponent instanceof JButton) { titleComponent.setText(text); } } 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 setTitleComponentText(String text) { if (titleComponent instanceof JButton) { titleComponent.setText(text); } } 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);  }