Codota Logo
GenericObjectEditor.getClassesFromProperties
Code IndexAdd Codota to your IDE (free)

How to use
getClassesFromProperties
method
in
weka.gui.GenericObjectEditor

Best Java code snippets using weka.gui.GenericObjectEditor.getClassesFromProperties (Showing top 12 results out of 315)

  • Common ways to obtain GenericObjectEditor
private void myMethod () {
GenericObjectEditor g =
  • Codota Iconnew GenericObjectEditor(true)
  • Smart code suggestions by Codota
}
origin: Waikato/weka-trunk

/**
 * Sets the class of values that can be edited.
 * 
 * @param type a value of type 'Class'
 */
public void setClassType(Class<?> type) {
 m_ClassType = type;
 m_ObjectNames = getClassesFromProperties();
}
origin: nz.ac.waikato.cms.weka/weka-stable

/**
 * Sets the class of values that can be edited.
 * 
 * @param type a value of type 'Class'
 */
public void setClassType(Class<?> type) {
 m_ClassType = type;
 m_ObjectNames = getClassesFromProperties();
}
origin: net.sf.meka/meka

/**
 * Called when the class of object being edited changes.
 *
 * @return the hashtable containing the HierarchyPropertyParsers for the root
 *         elements
 */
protected Hashtable<String, HierarchyPropertyParser> getClassesFromProperties() {
  String className = m_ClassType.getName();
  if (className.startsWith("meka.")) {
    Hashtable<String, HierarchyPropertyParser> hpps = new Hashtable<String, HierarchyPropertyParser>();
    Hashtable<String,String> typeOptions = sortClassesByRoot(EDITOR_PROPERTIES.getProperty(className));
    try {
      Enumeration<String> enm = typeOptions.keys();
      while (enm.hasMoreElements()) {
        String root = enm.nextElement();
        String typeOption = typeOptions.get(root);
        HierarchyPropertyParser hpp = new HierarchyPropertyParser();
        hpp.build(typeOption, ", ");
        hpps.put(root, hpp);
      }
    } catch (Exception ex) {
      Logger.log(weka.core.logging.Logger.Level.WARNING, "Invalid property: "
          + typeOptions);
    }
    if (DEBUG)
      System.out.println("Meka classes: " + hpps);
    return hpps;
  }
  return super.getClassesFromProperties();
}
origin: Waikato/meka

/**
 * Called when the class of object being edited changes.
 *
 * @return the hashtable containing the HierarchyPropertyParsers for the root
 *         elements
 */
protected Hashtable<String, HierarchyPropertyParser> getClassesFromProperties() {
  String className = m_ClassType.getName();
  if (className.startsWith("meka.")) {
    Hashtable<String, HierarchyPropertyParser> hpps = new Hashtable<String, HierarchyPropertyParser>();
    Hashtable<String,String> typeOptions = sortClassesByRoot(EDITOR_PROPERTIES.getProperty(className));
    try {
      Enumeration<String> enm = typeOptions.keys();
      while (enm.hasMoreElements()) {
        String root = enm.nextElement();
        String typeOption = typeOptions.get(root);
        HierarchyPropertyParser hpp = new HierarchyPropertyParser();
        hpp.build(typeOption, ", ");
        hpps.put(root, hpp);
      }
    } catch (Exception ex) {
      Logger.log(weka.core.logging.Logger.Level.WARNING, "Invalid property: "
          + typeOptions);
    }
    if (DEBUG)
      System.out.println("Meka classes: " + hpps);
    return hpps;
  }
  return super.getClassesFromProperties();
}
origin: nz.ac.waikato.cms.weka/weka-stable

/**
 * Updates the list of selectable object names, adding any new names to the
 * list.
 */
protected void updateObjectNames() {
 if (m_ObjectNames == null) {
  m_ObjectNames = getClassesFromProperties();
 }
 if (m_Object != null) {
  String className = m_Object.getClass().getName();
  String root = getRootFromClass(className,
   new HierarchyPropertyParser().getSeperator());
  HierarchyPropertyParser hpp = m_ObjectNames.get(root);
  if (hpp != null) {
   if (!hpp.contains(className)) {
    hpp.add(className);
   }
  }
 }
}
origin: Waikato/weka-trunk

/**
 * Updates the list of selectable object names, adding any new names to the
 * list.
 */
