Ejemplo n.º 1
0
 private DefaultMutableTreeNode createNode(
     PropertiesProvider funcClass, PropertySheetPanel propertiesPanel) {
   PluginDescription pluginAnnotation =
       funcClass.getClass().getAnnotation(PluginDescription.class);
   String name, icon;
   if (pluginAnnotation == null) {
     name = funcClass.getPropertiesDialogTitle();
     if (name == null || name.isEmpty()) name = funcClass.getClass().getSimpleName();
     icon = "";
   } else {
     name = pluginAnnotation.name();
     if (name == null || name.length() == 0) {
       name = funcClass.getPropertiesDialogTitle();
       if (name == null || name.isEmpty()) name = funcClass.getClass().getSimpleName();
       char firstLetter = Character.toUpperCase(name.charAt(0));
       name = firstLetter + name.substring(1);
     }
     icon = pluginAnnotation.icon();
   }
   ClassPropertiesInfo classInfo =
       new ClassPropertiesInfo(funcClass, null, name, propertiesPanel, icon);
   return new DefaultMutableTreeNode(classInfo);
 }