|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object bibliothek.gui.dock.station.stack.tab.TabComponentLayoutManager
public class TabComponentLayoutManager
A LayoutManager
that can be used by Component
s that show an
OrientedLabel
and a ButtonPanel
.
Constructor Summary | |
---|---|
TabComponentLayoutManager(OrientedLabel label,
ButtonPanel panel,
TabConfiguration configuration)
Creates a new layout manager. |
Method Summary | |
---|---|
void |
addLayoutComponent(String name,
Component comp)
|
Insets |
getActionInsets()
Gets the empty space around the actions. |
ButtonPanel |
getActions()
Gets the panels showing the actions |
TabConfiguration |
getConfiguration()
Gets the current configuration of the tab |
int |
getFreeSpaceBetweenLabelAndActions()
Gets the size of the gap between text/icon and actions. |
int |
getFreeSpaceToOpenSide()
Gets the size of the open side. |
int |
getFreeSpaceToParallelBorder()
Gets the size of the border at the side of the Dockable |
int |
getFreeSpaceToSideBorder()
Gets the size of the free space between the borders that are on the same line as the text/icon and the actions. |
OrientedLabel |
getLabel()
Gets the label showing icon and text |
Insets |
getLabelInsets()
Gets the empty space around the label. |
TabPlacement |
getOrientation()
Gets the current position of the tab in relation to the Dockable s. |
void |
layoutContainer(Container parent)
|
Dimension |
minimumLayoutSize(Container parent)
|
Dimension |
preferredLayoutSize(Container parent)
|
void |
removeLayoutComponent(Component comp)
|
void |
setActionInsets(Insets actionInsets)
Sets the empty space around the actions. |
void |
setConfiguration(TabConfiguration configuration)
Changes the look and behavior of the tab. |
void |
setFreeSpaceBetweenLabelAndActions(int freeSpaceBetweenLabelAndActions)
Sets the size of the gap that is between the label (icon and text) and the DockAction s (if there are any). |
void |
setFreeSpaceToOpenSide(int freeSpaceToOpenSide)
Sets the size of the free space between content and the open side. |
void |
setFreeSpaceToParallelBorder(int freeSpaceToParallelBorder)
Sets the size of the free space between content and the border at the side of the Dockable . |
void |
setFreeSpaceToSideBorder(int freeSpaceToSideBorder)
Sets the size of the free space between the borders that are on the same line as the text/icon and the actions. |
void |
setLabelInsets(Insets labelInsets)
Sets the space that should be left empty around the label. |
void |
setOrientation(TabPlacement orientation)
|
protected boolean |
shouldShowActions(Container parent)
Using the current TabConfiguration , this method decides whether there is enough space to show
the actions or not. |
protected boolean |
shouldShowIcon()
Tells whether the icon should be shown for the current size of the label . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TabComponentLayoutManager(OrientedLabel label, ButtonPanel panel, TabConfiguration configuration)
label
- the label shown on the tabpanel
- the actions shown on the tabconfiguration
- the exact look and behavior of the tabMethod Detail |
---|
public ButtonPanel getActions()
null
public OrientedLabel getLabel()
null
public TabConfiguration getConfiguration()
null
public void setConfiguration(TabConfiguration configuration)
configuration
- the new configuration to use, not null
public void setFreeSpaceToOpenSide(int freeSpaceToOpenSide)
freeSpaceToOpenSide
- the sizepublic int getFreeSpaceToOpenSide()
setFreeSpaceToOpenSide(int)
public void setFreeSpaceBetweenLabelAndActions(int freeSpaceBetweenLabelAndActions)
DockAction
s (if there are any).
freeSpaceBetweenLabelAndActions
- the sizepublic int getFreeSpaceBetweenLabelAndActions()
setFreeSpaceBetweenLabelAndActions(int)
public void setFreeSpaceToParallelBorder(int freeSpaceToParallelBorder)
Dockable
.
freeSpaceToParallelBorder
- the sizepublic int getFreeSpaceToParallelBorder()
Dockable
setFreeSpaceToParallelBorder(int)
public void setFreeSpaceToSideBorder(int freeSpaceToSideBorder)
freeSpaceToSideBorder
- the sizepublic int getFreeSpaceToSideBorder()
setFreeSpaceToSideBorder(int)
public void setLabelInsets(Insets labelInsets)
labelInsets
- the empty space, not null
public Insets getLabelInsets()
public void setActionInsets(Insets actionInsets)
actionInsets
- the empty space, not null
public Insets getActionInsets()
public void setOrientation(TabPlacement orientation)
public TabPlacement getOrientation()
Dockable
s.
public void addLayoutComponent(String name, Component comp)
addLayoutComponent
in interface LayoutManager
public Dimension preferredLayoutSize(Container parent)
preferredLayoutSize
in interface LayoutManager
public Dimension minimumLayoutSize(Container parent)
minimumLayoutSize
in interface LayoutManager
public void layoutContainer(Container parent)
layoutContainer
in interface LayoutManager
protected boolean shouldShowActions(Container parent)
TabConfiguration
, this method decides whether there is enough space to show
the actions or not.
parent
- the parent Container
of the label and the actions
protected boolean shouldShowIcon()
the label
.
public void removeLayoutComponent(Component comp)
removeLayoutComponent
in interface LayoutManager
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |