com.pnp.xfeature.editparts
Class FeatureNodeEditPart

java.lang.Object
  extended by AbstractGraphicalEditPart
      extended by com.pnp.xfeature.editparts.AbstractComponentEditPart
          extended by com.pnp.xfeature.editparts.FeatureNodeEditPart
All Implemented Interfaces:
java.beans.PropertyChangeListener, java.util.EventListener

public class FeatureNodeEditPart
extends AbstractComponentEditPart

Editpart that controls nodes.

Author:
Kamil Ekstein, created on 21.9.2004, totally redesigned on 26.3.2005 by Ondrej Rohlik

Constructor Summary
FeatureNodeEditPart()
           
 
Method Summary
 void activate()
          adds property change listener for every connection that target this node
 void deactivate()
          removes the listner
 FeatureNodeModel getCastedModel()
          return the the featre model typed as FeatureNodeModel
 FeatureNodeEditPart getModelParentEditPart()
          returns editpart of the parent (in a model logic) node
 ConnectionAnchor getSourceConnectionAnchor(ConnectionEditPart connection)
          Returns the source connection anchor, i.e. the lower anchor, coming out of this node towards children
 ConnectionAnchor getSourceConnectionAnchor(Request request)
          Overloaded (see getSourceConnectionAnchor)
 ConnectionAnchor getTargetConnectionAnchor(ConnectionEditPart connection)
          Returns the target connection anchor, i.e. the upper anchor, coming out of this node towards parent
 ConnectionAnchor getTargetConnectionAnchor(Request request)
          Overloaded (see getTargetConnectionAnchor)
 void performRequest(Request req)
          perform the DirectEdit request
 void propertyChange(java.beans.PropertyChangeEvent event)
          refreshes tha canvas and connections on node change
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FeatureNodeEditPart

public FeatureNodeEditPart()
Method Detail

activate

public void activate()
adds property change listener for every connection that target this node

Overrides:
activate in class AbstractComponentEditPart
See Also:
org.eclipse.gef.EditPart#activate()

deactivate

public void deactivate()
removes the listner

Overrides:
deactivate in class AbstractComponentEditPart
See Also:
org.eclipse.gef.EditPart#deactivate()

propertyChange

public void propertyChange(java.beans.PropertyChangeEvent event)
refreshes tha canvas and connections on node change

Specified by:
propertyChange in interface java.beans.PropertyChangeListener
Overrides:
propertyChange in class AbstractComponentEditPart
See Also:
PropertyChangeListener.propertyChange(java.beans.PropertyChangeEvent)

performRequest

public void performRequest(Request req)
perform the DirectEdit request

See Also:
org.eclipse.gef.EditPart#performRequest(org.eclipse.gef.Request)

getSourceConnectionAnchor

public ConnectionAnchor getSourceConnectionAnchor(ConnectionEditPart connection)
Returns the source connection anchor, i.e. the lower anchor, coming out of this node towards children


getSourceConnectionAnchor

public ConnectionAnchor getSourceConnectionAnchor(Request request)
Overloaded (see getSourceConnectionAnchor)


getTargetConnectionAnchor

public ConnectionAnchor getTargetConnectionAnchor(ConnectionEditPart connection)
Returns the target connection anchor, i.e. the upper anchor, coming out of this node towards parent


getTargetConnectionAnchor

public ConnectionAnchor getTargetConnectionAnchor(Request request)
Overloaded (see getTargetConnectionAnchor)


getCastedModel

public FeatureNodeModel getCastedModel()
return the the featre model typed as FeatureNodeModel


getModelParentEditPart

public FeatureNodeEditPart getModelParentEditPart()
returns editpart of the parent (in a model logic) node



Copyright © 2004 - 2008 ETH Zurich and P&P Software GmbH, All Rights Reserved.