Protege-2000 1.7

edu.stanford.smi.protegex.layout
Class AbstractActor

java.lang.Object
  |
  +--edu.stanford.smi.protegex.layout.AbstractActor
All Implemented Interfaces:
Actor, ActorControlPointHandler, ActorDelegate, ActorEventBroadcaster, ActorEventHandler, ActorFacade, ActorMovementHandler, Copyable
Direct Known Subclasses:
StandardGlyphActor, StandardImageActor, StandardWireActor

public abstract class AbstractActor
extends Object
implements Actor

Description of the Class

Author:
William Grosso

Field Summary
protected  AnimationContext _animationContext
           
protected  ActorEventBroadcaster _broadcaster
           
protected  ActorControlPointHandler _controlPointHandler
           
protected  ActorEventHandler _eventHandler
           
protected  Rectangle _lastDrawingLocation
           
protected  ActorLocation _location
           
protected  ActorMovementHandler _movementHandler
           
 
Fields inherited from interface edu.stanford.smi.protegex.layout.ActorMovementHandler
ZERO_VELOCITY
 
Constructor Summary
AbstractActor(AnimationContext animationContext, ActorLocation location, ActorEventHandler eventHandler, ActorMovementHandler movementHandler, ActorControlPointHandler controlPointHandler)
           
 
Method Summary
 void addActorListener(ActorListener actorListener)
           
 void broadcastActorDoubleClickedEvent()
           
 void broadcastActorMovedEvent()
           
 void broadcastActorResizedEvent()
           
 void broadcastActorSelectedEvent()
           
 void broadcastActorStartedMovingEvent()
           
 void broadcastActorStoppedMovingEvent()
           
 boolean canPerformIncrementalDrag(int deltaX, int deltaY)
           
 boolean collidesWithActor(Actor actor)
           
 void collideWithActor(Actor actor)
           
abstract  Object copy()
           
abstract  Rectangle draw(Graphics g)
           
 Actor getActor()
           
 AnimationContext getAnimationContext()
           
 boolean getBounces()
           
 void getControlPoint(int controlPoint, Point returnValue)
           
 int getControlPointForPoint(Point inputLocation)
           
 boolean getIsDraggable()
           
 boolean getIsDragging()
           
 boolean getIsResizable()
           
 boolean getIsResizing()
           
 boolean getIsSelectable()
           
 boolean getIsSelected()
           
 ActorLocation getLocation()
           
 int getMinimumSize()
           
 int getPrecision()
           
 double getXVelocity()
           
 double getYVelocity()
           
 boolean isInside(Rectangle location)
           
 boolean isLocatedAt(Point location)
           
abstract  boolean isWire()
           
 void move(int x, int y)
           
 void moveControlPoint(int controlPoint, Point destinationPoint)
           
 void processClick(MouseEvent e)
           
 void processDrag(MouseEvent e)
           
 void processIncrementalDrag(int deltaX, int deltaY)
           
 void processMousePress(MouseEvent e)
           
 void processMouseRelease(MouseEvent e)
           
 void removeActorListener(ActorListener actorListener)
           
 void setActor(Actor actor)
           
 void setAnimationContext(AnimationContext animationContext)
           
 void setBounces(boolean bounces)
           
 void setControlPointHandler(ActorControlPointHandler controlPointHandler)
           
 void setCoordinateSystem(Rectangle rectangle)
           
 void setEventHandler(ActorEventHandler actorEventHandler)
           
 void setIsDraggable(boolean isDraggable)
           
 void setIsResizable(boolean isResizable)
           
 void setIsSelectable(boolean isSelectable)
           
 void setIsSelected(boolean isSelected)
           
 void setLocation(ActorLocation location)
           
 void setMinimumSize(int minimumSize)
           
 void setMovementHandler(ActorMovementHandler actorMovementHandler)
           
 void setPrecision(int precision)
           
abstract  void setTitle(String title)
           
 void setXVelocity(double xVelocity)
           
 void setYVelocity(double yVelocity)
           
abstract  void tick(int currentTime)
           
 void translate(int x, int y)
           
 void translateControlPoint(int controlPoint, int deltaX, int deltaY)
           
 boolean wantEvent(MouseEvent e)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface edu.stanford.smi.protegex.layout.ActorFacade
