JXHeader extends JXPanel { public String getTitle() { return title; } JXHeader();  JXHeader(String title, String description);  JXHeader(String title, String description, Icon icon); @Override HeaderUI getUI(); void setUI(HeaderUI ui); @Override String getUIClassID(); @Override void updateUI(); void setTitle(String title); String getTitle(); void setDescription(String description); String getDescription(); void setIcon(Icon icon); Icon getIcon(); @Override void setFont(Font font); void setTitleFont(Font font); Font getTitleFont(); void setDescriptionFont(Font font); Font getDescriptionFont(); Color getTitleForeground(); void setTitleForeground(Color titleForeground); Color getDescriptionForeground(); void setDescriptionForeground(Color descriptionForeground); IconPosition getIconPosition(); void setIconPosition(IconPosition iconPosition); @Override Dimension getPreferredSize(); final static String uiClassID; }
@Test public void testTitleSynchInitialEmpty() { JXHeader header = new JXHeader(); assertEquals(header.getTitle(), getTitleLabel(header).getText()); }
@Test public void testTitleInContructor() { String title = "customTitle"; JXHeader header = new JXHeader(title, null); assertEquals(title, header.getTitle()); assertEquals("the label's text must be equal to the headers title", header.getTitle(), getTitleLabel(header).getText()); }