Package org.pdfsam.guiclient.plugins.interfaces

Examples of org.pdfsam.guiclient.plugins.interfaces.AbstractPlugablePanel


     
      for(String className : classList){ 
        try{
          Class<?> currentClass = urlClassLoader.loadClass(className);
          if((currentClass.getSuperclass().isAssignableFrom(PLUGIN_SUPER_CLASS))){
            AbstractPlugablePanel instance = (AbstractPlugablePanel) currentClass.newInstance();
            PluginDataModel pluginDataModel = new PluginDataModel(instance.getPluginName(), instance.getVersion(), instance.getPluginAuthor(), className);
            retMap.put(pluginDataModel, instance);
            log.info(pluginDataModel.getName()+GettextResource.gettext(Configuration.getInstance().getI18nResourceBundle()," plugin loaded."));
          }else{
            log.error(GettextResource.gettext(Configuration.getInstance().getI18nResourceBundle(),"Unable to load a plugin that is not JPanel subclass."));
          }
View Full Code Here


    DefaultMutableTreeNode node = container.getTreePanel().getSelectedNode();
    if (node != null && node.isLeaf()) {
      Object selectedObject = node.getUserObject();
      if(selectedObject instanceof PluginDataModel){
        PluginDataModel selectedPlug = (PluginDataModel)selectedObject;
        AbstractPlugablePanel panel = container.getPluginsMap().get(selectedPlug);
        statusPanel.setText(selectedPlug.getName());
        statusPanel.setIcon(panel.getIcon());
        CardLayout cl = (CardLayout)(plugsPanel.getLayout());
        cl.show(plugsPanel, selectedPlug.getName());    
        container.setFocusTraversalPolicy(panel.getFocusPolicy());
        container.setMainPanelPreferredSize(panel.getPreferredSize());
      }
    }
  }
View Full Code Here

TOP

Related Classes of org.pdfsam.guiclient.plugins.interfaces.AbstractPlugablePanel

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.