Package org.pentaho.reporting.tools.configeditor.model

Examples of org.pentaho.reporting.tools.configeditor.model.ClassConfigDescriptionEntry


        final EnumConfigDescriptionEntry entry = (EnumConfigDescriptionEntry) keyNames[i];
        editor = new EnumKeyEditor(getConfig(), entry, displayName);
      }
      else if (keyNames[i] instanceof ClassConfigDescriptionEntry)
      {
        final ClassConfigDescriptionEntry entry = (ClassConfigDescriptionEntry) keyNames[i];
        editor = new ClassKeyEditor(getConfig(), entry, displayName);
      }
      else
      {
        editor = new TextKeyEditor(getConfig(), keyNames[i], displayName);
View Full Code Here


      globalField.setSelected(selectedEntry.isGlobal());
      hiddenField.setSelected(selectedEntry.isHidden());
      descriptionField.setText(selectedEntry.getDescription());
      if (selectedEntry instanceof ClassConfigDescriptionEntry)
      {
        final ClassConfigDescriptionEntry ce = (ClassConfigDescriptionEntry) selectedEntry;
        setEntryType(ConfigDescriptionEditor.TYPE_CLASS);
        if (ce.getBaseClass() != null)
        {
          baseClassField.setText(ce.getBaseClass().getName());
        }
      }
      else if (selectedEntry instanceof EnumConfigDescriptionEntry)
      {
        final EnumConfigDescriptionEntry en = (EnumConfigDescriptionEntry) selectedEntry;
View Full Code Here

    final ConfigDescriptionEntry entry;
    switch (getEntryType())
    {
      case ConfigDescriptionEditor.TYPE_CLASS:
      {
        final ClassConfigDescriptionEntry ce = new ClassConfigDescriptionEntry(keyNameField.getText());
        ce.setDescription(descriptionField.getText());
        ce.setGlobal(globalField.isSelected());
        ce.setHidden(hiddenField.isSelected());
        try
        {
          final String className = baseClassField.getText();
          if (className == null)
          {
            ce.setBaseClass(Object.class);
          }
          else
          {
            final ClassLoader classLoader = ObjectUtilities.getClassLoader(getClass());
            final Class c = Class.forName(className, false, classLoader);
            ce.setBaseClass(c);
          }
        }
        catch (Exception e)
        {
          // invalid
          ConfigDescriptionEditor.logger.debug("Class is invalid; defaulting to Object.class"); //$NON-NLS-1$
          ce.setBaseClass(Object.class);
        }
        entry = ce;
        break;
      }
      case ConfigDescriptionEditor.TYPE_ENUM:
View Full Code Here

      globalField.setSelected(selectedEntry.isGlobal());
      hiddenField.setSelected(selectedEntry.isHidden());
      descriptionField.setText(selectedEntry.getDescription());
      if (selectedEntry instanceof ClassConfigDescriptionEntry)
      {
        final ClassConfigDescriptionEntry ce = (ClassConfigDescriptionEntry) selectedEntry;
        setEntryType(ConfigDescriptionEditor.TYPE_CLASS);
        if (ce.getBaseClass() != null)
        {
          baseClassField.setText(ce.getBaseClass().getName());
        }
      }
      else if (selectedEntry instanceof EnumConfigDescriptionEntry)
      {
        final EnumConfigDescriptionEntry en = (EnumConfigDescriptionEntry) selectedEntry;
View Full Code Here

        final EnumConfigDescriptionEntry entry = (EnumConfigDescriptionEntry) keyNames[i];
        editor = new EnumKeyEditor(getConfig(), entry, displayName);
      }
      else if (keyNames[i] instanceof ClassConfigDescriptionEntry)
      {
        final ClassConfigDescriptionEntry entry = (ClassConfigDescriptionEntry) keyNames[i];
        editor = new ClassKeyEditor(getConfig(), entry, displayName);
      }
      else
      {
        editor = new TextKeyEditor(getConfig(), keyNames[i], displayName);
View Full Code Here

    final ConfigDescriptionEntry entry;
    switch (getEntryType())
    {
      case ConfigDescriptionEditor.TYPE_CLASS:
      {
        final ClassConfigDescriptionEntry ce = new ClassConfigDescriptionEntry(keyNameField.getText());
        ce.setDescription(descriptionField.getText());
        ce.setGlobal(globalField.isSelected());
        ce.setHidden(hiddenField.isSelected());
        try
        {
          final String className = baseClassField.getText();
          if (className == null)
          {
            ce.setBaseClass(Object.class);
          }
          else
          {
            final ClassLoader classLoader = ObjectUtilities.getClassLoader(getClass());
            final Class c = Class.forName(className, false, classLoader);
            ce.setBaseClass(c);
          }
        }
        catch (Exception e)
        {
          // invalid
          ConfigDescriptionEditor.logger.debug("Class is invalid; defaulting to Object.class"); //$NON-NLS-1$
          ce.setBaseClass(Object.class);
        }
        entry = ce;
        break;
      }
      case ConfigDescriptionEditor.TYPE_ENUM:
View Full Code Here

TOP

Related Classes of org.pentaho.reporting.tools.configeditor.model.ClassConfigDescriptionEntry

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.