Example usage for com.jgoodies.looks Options EMBEDDED_TABS_KEY

List of usage examples for com.jgoodies.looks Options EMBEDDED_TABS_KEY

Introduction

In this page you can find the example usage for com.jgoodies.looks Options EMBEDDED_TABS_KEY.

Prototype

String EMBEDDED_TABS_KEY

To view the source code for com.jgoodies.looks Options EMBEDDED_TABS_KEY.

Click Source Link

Document

A JTabbedPane client property key that indicates that tabs are painted with a special embedded appearance.

Usage

From source file:de.dfki.dmas.owls2wsdl.gui.MainPane.java

License:Open Source License

/**
 * Builds and returns a panel that uses a tabbed pane with embedded tabs
 * enabled./*from  ww  w .  j ava  2  s.  c om*/
 */
private JComponent buildMainLeftPanel() {
    tabbedPaneLeft = new JTabbedPane(SwingConstants.BOTTOM);
    tabbedPaneLeft.putClientProperty(Options.EMBEDDED_TABS_KEY, Boolean.TRUE);
    tabbedPaneLeft.addTab("Services", Factory.createStrippedScrollPane(this.serviceList));
    tabbedPaneLeft.addTab("Datatypes", Factory.createStrippedScrollPane(this.datatypeList));
    tabbedPaneLeft.addChangeListener(this);

    sif_overview = new SimpleInternalFrame("Services");
    sif_overview.setPreferredSize(new Dimension(150, 400));
    sif_overview.add(tabbedPaneLeft);

    sif_status = new SimpleInternalFrame(ResourceManager.getString("iframe.projectstatus.inactive"));
    sif_status.setPreferredSize(new Dimension(150, 100));
    // sif_status.add( new JScrollPane(this.statusTable) );

    sif_status.setBackground(Color.WHITE);
    sif_status.add(this.logoComponent);

    leftSplitPane = Factory.createStrippedSplitPane(JSplitPane.VERTICAL_SPLIT, sif_overview, sif_status, 0.9f);
    leftSplitPane.setDividerLocation(390);
    return leftSplitPane;
}

From source file:de.dfki.dmas.owls2wsdl.gui.OutputPanel.java

License:Open Source License

/** Creates a new instance of OutputPanel */
public OutputPanel() {
    super(new BorderLayout());
    this.tabbedPane = new CloseableTabbedPane(JTabbedPane.TOP);
    this.tabbedPane.putClientProperty(Options.EMBEDDED_TABS_KEY, Boolean.TRUE);
    this.tabbedPane.addTabCloseListener(new TabCloseListener() {
        public void tabClosed(TabCloseEvent e) {
            System.out.println("CLOSE TAB: " + e.getClosedTab());
            tabbedPane.removeTabAt(e.getClosedTab());
        }/*w  w  w  . j  av a2 s . c  o  m*/
    });
    this.outputToolbar = new JToolBar();

    JButton saveSelectedButton = new JButton(ResourceManager.getString("iframe.output.save"), saveIcon);
    saveSelectedButton.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
            // File outputdir = showSave2DirectoryChooser();
            // if(outputdir != null)
            // saveSelectedTab(outputdir);

            File exportFile = showSave2Chooser();
            if (exportFile != null) {
                saveSelectedTab(exportFile);
            }
        }
    });
    this.outputToolbar.add(saveSelectedButton);

    JButton saveAllButton = new JButton(ResourceManager.getString("iframe.output.saveall"), saveAllIcon);
    saveAllButton.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
            File outputdir = showSave2DirectoryChooser();
            if (outputdir != null)
                saveAllTabs(outputdir);
        }
    });
    this.outputToolbar.add(saveAllButton);

    this.add(this.tabbedPane, BorderLayout.CENTER);
    this.add(this.outputToolbar, BorderLayout.SOUTH);
}

From source file:de.xplib.xdbm.ui.BottomFrame.java

License:Open Source License

/**
 * /*from  ww w . j  av a 2 s . co m*/
 */
private void initUI() {

    this.jtPane.putClientProperty(Options.EMBEDDED_TABS_KEY, Boolean.TRUE);
    this.jtPane.setTabPlacement(JTabbedPane.TOP);

    this.setContent(this.jtPane);

    this.outputPanel = new OutputPanel();

    this.jtPane.addTab("Foo", this.outputPanel);
    this.jtPane.addTab("Bar", new JLabel("Label2"));
}

From source file:de.xplib.xdbm.ui.CenterFrame.java

License:Open Source License

/**
 * /*  w  w  w.j  a va 2 s .co m*/
 */
private void initUI() {

    this.setContent(this.jtPane);

    this.jtPane.putClientProperty(Options.EMBEDDED_TABS_KEY, Boolean.TRUE);
    this.jtPane.setTabPlacement(JTabbedPane.BOTTOM);

    try {
        PluginFile p = app.getConfig().getPluginFile("resource");
        this.jtPane.addTab("FOO", p.createPlugin().getPanelInstance(this.app));
        p = app.getConfig().getPluginFile("editor");
        this.jtPane.addTab("Test", p.createPlugin().getPanelInstance(this.app));
    } catch (FileNotFoundException e) {
        e.printStackTrace();
    } catch (ClassCastException e) {
        e.printStackTrace();
    } catch (ClassNotFoundException e) {
        e.printStackTrace();
    }

}

From source file:de.xplib.xdbm.ui.LeftFrame.java

License:Open Source License

