cytoscape.editor
Interface GraphicalEntity

All Known Implementing Classes:
BasicCytoShapeEntity

public interface GraphicalEntity

Interface for defining draggable/droppable visual components in the Cytoscape editor framework. The framework provides for dragging and dropping graphical entities from palette onto the canvas. Graphical entities are associated with semantic objects, i.e. nodes and edges, that are created when the graphical entities are dropped onto the canvas.

Author:
Allan Kuchinsky, Agilent Technologies

Method Summary
 java.awt.Image get_image()
          get the image for the icon used on the palette to represent the graphical entity
 java.lang.String getAttributeName()
          returns the name of the attribute associated with the Graphical Entity.
 java.lang.String getAttributeValue()
          returns the value of the attribute associated with the Graphical Entity.
 javax.swing.Icon getIcon()
          get the icon used on the palette to represent the graphical entity
 java.awt.dnd.DragSource getMyDragSource()
          retrieves the source of the drag operation, used when dragging a graphical entity from the palette onto the canvas
 java.lang.String getTitle()
          get the Title of the graphical entity
 void set_image(java.awt.Image _image)
          set the image for the icon used on the palette to represent the graphical entity
 void setAttributeName(java.lang.String attributeName)
          sets the name of the attribute associated with the Graphical Entity.
 void setAttributeValue(java.lang.String attributeValue)
          sets the value of the attribute associated with the Graphical Entity.
 void setIcon(javax.swing.Icon icon)
          set the icon used on the palette to represent the graphical entity
 void setMyDragSource(java.awt.dnd.DragSource myDragSource)
          defines the source of the drag operation, used when dragging a graphical entity from the palette onto the canvas
 void setTitle(java.lang.String title)
          set the Title of the graphical entity
 

Method Detail

getTitle

public java.lang.String getTitle()
get the Title of the graphical entity

Returns:
the Title

setTitle

public void setTitle(java.lang.String title)
set the Title of the graphical entity

Parameters:
title - The title to set.

getMyDragSource

public java.awt.dnd.DragSource getMyDragSource()
retrieves the source of the drag operation, used when dragging a graphical entity from the palette onto the canvas

Returns:
the drag source

setMyDragSource

public void setMyDragSource(java.awt.dnd.DragSource myDragSource)
defines the source of the drag operation, used when dragging a graphical entity from the palette onto the canvas

Parameters:
myDragSource - the drag source

get_image

public java.awt.Image get_image()
get the image for the icon used on the palette to represent the graphical entity

Returns:
the image

set_image

public void set_image(java.awt.Image _image)
set the image for the icon used on the palette to represent the graphical entity

Parameters:
_image - the icon to set

getIcon

public javax.swing.Icon getIcon()
get the icon used on the palette to represent the graphical entity

Returns:
the icon used on the palette to represent the graphical entity

setIcon

public void setIcon(javax.swing.Icon icon)
set the icon used on the palette to represent the graphical entity

Parameters:
icon - the icon to set

getAttributeName

public java.lang.String getAttributeName()
returns the name of the attribute associated with the Graphical Entity. This is used to determine whether a Node or an Edge has been dropped on the canvas. This attribute will also be set for the CyNode or CyEdge created as a result of the drop operation.

Returns:
the attribute name

setAttributeName

public void setAttributeName(java.lang.String attributeName)
sets the name of the attribute associated with the Graphical Entity. This is used to determine whether a Node or an Edge has been dropped on the canvas. This attribute will also be set for the CyNode or CyEdge created as a result of the drop operation.

Parameters:
attributeName - the attribute name to set

getAttributeValue

public java.lang.String getAttributeValue()
returns the value of the attribute associated with the Graphical Entity. This attribute will be set for the CyNode or CyEdge created as a result of the drop operation.

Returns:
the attribute value

setAttributeValue

public void setAttributeValue(java.lang.String attributeValue)
sets the value of the attribute associated with the Graphical Entity. This attribute will be set for the CyNode or CyEdge created as a result of the drop operation.

Parameters:
attributeValue - The attributeValue to set.