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
Fields Modifier and Type Field Description static String
EDITOR_WINDOW_CLOSED
Tell vizMapper main which editor is disabled/enabled.static String
EDITOR_WINDOW_OPENED
Editor window state
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
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.Collection<PropertyEditor>
getAttributeSelectors()
Returns set of selector for available attributes (table columns).List<PropertyEditor>
getCellEditors()
Returns editors for individual cells in discrete mapping editor.PropertyEditor
getContinuousEditor(VisualProperty<?> vp)
Returns the continuous editor for the specified visual property.PropertyEditor
getDataTableComboBoxEditor(Class<? extends CyIdentifiable> targetObjectType)
Attribute selector for the given table entry type.PropertyEditor
getDefaultComboBoxEditor(String editorName)
GetJComboBox
type editorPropertyEditor
getMappingFunctionSelector()
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 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 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 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
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 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
PropertyEditor getDefaultComboBoxEditor(String editorName)
GetJComboBox
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
-
-