Gridarta Editor
MoveToActions.java
Go to the documentation of this file.
1 /*
2  * Gridarta MMORPG map editor for Crossfire, Daimonin and similar games.
3  * Copyright (C) 2000-2023 The Gridarta Developers.
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; either version 2 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License along
16  * with this program; if not, write to the Free Software Foundation, Inc.,
17  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18  */
19 
20 package net.sf.gridarta.gui.utils.tabbedpanel;
21 
23 import net.sf.japi.swing.action.ActionMethod;
24 import org.jetbrains.annotations.NotNull;
25 
30 public class MoveToActions {
31 
35  @NotNull
36  private final Tab tab;
37 
41  @NotNull
42  private final TabbedPanel tabbedPanel;
43 
49  public MoveToActions(@NotNull final Tab tab, @NotNull final TabbedPanel tabbedPanel) {
50  this.tab = tab;
51  this.tabbedPanel = tabbedPanel;
52  }
53 
57  @ActionMethod
58  public void tabButtonMoveToTop() {
60  }
61 
65  @ActionMethod
66  public void tabButtonMoveToBottom() {
68  }
69 
73  @ActionMethod
74  public void tabButtonMoveToLeft() {
76  }
77 
81  @ActionMethod
82  public void tabButtonMoveToRight() {
84  }
85 
90  @ActionMethod
91  public boolean isTabSplitMode() {
92  return tab.isAlternativeLocation();
93  }
94 
99  @ActionMethod
100  public void setTabSplitMode(final boolean splitMode) {
101  tabbedPanel.setTabSplitMode(tab, splitMode);
102  }
103 
104 }
net.sf.gridarta.gui.utils.tabbedpanel.Tab.isAlternativeLocation
boolean isAlternativeLocation()
Returns whether the button is shown in the alternative location.
Definition: Tab.java:339
net.sf.gridarta.gui.utils.tabbedpanel.MoveToActions.tabbedPanel
final TabbedPanel tabbedPanel
The TabbedPanel to forward to.
Definition: MoveToActions.java:42
net.sf.gridarta
Base package of all Gridarta classes.
net.sf.gridarta.gui.utils.tabbedpanel.MoveToActions.tabButtonMoveToBottom
void tabButtonMoveToBottom()
Action method to move the menu to Location#BOTTOM.
Definition: MoveToActions.java:66
net.sf.gridarta.gui.utils.tabbedpanel.MoveToActions.tabButtonMoveToLeft
void tabButtonMoveToLeft()
Action method to move the menu to Location#LEFT.
Definition: MoveToActions.java:74
net.sf
net.sf.gridarta.gui.utils.tabbedpanel.MoveToActions.tabButtonMoveToRight
void tabButtonMoveToRight()
Action method to move the menu to Location#RIGHT.
Definition: MoveToActions.java:82
net.sf.gridarta.gui.utils.tabbedpanel.MoveToActions.MoveToActions
MoveToActions(@NotNull final Tab tab, @NotNull final TabbedPanel tabbedPanel)
Creates a new instance.
Definition: MoveToActions.java:49
net.sf.gridarta.gui.utils.tabbedpanel.Tab
A tab in a TabbedPanel component.
Definition: Tab.java:54
net.sf.gridarta.gui
Graphical User Interface of Gridarta.
net
net.sf.gridarta.gui.utils.tabbedpanel.TabbedPanel
A Component that always displays another component and optionally a number of tabs around it.
Definition: TabbedPanel.java:47
net.sf.gridarta.gui.utils.tabbedpanel.MoveToActions.setTabSplitMode
void setTabSplitMode(final boolean splitMode)
Action method set split mode.
Definition: MoveToActions.java:100
net.sf.gridarta.gui.utils.borderpanel.Location
A location.
Definition: Location.java:33
net.sf.gridarta.gui.utils.tabbedpanel.TabbedPanel.setTabSplitMode
void setTabSplitMode(@NotNull final Tab tab, final boolean splitMode)
Toggles split mode for the given tab.
Definition: TabbedPanel.java:183
net.sf.gridarta.gui.utils.borderpanel
Definition: BorderPanel.java:20
net.sf.gridarta.gui.utils.tabbedpanel.MoveToActions.tabButtonMoveToTop
void tabButtonMoveToTop()
Action method to move the menu to Location#TOP.
Definition: MoveToActions.java:58
net.sf.gridarta.gui.utils.tabbedpanel.MoveToActions
Defines ActionMethods to move tab locations.
Definition: MoveToActions.java:30
net.sf.gridarta.gui.utils.tabbedpanel.MoveToActions.tab
final Tab tab
The tab.
Definition: MoveToActions.java:36
net.sf.gridarta.gui.utils
Definition: AnimationComponent.java:20
net.sf.gridarta.gui.utils.tabbedpanel.MoveToActions.isTabSplitMode
boolean isTabSplitMode()
Action method to query split mode.
Definition: MoveToActions.java:91
net.sf.gridarta.gui.utils.tabbedpanel.TabbedPanel.moveTab
void moveTab(@NotNull final Tab tab, @NotNull final Location location)
Moves the tab to the given location.
Definition: TabbedPanel.java:163