Interface EditorManager
-
public interface EditorManagerManages all editor objects for the VizMap GUI.Module:
vizmap-gui-apiTo 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.
-
-
Field Summary
Fields Modifier and Type Field Description static StringEDITOR_WINDOW_CLOSEDTell vizMapper main which editor is disabled/enabled.static StringEDITOR_WINDOW_OPENEDEditor window state
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddValueEditor(ValueEditor<?> va, Map properties)Add value editor OSGi services.voidaddVisualPropertyValueEditor(VisualPropertyValueEditor<?> va, Map properties)Add value editor--invoked by OSGi when a new bundle exports an instance.Collection<PropertyEditor>getAttributeSelectors()Returns set of selector for available attributes (table columns).List<PropertyEditor>getCellEditors()Returns editors for individual cells in discrete mapping editor.PropertyEditorgetContinuousEditor(VisualProperty<?> vp)Returns the continuous editor for the specified visual property.PropertyEditorgetDataTableComboBoxEditor(Class<? extends CyIdentifiable> targetObjectType)Attribute selector for the given table entry type.PropertyEditorgetDefaultComboBoxEditor(String editorName)GetJComboBoxtype editorPropertyEditorgetMappingFunctionSelector()Returns selector for Mapping Type.<V> ValueEditor<V>getValueEditor(Class<V> dataType)Returns value editor for the given data type.<V> VisualPropertyEditor<V>getVisualPropertyEditor(VisualProperty<V> vp)Returns theVisualPropertyEditorfor the givenVisualProperty.voidremoveValueEditor(ValueEditor<?> va, Map properties)Remove an editor from manager (through OSGi).voidremoveVisualPropertyValueEditor(VisualPropertyValueEditor<?> va, Map properties)Remove an editor from manager--invoked by OSGi when a bundle that exports an instance is being unloaded.<V> VshowVisualPropertyValueEditor(Component parentComponent, VisualProperty<V> type, V initialVal)Display value editor to get a new value.
-
-
-
Field Detail
-
EDITOR_WINDOW_OPENED
static final String EDITOR_WINDOW_OPENED
Editor window state- See Also:
- Constant Field Values
-
EDITOR_WINDOW_CLOSED
static final String EDITOR_WINDOW_CLOSED
Tell vizMapper main which editor is disabled/enabled.- See Also:
- Constant Field Values
-
-
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 forVisualPropertyValueEditors with matching value types. If none are found, resort to searching forValueEditors.- Parameters:
parentComponent- parent GUI componenttype- Visual Property type to be editedinitialVal- 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.
-
getVisualPropertyEditor
<V> VisualPropertyEditor<V> getVisualPropertyEditor(VisualProperty<V> vp)
Returns theVisualPropertyEditorfor the givenVisualProperty.- Type Parameters:
V- the generic type of the VisualProperty.- Parameters:
vp- theVisualPropertyto get the VisualPropertyEditor of.- Returns:
- the
VisualPropertyEditorfor the givenVisualProperty.
-
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)
GetJComboBoxtype 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
-
-