getBoundaryPointForLine
 

Field Detail

_animationContext

protected AnimationContext _animationContext

_location

protected ActorLocation _location

_eventHandler

protected ActorEventHandler _eventHandler

_movementHandler

protected ActorMovementHandler _movementHandler

_controlPointHandler

protected ActorControlPointHandler _controlPointHandler

_lastDrawingLocation

protected Rectangle _lastDrawingLocation

_broadcaster

protected ActorEventBroadcaster _broadcaster
Constructor Detail

AbstractActor

public AbstractActor(AnimationContext animationContext,
                     ActorLocation location,
                     ActorEventHandler eventHandler,
                     ActorMovementHandler movementHandler,
                     ActorControlPointHandler controlPointHandler)
Method Detail

addActorListener

public void addActorListener(ActorListener actorListener)
Specified by:
addActorListener in interface ActorEventBroadcaster

broadcastActorDoubleClickedEvent

public void broadcastActorDoubleClickedEvent()
Specified by:
broadcastActorDoubleClickedEvent in interface ActorEventBroadcaster

broadcastActorMovedEvent

public void broadcastActorMovedEvent()
Specified by:
broadcastActorMovedEvent in interface ActorEventBroadcaster

broadcastActorResizedEvent

public void broadcastActorResizedEvent()
Specified by:
broadcastActorResizedEvent in interface ActorEventBroadcaster

broadcastActorSelectedEvent

public void broadcastActorSelectedEvent()
Specified by:
broadcastActorSelectedEvent in interface ActorEventBroadcaster

broadcastActorStartedMovingEvent

public void broadcastActorStartedMovingEvent()
Specified by:
broadcastActorStartedMovingEvent in interface ActorEventBroadcaster

broadcastActorStoppedMovingEvent

public void broadcastActorStoppedMovingEvent()
Specified by:
broadcastActorStoppedMovingEvent in interface ActorEventBroadcaster

canPerformIncrementalDrag

public boolean canPerformIncrementalDrag(int deltaX,
                                         int deltaY)
Specified by:
canPerformIncrementalDrag in interface ActorEventHandler

collidesWithActor

public boolean collidesWithActor(Actor actor)
Specified by:
collidesWithActor in interface ActorMovementHandler

collideWithActor

public void collideWithActor(Actor actor)
Specified by:
collideWithActor in interface ActorMovementHandler

copy

public abstract Object copy()
Specified by:
copy in interface Copyable

draw

public abstract Rectangle draw(Graphics g)
Specified by:
draw in interface ActorFacade

getActor

public Actor getActor()
Specified by:
getActor in interface ActorDelegate

getAnimationContext

public AnimationContext getAnimationContext()
Specified by:
getAnimationContext in interface ActorFacade

getBounces

public boolean getBounces()
Specified by:
getBounces in interface ActorMovementHandler

getControlPoint

public void getControlPoint(int controlPoint,
                            Point returnValue)
Specified by:
getControlPoint in interface ActorControlPointHandler

getControlPointForPoint

public int getControlPointForPoint(Point inputLocation)
Specified by:
getControlPointForPoint in interface ActorControlPointHandler

getIsDraggable

public boolean getIsDraggable()
Specified by:
getIsDraggable in interface ActorEventHandler

getIsDragging

public boolean getIsDragging()
Specified by:
getIsDragging in interface ActorEventHandler

getIsResizable

public boolean getIsResizable()
Specified by:
getIsResizable in interface ActorEventHandler

getIsResizing

public boolean getIsResizing()
Specified by:
getIsResizing in interface ActorEventHandler

getIsSelectable

public boolean getIsSelectable()
Specified by:
getIsSelectable in interface ActorEventHandler

getIsSelected

public boolean getIsSelected()
Specified by:
getIsSelected in interface ActorEventHandler

getLocation

public ActorLocation getLocation()
Specified by:
getLocation in interface ActorFacade

getMinimumSize

public int getMinimumSize()
Specified by:
getMinimumSize in interface ActorControlPointHandler

getPrecision

public int getPrecision()
Specified by:
getPrecision in interface ActorControlPointHandler

getXVelocity

public double getXVelocity()
Specified by:
getXVelocity in interface ActorMovementHandler

