Java Code Examples for org.netbeans.swing.tabcontrol.TabbedContainer#TYPE_SLIDING

The following examples show how to use org.netbeans.swing.tabcontrol.TabbedContainer#TYPE_SLIDING . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: DefaultTabbedContainerUI.java    From netbeans with Apache License 2.0 6 votes vote down vote up
public void hierarchyChanged(HierarchyEvent e) {
    if ((e.getChangeFlags() & HierarchyEvent.SHOWING_CHANGED) != 0) {
        boolean showing = container.isShowing();
        if (showing != bug4924561knownShowing) {
            if (container.isShowing()) {
                initDisplayer();
                attachModelAndSelectionListeners();
                ensureSelectedComponentIsShowing();
                if (container.getType() == TabbedContainer.TYPE_SLIDING) {
                    updateOrientation();
                }
            } else {
                detachModelAndSelectionListeners();
                if (container.getType() == TabbedContainer.TYPE_SLIDING) {
                    updateOrientation();
                }
            }
        }
        bug4924561knownShowing = showing;
    }
}
 
Example 2
Source File: DefaultTabbedContainerUI.java    From netbeans with Apache License 2.0 4 votes vote down vote up
public void componentMoved (ComponentEvent e) {
    if (container.getType() == TabbedContainer.TYPE_SLIDING) {
        updateOrientation();
    }
}
 
Example 3
Source File: DefaultTabbedContainerUI.java    From netbeans with Apache License 2.0 4 votes vote down vote up
public void componentResized (ComponentEvent e) {
    if (container.getType() == TabbedContainer.TYPE_SLIDING) {
        updateOrientation();
    }
}
 
Example 4
Source File: DefaultTabbedContainerUI.java    From netbeans with Apache License 2.0 3 votes vote down vote up
/**
 * Create the layout manager that will manage the layout of the
 * TabbedContainer.  A TabbedContainer contains two components - the tabs
 * contentDisplayer, and the component contentDisplayer.
 * <p/>
 * The layout manager determines the position of the tabs relative to the
 * contentDisplayer component which displays the tab contents.
 * <p/>
 * The default implementation uses BorderLayout.  If you override this, you
 * should probably override <code>installDisplayer()</code> as well.
 */
protected LayoutManager createLayout() {
    if (container.getType() == TabbedContainer.TYPE_SLIDING) {
        return new SlidingTabsLayout();
    } else if (container.getType() == TabbedContainer.TYPE_TOOLBAR) {
        return new ToolbarTabsLayout();
    } else {
        return new BorderLayout();
    }
}