Search in sources :

Example 1 with RequestAddTabToGMGenMessage

use of gmgen.pluginmgr.messages.RequestAddTabToGMGenMessage in project pcgen by PCGen.

the class GMGenSystem method handleMessage.

/**
     * Message handler for the GMBus.
     * 
     * @param message
     *            The message passed in from the bus
     */
@Override
public void handleMessage(PCGenMessage message) {
    // A plugin is asking for the creation of a new tab
    if (message instanceof RequestAddTabToGMGenMessage) {
        RequestAddTabToGMGenMessage tmessage = (RequestAddTabToGMGenMessage) message;
        Logging.debugPrint("Creating Tab " + GMGenSystemView.getTabPane().getTabCount());
        theView.insertPane(tmessage.getName(), tmessage.getPane(), GMGenSystemView.getTabPane().getTabCount());
    } else if (message instanceof RequestAddPreferencesPanelMessage) {
        RequestAddPreferencesPanelMessage pmessage = (RequestAddPreferencesPanelMessage) message;
        Logging.debugPrint("Creating Preferences Panel");
        rootNode.addPanel(pmessage.getName(), pmessage.getPrefsPanel());
    } else // A plugin is asking for the creation of a new option in the tool menu
    if (message instanceof AddMenuItemToGMGenToolsMenuMessage) {
        AddMenuItemToGMGenToolsMenuMessage mmessage = (AddMenuItemToGMGenToolsMenuMessage) message;
        toolsMenu.add(mmessage.getMenuItem());
    } else if (message instanceof GMGenBeingClosedMessage) {
        setCloseSettings();
        // Karianna 07/03/2008 - Added a call to exitForm passing in no
        // window event
        // TODO This sequence of calls simply hides GMGen as opposed to
        // unloading it
        exitForm(null);
    }
}
Also used : RequestAddTabToGMGenMessage(gmgen.pluginmgr.messages.RequestAddTabToGMGenMessage) AddMenuItemToGMGenToolsMenuMessage(gmgen.pluginmgr.messages.AddMenuItemToGMGenToolsMenuMessage) RequestAddPreferencesPanelMessage(gmgen.pluginmgr.messages.RequestAddPreferencesPanelMessage) GMGenBeingClosedMessage(gmgen.pluginmgr.messages.GMGenBeingClosedMessage)

Example 2 with RequestAddTabToGMGenMessage

use of gmgen.pluginmgr.messages.RequestAddTabToGMGenMessage in project pcgen by PCGen.

the class InitiativePlugin method start.

/**
	 * Starts the plugin, registering itself with the {@code TabAddMessage}.
	 */
@Override
public void start(PCGenMessageHandler mh) {
    messageHandler = mh;
    theView = new Initiative();
    messageHandler.handleMessage(new RequestAddPreferencesPanelMessage(this, name, new PreferencesDamagePanel()));
    messageHandler.handleMessage(new RequestAddPreferencesPanelMessage(this, name, new PreferencesMassiveDamagePanel()));
    messageHandler.handleMessage(new RequestAddPreferencesPanelMessage(this, name, new PreferencesInitiativePanel()));
    messageHandler.handleMessage(new RequestAddPreferencesPanelMessage(this, name, new PreferencesPerformancePanel()));
    theView.setLog(LogUtilities.inst());
    messageHandler.handleMessage(new RequestAddTabToGMGenMessage(this, name, getView()));
    initMenus();
}
Also used : RequestAddTabToGMGenMessage(gmgen.pluginmgr.messages.RequestAddTabToGMGenMessage) PreferencesDamagePanel(plugin.initiative.gui.PreferencesDamagePanel) PreferencesPerformancePanel(plugin.initiative.gui.PreferencesPerformancePanel) PreferencesInitiativePanel(plugin.initiative.gui.PreferencesInitiativePanel) RequestAddPreferencesPanelMessage(gmgen.pluginmgr.messages.RequestAddPreferencesPanelMessage) PreferencesMassiveDamagePanel(plugin.initiative.gui.PreferencesMassiveDamagePanel) Initiative(plugin.initiative.gui.Initiative)