getYVelocity

public double getYVelocity()
Specified by:
getYVelocity in interface ActorMovementHandler

isInside

public boolean isInside(Rectangle location)
Specified by:
isInside in interface ActorFacade

isLocatedAt

public boolean isLocatedAt(Point location)
Specified by:
isLocatedAt in interface ActorFacade

isWire

public abstract boolean isWire()
Specified by:
isWire in interface ActorFacade

move

public void move(int x,
                 int y)
Specified by:
move in interface ActorFacade

moveControlPoint

public void moveControlPoint(int controlPoint,
                             Point destinationPoint)
Specified by:
moveControlPoint in interface ActorControlPointHandler

processClick

public void processClick(MouseEvent e)
Specified by:
processClick in interface ActorEventHandler

processDrag

public void processDrag(MouseEvent e)
Specified by:
processDrag in interface ActorEventHandler

processIncrementalDrag

public void processIncrementalDrag(int deltaX,
                                   int deltaY)
Specified by:
processIncrementalDrag in interface ActorEventHandler

processMousePress

public void processMousePress(MouseEvent e)
Specified by:
processMousePress in interface ActorEventHandler

processMouseRelease

public void processMouseRelease(MouseEvent e)
Specified by:
processMouseRelease in interface ActorEventHandler

removeActorListener

public void removeActorListener(ActorListener actorListener)
Specified by:
removeActorListener in interface ActorEventBroadcaster

setActor

public void setActor(Actor actor)
Specified by:
setActor in interface ActorDelegate

setAnimationContext

public void setAnimationContext(AnimationContext animationContext)
Specified by:
setAnimationContext in interface ActorFacade

setBounces

public void setBounces(boolean bounces)
Specified by:
setBounces in interface ActorMovementHandler

setControlPointHandler

public void setControlPointHandler(ActorControlPointHandler controlPointHandler)
Specified by:
setControlPointHandler in interface ActorFacade

setCoordinateSystem

public void setCoordinateSystem(Rectangle rectangle)
Specified by:
setCoordinateSystem in interface ActorFacade

setEventHandler

public void setEventHandler(ActorEventHandler actorEventHandler)
Specified by:
setEventHandler in interface ActorFacade

setIsDraggable

public void setIsDraggable(boolean isDraggable)
Specified by:
setIsDraggable in interface ActorEventHandler

setIsResizable

public void setIsResizable(boolean isResizable)
Specified by:
setIsResizable in interface ActorEventHandler

setIsSelectable

public void setIsSelectable(boolean isSelectable)
Specified by:
setIsSelectable in interface ActorEventHandler

setIsSelected

public void setIsSelected(boolean isSelected)
Specified by:
setIsSelected in interface ActorEventHandler

setLocation

public void setLocation(ActorLocation location)
Specified by:
setLocation in interface ActorFacade

setMinimumSize

public void setMinimumSize(int minimumSize)
Specified by:
setMinimumSize in interface ActorControlPointHandler

setMovementHandler

public void setMovementHandler(ActorMovementHandler actorMovementHandler)
Specified by:
setMovementHandler in interface ActorFacade

setPrecision

public void setPrecision(int precision)
Specified by:
setPrecision in interface ActorControlPointHandler

setTitle

public abstract void setTitle(String title)
Specified by:
setTitle in interface ActorFacade

setXVelocity

public void setXVelocity(double xVelocity)
Specified by:
setXVelocity in interface ActorMovementHandler

setYVelocity

public void setYVelocity(double yVelocity)
Specified by:
setYVelocity in interface ActorMovementHandler

tick

public abstract void tick(int currentTime)
Specified by:
tick in interface ActorMovementHandler

translate

public void translate(int x,
                      int y)
Specified by:
translate in interface ActorFacade

translateControlPoint

public void translateControlPoint(int controlPoint,
                                  int deltaX,
                                  int deltaY)
Specified by:
translateControlPoint in interface ActorControlPointHandler

wantEvent

public boolean wantEvent(MouseEvent e)
Specified by:
wantEvent in interface ActorEventHandler

Protege-2000 1.7

Submit a bug report or feature request
Protege-2000 is a trademark of Stanford University.
Copyright (c) 1998-2002 Stanford University.