com.change_vision.jude.api.inf.model
Interface IDiagram

com.change_vision.jude.api.inf.model.IDiagram
All Superinterfaces:
IElement, IEntity, IHyperlinkOwner, INamedElement
All Implemented Interfaces:
IElement, IEntity, IHyperlinkOwner, INamedElement
All Known Implementing Classes:
IActivityDiagram, IClassDiagram, ICommunicationDiagram, IComponentDiagram, ICompositeStructureDiagram, IDataFlowDiagram, IDeploymentDiagram, IERDiagram, IMatrixDiagram, IMindMapDiagram, IRequirementDiagram, IRequirementTable, ISequenceDiagram, IStateMachineDiagram, ITraceabilityMap, IUseCaseDiagram

public IDiagram
extends INamedElement

Interface for diagrams.


Field Summary
 
Fields inherited from class com.change_vision.jude.api.inf.model.INamedElement
PACKAGE_VISIBILITY, PRIVATE_VISIBILITY, PROTECTED_VISIBILITY, PUBLIC_VISIBILITY
 
Method Summary
abstract  String exportImage(String outputDir, String format, double dpi)
          Export diagram images.
abstract  Rectangle2D getBoundRect()
          Return a rectangle representing the boundary of the diagram.
abstract  IPresentation[] getPresentations()
          Get presentations on a diagram or cells on a CRUD.
abstract  HashMap getProperties()
          Get Properties.
abstract  String getProperty(String key)
          Get Properties.
abstract  String[] getText()
          Deprecated. Get texts on the diagram.
abstract  void setProperties(Map<K,V> map)
          Set Properties.
abstract  void setProperty(String key, String value)
          Set Property.
 
Methods inherited from class com.change_vision.jude.api.inf.model.INamedElement
getAlias1, getAlias2, getClientDependencies, getClientRealizations, getClientUsages, getConstraints, getDefinition, getDiagrams, getFullName, getFullNamespace, getName, getSupplierDependencies, getSupplierRealizations, getSupplierUsages, isPackageVisibility, isPrivateVisibility, isProtectedVisibility, isPublicVisibility, setAlias1, setAlias2, setDefinition, setName, setVisibility
 
Methods inherited from class com.change_vision.jude.api.inf.model.IElement
addStereotype, getComments, getContainer, getContainers, getId, getOwner, getPresentations, getStereotypes, getTaggedValues, getTypeModifier, hasStereotype, isReadOnly, removeStereotype, setTypeModifier
 
Methods inherited from class com.change_vision.jude.api.inf.model.IHyperlinkOwner
createElementHyperlink, createFileHyperlink, createURLHyperlink, deleteHyperlink, getHyperlinks
 

Method Detail

getText

abstract String[] getText()
Deprecated. Get texts on the diagram.

Returns:
The array of Texts. Return the empty array if there is none.

getPresentations

abstract IPresentation[] getPresentations()
Get presentations on a diagram or cells on a CRUD.

Returns:
The array of presentations on a diagram or the array of cells on a CRUD. Return the empty array if there is none.
Throws:
InvalidUsingException - nvalidUsingException occurs.
Keys: 
      ILLEGAL_USE_ERROR_KEY - if Presentation API is used in astah* community. 
 
Values: 
      Error messages for exceptions.

getProperties

abstract HashMap getProperties()
Get Properties.

Returns:
Properties

getProperty

abstract String getProperty(String key)
Get Properties.

Parameters:
key - Key of Property.
Returns:
Value of Property.

setProperty

abstract void setProperty(String key,
                          String value)
Set Property.

Parameters:
key - Key of Property. value Value of Property.
Throws:
InvalidEditingException - InvalidEditingException occurs.
Keys: 
      ILLEGAL_VERSION_ERROR_KEY - if Editing API is used in astah* community. 
      PARAMETER_ERROR_KEY - if a parameter is not set properly. 
      BAD_TRANSACTION_KEY - Bad Transaction. 
      HAS_EXCEPTION_KEY - if an exception has occurred. 
      READ_ONLY_KEY - if a read-only element is edited.
Values: 
      Error messages for exceptions.

setProperties

abstract void setProperties(Map<K,V> map)
Set Properties.

Parameters:
map - Properties.
Throws:
InvalidEditingException - InvalidEditingException occurs.
Keys: 
      ILLEGAL_VERSION_ERROR_KEY - if Editing API is used in astah* community. 
      PARAMETER_ERROR_KEY - if a parameter is not set properly. 
      BAD_TRANSACTION_KEY - Bad Transaction. 
      HAS_EXCEPTION_KEY - if an exception has occurred. 
      READ_ONLY_KEY - if a read-only element is edited.
Values: 
      Error messages for exceptions.

getBoundRect

abstract Rectangle2D getBoundRect()
Return a rectangle representing the boundary of the diagram. A rectangle whose width and height are zero will be returned if the diagram isn't associated to coordinates. The width and height of the rectangle is decided by the scope of all elements on the diagram and special margins. All Margins added for the scope of all elements are 10.

Returns:
A rectangle representing the boundary of the diagram. Null isn't returned. If there isn't any element on the diagram, A rectangle around origin whose width and height are decided by margins will be returned.

exportImage

abstract String exportImage(String outputDir,
                            String format,
                            double dpi)
Export diagram images. This API is available if it is called by plugin (not provided).

Parameters:
outputDir - Output directory
format - Image format. "png", "jpg", "emf" or "svg"
dpi - Resolution of the images. Use 96dpi as default if the value of the scope is invalid.
Returns:
Path to exported images. It includes the file name with the relative path from outputDir.
Throws:
InvalidUsingException - InvalidUsingException occurs if the image export is failed (e.g. called by non-plugin)
InvalidExportImageException - InvalidExportImageException occurs.
See Also:
getBoundRect()