br.edu.fei.dcc.raciocinioespacial.editor.shapes.elements
Class Shape

java.lang.Object
  extended by br.edu.fei.dcc.raciocinioespacial.editor.shapes.model.ModelElement
      extended by br.edu.fei.dcc.raciocinioespacial.editor.shapes.elements.Shape
All Implemented Interfaces:
java.io.Serializable, org.eclipse.ui.views.properties.IPropertySource
Direct Known Subclasses:
Mobile2DShape, Ponto2DShape, Street2DShape

public abstract class Shape
extends ModelElement

Abstract prototype of a Shape. Possui um tamanho (largura e altura), uma localização (posição x e y) e uma lista das conexões de entrada e saída. Use subclasses para inicializar uma forma específica.

See Also:
Serialized Form

Field Summary
static java.lang.String Proprerty_Localization
           
static java.lang.String Proprerty_Name
           
static java.lang.String Proprerty_X
           
static java.lang.String Proprerty_Y
           
 
Constructor Summary
Shape()
           
 
Method Summary
 java.util.List<org.eclipse.ui.views.properties.IPropertyDescriptor> getDescriptors()
           
abstract  org.eclipse.swt.graphics.Image getIcon()
          Return an icon for this ModelElement.
 org.eclipse.draw2d.geometry.Point getLocalization()
          Return the localization of this Shape.
 java.lang.String getName()
          Return the name typed to each object
 ShapesDiagram getParent()
          Return the parent ShapeDiagram
 org.eclipse.ui.views.properties.IPropertyDescriptor[] getPropertyDescriptors()
          Return an array of IPropertyDescriptors for this Shape.
 java.lang.Object getPropertyValue(java.lang.Object propertyId)
          Return the property value of the propertyId requested, or null.
 org.eclipse.draw2d.geometry.Dimension getSize()
          Return the size of this Shape.
 void setDescriptors(java.util.List<org.eclipse.ui.views.properties.IPropertyDescriptor> descriptors)
           
 void setLocalization(org.eclipse.draw2d.geometry.Point newLocation)
          Define the localization of this Shape.
 void setNome(java.lang.String name)
          Set the name for this object
 void setParent(ShapesDiagram parent)
           
 void setPropertyValue(java.lang.Object propertyId, java.lang.Object value)
          Define o valor de uma propriedade com o identificador fornecido.
 void setSize(org.eclipse.draw2d.geometry.Dimension newSize)
          Define the size of this shape.
 
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

Proprerty_Localization

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

Proprerty_X

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

Proprerty_Y

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

Proprerty_Name

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

Shape

public Shape()
Method Detail

getDescriptors

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

getIcon

public abstract org.eclipse.swt.graphics.Image getIcon()
Return an icon for this ModelElement.

Returns:
An image 16x16 or null.

getLocalization

public org.eclipse.draw2d.geometry.Point getLocalization()
Return the localization of this Shape.


getName

public java.lang.String getName()
Return the name typed to each object


getParent

public ShapesDiagram getParent()
Return the parent ShapeDiagram


getPropertyDescriptors

public org.eclipse.ui.views.properties.IPropertyDescriptor[] getPropertyDescriptors()
Return an array of IPropertyDescriptors for this Shape.

Specified by:
getPropertyDescriptors in interface org.eclipse.ui.views.properties.IPropertySource
Overrides:
getPropertyDescriptors in class ModelElement
See Also:
descriptors, getPropertyValue(Object), setPropertyValue(Object, Object)

getPropertyValue

public java.lang.Object getPropertyValue(java.lang.Object propertyId)
Return the property value of the propertyId requested, or null.

A visão de propriedades usa os identificadores a partir do array de IPropertyDescriptors para obter o valor das propriedades correspondentes.

Specified by:
getPropertyValue in interface org.eclipse.ui.views.properties.IPropertySource
Overrides:
getPropertyValue in class ModelElement
See Also:
descriptors, getPropertyDescriptors()

getSize

public org.eclipse.draw2d.geometry.Dimension getSize()
Return the size of this Shape.


setDescriptors

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

setLocalization

public void setLocalization(org.eclipse.draw2d.geometry.Point newLocation)
Define the localization of this Shape.


setNome

public void setNome(java.lang.String name)
Set the name for this object


setParent

public void setParent(ShapesDiagram parent)

setPropertyValue

public void setPropertyValue(java.lang.Object propertyId,
                             java.lang.Object value)
Define o valor de uma propriedade com o identificador fornecido. Se não forem encontradas propriedades com essa identificação, a chamada é passada para a superclasse.

A visão de propriedade usa os identificadores a partir do array de IPropertyDescriptors para definir os valores. das respectivas propriedades.

Specified by:
setPropertyValue in interface org.eclipse.ui.views.properties.IPropertySource
Overrides:
setPropertyValue in class ModelElement
See Also:
descriptors, getPropertyDescriptors()

setSize

public void setSize(org.eclipse.draw2d.geometry.Dimension newSize)
Define the size of this shape.