APStudio.models
Class ClassGraphModel

java.lang.Object
  |
  +--APStudio.models.BasicElement
        |
        +--APStudio.models.BasicSubpart
              |
              +--APStudio.models.ClassGraphModel
All Implemented Interfaces:
java.lang.Cloneable, org.eclipse.ui.views.properties.IPropertySource, java.io.Serializable

public class ClassGraphModel
extends BasicSubpart

Author:
rajags This is the basic Model which can have other nodes added to it. The same class can be used for future extension if each of the nodes needs to hold others.For example a ClassDiagram holding attributes methods etc...
See Also:
Serialized Form

Field Summary
static java.lang.String ID_ROUTER
           
static java.lang.String ID_STRATEGY
           
static java.lang.Integer ROUTER_MANHATTAN
           
static java.lang.Integer ROUTER_MANUAL
           
 
Fields inherited from class APStudio.models.BasicSubpart
CHILDREN, ID_LOCATION, ID_NAME, ID_SIZE, INPUTS, NODE_ADDED, NODE_REMOVED, OUTPUTS
 
Constructor Summary
ClassGraphModel()
           
 
Method Summary
 void addChild(APStudio.models.BasicElement child)
           
 void addChild(APStudio.models.BasicElement child, int index)
           
 APStudio.models.BasicElement getChild()
           
 java.util.List getChildren()
           
 java.lang.Integer getConnectionRouter()
           
 org.eclipse.swt.graphics.Image getIconImage()
           
 java.lang.String getNewID()
           
 org.eclipse.ui.views.properties.IPropertyDescriptor[] getPropertyDescriptors()
          Returns null for this model.
 java.lang.Object getPropertyValue(java.lang.Object propName)
          Returns an Object which represents the appropriate value for the property name supplied.
 void removeChild(APStudio.models.BasicElement child)
           
 void setChild(APStudio.models.BasicElement child)
           
 void setConnectionRouter(java.lang.Integer router)
           
 void setPropertyValue(java.lang.Object id, java.lang.Object value)
          Sets the value of a given property with the value supplied.
 void setStrategyFile(java.lang.String newfileName)
           
 java.lang.String toString()
           
 
Methods inherited from class APStudio.models.BasicSubpart
addPropertyChangeListener, connectInput, connectOutput, disconnectInput, disconnectOutput, getConnections, getEditableValue, getIcon, getID, getLocation, getName, getOutputs, getSize, getSourceConnections, getTargetConnections, isPropertySet, isPropertySet, removePropertyChangeListener, resetPropertyValue, setID, setLocation, setName, setSize, update
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ID_ROUTER

public static java.lang.String ID_ROUTER

ID_STRATEGY

public static java.lang.String ID_STRATEGY

ROUTER_MANUAL

public static java.lang.Integer ROUTER_MANUAL

ROUTER_MANHATTAN

public static java.lang.Integer ROUTER_MANHATTAN
Constructor Detail

ClassGraphModel

public ClassGraphModel()
Method Detail

setChild

public void setChild(APStudio.models.BasicElement child)

getChild

public APStudio.models.BasicElement getChild()

addChild

public void addChild(APStudio.models.BasicElement child)

addChild

public void addChild(APStudio.models.BasicElement child,
                     int index)

getChildren

public java.util.List getChildren()

getConnectionRouter

public java.lang.Integer getConnectionRouter()

getIconImage

public org.eclipse.swt.graphics.Image getIconImage()
Specified by:
getIconImage in class BasicSubpart

getNewID

public java.lang.String getNewID()
Overrides:
getNewID in class APStudio.models.BasicElement

getPropertyDescriptors

public org.eclipse.ui.views.properties.IPropertyDescriptor[] getPropertyDescriptors()
Returns null for this model. Returns normal descriptors for all subclasses.

Specified by:
getPropertyDescriptors in interface org.eclipse.ui.views.properties.IPropertySource
Overrides:
getPropertyDescriptors in class BasicSubpart
Returns:
Array of property descriptors.

getPropertyValue

public java.lang.Object getPropertyValue(java.lang.Object propName)
Description copied from class: BasicSubpart
Returns an Object which represents the appropriate value for the property name supplied.

Specified by:
getPropertyValue in interface org.eclipse.ui.views.properties.IPropertySource
Overrides:
getPropertyValue in class BasicSubpart
Parameters:
propName - Name of the property for which the the values are needed.
Returns:
Object which is the value of the property.

removeChild

public void removeChild(APStudio.models.BasicElement child)

setConnectionRouter

public void setConnectionRouter(java.lang.Integer router)

setStrategyFile

public void setStrategyFile(java.lang.String newfileName)

setPropertyValue

public void setPropertyValue(java.lang.Object id,
                             java.lang.Object value)
Description copied from class: BasicSubpart
Sets the value of a given property with the value supplied. Also fires a property change if necessary.

Specified by:
setPropertyValue in interface org.eclipse.ui.views.properties.IPropertySource
Overrides:
setPropertyValue in class BasicSubpart
Parameters:
id - Name of the parameter to be changed.
value - Value to be set to the given parameter.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object