Search in sources :

Example 1 with OverPanel

use of plugin.overland.gui.OverPanel in project pcgen by PCGen.

the class OverlandPlugin method toolMenuItem.

/**
	 * Sets the index for the pane 
	 * @param evt
	 */
private void toolMenuItem(ActionEvent evt) {
    JTabbedPane tp = GMGenSystemView.getTabPane();
    IntStream.range(0, tp.getTabCount()).filter(i -> tp.getComponentAt(i) instanceof OverPanel).forEach(tp::setSelectedIndex);
}
Also used : IntStream(java.util.stream.IntStream) FocusOrStateChangeOccurredMessage(pcgen.pluginmgr.messages.FocusOrStateChangeOccurredMessage) InteractivePlugin(pcgen.pluginmgr.InteractivePlugin) JOptionPane(javax.swing.JOptionPane) Component(java.awt.Component) ActionEvent(java.awt.event.ActionEvent) OverPanel(plugin.overland.gui.OverPanel) File(java.io.File) AddMenuItemToGMGenToolsMenuMessage(gmgen.pluginmgr.messages.AddMenuItemToGMGenToolsMenuMessage) PCGenMessage(pcgen.pluginmgr.PCGenMessage) RequestAddTabToGMGenMessage(gmgen.pluginmgr.messages.RequestAddTabToGMGenMessage) GMGenSystemView(gmgen.GMGenSystemView) JMenuItem(javax.swing.JMenuItem) SettingsHandler(pcgen.core.SettingsHandler) Utility(pcgen.gui2.tools.Utility) JTabbedPane(javax.swing.JTabbedPane) PCGenMessageHandler(pcgen.pluginmgr.PCGenMessageHandler) LanguageBundle(pcgen.system.LanguageBundle) JTabbedPane(javax.swing.JTabbedPane) OverPanel(plugin.overland.gui.OverPanel)

Example 2 with OverPanel

use of plugin.overland.gui.OverPanel in project pcgen by PCGen.

the class OverlandPlugin method start.

/**
	 * Starts the plugin, registering itself with the {@code TabAddMessage}.
	 */
@Override
public void start(PCGenMessageHandler mh) {
    messageHandler = mh;
    File datadir = this.getDataDirectory();
    theView = new OverPanel(datadir);
    messageHandler.handleMessage(new RequestAddTabToGMGenMessage(this, getLocalizedName(), getView()));
    initMenus();
}
Also used : RequestAddTabToGMGenMessage(gmgen.pluginmgr.messages.RequestAddTabToGMGenMessage) OverPanel(plugin.overland.gui.OverPanel) File(java.io.File)

Aggregations

RequestAddTabToGMGenMessage (gmgen.pluginmgr.messages.RequestAddTabToGMGenMessage)2 File (java.io.File)2 OverPanel (plugin.overland.gui.OverPanel)2 GMGenSystemView (gmgen.GMGenSystemView)1 AddMenuItemToGMGenToolsMenuMessage (gmgen.pluginmgr.messages.AddMenuItemToGMGenToolsMenuMessage)1 Component (java.awt.Component)1 ActionEvent (java.awt.event.ActionEvent)1 IntStream (java.util.stream.IntStream)1 JMenuItem (javax.swing.JMenuItem)1 JOptionPane (javax.swing.JOptionPane)1 JTabbedPane (javax.swing.JTabbedPane)1 SettingsHandler (pcgen.core.SettingsHandler)1 Utility (pcgen.gui2.tools.Utility)1 InteractivePlugin (pcgen.pluginmgr.InteractivePlugin)1 PCGenMessage (pcgen.pluginmgr.PCGenMessage)1 PCGenMessageHandler (pcgen.pluginmgr.PCGenMessageHandler)1 FocusOrStateChangeOccurredMessage (pcgen.pluginmgr.messages.FocusOrStateChangeOccurredMessage)1 LanguageBundle (pcgen.system.LanguageBundle)1