Interface EditorManager


  • public interface EditorManager
    Manages all editor objects for the VizMap GUI.

    Module: vizmap-gui-api

    To use this in your app, include the following dependency in your POM:

    <dependency>
        <groupId>org.cytoscape</groupId>
        <artifactId>vizmap-gui-api</artifactId>
    </dependency>

    Cytoscape Backwards Compatibility (API Interface): We expect that this interface will be used but not implemented by developers using this interface. As such, we reserve the right to add methods to the interface as part of minor version upgrades. We will not remove methods for any changes other than major version upgrades.
    • Method Detail

      • addValueEditor

        void addValueEditor​(ValueEditor<?> va,
                            Map properties)
        Add value editor OSGi services.
        Parameters:
        va - New value editor to be added.
        properties - OSGi service metadata.
      • removeValueEditor

        void removeValueEditor​(ValueEditor<?> va,
                               Map properties)
        Remove an editor from manager (through OSGi).
        Parameters:
        va - editor to be removed.
        properties - OSGi metadata
      • addVisualPropertyValueEditor

        void addVisualPropertyValueEditor​(VisualPropertyValueEditor<?> va,
                                          Map properties)
        Add value editor--invoked by OSGi when a new bundle exports an instance.
        Parameters:
        va - New value editor to be added.
        properties - OSGi service metadata.
      • removeVisualPropertyValueEditor

        void removeVisualPropertyValueEditor​(VisualPropertyValueEditor<?> va,
                                             Map properties)
        Remove an editor from manager--invoked by OSGi when a bundle that exports an instance is being unloaded.
        Parameters:
        va - editor to be removed.
        properties - OSGi metadata
      • showVisualPropertyValueEditor

        <V> V showVisualPropertyValueEditor​(Component parentComponent,
                                            VisualProperty<V> type,
                                            V initialVal)
                                     throws Exception
        Display value editor to get a new value. This should first search for VisualPropertyValueEditors with matching value types. If none are found, resort to searching for ValueEditors.
        Parameters:
        parentComponent - parent GUI component
        type - Visual Property type to be edited
        initialVal - default value for the editor.
        Returns:
        New value fot the given Visual Property.
        Throws:
        Exception
      • getContinuousEditor

        PropertyEditor getContinuousEditor​(VisualProperty<?> vp)
        Returns the continuous editor for the specified visual property.
        Parameters:
        vp - The visual property.
        Returns:
        the continuous editor for the specified visual property.
      • getCellEditors

        List<PropertyEditor> getCellEditors()
        Returns editors for individual cells in discrete mapping editor.
        Returns:
        all available cell editors.
      • getAttributeSelectors

        Collection<PropertyEditor> getAttributeSelectors()
        Returns set of selector for available attributes (table columns).
        Returns:
        all attribute selectors.
      • getMappingFunctionSelector

        PropertyEditor getMappingFunctionSelector()
        Returns selector for Mapping Type. For now, users can select Discrete, Continuous, and Passthrough from this object.
        Returns:
        mapping type selector.
      • getDefaultComboBoxEditor

        PropertyEditor getDefaultComboBoxEditor​(String editorName)
        Get JComboBox type editor
        Parameters:
        editorName - name (ID) of editor
        Returns:
        combobox editor associated with the name.
      • getDataTableComboBoxEditor

        PropertyEditor getDataTableComboBoxEditor​(Class<? extends CyIdentifiable> targetObjectType)
        Attribute selector for the given table entry type.
        Parameters:
        targetObjectType - node, edge, or network.
        Returns:
        selector
      • getValueEditor

        <V> ValueEditor<V> getValueEditor​(Class<V> dataType)
        Returns value editor for the given data type.
        Parameters:
        dataType - type of data. They are Color, number, Shape, etc.
        Returns:
        Value editor