Example 3 with RequestAddTabToGMGenMessage

use of gmgen.pluginmgr.messages.RequestAddTabToGMGenMessage in project pcgen by PCGen.

the class PCGTrackerPlugin method start.

/**
	 * Starts the plugin, registering itself with the {@code TabAddMessage}.
	 */
@Override
public void start(PCGenMessageHandler mh) {
    messageHandler = mh;
    theView = new PCGTrackerView();
    theView.getLoadedList().setModel(model);
    initListeners();
    messageHandler.handleMessage(new RequestAddTabToGMGenMessage(this, getLocalizedName(), getView()));
    initMenus();
}
Also used : RequestAddTabToGMGenMessage(gmgen.pluginmgr.messages.RequestAddTabToGMGenMessage) PCGTrackerView(plugin.pcgtracker.gui.PCGTrackerView)

Example 4 with RequestAddTabToGMGenMessage

use of gmgen.pluginmgr.messages.RequestAddTabToGMGenMessage 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)

Example 5 with RequestAddTabToGMGenMessage

use of gmgen.pluginmgr.messages.RequestAddTabToGMGenMessage in project pcgen by PCGen.

the class NotesPlugin method start.

/**
	 * Starts the plugin, registering itself with the {@code TabAddMessage}.
	 */
@Override
public void start(PCGenMessageHandler mh) {
    messageHandler = mh;
    String name = NAME;
    messageHandler.handleMessage(new RequestAddPreferencesPanelMessage(this, name, new PreferencesNotesPanel()));
    theView = new NotesView(getDataDirectory(), this);
    messageHandler.handleMessage(new RequestAddTabToGMGenMessage(this, name, getView()));
    initMenus();
}
Also used : RequestAddTabToGMGenMessage(gmgen.pluginmgr.messages.RequestAddTabToGMGenMessage) PreferencesNotesPanel(plugin.notes.gui.PreferencesNotesPanel) NotesView(plugin.notes.gui.NotesView) RequestAddPreferencesPanelMessage(gmgen.pluginmgr.messages.RequestAddPreferencesPanelMessage)

Aggregations

RequestAddTabToGMGenMessage (gmgen.pluginmgr.messages.RequestAddTabToGMGenMessage)9 RequestAddPreferencesPanelMessage (gmgen.pluginmgr.messages.RequestAddPreferencesPanelMessage)4 InitHolderList (gmgen.plugin.InitHolderList)1 AddMenuItemToGMGenToolsMenuMessage (gmgen.pluginmgr.messages.AddMenuItemToGMGenToolsMenuMessage)1 GMGenBeingClosedMessage (gmgen.pluginmgr.messages.GMGenBeingClosedMessage)1 File (java.io.File)1 NameGenPanel (pcgen.gui2.doomsdaybook.NameGenPanel)1 DiceBagPluginController (plugin.dicebag.gui.DiceBagPluginController)1 EncounterView (plugin.encounter.gui.EncounterView)1 ExperienceAdjusterView (plugin.experience.gui.ExperienceAdjusterView)1 PreferencesExperiencePanel (plugin.experience.gui.PreferencesExperiencePanel)1 Initiative (plugin.initiative.gui.Initiative)1 PreferencesDamagePanel (plugin.initiative.gui.PreferencesDamagePanel)1 PreferencesInitiativePanel (plugin.initiative.gui.PreferencesInitiativePanel)1 PreferencesMassiveDamagePanel (plugin.initiative.gui.PreferencesMassiveDamagePanel)1 PreferencesPerformancePanel (plugin.initiative.gui.PreferencesPerformancePanel)1 NotesView (plugin.notes.gui.NotesView)1 PreferencesNotesPanel (plugin.notes.gui.PreferencesNotesPanel)1 OverPanel (plugin.overland.gui.OverPanel)1 PCGTrackerView (plugin.pcgtracker.gui.PCGTrackerView)1