Cytoscape 3.0.0-alpha8-SNAPSHOT API

org.cytoscape.view.vizmap.gui.editor
Class AbstractVisualPropertyEditor<T>

java.lang.Object
  extended by 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.

Field Summary
protected  TableCellRenderer continuousTableCellRenderer
           
protected  TableCellRenderer discreteTableCellRenderer
           
protected  PropertyEditor propertyEditor
           
protected  Class<T> type
           
protected  Window vpValueEditor
           
 
Constructor Summary
AbstractVisualPropertyEditor(Class<T> type, PropertyEditor propertyEditor, ContinuousEditorType continuousEditorType)
          Creates a new AbstractVisualPropertyEditor object.
 
Method Summary
 ContinuousEditorType getContinuousEditorType()
           
 TableCellRenderer getContinuousTableCellRenderer(PropertyEditor continuousMappingEditor)
          A custom cell renderer for Continuous table cells.
 Icon getDefaultIcon(int width, int height)
          This is for default view editor.
 TableCellRenderer getDiscreteTableCellRenderer()
          A custom cell renderer for Discrete table cells.
 PropertyEditor getPropertyEditor()
          Returns PropertyEditor object for this data type.
 Class<T> getType()
          Returns the type of object managed in the Visual property.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

type

protected final Class<T> type

propertyEditor

protected final PropertyEditor propertyEditor

vpValueEditor

protected Window vpValueEditor

discreteTableCellRenderer

protected TableCellRenderer discreteTableCellRenderer

continuousTableCellRenderer

protected TableCellRenderer continuousTableCellRenderer
Constructor Detail

AbstractVisualPropertyEditor

public AbstractVisualPropertyEditor(Class<T> type,
                                    PropertyEditor propertyEditor,
                                    ContinuousEditorType continuousEditorType)
Creates a new AbstractVisualPropertyEditor object.

Parameters:
type - The type of this AbstractVisualPropertyEditor object.
propertyEditor - the PropertyEditor to construct this with.
Method Detail

getType

public Class<T> getType()
Returns the type of object managed in the Visual property.

Specified by:
getType in interface VisualPropertyEditor<T>
Returns:
the type of object managed in the Visual property.

getPropertyEditor

public PropertyEditor getPropertyEditor()
Returns PropertyEditor object for this data type.

Specified by:
getPropertyEditor in interface VisualPropertyEditor<T>
Returns:
PropertyEditor object for this data type.

getDiscreteTableCellRenderer

public TableCellRenderer getDiscreteTableCellRenderer()
A custom cell renderer for Discrete table cells.

Specified by:
getDiscreteTableCellRenderer in interface VisualPropertyEditor<T>
Returns:
a TableCellRenderer Discrete table cells.

getContinuousTableCellRenderer

public TableCellRenderer getContinuousTableCellRenderer(PropertyEditor continuousMappingEditor)
Description copied from interface: VisualPropertyEditor
A custom cell renderer for Continuous table cells.

Specified by:
getContinuousTableCellRenderer in interface VisualPropertyEditor<T>
Returns:
a TableCellRenderer Continuous table cells.

getContinuousEditorType

public ContinuousEditorType getContinuousEditorType()
Specified by:
getContinuousEditorType in interface VisualPropertyEditor<T>

getDefaultIcon

public Icon getDefaultIcon(int width,
                           int height)
This is for default view editor.

Specified by:
getDefaultIcon in interface VisualPropertyEditor<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.

Cytoscape 3.0.0-alpha8-SNAPSHOT API

Copyright 2011 Cytoscape Consortium. All rights reserved.