public class BasicTabbedPaneUI.TabbedPaneLayout extends java.lang.Object implements java.awt.LayoutManager
| Constructor and Description |
|---|
BasicTabbedPaneUI.TabbedPaneLayout() |
| Modifier and Type | Method and Description |
|---|---|
void |
addLayoutComponent(java.lang.String name,
java.awt.Component comp)
This method is called when a component is added to the JTabbedPane.
|
void |
calculateLayoutInfo()
This method is called when the rectangles need to be calculated.
|
protected java.awt.Dimension |
calculateSize(boolean minimum)
This method calculates the size of the the JTabbedPane.
|
protected void |
calculateTabRects(int tabPlacement,
int tabCount)
This method is called to calculate the tab rectangles.
|
void |
layoutContainer(java.awt.Container parent)
This method is called when the JTabbedPane is laid out in
WRAP_TAB_LAYOUT.
|
java.awt.Dimension |
minimumLayoutSize(java.awt.Container parent)
This method returns the minimum layout size for the given container.
|
protected void |
normalizeTabRuns(int tabPlacement,
int tabCount,
int start,
int max)
This method tries to "even out" the number of tabs in each run based on
their widths.
|
protected void |
padSelectedTab(int tabPlacement,
int selectedIndex)
This method pads the tab at the selected index by the selected tab pad
insets (so that it looks larger).
|
protected void |
padTabRun(int tabPlacement,
int start,
int end,
int max)
This method makes each tab in the run larger so that the tabs expand
to fill the runs width/height (depending on tabPlacement).
|
java.awt.Dimension |
preferredLayoutSize(java.awt.Container parent)
This method returns the preferred layout size for the given container.
|
protected int |
preferredTabAreaHeight(int tabPlacement,
int width)
This method returns the preferred tab height given a tabPlacement and
width.
|
protected int |
preferredTabAreaWidth(int tabPlacement,
int height)
This method calculates the preferred tab area width given a tab
placement and height.
|
void |
removeLayoutComponent(java.awt.Component comp)
This method is called when a component is removed from the
JTabbedPane.
|
protected void |
rotateTabRuns(int tabPlacement,
int selectedRun)
This method rotates the places each run in the correct place the
tabRuns array.
|
public BasicTabbedPaneUI.TabbedPaneLayout()
public void addLayoutComponent(java.lang.String name, java.awt.Component comp)
addLayoutComponent in interface java.awt.LayoutManagername - The name of the component.comp - The component being added.public void calculateLayoutInfo()
protected java.awt.Dimension calculateSize(boolean minimum)
minimum - Whether the JTabbedPane will try to be as small as it
can.protected void calculateTabRects(int tabPlacement, int tabCount)
tabPlacement - The JTabbedPane's tab placement.tabCount - The run the current selection is in.public void layoutContainer(java.awt.Container parent)
layoutContainer in interface java.awt.LayoutManagerparent - The Container to lay out.public java.awt.Dimension minimumLayoutSize(java.awt.Container parent)
minimumLayoutSize in interface java.awt.LayoutManagerparent - The container that is being sized.LayoutManager.preferredLayoutSize(Container)protected void normalizeTabRuns(int tabPlacement, int tabCount, int start, int max)
tabPlacement - The JTabbedPane's tab placement.tabCount - The number of tabs.start - The x position where the tabs will begin.max - The maximum x position where the tab can run to.protected void padSelectedTab(int tabPlacement, int selectedIndex)
tabPlacement - The placement of the tabs.selectedIndex - The selected index.protected void padTabRun(int tabPlacement, int start, int end, int max)
tabPlacement - The placement of the tabs.start - The index of the first tab.end - The last index of the tabmax - The amount of space in the run (width for TOP and BOTTOM
tabPlacement).public java.awt.Dimension preferredLayoutSize(java.awt.Container parent)
preferredLayoutSize in interface java.awt.LayoutManagerparent - The container to size.LayoutManager.minimumLayoutSize(Container)protected int preferredTabAreaHeight(int tabPlacement, int width)
tabPlacement - The JTabbedPane's tab placement.width - The expected width.protected int preferredTabAreaWidth(int tabPlacement, int height)
tabPlacement - The JTabbedPane's tab placement.height - The expected height.protected void rotateTabRuns(int tabPlacement, int selectedRun)
tabPlacement - The JTabbedPane's tab placement.selectedRun - The run the current selection is in.public void removeLayoutComponent(java.awt.Component comp)
removeLayoutComponent in interface java.awt.LayoutManagercomp - The component removed.