# astah* API User Guide

## [DiagramEditor]

1. DiagramEditor
2. Transaction operation
3. setDiagram method
4. DiagramEditor
5. BasicDiagramEditor
6. StructureDiagramEditor
7. ClassDiagramEditor
8. UseCaseDiagramEditor
9. StateMachineDiagramEditor
10. CompositeStructureDiagramEditor
11. ERDiagramEditor
12. MindmapEditor
13. RequirementDiagramEditor

Please refer to astah* API JavaDoc for Interfaces and methods.
Presentation of astah* API is supported in astah* UML and professional.

#### [DiagramEditor]

Use DiagramEditor to create/delete diagrams and presentations.

Diagram | Editor name | Parent Editor | Parent Editor | Parent Editor | Parent Editor
Class Diagram/Object Diagram Interface | ClassDiagramEditor | StructureDiagramEditor | BasicDiagramEditor | DiagramEditor | -
UseCase Diagram Interface | UseCaseDiagramEditor | StructureDiagramEditor | BasicDiagramEditor | DiagramEditor | -
Statemachine Diagram Interface | StateMachineDiagramEditor | BehaviorDiagramEditor | BasicDiagramEditor | DiagramEditor | -
Composite StructureDiagram Interface | CompositeStructureDiagramEditor | StructureDiagramEditor | BasicDiagramEditor | DiagramEditor | -
ER Diagram Interface | ERDiagramEditor | BasicDiagramEditor | DiagramEditor | - | -
Mind Map Interface | MindmapEditor | DiagramEditor | - | - | -
Requirement Diagram Interface | RequirementDiagramEditor | ClassDiagramEditor | StructureDiagramEditor | BasicDiagramEditor | DiagramEditor

#### [Transaction Operation]

Transaction operation is required when creating/modifying/deleting diagrams.
Please read Transaction operation.

#### [setDiagram Method]

Set the target diagram by using setDiagram method before calling DiagramEditor method when editng/deleting diagrams or presentations.
If the target diagram is not set, an InvalidEditingException appears. If a diagram is created by using DiagramEditor API, the diagram will be set automatically.

#### [DiagramEditor]

- Delete diagrams from project by using delete, deleteDiagram method of DiagramEditor
- Delete presentation from project by using deletePresentation method of DiagramEditor
- Create a text presentation by using createText method of DiagramEditor
- Create an image presentation by using createImage method of DiagramEditor
- Create a rectangle presentation by using createRect method of DiagramEditor
- Create a line presentation by using createLine method of DiagramEditor

#### [BasicDiagramEditor]

- Create a note presentation by using createNote method of BasicDiagramEditor
- Create a note anchor presentation by using createNoteAnchor method of BasicDiagramEditor

#### [StructureDiagramEditor]

- Create a rectanglar presentation(INodePresentation) by using createNodePresentation method of StructureDiagramEditor
- Create a line presentation(ILinkPresentation) by using createLinkPresentation method of StructureDiagramEditor

#### [ClassDiagramEditor]

- Create Class Diagram/Object Diagram by using createClassDiagram method of ClassDiagramEditor
- Create Package presentation/Class presentation by using createNodePresentation method of ClassDiagramEditor's parent interface, StructureDiagramEditor
- Create Association presentation/Generalization presentation/Realization presentation/Dependency presentation/TemplateBinding presentation by using
  createLinkPresentation method of ClassDiagramEditor's parent interface, StructureDiagramEditor
- Create Association class presentation by using createAssociationClassPresentation method of ClassDiagramEditor
- Create an InstanceSpecification presentation by using createInstanceSpecification method of ClassDiagramEditor
- Create a link presentation by using createInstanceSpecificationLink method of ClassDiagramEditor

#### [UseCaseDiagramEditor]

- Create UseCase Diagram by using createUseCaseDiagram method of UseCaseDiagramEditor
- Create UseCase presentation by using createNodePresentation method of UseCaseDiagramEditor's parent interface, StructureDiagramEditor
- Create an Extend presentation/Include presentation by using createLinkPresentation method of UseCaseDiagramEditor's parent interface, StructureDiagramEditor

#### [StateMachineDiagramEditor]

- Create Statemachine diagram by using createStatemachineDiagram method of StateMachineDiagramEditor
- Create a initialpseudostate presentation by using createInitialPseudostate method of StateMachineDiagramEditor
- Create a state presentation by using createState method of StateMachineDiagramEditor
- Create a Finalstate presentation by using createFinalState method of StateMachineDiagramEditor
- Create a transition presentation by using createTransition method of StateMachineDiagramEditor

#### [CompositeStructureDiagramEditor]

- Create Composite Structure diagram by using createCompositeStructureDiagram method of CompositeStructureDiagramEditor
- Create a Structured Class presentation by using createStructuredClassPresentation method of CompositeStructureDiagramEditor
- Create a Port presentation on a part or structured class by using createPortPresentation(INodePresentation partPresentation, String name, String dataType, Point2D location) method of CompositeStructureDiagramEditor
- Create a Port presentation on a part or structured class by using createPortPresentation(INodePresentation partPresentation) method of CompositeStructureDiagramEditor
- Create a provided interface presentation for a port or a part by using createProvidedInterfacePresentation(INodePresentation endPresentation) method of CompositeStructureDiagramEditor
- Create a provided interface presentation for a port or a part by using createProvidedInterfacePresentation(INodePresentation endPresentation, Point2D location) method of CompositeStructureDiagramEditor
- Create a provided interface presentation for a port or a part by using createProvidedInterfacePresentation(INodePresentation endPresentation, IClass interfaceModel, Point2D location) method of CompositeStructureDiagramEditor
- Create a required interface presentation for a port or a part by using createRequiredInterfacePresentation(INodePresentation endPresentation) method of CompositeStructureDiagramEditor
- Create a required interface presentation for a port or a part by using createRequiredInterfacePresentation(INodePresentation endPresentation, Point2D location) method of CompositeStructureDiagramEditor
- Create a required interface presentation for a port or a part by using createRequiredInterfacePresentation(INodePresentation endPresentation, IClass interfaceModel, Point2D location) method of CompositeStructureDiagramEditor

#### [ERDiagramEditor](professional only)

- Create an ER Diagram by using createERDiagram method of ERDiagramEditor
- Create an Entity presentation by using createNodePresentation method of ERDiagramEditor
- Create an Identifying relationship/Non-Identifying relationship/subtype presentations by using createLinkPresentation method of ERDiagramEditor

#### [MindmapEditor]

- Create a Mind Map by using createMindmapDiagram method of MindmapEditor
- Create a child topic presentation by using createTopic method of MindmapEditor
- Move a topic by using moveTo method of MindmapEditor
- Delete all child topics of selected topic by using deleteChildren method of MindmapEditor
- Create a link line between topics by using createMMLinkPresentation method of MindmapEditor

MindmapDiagramEditor has been deprecated since astah* 6.0. Please use MindmapEditor.

#### [RequirementDiagramEditor]

- Create Requirement Diagram by using createRequirementDiagram method of RequirementDiagramEditor
- Create Requirement presentation/TestCase presentation by using createNodePresentation method of RequirementDiagramEditor's parent interface, StructureDiagramEditor
- Create DeriveReqt presentation/Copy presentation/Satidfy presentation/Verify presentation/Refine presentation/Trace presentation by using
  createLinkPresentation method of RequirementDiagramEditor's parent interface, StructureDiagramEditor

HOME