private JideTabbedPane createTabbedPane(Demo demo) { _pane = new JideTabbedPane(); _demoPanel = demo.getDemoPanel(); _pane.addTab("Demo", new JideScrollPane(new DemoPanel(_demoPanel))); _pane.setTabShape(JideTabbedPane.SHAPE_BOX); _pane.setHideOneTab(true); _pane.setFocusable(false); _pane.setTabPlacement(JideTabbedPane.TOP); return _pane; }
public void browseSourceCode() { if (_pane.getTabCount() == 1) { _pane.addTab("Source", AbstractDemo.createSourceCodePanel(_demo.getDemoSource())); } _pane.setSelectedIndex(1); }
public DemoDocumentComponent(Demo demo) { super(null, demo.getName(), demo.getName(), DemoCellRenderer.getProductIcon(demo.getProduct())); setComponent(createTabbedPane(demo)); _demo = demo; }