br.edu.fei.dcc.raciocinioespacial.editor.shapes.model
Class ShapesDiagram

java.lang.Object
  extended by br.edu.fei.dcc.raciocinioespacial.editor.shapes.model.ModelElement
      extended by br.edu.fei.dcc.raciocinioespacial.editor.shapes.model.ShapesDiagram
All Implemented Interfaces:
java.io.Serializable, org.eclipse.ui.views.properties.IPropertySource

public class ShapesDiagram
extends ModelElement

Um container para múltiplas formas/Shapes. Este é a "raíz" do modelo de estrutura de dados.

See Also:
Serialized Form

Field Summary
static java.lang.String CHILD_ADDED_PROP
          Property ID used when a child is added into the diagram.
static java.lang.String CHILD_REMOVED_PROP
          Property ID used when a child is removed from the diagram.
static java.lang.String Propriedade_Intervalo
           
static java.lang.String Propriedade_Nome
           
static java.lang.String Propriedade_Perfil
           
static java.lang.String Propriedade_Roads
           
 
Constructor Summary
ShapesDiagram()
           
ShapesDiagram(java.lang.String name)
           
 
Method Summary
 boolean addChild(Shape s)
          Adiciona uma forma/Shape no diagrama.
 boolean existName(java.lang.String name)
           
 java.util.List<Shape> getChildren()
          Retorna a lista de formas/Shape contidas no diagrama.
 java.util.List<Shape> getChildren(java.lang.Class<?> t)
           
 java.util.List<java.lang.String> getChildrensNames(java.lang.Class<?> t)
           
 java.util.List<org.eclipse.ui.views.properties.IPropertyDescriptor> getDescriptors()
           
 float getIntervalo()
           
 boolean getIsPaintRoads()
           
 boolean getIsShowDlgDetalhes()
           
 java.lang.String getNome()
           
 boolean getPerfilProfundidade()
           
 org.eclipse.ui.views.properties.IPropertyDescriptor[] getPropertyDescriptors()
          Classes, which will heritage from this class, must implement this method.
 java.lang.Object getPropertyValue(java.lang.Object propertyId)
          Classes, which will heritage from this class, must implement this method.
 boolean removeChild(Shape s)
          Remove a forma/Shape do diagrama.
 void setDescriptors(java.util.List<org.eclipse.ui.views.properties.IPropertyDescriptor> descriptors)
           
 void setIntervalo(float intervalo)
           
 void setIsPaintRoads(boolean isPaintRoads)
           
 void setIsShowDlgDetalhes(boolean isDetalhes)
           
 void setNome(java.lang.String nome)
           
 void setPerfilProfundidade(boolean perfilProfundidade)
           
 void setPropertyValue(java.lang.Object propertyId, java.lang.Object value)
          Classes, which will heritage from this class, must implement this method.
 
Methods inherited from class br.edu.fei.dcc.raciocinioespacial.editor.shapes.model.ModelElement
addPropertyChangeListener, getEditableValue, isPropertySet, removePropertyChangeListener, resetPropertyValue
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CHILD_ADDED_PROP

public static final java.lang.String CHILD_ADDED_PROP
Property ID used when a child is added into the diagram.

See Also:
Constant Field Values

CHILD_REMOVED_PROP

public static final java.lang.String CHILD_REMOVED_PROP
Property ID used when a child is removed from the diagram.

See Also:
Constant Field Values

Propriedade_Nome

public static final java.lang.String Propriedade_Nome
See Also:
Constant Field Values

Propriedade_Perfil

public static final java.lang.String Propriedade_Perfil
See Also:
Constant Field Values

Propriedade_Roads

public static final java.lang.String Propriedade_Roads
See Also:
Constant Field Values

Propriedade_Intervalo

public static final java.lang.String Propriedade_Intervalo
See Also:
Constant Field Values
Constructor Detail

ShapesDiagram

public ShapesDiagram()

ShapesDiagram

public ShapesDiagram(java.lang.String name)
Method Detail

addChild

public boolean addChild(Shape s)
Adiciona uma forma/Shape no diagrama.

Parameters:
s - uma instância não-nula de Shape.
Returns:
Verdadeiro, se a forma/Shape foi adicionada com sucesso, Falso caso contrário.

existName

public boolean existName(java.lang.String name)

getChildren

public java.util.List<Shape> getChildren()
Retorna a lista de formas/Shape contidas no diagrama. A lista retornada não pode ser modificada.


getChildren

public java.util.List<Shape> getChildren(java.lang.Class<?> t)

getChildrensNames

public java.util.List<java.lang.String> getChildrensNames(java.lang.Class<?> t)

getDescriptors

public java.util.List<org.eclipse.ui.views.properties.IPropertyDescriptor> getDescriptors()

getIntervalo

public float getIntervalo()

getNome

public java.lang.String getNome()

getIsShowDlgDetalhes

public boolean getIsShowDlgDetalhes()

getIsPaintRoads

public boolean getIsPaintRoads()

getPerfilProfundidade

public boolean getPerfilProfundidade()

getPropertyDescriptors

public org.eclipse.ui.views.properties.IPropertyDescriptor[] getPropertyDescriptors()
Description copied from class: ModelElement
Classes, which will heritage from this class, must implement this method.

Specified by:
getPropertyDescriptors in interface org.eclipse.ui.views.properties.IPropertySource
Overrides:
getPropertyDescriptors in class ModelElement

getPropertyValue

public java.lang.Object getPropertyValue(java.lang.Object propertyId)
Description copied from class: ModelElement
Classes, which will heritage from this class, must implement this method.

Specified by:
getPropertyValue in interface org.eclipse.ui.views.properties.IPropertySource
Overrides:
getPropertyValue in class ModelElement

removeChild

public boolean removeChild(Shape s)
Remove a forma/Shape do diagrama.

Parameters:
s - uma instância não-nula de Shape;
Returns:
Verdadeiro, se o Shape foi removido com sucesso, False caso contrário.

setDescriptors

public void setDescriptors(java.util.List<org.eclipse.ui.views.properties.IPropertyDescriptor> descriptors)

setIntervalo

public void setIntervalo(float intervalo)

setNome

public void setNome(java.lang.String nome)

setIsShowDlgDetalhes

public void setIsShowDlgDetalhes(boolean isDetalhes)

setIsPaintRoads

public void setIsPaintRoads(boolean isPaintRoads)

setPerfilProfundidade

public void setPerfilProfundidade(boolean perfilProfundidade)

setPropertyValue

public void setPropertyValue(java.lang.Object propertyId,
                             java.lang.Object value)
Description copied from class: ModelElement
Classes, which will heritage from this class, must implement this method.

Specified by:
setPropertyValue in interface org.eclipse.ui.views.properties.IPropertySource
Overrides:
setPropertyValue in class ModelElement