![]() |
Gridarta Editor
|
A Component that always displays another component and optionally a number of tabs around it. More...
Public Member Functions | |
void | addTab (@NotNull final Tab tab) |
Adds a tab. More... | |
Tab | getActiveTab (@NotNull final Location location, final boolean alternativeLocation) |
Returns the active Tab on a given Location of the main view. More... | |
void | moveTab (@NotNull final Tab tab, @NotNull final Location location) |
Moves the tab to the given location. More... | |
void | setTabSplitMode (@NotNull final Tab tab, final boolean splitMode) |
Toggles split mode for the given tab. More... | |
TabbedPanel (@NotNull final Component centerComponent) | |
Creates a new instance. More... | |
Private Member Functions | |
void | close (@NotNull final Tab tab) |
Closes a Tab. More... | |
void | closeInt (final Tab tab) |
Closes a Tab but does not update the tab's open status. More... | |
void | fillContextMenu (@NotNull final Tab tab, final boolean initialize) |
Fills in context popup menu entries for a tab in a given location. More... | |
void | open (@NotNull final Tab tab) |
Opens a Tab. More... | |
void | tabAdded (@NotNull final Tab tab, @NotNull final DoubleButtonList buttonList, final boolean open) |
Called whenever a Tab has been added to a ButtonList. More... | |
void | tabRemoved (@NotNull final DoubleButtonList buttonList) |
Called whenever a Tab has been added from a ButtonList. More... | |
Private Attributes | |
final BorderPanel | borderPanel |
The BorderPanel. More... | |
final ButtonLists | buttonLists = new ButtonLists(buttonListsListener) |
The list of buttons for each Location. More... | |
final ButtonListsListener | buttonListsListener |
The ButtonListsListener attached to buttonLists. More... | |
final Map< Component, Tab > | openTabs = new IdentityHashMap<>() |
The Tabs currently shown in borderPanel. More... | |
Static Private Attributes | |
static final ActionBuilder | ACTION_BUILDER = ActionBuilderFactory.getInstance().getActionBuilder("net.sf.gridarta") |
The ActionBuilder. More... | |
static final Preferences | PREFERENCES = Preferences.userNodeForPackage(MainControl.class) |
The Preferences. More... | |
static final long | serialVersionUID = 1L |
The serial version UID. More... | |
static final String | TAB_PREFIX = "MainWindow.tab" |
The key used to store the preferred height of a tab. More... | |
A Component that always displays another component and optionally a number of tabs around it.
Each tab has an associated component which is shown while the tab is active.
Definition at line 47 of file TabbedPanel.java.
net.sf.gridarta.gui.utils.tabbedpanel.TabbedPanel.TabbedPanel | ( | @NotNull final Component | centerComponent | ) |
Creates a new instance.
centerComponent | the component to display in the center location |
Definition at line 108 of file TabbedPanel.java.
References net.sf.gridarta.gui.utils.tabbedpanel.TabbedPanel.borderPanel, net.sf.gridarta.gui.utils.borderpanel.Location.getName(), net.sf.gridarta.gui.utils.tabbedpanel.TabbedPanel.openTabs, net.sf.gridarta.gui.utils.tabbedpanel.TabbedPanel.PREFERENCES, net.sf.gridarta.gui.utils.tabbedpanel.Tab.setSize(), and net.sf.gridarta.gui.utils.tabbedpanel.TabbedPanel.TAB_PREFIX.
void net.sf.gridarta.gui.utils.tabbedpanel.TabbedPanel.addTab | ( | @NotNull final Tab | tab | ) |
Adds a tab.
tab | the tab to add |
Definition at line 139 of file TabbedPanel.java.
References net.sf.gridarta.gui.utils.tabbedpanel.ButtonLists.addTab(), net.sf.gridarta.gui.utils.tabbedpanel.TabbedPanel.buttonLists, net.sf.gridarta.gui.utils.tabbedpanel.TabbedPanel.fillContextMenu(), and net.sf.gridarta.gui.utils.tabbedpanel.TabbedPanel.tabAdded().
Referenced by net.sf.gridarta.gui.misc.MainView.addTab().
|
private |
Closes a Tab.
tab | the tab |
Definition at line 264 of file TabbedPanel.java.
References net.sf.gridarta.gui.utils.tabbedpanel.TabbedPanel.closeInt().
|
private |
Closes a Tab but does not update the tab's open status.
tab | the tab |
Definition at line 273 of file TabbedPanel.java.
References net.sf.gridarta.gui.utils.tabbedpanel.TabbedPanel.borderPanel, net.sf.gridarta.gui.utils.tabbedpanel.Tab.getComponent(), net.sf.gridarta.gui.utils.tabbedpanel.Tab.getLocation(), net.sf.gridarta.gui.utils.tabbedpanel.Tab.isAlternativeLocation(), net.sf.gridarta.gui.utils.tabbedpanel.TabbedPanel.openTabs, and net.sf.gridarta.gui.utils.borderpanel.BorderPanel.unsetComponent().
Referenced by net.sf.gridarta.gui.utils.tabbedpanel.TabbedPanel.close().
|
private |
Fills in context popup menu entries for a tab in a given location.
tab | the tab |
initialize | whether this is the initial call |
Definition at line 230 of file TabbedPanel.java.
References net.sf.gridarta.gui.utils.tabbedpanel.TabbedPanel.ACTION_BUILDER, and net.sf.gridarta.gui.utils.MenuUtils.removeAll().
Referenced by net.sf.gridarta.gui.utils.tabbedpanel.TabbedPanel.addTab(), and net.sf.gridarta.gui.utils.tabbedpanel.TabbedPanel.moveTab().
Tab net.sf.gridarta.gui.utils.tabbedpanel.TabbedPanel.getActiveTab | ( | @NotNull final Location | location, |
final boolean | alternativeLocation | ||
) |
Returns the active Tab on a given Location of the main view.
location | the location |
alternativeLocation | whether the alternative location should be checked |
Definition at line 154 of file TabbedPanel.java.
References net.sf.gridarta.gui.utils.tabbedpanel.TabbedPanel.buttonLists, and net.sf.gridarta.gui.utils.tabbedpanel.ButtonLists.getActiveTab().
Referenced by net.sf.gridarta.gui.misc.MainView.getActiveTab().
void net.sf.gridarta.gui.utils.tabbedpanel.TabbedPanel.moveTab | ( | @NotNull final Tab | tab, |
@NotNull final Location | location | ||
) |
Moves the tab to the given location.
tab | the tab |
location | the location |
Definition at line 163 of file TabbedPanel.java.
References net.sf.gridarta.gui.utils.tabbedpanel.TabbedPanel.buttonLists, net.sf.gridarta.gui.utils.tabbedpanel.TabbedPanel.fillContextMenu(), net.sf.gridarta.gui.utils.tabbedpanel.ButtonLists.moveTab(), net.sf.gridarta.gui.utils.tabbedpanel.TabbedPanel.open(), net.sf.gridarta.gui.utils.tabbedpanel.TabbedPanel.tabAdded(), and net.sf.gridarta.gui.utils.tabbedpanel.TabbedPanel.tabRemoved().
Referenced by net.sf.gridarta.gui.utils.tabbedpanel.MoveToActions.tabButtonMoveToBottom(), net.sf.gridarta.gui.utils.tabbedpanel.MoveToActions.tabButtonMoveToLeft(), net.sf.gridarta.gui.utils.tabbedpanel.MoveToActions.tabButtonMoveToRight(), and net.sf.gridarta.gui.utils.tabbedpanel.MoveToActions.tabButtonMoveToTop().
|
private |
Opens a Tab.
tab | the tab |
Definition at line 254 of file TabbedPanel.java.
References net.sf.gridarta.gui.utils.tabbedpanel.TabbedPanel.borderPanel, net.sf.gridarta.gui.utils.tabbedpanel.TabbedPanel.openTabs, and net.sf.gridarta.gui.utils.borderpanel.BorderPanel.setComponent().
Referenced by net.sf.gridarta.gui.utils.tabbedpanel.TabbedPanel.moveTab(), net.sf.gridarta.gui.utils.tabbedpanel.TabbedPanel.setTabSplitMode(), and net.sf.gridarta.gui.utils.tabbedpanel.TabbedPanel.tabAdded().
void net.sf.gridarta.gui.utils.tabbedpanel.TabbedPanel.setTabSplitMode | ( | @NotNull final Tab | tab, |
final boolean | splitMode | ||
) |
Toggles split mode for the given tab.
tab | the tab |
splitMode | whether to enable split mode |
Definition at line 183 of file TabbedPanel.java.
References net.sf.gridarta.gui.utils.tabbedpanel.TabbedPanel.buttonLists, net.sf.gridarta.gui.utils.tabbedpanel.TabbedPanel.open(), net.sf.gridarta.gui.utils.tabbedpanel.DoubleButtonList.selectButton(), and net.sf.gridarta.gui.utils.tabbedpanel.ButtonLists.toggleTabSplitMode().
Referenced by net.sf.gridarta.gui.utils.tabbedpanel.MoveToActions.setTabSplitMode().
|
private |
Called whenever a Tab has been added to a ButtonList.
Shows the button list component if the first tab has been added.
tab | the tab |
buttonList | the button list |
open | whether the tab is open |
Definition at line 202 of file TabbedPanel.java.
References net.sf.gridarta.gui.utils.tabbedpanel.TabbedPanel.open().
Referenced by net.sf.gridarta.gui.utils.tabbedpanel.TabbedPanel.addTab(), and net.sf.gridarta.gui.utils.tabbedpanel.TabbedPanel.moveTab().
|
private |
Called whenever a Tab has been added from a ButtonList.
Hides the button list component if the last tab has been removed.
buttonList | the button list |
Definition at line 218 of file TabbedPanel.java.
Referenced by net.sf.gridarta.gui.utils.tabbedpanel.TabbedPanel.moveTab().
|
staticprivate |
The ActionBuilder.
Definition at line 64 of file TabbedPanel.java.
Referenced by net.sf.gridarta.gui.utils.tabbedpanel.TabbedPanel.fillContextMenu().
|
private |
The BorderPanel.
@serial
Definition at line 77 of file TabbedPanel.java.
Referenced by net.sf.gridarta.gui.utils.tabbedpanel.TabbedPanel.closeInt(), net.sf.gridarta.gui.utils.tabbedpanel.TabbedPanel.open(), and net.sf.gridarta.gui.utils.tabbedpanel.TabbedPanel.TabbedPanel().
|
private |
The list of buttons for each Location.
Definition at line 102 of file TabbedPanel.java.
Referenced by net.sf.gridarta.gui.utils.tabbedpanel.TabbedPanel.addTab(), net.sf.gridarta.gui.utils.tabbedpanel.TabbedPanel.getActiveTab(), net.sf.gridarta.gui.utils.tabbedpanel.TabbedPanel.moveTab(), and net.sf.gridarta.gui.utils.tabbedpanel.TabbedPanel.setTabSplitMode().
|
private |
The ButtonListsListener attached to buttonLists.
Definition at line 89 of file TabbedPanel.java.
|
private |
The Tabs currently shown in borderPanel.
Definition at line 83 of file TabbedPanel.java.
Referenced by net.sf.gridarta.gui.utils.tabbedpanel.TabbedPanel.closeInt(), net.sf.gridarta.gui.utils.tabbedpanel.TabbedPanel.open(), and net.sf.gridarta.gui.utils.tabbedpanel.TabbedPanel.TabbedPanel().
|
staticprivate |
The Preferences.
Definition at line 70 of file TabbedPanel.java.
Referenced by net.sf.gridarta.gui.utils.tabbedpanel.TabbedPanel.TabbedPanel().
|
staticprivate |
The serial version UID.
Definition at line 58 of file TabbedPanel.java.
|
staticprivate |
The key used to store the preferred height of a tab.
Definition at line 53 of file TabbedPanel.java.
Referenced by net.sf.gridarta.gui.utils.tabbedpanel.TabbedPanel.TabbedPanel().