javax.swing.plaf.metal

Class MetalTabbedPaneUI.TabbedPaneLayout

Enclosing Class:
MetalTabbedPaneUI
Implemented Interfaces:
LayoutManager

public class MetalTabbedPaneUI.TabbedPaneLayout
extends BasicTabbedPaneUI.TabbedPaneLayout

A LayoutManager responsible for placing all the tabs and the visible component inside the JTabbedPane. This class is only used for JTabbedPane.WRAP_TAB_LAYOUT.

Constructor Summary

TabbedPaneLayout()
Creates a new instance of the layout manager.

Method Summary

protected void
normalizeTabRuns(int tabPlacement, int tabCount, int start, int max)
Overridden because tab runs are only normalized for TOP and BOTTOM tab placement in the Metal L&F.
protected void
padSelectedTab(int tabPlacement, int selectedIndex)
Overridden to do nothing, because the selected tab does not have extra padding in the MetalLookAndFeel.
protected void
rotateTabRuns(int tabPlacement, int selectedRun)
Overridden to do nothing, because tab runs are not rotated in the MetalLookAndFeel.

Methods inherited from class javax.swing.plaf.basic.BasicTabbedPaneUI.TabbedPaneLayout

addLayoutComponent, calculateLayoutInfo, calculateSize, calculateTabRects, layoutContainer, minimumLayoutSize, normalizeTabRuns, padSelectedTab, padTabRun, preferredLayoutSize, preferredTabAreaHeight, preferredTabAreaWidth, removeLayoutComponent, rotateTabRuns

Methods inherited from class java.lang.Object

clone, equals, extends Object> getClass, finalize, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Details

TabbedPaneLayout

public TabbedPaneLayout()
Creates a new instance of the layout manager.

Method Details

normalizeTabRuns

protected void normalizeTabRuns(int tabPlacement,
                                int tabCount,
                                int start,
                                int max)
Overridden because tab runs are only normalized for TOP and BOTTOM tab placement in the Metal L&F.
Overrides:
normalizeTabRuns in interface BasicTabbedPaneUI.TabbedPaneLayout

padSelectedTab

protected void padSelectedTab(int tabPlacement,
                              int selectedIndex)
Overridden to do nothing, because the selected tab does not have extra padding in the MetalLookAndFeel.
Overrides:
padSelectedTab in interface BasicTabbedPaneUI.TabbedPaneLayout
Parameters:
tabPlacement - the tab placement (one of MetalTabbedPaneUI.TabbedPaneLayout, MetalTabbedPaneUI.TabbedPaneLayout, MetalTabbedPaneUI.TabbedPaneLayout or MetalTabbedPaneUI.TabbedPaneLayout).
selectedIndex - the index of the selected tab.

rotateTabRuns

protected void rotateTabRuns(int tabPlacement,
                             int selectedRun)
Overridden to do nothing, because tab runs are not rotated in the MetalLookAndFeel.
Overrides:
rotateTabRuns in interface BasicTabbedPaneUI.TabbedPaneLayout
Parameters:
tabPlacement - the tab placement (one of MetalTabbedPaneUI.TabbedPaneLayout, MetalTabbedPaneUI.TabbedPaneLayout, MetalTabbedPaneUI.TabbedPaneLayout or MetalTabbedPaneUI.TabbedPaneLayout).
selectedRun - the index of the selected run.

MetalTabbedPaneUI.java Copyright (C) 2005, 2006 Free Software Foundation, Inc. This file is part of GNU Classpath. GNU Classpath is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. GNU Classpath is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with GNU Classpath; see the file COPYING. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Linking this library statically or dynamically with other modules is making a combined work based on this library. Thus, the terms and conditions of the GNU General Public License cover the whole combination. As a special exception, the copyright holders of this library give you permission to link this library with independent modules to produce an executable, regardless of the license terms of these independent modules, and to copy and distribute the resulting executable under terms of your choice, provided that you also meet, for each linked independent module, the terms and conditions of the license of that module. An independent module is a module which is not derived from or based on this library. If you modify this library, you may extend this exception to your version of the library, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version.