protected void updateObjectNames() {
 if (m_ObjectNames == null) {
  m_ObjectNames = getClassesFromProperties();
 }
 if (m_Object != null) {
  String className = m_Object.getClass().getName();
  String root = getRootFromClass(className,
   new HierarchyPropertyParser().getSeperator());
  HierarchyPropertyParser hpp = m_ObjectNames.get(root);
  if (hpp != null) {
   if (!hpp.contains(className)) {
    hpp.add(className);
   }
  }
 }
}
origin: Waikato/weka-trunk

m_ObjectNames = getClassesFromProperties();
if (m_Object != null) {
 updateObjectNames();
origin: nz.ac.waikato.cms.weka/weka-stable

m_ObjectNames = getClassesFromProperties();
if (m_Object != null) {
 updateObjectNames();
origin: Waikato/weka-trunk

Hashtable<String, HierarchyPropertyParser> hpps = getClassesFromProperties();
HierarchyPropertyParser hpp = null;
Enumeration<HierarchyPropertyParser> enm = hpps.elements();
origin: nz.ac.waikato.cms.weka/weka-stable

Hashtable<String, HierarchyPropertyParser> hpps = getClassesFromProperties();
HierarchyPropertyParser hpp = null;
Enumeration<HierarchyPropertyParser> enm = hpps.elements();
origin: nz.ac.waikato.cms.weka/weka-stable

 @Override
 public void actionPerformed(ActionEvent e) {
  m_ChildPropertySheet.closingCancel();
  m_CancelWasPressed = true;
  if (m_Backup != null) {
   m_Object = copyObject(m_Backup);
   // To fire property change
   m_Support.firePropertyChange("", null, null);
   m_ObjectNames = getClassesFromProperties();
   updateObjectNames();
   updateChildPropertySheet();
  }
  if ((getTopLevelAncestor() != null)
   && (getTopLevelAncestor() instanceof Window)) {
   Window w = (Window) getTopLevelAncestor();
   w.dispose();
  }
 }
});
origin: Waikato/weka-trunk

 @Override
 public void actionPerformed(ActionEvent e) {
  m_ChildPropertySheet.closingCancel();
  m_CancelWasPressed = true;
  if (m_Backup != null) {
   m_Object = copyObject(m_Backup);
   // To fire property change
   m_Support.firePropertyChange("", null, null);
   m_ObjectNames = getClassesFromProperties();
   updateObjectNames();
   updateChildPropertySheet();
  }
  if ((getTopLevelAncestor() != null)
   && (getTopLevelAncestor() instanceof Window)) {
   Window w = (Window) getTopLevelAncestor();
   w.dispose();
  }
 }
});
weka.guiGenericObjectEditorgetClassesFromProperties

Javadoc

Called when the class of object being edited changes.

Popular methods of GenericObjectEditor

  • <init>
    Constructor that allows specifying whether it is possible to change the class within the editor dial
  • determineClasses
  • getValue
    Gets the current Object.
  • setClassType
    Sets the class of values that can be edited.
  • setValue
    Sets the current Object. If the Object is in the Object chooser, this becomes the selected item (and
  • addPropertyChangeListener
    Adds a PropertyChangeListener who will be notified of value changes.
  • getChooseClassPopupMenu
    Returns a popup menu that allows the user to change the class of object.
  • getCustomEditor
    Returns the array editing component.
  • setEnabled
    Sets whether the editor is "enabled", meaning that the current values will be painted.
  • addChildrenToTree
    Recursively builds a JTree from an object heirarchy. Also updates m_treeNodeOfCurrentObject if the c
  • classSelected
    Called when the user selects an class type to change to.
  • createChooseClassButton
    Creates a button that when clicked will enable the user to change the class of the object being edit
  • classSelected,
  • createChooseClassButton,
  • createTree,
  • getBackup,
  • getCapabilitiesFilter,
  • getClassnameFromPath,
  • getHistory,
  • getRootFromClass,
  • makeCopy

Popular in Java

  • Start an intent from android
  • compareTo (BigDecimal)
  • requestLocationUpdates (LocationManager)
  • getContentResolver (Context)
  • Graphics2D (java.awt)
    This Graphics2D class extends the Graphics class to provide more sophisticated control overgraphics
  • String (java.lang)
  • HttpURLConnection (java.net)
    An URLConnection for HTTP (RFC 2616 [http://tools.ietf.org/html/rfc2616]) used to send and receive d
  • Proxy (java.net)
    This class represents proxy server settings. A created instance of Proxy stores a type and an addres
  • GregorianCalendar (java.util)
    GregorianCalendar is a concrete subclass of Calendarand provides the standard calendar used by most
  • IsNull (org.hamcrest.core)
    Is the value null?
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now