kaapo.types.diagramcomponents
Class Generalization

java.lang.Object
  extended by kaapo.Observable
      extended by kaapo.project.ProjectComponent
          extended by kaapo.project.DiagramComponent
              extended by kaapo.project.Connection
                  extended by kaapo.types.diagramcomponents.Generalization
All Implemented Interfaces:
Serializable

public class Generalization
extends Connection

Author:
holsti Basic generalization connection for usecase diagrams.
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
Generalization()
          Constructor that calls super().
 
Method Summary
protected  DCGraphics buildDCGraphics(DiagramComponentWrapper wrapper, ProjectManager projectManager)
          Build a new graphical representation of the element as DCGraphics.
 boolean canMove(DiagramComponentWrapper wrapper)
          Returns true if the connection is free at both ends, false if it is connected at either.
 boolean canResize(DiagramComponentWrapper wrapper)
          Tell whether the element can be resized by user.
 boolean getIsDirect()
          Tell whether the connection goes directly from end point to start point or has multiple segments.
 ImageIcon getLargeIcon()
          Returns the icon representation of the generalization connection.
 ImageIcon getSmallIcon()
          Returns a 16*16 icon representing the project component type.
 String getTypeName()
          Returns the name of the connection type.
 
Methods inherited from class kaapo.project.Connection
getComponentType, isElement
 
Methods inherited from class kaapo.project.ProjectComponent
addAttribute, addAttribute, buildAttributePanel, getAttribute, getAttributeMap, getAttributePanel, 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

Generalization

public Generalization()
Constructor that calls super().

Method Detail

buildDCGraphics

protected DCGraphics buildDCGraphics(DiagramComponentWrapper wrapper,
                                     ProjectManager projectManager)
Description copied from class: DiagramComponent
Build a new graphical representation of the element as DCGraphics. This method must always build a new instance.

Specified by:
buildDCGraphics in class DiagramComponent
Parameters:
wrapper - The wrapper containing the attributes of the element the differ between diagrams.
projectManager - Project manager
Returns:
New DCGraphics instance

getTypeName

public String getTypeName()
Returns the name of the connection type.

Specified by:
getTypeName in class ProjectComponent

getLargeIcon

public ImageIcon getLargeIcon()
Returns the icon representation of the generalization connection.

Specified by:
getLargeIcon in class DiagramComponent
Returns:
Icon

canResize

public boolean canResize(DiagramComponentWrapper wrapper)
Description copied from class: DiagramComponent
Tell whether the element can be resized by user.

Specified by:
canResize in class DiagramComponent
Parameters:
wrapper - The wrapper in question. The wrapper is given as parameter because it may depend on the wrapper whether the component can be resized.
Returns:
True if element can be resized.

canMove

public boolean canMove(DiagramComponentWrapper wrapper)
Returns true if the connection is free at both ends, false if it is connected at either.

Specified by:
canMove in class DiagramComponent
Parameters:
wrapper - The wrapper in question. The wrapper is given as parameter because it may depend on the wrapper whether the component can be moved.
Returns:
True if element can be moved.

getSmallIcon

public ImageIcon getSmallIcon()
Description copied from class: ProjectComponent
Returns a 16*16 icon representing the project component type. The icon is used by GUI in the diagram tree.

Specified by:
getSmallIcon in class ProjectComponent

getIsDirect

public boolean getIsDirect()
Description copied from class: Connection
Tell whether the connection goes directly from end point to start point or has multiple segments.

Overrides:
getIsDirect in class Connection
Returns:
True if connection is direct, false if connection has multiple segments.