|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectbibliothek.gui.dock.station.stack.tab.TabComponentLayoutManager
public class TabComponentLayoutManager
A LayoutManager that can be used by Components 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 Dockables. |
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 DockActions (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 tab| Method Detail |
|---|
public ButtonPanel getActions()
nullpublic OrientedLabel getLabel()
nullpublic TabConfiguration getConfiguration()
nullpublic void setConfiguration(TabConfiguration configuration)
configuration - the new configuration to use, not nullpublic void setFreeSpaceToOpenSide(int freeSpaceToOpenSide)
freeSpaceToOpenSide - the sizepublic int getFreeSpaceToOpenSide()
setFreeSpaceToOpenSide(int)public void setFreeSpaceBetweenLabelAndActions(int freeSpaceBetweenLabelAndActions)
DockActions (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 nullpublic Insets getLabelInsets()
public void setActionInsets(Insets actionInsets)
actionInsets - the empty space, not nullpublic Insets getActionInsets()
public void setOrientation(TabPlacement orientation)
public TabPlacement getOrientation()
Dockables.
public void addLayoutComponent(String name,
Component comp)
addLayoutComponent in interface LayoutManagerpublic Dimension preferredLayoutSize(Container parent)
preferredLayoutSize in interface LayoutManagerpublic Dimension minimumLayoutSize(Container parent)
minimumLayoutSize in interface LayoutManagerpublic void layoutContainer(Container parent)
layoutContainer in interface LayoutManagerprotected 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 | |||||||||