br.edu.fei.dcc.raciocinioespacial.simulador.entidades
Class Pedestrian2D

java.lang.Object
  extended by java.util.Observable
      extended by br.edu.fei.dcc.raciocinioespacial.simulador.entidades.Pedestrian2D
All Implemented Interfaces:
IEntidade, IEntidade2D, IEntidadeMovel, java.io.Serializable, java.lang.Cloneable
Direct Known Subclasses:
Vehicle2D

public class Pedestrian2D
extends java.util.Observable
implements IEntidade2D

?

See Also:
Serialized Form

Constructor Summary
Pedestrian2D()
           
Pedestrian2D(int x, int y, int width, int height, java.lang.String nome)
           
Pedestrian2D(int x, int y, int width, int height, java.lang.String nome, java.awt.Color cor)
           
Pedestrian2D(int x, int y, int width, int height, java.lang.String nome, java.awt.Color cor, java.util.ArrayList<java.awt.Point> pontos)
           
 
Method Summary
 IEntidade criarEntidade()
           
 java.awt.Color getCor()
          Getter of the property cor
 int getHeight()
           
 java.lang.String getNome()
          Getter of the property nome
 java.awt.geom.RectangularShape getObjeto2D()
           
 java.util.ArrayList<java.awt.Point> getPontos()
          Getter of the property pontos
 java.awt.Rectangle getRect()
           
 SentidoVehicle getSentido()
           
 float getTempoTotalMovimentacao()
           
 float getVelocidade()
          Getter of the property velocidade
 int getWidth()
           
 int getX()
          Getter of the property x
 int getY()
          Getter of the property y
 void move()
           
 void moveInitialPos()
           
 void notificarObservadores(int instanteAnterior, int instanteAtual, float instante)
           
 void notifyObservers(java.lang.Object arg)
           
 void setCor(java.awt.Color cor)
          Setter of the property cor
 void setHeight(int height)
           
 void setNome(java.lang.String nome)
          Setter of the property nome
 void setPontos(java.util.ArrayList<java.awt.Point> pontos)
          Setter of the property pontos
 void setSentido(SentidoVehicle direction)
           
 void setVelocidade(float velocidade)
          Setter of the property velocidade
 void setWidth(int width)
           
 void setX(int x)
          Setter of the property x
 void setY(int y)
          Setter of the property y
static java.util.List<Pedestrian2D> transformEntidadeMovelToObjeto2D(java.util.List<IEntidadeMovel> in)
           
 
Methods inherited from class java.util.Observable
addObserver, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Pedestrian2D

public Pedestrian2D()

Pedestrian2D

public Pedestrian2D(int x,
                    int y,
                    int width,
                    int height,
                    java.lang.String nome)

Pedestrian2D

public Pedestrian2D(int x,
                    int y,
                    int width,
                    int height,
                    java.lang.String nome,
                    java.awt.Color cor)

Pedestrian2D

public Pedestrian2D(int x,
                    int y,
                    int width,
                    int height,
                    java.lang.String nome,
                    java.awt.Color cor,
                    java.util.ArrayList<java.awt.Point> pontos)
Method Detail

transformEntidadeMovelToObjeto2D

public static java.util.List<Pedestrian2D> transformEntidadeMovelToObjeto2D(java.util.List<IEntidadeMovel> in)

criarEntidade

public IEntidade criarEntidade()
Specified by:
criarEntidade in interface IEntidade

getCor

public java.awt.Color getCor()
Getter of the property cor

Specified by:
getCor in interface IEntidade2D
Returns:
Returns the cor.

getNome

public java.lang.String getNome()
Getter of the property nome

Specified by:
getNome in interface IEntidade
Returns:
Returns the nome.

getObjeto2D

public java.awt.geom.RectangularShape getObjeto2D()
Specified by:
getObjeto2D in interface IEntidade2D

getPontos

public java.util.ArrayList<java.awt.Point> getPontos()
Getter of the property pontos

Specified by:
getPontos in interface IEntidadeMovel
Returns:
Returns the pontos.

getRect

public java.awt.Rectangle getRect()
Specified by:
getRect in interface IEntidadeMovel

getVelocidade

public float getVelocidade()
Getter of the property velocidade

Specified by:
getVelocidade in interface IEntidadeMovel
Returns:
Returns the velocidade.

getX

public int getX()
Getter of the property x

Specified by:
getX in interface IEntidade
Returns:
Returns the x.

getY

public int getY()
Getter of the property y

Specified by:
getY in interface IEntidade
Returns:
Returns the y.

notificarObservadores

public void notificarObservadores(int instanteAnterior,
                                  int instanteAtual,
                                  float instante)

notifyObservers

public void notifyObservers(java.lang.Object arg)
Overrides:
notifyObservers in class java.util.Observable

setCor

public void setCor(java.awt.Color cor)
Setter of the property cor

Specified by:
setCor in interface IEntidade2D
Parameters:
cor - The cor to set.

setNome

public void setNome(java.lang.String nome)
Setter of the property nome

Specified by:
setNome in interface IEntidade
Parameters:
nome - The nome to set.

setPontos

public void setPontos(java.util.ArrayList<java.awt.Point> pontos)
Setter of the property pontos

Specified by:
setPontos in interface IEntidadeMovel
Parameters:
pontos - The pontos to set.

setVelocidade

public void setVelocidade(float velocidade)
Setter of the property velocidade

Specified by:
setVelocidade in interface IEntidadeMovel
Parameters:
velocidade - The velocidade to set.

setX

public void setX(int x)
Setter of the property x

Specified by:
setX in interface IEntidade
Parameters:
x - The x to set.

setY

public void setY(int y)
Setter of the property y

Specified by:
setY in interface IEntidade
Parameters:
y - The y to set.

getTempoTotalMovimentacao

public float getTempoTotalMovimentacao()

getHeight

public int getHeight()
Specified by:
getHeight in interface IEntidade

getWidth

public int getWidth()
Specified by:
getWidth in interface IEntidade

setHeight

public void setHeight(int height)
Specified by:
setHeight in interface IEntidade

setWidth

public void setWidth(int width)
Specified by:
setWidth in interface IEntidade

getSentido

public SentidoVehicle getSentido()

setSentido

public void setSentido(SentidoVehicle direction)

move

public void move()
Specified by:
move in interface IEntidadeMovel

moveInitialPos

public void moveInitialPos()
Specified by:
moveInitialPos in interface IEntidadeMovel