kaapo.project
Class Element

java.lang.Object
  extended by kaapo.Observable
      extended by kaapo.project.ProjectComponent
          extended by kaapo.project.DiagramComponent
              extended by kaapo.project.Element
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
Actor, DataBase, DataStore, Process, Text, UseCase

public abstract class Element
extends DiagramComponent

Abstract base class for elements. Concrete element types inherit from this class.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class kaapo.project.DiagramComponent
DiagramComponent.ComponentType
 
Nested classes/interfaces inherited from class kaapo.project.ProjectComponent
ProjectComponent.ObservableMessage
 
Field Summary
 
Fields inherited from class kaapo.project.ProjectComponent
attributeMap, attributePanel
 
Constructor Summary
Element()
           
 
Method Summary
 DiagramComponent.ComponentType getComponentType()
          Get the basic type of the diagram component (element or connection).
abstract  double getDefaultHeight()
          Returns the default height of the element.
abstract  double getDefaultWidth()
          Returns the default width of the element.
 boolean isElement()
          Tell whether the diagram component is an element or a connection.
 
Methods inherited from class kaapo.project.DiagramComponent
buildDCGraphics, canMove, canResize, getLargeIcon
 
Methods inherited from class kaapo.project.ProjectComponent
addAttribute, addAttribute, buildAttributePanel, getAttribute, getAttributeMap, getAttributePanel, getSmallIcon, getTypeName, hasAttribute, removeAttribute, setAttribute
 
Methods inherited from class kaapo.Observable
addObserver, notifyObservers, notifyObservers, removeAllObservers, removeObserver, setChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Element

public Element()
Method Detail

getDefaultWidth

public abstract double getDefaultWidth()
Returns the default width of the element. Default width is used when creating a new element instance, for example.

Returns:
Default width

getDefaultHeight

public abstract double getDefaultHeight()
Returns the default height of the element. Default height is used when creating a new element instance, for example.

Returns:
Default height

isElement

public boolean isElement()
Description copied from class: DiagramComponent
Tell whether the diagram component is an element or a connection.

Specified by:
isElement in class DiagramComponent
Returns:
True if element, false if connection.

getComponentType

public DiagramComponent.ComponentType getComponentType()
Description copied from class: DiagramComponent
Get the basic type of the diagram component (element or connection).

Specified by:
getComponentType in class DiagramComponent
Returns:
Basic type