public LeftFrame(final Application appIn) {
    super("Collections");

    this.position = LEFT;

    this.app = appIn;

    this.setContent(this.jtPane);

    this.jtPane.putClientProperty(Options.EMBEDDED_TABS_KEY, Boolean.TRUE);
    this.jtPane.setTabPlacement(JTabbedPane.BOTTOM);

    this.jtPane.addTab("FOO", new TreePanel());
}

From source file:etomica.virial.cluster2.mvc.view.LeftPanelView.java

License:Mozilla Public License

private static JComponent buildBottomPanel() {

    SimpleInternalFrame sif = new SimpleInternalFrame("Designer");
    JTabbedPane tabbedPane = new JTabbedPane(SwingConstants.TOP);
    tabbedPane.putClientProperty(Options.EMBEDDED_TABS_KEY, Boolean.TRUE);
    tabbedPane.addTab("Generation", buildPanel());
    tabbedPane.addTab("Manipulation", buildPanel());
    JScrollPane pane = Factory.createStrippedScrollPane(tabbedPane);
    pane.setBorder(new EmptyBorder(2, 2, 2, 2));
    sif.add(pane);/*from   w  w w  .  jav a  2  s .  c om*/
    sif.setPreferredSize(new Dimension(150, 250));
    return sif;
}

From source file:etomica.virial.cluster2.mvc.view.RightPanelView.java

License:Mozilla Public License

private static JComponent buildTopPanel() {

    SimpleInternalFrame sif = new SimpleInternalFrame("Cluster View");
    JTabbedPane tabbedPane = new JTabbedPane(SwingConstants.TOP);
    tabbedPane.setAutoscrolls(false);//from  w  w w  . j  a v  a  2s . com
    tabbedPane.putClientProperty(Options.EMBEDDED_TABS_KEY, Boolean.TRUE);
    SVGDraw d = new SVGDraw(GraphSetFactory.completeGraphSet(
            new char[] { Nodes.NODE_COLOR_1, Nodes.NODE_COLOR_1, Nodes.NODE_COLOR_1, Nodes.NODE_COLOR_1 },
            new char[] { Nodes.NODE_COLOR_1 }, true));
    tabbedPane.addTab("SVG Cluster", d.getPanel());
    JScrollPane pane = Factory.createStrippedScrollPane(tabbedPane);
    pane.setBorder(new EmptyBorder(2, 2, 2, 2));
    sif.add(pane);
    sif.setPreferredSize(new Dimension(400, 450));
    return sif;
}

From source file:nplugins.shell.application.NPluginsApplication.java

License:Open Source License

protected JComponent buildMainLeftPanel(INanoPlugin plugin) {
    JComponent c = null;//  w  w w.j  a va  2 s. c  o  m
    JComponent[] options = plugin.createOptionsComponent();
    if (options != null)
        if (options.length > 1) {
            JTabbedPane tabbedPane = new JTabbedPane(SwingConstants.BOTTOM);
            tabbedPane.putClientProperty(Options.EMBEDDED_TABS_KEY, Boolean.TRUE);
            for (int i = 0; i < options.length; i++)
                tabbedPane.addTab(Integer.toString(i + 1), options[i]);
            c = tabbedPane;
        } else
            c = options[0];
    else
        c = new JLabel("No options");
    return c;
}

From source file:nplugins.shell.application.NPluginsApplication.java

License:Open Source License

protected JComponent buildDetailsPanel(INanoPlugin plugin) {
    JComponent c = null;/*w  w w. ja  v a  2  s  .  c  o  m*/
    JComponent[] options = plugin.createDetailsComponent();
    if (options != null)
        if (options.length > 1) {
            JTabbedPane tabbedPane = new JTabbedPane(SwingConstants.BOTTOM);
            tabbedPane.putClientProperty(Options.EMBEDDED_TABS_KEY, Boolean.TRUE);
            for (int i = 0; i < options.length; i++)
                tabbedPane.addTab(Integer.toString(i + 1), options[i]);
            c = tabbedPane;
        } else
            c = options[0];
    return c;
}

From source file:org.qedeq.gui.se.main.QedeqMainPane.java

License:Open Source License

/**
 * Creates the two main stripped split panes.
 *
 * @param   controller  Enables controller access.
 * @return  Splits./*from   www .j a  va2  s.  c o m*/
 */
private JComponent createSplits(final QedeqController controller) {

    final QedeqTreeModel treeModel = new QedeqTreeModel();
    ModuleEventLog.getInstance().addLog(treeModel);
    final QedeqTreeView treeView = new QedeqTreeView(treeModel);

    SelectionListenerList listener = new SelectionListenerList();
    final UpperTabbedView tabbedView = new UpperTabbedView(listener);
    listener.addListener(tabbedView);
    final LowerTabbedView lowerView = new LowerTabbedView(listener);

    tabbedView.putClientProperty(Options.EMBEDDED_TABS_KEY, Boolean.TRUE);

    final QedeqTreeCtrl treeCtrl = new QedeqTreeCtrl(treeView, treeModel, tabbedView, lowerView, controller);
    controller.setTreeCtrl(treeCtrl);

    final JComponent left = new JScrollPane(treeView);
    left.setPreferredSize(new Dimension(200, 200));

    final JComponent right = tabbedView;
    right.setPreferredSize(new Dimension(200, 150));

    final JComponent lower = lowerView;
    lower.setPreferredSize(new Dimension(200, 100));

    final JSplitPane horizontalSplit = UIFSplitPane.createStrippedSplitPane(JSplitPane.HORIZONTAL_SPLIT, left,
            right);

    final JSplitPane verticalSplit = UIFSplitPane.createStrippedSplitPane(JSplitPane.VERTICAL_SPLIT,
            horizontalSplit, lower);

    verticalSplit.setResizeWeight(0.80);
    return verticalSplit;
}