Package org.openbp.jaspira.plugin

Examples of org.openbp.jaspira.plugin.PluginMgr


   */
  protected void postInstallApplication()
  {
    super.postInstallApplication();

    PluginMgr pm = PluginMgr.getInstance();

    // Initialize the client environment
    GUIClientModule.getInstance().initialize();

    // This will load the model data.
    ModelConnector.getInstance().initialize(GUIClientModule.getInstance());

    // Set the custom descriptor directory and custom descriptor set name specified by the user
    initCustomDescriptors();

    // Add global plugins
    // This will automatically create the display object plugin
    DisplayObjectPlugin.getInstance();

    // Load all skin data and initialize the icon model accordingly
    SkinMgr.getInstance().load();

    // Add these plugins first, they will create menu items for the global menu
    pm.createInstance(ErrorDialogPlugin.class, this);

    // Try to connect to the server
    // By default, use an anonymous login
    ServerConnection connection = ServerConnection.getInstance();
    connection.setLoginInfo(new ClientLoginInfo("Anonymous", null));
    try
    {
      connection.connect(true);
    }
    catch (OpenBPException e)
    {
      // Show dialog box if the user has not chose to skip it before
      if (! SettingUtil.getBooleanSetting("openbp.cockpit.connectionwarning.hide", false))
      {
        // Hide splash screen.
        if (splashScreen != null)
        {
          splashScreen.setVisible(false);
        }

        int response = JMsgBox.show(null, getPluginResourceCollection().getRequiredString(
          "connectionerror.title"), ResourceCollectionUtil.formatMsg(getPluginResourceCollection(),
          "connectionerror.description", new Object[]
          {
            connection.getConnectionInfo().getRmiServerHost(),
            new Integer(connection.getConnectionInfo().getRmiServerPort()), e.getMessage()
          }), JMsgBox.ICON_INFO | JMsgBox.TYPE_OK | JMsgBox.DEFAULT_OK | JMsgBox.TYPE_DO_NOT_SHOW_AGAIN);

        if ((response & JMsgBox.TYPE_DO_NOT_SHOW_AGAIN) != 0)
        {
          // Skip this dialog the next time
          SettingUtil.setBooleanSetting("openbp.cockpit.connectionwarning.hide", true);
          SettingUtil.saveSettings(null);
        }
      }
    }

    // After adding the first page, we have a component we need for the glass pane access
    // for the wait cursor, so turn it on now
    ApplicationUtil.waitCursorOn();

    try
    {
      // Add the standard pages
      addPage((JaspiraPage) pm.createInstance(ModelerPage.class, this));

      pm.createInstance(GeneratorPlugin.class, this);

      // pm.createInstance (DataTypeSearchPlugin.class, this);
      // pm.createInstance(EclipseEditorPlugin.class, this);

      pm.createInstance(ModelerOptionPlugin.class, this);
      pm.createInstance(SkinPlugin.class, this);

      pm.createInstance(ItemOpenDispatcherPlugin.class, this);
      pm.createInstance(CommandLinePlugin.class, this);
      pm.createInstance(ExternalAssociationPlugin.class, this);
      pm.createInstance(AssociationPlugin.class, this);

      // Load global custom plugins
      PluginMgr.getInstance().loadCustomPlugins("openbp.cockpit.plugins.global");

      // Load custom plugins from the 'plugin' directory.
View Full Code Here


  public void layoutDefaultContent()
  {
    historyList = new ArrayList();
    historyIndex = -1;

    PluginMgr pm = PluginMgr.getInstance();

    // Create the non-visible plugins
    pm.createInstance(DebuggerPlugin.class, this);
    pm.createInstance(ModelerUndoPlugin.class, this);

    JComponent leftArea = createLeftArea();
    JComponent rightArea = createRightArea();
    JComponent bottomArea = createBottomArea();
View Full Code Here

    PluginMgr.getInstance().loadCustomPlugins("openbp.cockpit.plugins.modelerpage");
  }

  private JComponent createLeftArea()
  {
    PluginMgr pm = PluginMgr.getInstance();

    // Create the toolbox container
    TabbedPluginContainer toolContainer = new TabbedPluginContainer();
    toolContainer.addPlugin(pm.createVisibleInstance(StandardToolBoxPlugin.class, this), true);

    // toolContainer.addPlugin (pm.createVisibleInstance (UserToolBoxPlugin.class, this), false);

    toolContainer.addPlugin(pm.createVisibleInstance(MiniViewPlugin.class, this), false);

    // Create the item browser container
    TabbedPluginContainer itemContainer = new TabbedPluginContainer();
    itemContainer.addPlugin(pm.createVisibleInstance(ItemBrowserPlugin.class, this));

    TabbedPluginContainer infoContainer = new TabbedPluginContainer();
    infoContainer.addPlugin(pm.createVisibleInstance(InfoPanelPlugin.class, this));

    // Hor. divider for toolbox and item browser
    PluginDivider divider = new PluginDivider(JSplitPane.VERTICAL_SPLIT);
    divider.addContainer(toolContainer);
    divider.addContainer(itemContainer);
View Full Code Here

    return modelerContainer;
  }

  private JComponent createBottomArea()
  {
    PluginMgr pm = PluginMgr.getInstance();

    // The content container consists of...

    // ...the property browser and the browser (left)
    TabbedPluginContainer leftContainer = new TabbedPluginContainer();
    leftContainer.addPlugin(pm.createVisibleInstance(PropertyBrowserPlugin.class, this), true);

    // ...and the process variables, color chooser, context inspector and the console (right)
    ColorChooserPlugin colorChooser = (ColorChooserPlugin) pm.createInstance(ColorChooserPlugin.class, this);
    colorChooser.setHelpText(getPluginResourceCollection().getOptionalString("chooserhelptext"));

    TabbedPluginContainer rightContainer = new TabbedPluginContainer();
    rightContainer.addPlugin(pm.createVisibleInstance(VariablesPlugin.class, this), true);
    rightContainer.addPlugin(colorChooser, false);
    rightContainer.addPlugin(pm.createVisibleInstance(InspectorPlugin.class, this), false);
    rightContainer.addPlugin(pm.createVisibleInstance(StackTracePlugin.class, this), false);

    // Divider for content area (modeler, toolbox, item browser)
    PluginDivider divider = new PluginDivider();
    divider.addContainer(leftContainer);
    divider.addContainer(rightContainer);
View Full Code Here

  public void layoutDefaultContent()
  {
    // We don't register the page as plugin, so use the application as parent plugin (the key manager requires a parent)
    this.setParentPlugin(ApplicationBase.getInstance());

    PluginMgr pm = PluginMgr.getInstance();
    propertyBrowser = (PropertyBrowserPlugin) pm.createInstance(PropertyBrowserPlugin.class, this);
    itemBrowser = (NodeEditorItemBrowserPlugin) pm.createInstance(NodeEditorItemBrowserPlugin.class, this);
    nodeEditor = (NodeItemEditorPlugin) pm.createInstance(NodeItemEditorPlugin.class, this);
    socketToolBox = (SocketToolBoxPlugin) pm.createInstance(SocketToolBoxPlugin.class, this);
    colorChooser = (ColorChooserPlugin) pm.createInstance(ColorChooserPlugin.class, this);
    colorChooser.setHelpText(getPluginResourceCollection().getOptionalString("chooserhelptext"));

    PluginDivider main = new PluginDivider(PluginDivider.HORIZONTAL_SPLIT);
    PluginDivider left = new PluginDivider(PluginDivider.VERTICAL_SPLIT);
    PluginDivider right = new PluginDivider(PluginDivider.VERTICAL_SPLIT);
View Full Code Here

   */
  protected void pluginUninstalled()
  {
    super.pluginUninstalled();

    PluginMgr pm = PluginMgr.getInstance();
    pm.removeInstance(propertyBrowser);
    pm.removeInstance(itemBrowser);
    pm.removeInstance(nodeEditor);
    pm.removeInstance(socketToolBox);
    pm.removeInstance(colorChooser);

    // Unregister the page from the key manager
    KeyMgr.getInstance().uninstall(getContentPane());
  }
View Full Code Here

TOP

Related Classes of org.openbp.jaspira.plugin.PluginMgr

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.