Class AbstractVisualPropertyEditor<T>
java.lang.Object
org.cytoscape.view.vizmap.gui.editor.AbstractVisualPropertyEditor<T>
- Type Parameters:
T
- The generic type of this AbstractVisualPropertyEditor.
- All Implemented Interfaces:
VisualPropertyEditor<T>
public abstract class AbstractVisualPropertyEditor<T>
extends Object
implements VisualPropertyEditor<T>
Abstract implementation of Visual Property Editor.
All editors should extend this class.
Cytoscape Backwards Compatibility (Abstract Class): This class is abstract and meant to be extended by users. This means that we may add methods for minor version updates. Methods will only be removed for major version updates.
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>
-
Field Summary
Modifier and TypeFieldDescriptionprotected TableCellRenderer
The cell renderer for discrete mappings.protected final PropertyEditor
The property editor. -
Constructor Summary
ConstructorDescriptionAbstractVisualPropertyEditor
(Class<T> type, PropertyEditor propertyEditor, ContinuousEditorType continuousEditorType, ContinuousMappingCellRendererFactory cellRendererFactory) Creates a new AbstractVisualPropertyEditor object. -
Method Summary
Modifier and TypeMethodDescriptionReturns type of Continuous Editor.getContinuousTableCellRenderer
(ContinuousMappingEditor<? extends Number, T> continuousMappingEditor) A custom cell renderer for Continuous table cells.getDefaultIcon
(int width, int height) This is for default view editor.A custom cell renderer for Discrete table cells.ReturnsPropertyEditor
object for this data type.getType()
Returns the type of object managed in the Visual property.
-
Field Details
-
propertyEditor
The property editor. -
discreteTableCellRenderer
The cell renderer for discrete mappings.
-
-
Constructor Details
-
AbstractVisualPropertyEditor
public AbstractVisualPropertyEditor(Class<T> type, PropertyEditor propertyEditor, ContinuousEditorType continuousEditorType, ContinuousMappingCellRendererFactory cellRendererFactory) Creates a new AbstractVisualPropertyEditor object.- Parameters:
type
- The type of this property editor.propertyEditor
- thePropertyEditor
to construct this with.continuousEditorType
- theContinuousEditorType
to construct this with.
-
-
Method Details
-
getType
Description copied from interface:VisualPropertyEditor
Returns the type of object managed in the Visual property.- Specified by:
getType
in interfaceVisualPropertyEditor<T>
- Returns:
- the type of object managed in the Visual property.
-
getPropertyEditor
Description copied from interface:VisualPropertyEditor
ReturnsPropertyEditor
object for this data type.- Specified by:
getPropertyEditor
in interfaceVisualPropertyEditor<T>
- Returns:
PropertyEditor
object for this data type.
-
getDiscreteTableCellRenderer
Description copied from interface:VisualPropertyEditor
A custom cell renderer for Discrete table cells.- Specified by:
getDiscreteTableCellRenderer
in interfaceVisualPropertyEditor<T>
- Returns:
- a TableCellRenderer Discrete table cells.
-
getContinuousTableCellRenderer
public TableCellRenderer getContinuousTableCellRenderer(ContinuousMappingEditor<? extends Number, T> continuousMappingEditor) Description copied from interface:VisualPropertyEditor
A custom cell renderer for Continuous table cells.- Specified by:
getContinuousTableCellRenderer
in interfaceVisualPropertyEditor<T>
- Returns:
- a TableCellRenderer Continuous table cells.
-
getContinuousEditorType
Description copied from interface:VisualPropertyEditor
Returns type of Continuous Editor.- Specified by:
getContinuousEditorType
in interfaceVisualPropertyEditor<T>
- Returns:
- type of
ContinuousMappingEditor
-
getDefaultIcon
Description copied from interface:VisualPropertyEditor
This is for default view editor.- Specified by:
getDefaultIcon
in interfaceVisualPropertyEditor<T>
- Parameters:
width
- The width of the desired Icon.height
- The height of the desired Icon.- Returns:
- An icon of the specified width and height.
-