Interface IDiagram
-
- All Superinterfaces:
IItem
public interface IDiagram extends IItem
Represents an instance of a diagram contained in the encyclopedia.This interface is not intended to be implemented by clients.
- Since:
- 2.2.0
- See Also:
IEncyclopedia.getDiagrams()
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ISymbolcreateSymbol(String name, long type)Creates an instance of the Symbol class with a particular name and type.voidexportBMP(File file)Exports the diagram into a BMP file.voidexportBMP(File file, boolean uncrop)Exports the diagram into a BMP file.voidexportSVG(File file)Exports the diagram into a SVG file.voidexportWMF(File file)Exports the diagram into a WMF file.ISymbolgetSymbolById(long id)Returns a symbol from its identity.List<ISymbol>getSymbols()Returns all symbols contained in the diagram.StringgetXML()Returns the XML content of the diagram.voidhide()Used to close an instance of a diagram that is currently open.booleanisHidden()Determines whether a diagram is closed or open.booleanisLocked()Check if the diagram is locked by the application.voidshow()Open the diagram on a System Architect screen.voidunlock()Unlock the diagram in the application.-
Methods inherited from interface com.sodius.mdw.metamodel.sa.io.app.IItem
delete, getAuditId, getEncyclopedia, getId, getName, getProperty, getPropertyListOf, getPropertyOneOf, getTypeMinor, getTypeName, setName, setProperty, setPropertyOneOf
-
-
-
-
Method Detail
-
isHidden
boolean isHidden()
Determines whether a diagram is closed or open.- Returns:
trueis the diagram is closed,falseif it is displayed.
-
hide
void hide()
Used to close an instance of a diagram that is currently open.
-
show
void show()
Open the diagram on a System Architect screen.
-
getXML
String getXML()
Returns the XML content of the diagram.- Returns:
- the XML content of the diagram.
-
getSymbols
List<ISymbol> getSymbols()
Returns all symbols contained in the diagram.- Returns:
- all symbols contained in the diagram.
-
getSymbolById
ISymbol getSymbolById(long id)
Returns a symbol from its identity.- Parameters:
id- the symbol identifier.- Returns:
- the symbol of specified identifier, if any.
-
createSymbol
ISymbol createSymbol(String name, long type)
Creates an instance of the Symbol class with a particular name and type.Refer to the SYMBOLS.BAS file in the System Architect directory for a complete listing of all symbols and their internal numbers.
- Parameters:
name- name of new symbol.type- type of System Architect symbol that is being created- Returns:
- the create symbol.
-
exportBMP
void exportBMP(File file)
Exports the diagram into a BMP file. The diagram must be visible for this export to succeed.Preconditions:
- The diagram must be displayed is System Architect
- The directory where the file is to export must exist
- Parameters:
file- the file where to export the picture.- Throws:
IllegalStateException- if the diagram is not displayed in System ArchitectRuntimeException- if the diagram image is not exported by System Architect
-
exportBMP
void exportBMP(File file, boolean uncrop)
Exports the diagram into a BMP file. The diagram must be visible for this export to succeed.Preconditions:
- The diagram must be displayed is System Architect
- The directory where the file is to export must exist
- Parameters:
file- the file where to export the picture.uncrop- determines whether to uncrop diagram content for the export.- Throws:
IllegalStateException- if the diagram is not displayed in System ArchitectRuntimeException- if the diagram image is not exported by System Architect
-
exportSVG
void exportSVG(File file)
Exports the diagram into a SVG file. The diagram must be visible for this export to succeed.Preconditions:
- The diagram must be displayed is System Architect
- The directory where the file is to export must exist
- Parameters:
file- the file where to export the picture.- Throws:
IllegalStateException- if the diagram is not displayed in System ArchitectRuntimeException- if the diagram image is not exported by System Architect
-
exportWMF
void exportWMF(File file)
Exports the diagram into a WMF file. The diagram must be visible for this export to succeed.Preconditions:
- The diagram must be displayed is System Architect
- The directory where the file is to export must exist
- Parameters:
file- the file where to export the picture.- Throws:
IllegalStateException- if the diagram is not displayed in System ArchitectRuntimeException- if the diagram image is not exported by System Architect
-
isLocked
boolean isLocked()
Check if the diagram is locked by the application.- Returns:
trueif and only if the diagram is locked by the application;falseotherwise.- Since:
- 2.2.2
-
unlock
void unlock()
Unlock the diagram in the application.Warning: This method does not unlock the diagram symbols. To unlock the symbols, all the definitions represented by the diagram symbols must be unlocked.
- Since:
- 2.2.2
-
-