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:org.springframework.richclient.application.support.flexdock.FlexComponentDelegate.java

License:Apache License

/**
 * Embedded tabs//from w  w  w .  java2  s  .c o  m
 * 
 */
public JTabbedPane createTabbedPane() {
    JTabbedPane tpane = new JTabbedPane(JTabbedPane.BOTTOM);
    tpane.putClientProperty(Options.EMBEDDED_TABS_KEY, Boolean.TRUE);
    tpane.updateUI();

    return tpane;
}

From source file:phex.gui.tabs.download.SWDownloadTab.java

License:Open Source License

public void initComponent(DGuiSettings guiSettings) {
    MouseHandler mouseHandler = new MouseHandler();
    CellConstraints cc = new CellConstraints();
    FormLayout layout = new FormLayout("2dlu, fill:d:grow, 2dlu", // columns
            "2dlu, fill:d:grow, 2dlu"); //rows
    PanelBuilder tabBuilder = new PanelBuilder(layout, this);

    JPanel downloadTablePanel = initDownloadTablePanel(guiSettings, mouseHandler);
    initDownloadOverviewPanel();// www  . jav  a2  s.  c  o  m
    JPanel downloadCandidatePanel = initDownloadCandidatePanel(guiSettings, mouseHandler);
    initDownloadTransferPanel(guiSettings);

    downloadDetails = new JTabbedPane(JTabbedPane.BOTTOM);
    downloadDetails.putClientProperty(Options.EMBEDDED_TABS_KEY, Boolean.TRUE);
    downloadDetails.setBorder(BorderFactory.createEmptyBorder(2, 0, 0, 0));
    downloadDetails.addTab(Localizer.getString("DownloadTab_Overview"), overviewElegantPanel);
    downloadDetails.addTab(Localizer.getString("DownloadTab_Transfers"), transfersElegantPanel);
    downloadDetails.addTab(Localizer.getString("Candidates"), downloadCandidatePanel);

    // Workaround for very strange j2se 1.4 split pane layout behavior
    Dimension dim = new Dimension(400, 300);
    downloadTablePanel.setPreferredSize(dim);
    downloadDetails.setPreferredSize(dim);
    dim = new Dimension(0, 0);
    downloadTablePanel.setMinimumSize(dim);
    downloadDetails.setMinimumSize(dim);

    JSplitPane splitPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT, downloadTablePanel, downloadDetails);
    splitPane.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
    splitPane.setDividerSize(4);
    splitPane.setOneTouchExpandable(false);
    splitPane.setDividerLocation(0.5);
    splitPane.setResizeWeight(0.5);

    tabBuilder.add(splitPane, cc.xy(2, 2));

    // increase table height a bit to display progress bar string better...
    GUIUtils.adjustTableProgresssBarHeight(downloadTable);
    GUIUtils.adjustTableProgresssBarHeight(candidateTable);

    //mDownloadMgr.addDownloadFilesChangeListener( new DownloadFilesChangeHandler() );

    ActionListener updateDownloadFileInfoAction = new ActionListener() {
        public void actionPerformed(ActionEvent e) {
            updateDownloadFileInfo();
        }
    };
    GUIRegistry.getInstance().getGuiUpdateTimer().addActionListener(updateDownloadFileInfoAction);
}