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.
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addValueEditor(ValueEditor<?> va, Map properties)
Add value editor OSGi services.void
addVisualPropertyValueEditor(VisualPropertyValueEditor<?> va, Map properties)
Add value editor--invoked by OSGi when a new bundle exports an instance.Returns set of selector for available attributes (table columns).Returns editors for individual cells in discrete mapping editor.getContinuousEditor(VisualProperty<?> vp)
Returns the continuous editor for the specified visual property.getDataTableComboBoxEditor(Class<? extends CyIdentifiable> targetObjectType)
Attribute selector for the given table entry type.getDefaultComboBoxEditor(String editorName)
GetJComboBox
type editorReturns selector for Mapping Type.<V> ValueEditor<V>
getValueEditor(Class<V> dataType)
Returns value editor for the given data type.<V> VisualPropertyEditor<V>
Returns theVisualPropertyEditor
for the givenVisualProperty
.void
removeValueEditor(ValueEditor<?> va, Map properties)
Remove an editor from manager (through OSGi).void
removeVisualPropertyValueEditor(VisualPropertyValueEditor<?> va, Map properties)
Remove an editor from manager--invoked by OSGi when a bundle that exports an instance is being unloaded.<V> V
showVisualPropertyValueEditor(Component parentComponent, VisualProperty<V> type, V initialVal)
Display value editor to get a new value.
-
Field Details
-
EDITOR_WINDOW_OPENED
Editor window state- See Also:
- Constant Field Values
-
EDITOR_WINDOW_CLOSED
Tell vizMapper main which editor is disabled/enabled.- See Also:
- Constant Field Values
-
-
Method Details
-
addValueEditor
Add value editor OSGi services.- Parameters:
va
- New value editor to be added.properties
- OSGi service metadata.
-
removeValueEditor
Remove an editor from manager (through OSGi).- Parameters:
va
- editor to be removed.properties
- OSGi metadata
-
addVisualPropertyValueEditor
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
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 ExceptionDisplay value editor to get a new value. This should first search forVisualPropertyValueEditor
s with matching value types. If none are found, resort to searching forValueEditor
s.- 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
Returns the continuous editor for the specified visual property.- Parameters:
vp
- The visual property.- Returns:
- the continuous editor for the specified visual property.
-
getVisualPropertyEditor
Returns theVisualPropertyEditor
for the givenVisualProperty
.- Type Parameters:
V
- the generic type of the VisualProperty.- Parameters:
vp
- theVisualProperty
to get the VisualPropertyEditor of.- Returns:
- the
VisualPropertyEditor
for 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
GetJComboBox
type editor- Parameters:
editorName
- name (ID) of editor- Returns:
- combobox editor associated with the name.
-
getDataTableComboBoxEditor
Attribute selector for the given table entry type.- Parameters:
targetObjectType
- node, edge, or network.- Returns:
- selector
-
getValueEditor
Returns value editor for the given data type.- Parameters:
dataType
- type of data. They are Color, number, Shape, etc.- Returns:
- Value editor
-