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.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 (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.
-
-
Field Summary
Fields Modifier and Type Field Description protected TableCellRendererdiscreteTableCellRendererThe cell renderer for discrete mappings.protected PropertyEditorpropertyEditorThe property editor.
-
Constructor Summary
Constructors Constructor Description AbstractVisualPropertyEditor(Class<T> type, PropertyEditor propertyEditor, ContinuousEditorType continuousEditorType, ContinuousMappingCellRendererFactory cellRendererFactory)Creates a new AbstractVisualPropertyEditor object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ContinuousEditorTypegetContinuousEditorType()Returns type of Continuous Editor.TableCellRenderergetContinuousTableCellRenderer(ContinuousMappingEditor<? extends Number,T> continuousMappingEditor)A custom cell renderer for Continuous table cells.IcongetDefaultIcon(int width, int height)This is for default view editor.TableCellRenderergetDiscreteTableCellRenderer()A custom cell renderer for Discrete table cells.PropertyEditorgetPropertyEditor()ReturnsPropertyEditorobject for this data type.Class<T>getType()Returns the type of object managed in the Visual property.
-
-
-
Field Detail
-
propertyEditor
protected final PropertyEditor propertyEditor
The property editor.
-
discreteTableCellRenderer
protected TableCellRenderer discreteTableCellRenderer
The cell renderer for discrete mappings.
-
-
Constructor Detail
-
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- thePropertyEditorto construct this with.continuousEditorType- theContinuousEditorTypeto construct this with.
-
-
Method Detail
-
getType
public Class<T> getType()
Description copied from interface:VisualPropertyEditorReturns the type of object managed in the Visual property.- Specified by:
getTypein interfaceVisualPropertyEditor<T>- Returns:
- the type of object managed in the Visual property.
-
getPropertyEditor
public PropertyEditor getPropertyEditor()
Description copied from interface:VisualPropertyEditorReturnsPropertyEditorobject for this data type.- Specified by:
getPropertyEditorin interfaceVisualPropertyEditor<T>- Returns:
PropertyEditorobject for this data type.
-
getDiscreteTableCellRenderer
public TableCellRenderer getDiscreteTableCellRenderer()
Description copied from interface:VisualPropertyEditorA custom cell renderer for Discrete table cells.- Specified by:
getDiscreteTableCellRendererin interfaceVisualPropertyEditor<T>- Returns:
- a TableCellRenderer Discrete table cells.
-
getContinuousTableCellRenderer
public TableCellRenderer getContinuousTableCellRenderer(ContinuousMappingEditor<? extends Number,T> continuousMappingEditor)
Description copied from interface:VisualPropertyEditorA custom cell renderer for Continuous table cells.- Specified by:
getContinuousTableCellRendererin interfaceVisualPropertyEditor<T>- Returns:
- a TableCellRenderer Continuous table cells.
-
getContinuousEditorType
public ContinuousEditorType getContinuousEditorType()
Description copied from interface:VisualPropertyEditorReturns type of Continuous Editor.- Specified by:
getContinuousEditorTypein interfaceVisualPropertyEditor<T>- Returns:
- type of
ContinuousMappingEditor
-
getDefaultIcon
public Icon getDefaultIcon(int width, int height)
Description copied from interface:VisualPropertyEditorThis is for default view editor.- Specified by:
getDefaultIconin 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.
-
-