Main Page | Packages | Class Hierarchy | Class List | File List | Class Members

UMLInterface Class Reference

Inheritance diagram for UMLInterface:

ArgoPrintDataSource List of all members.

Detailed Description

The class ArgoPrint uses to interface to the ArgoUML model.

It primarily communicates with ModelFacade using java.lang.reflect.* To save diagrams gef is used. TODO: fix bug that causes only the open diagram to be saved correctly.

Author:
matda701, Mattias Danielsson

Definition at line 93 of file UMLInterface.java.

Public Member Functions

 UMLInterface ()
 Constructor.

void initialize (Logger log)
 Initializes fields prior to usage.

void setLog (Logger logger)
 Sets the logger (_log) to logger.

void setProjectBrowser (ProjectBrowser browser)
 Sets the projectBrowswer to browser.

void setProject (Project proj)
 Sets the project to proj.

void setOutputDir (String dir)
 Sets the outputPath to path.

boolean hasMethod (String method)
 Checks if ModelFacade has a method named method.

Object caller (String call, Object iteratorObject) throws Exception
 Calls method named call in ModelFacade returns Object, which often is String or Collection iteratorObject is the argument for the method.

Object caller (String call) throws Exception
 Calls method named call in ModelFacade.

boolean booleanCaller (String call, Object args[])
 Calls method named call in ModelFacade returns boolean, caller(..) can be used instead but then Booolean.booleanValue() must be used.

Collection getAllDiagrams ()
 Returns all diagrams in the project.

String saveDiagram (UMLDiagram diagram) throws Exception
 Saves a diagram as gif in the directory specified by _outputDir.

boolean trySaveAllDiagrams (boolean overwrite)
 Tests saving of diagrams as gif-files.


Static Public Attributes

final String separator = "/"

Package Attributes

String _outputDir
 The ArgoPrint output dir.


Constructor & Destructor Documentation

UMLInterface  ) 
 

Constructor.

Definition at line 131 of file UMLInterface.java.


Member Function Documentation

boolean booleanCaller String  call,
Object  args[]
 

Calls method named call in ModelFacade returns boolean, caller(..) can be used instead but then Booolean.booleanValue() must be used.

Depracated!

Definition at line 325 of file UMLInterface.java.

References UMLInterface.hasMethod().

Object caller String  call  )  throws Exception [virtual]
 

Calls method named call in ModelFacade.

Used when argument is to be on of the default. ex. calledMethodName(model) and not an iteratorObject

Implements ArgoPrintDataSource.

Definition at line 243 of file UMLInterface.java.

Object caller String  call,
Object  iteratorObject
throws Exception [virtual]
 

Calls method named call in ModelFacade returns Object, which often is String or Collection iteratorObject is the argument for the method.

Implements ArgoPrintDataSource.

Definition at line 195 of file UMLInterface.java.

Collection getAllDiagrams  ) 
 

Returns all diagrams in the project.

TODO: Figure out a clever way to invoke with caller. Solved by using reflections on Project Therefor not needed.

Definition at line 365 of file UMLInterface.java.

boolean hasMethod String  method  ) 
 

Checks if ModelFacade has a method named method.

Depracated!

Definition at line 178 of file UMLInterface.java.

Referenced by UMLInterface.booleanCaller().

void initialize Logger  log  ) 
 

Initializes fields prior to usage.

Can be used instead of the individual setters.

Definition at line 141 of file UMLInterface.java.

String saveDiagram UMLDiagram  diagram  )  throws Exception
 

Saves a diagram as gif in the directory specified by _outputDir.

Returns a String with the path to the saved gif file. TODO: Solve same Bug as in trySaveAllDiagrams() and implement better control for overwrite of old files.

Definition at line 376 of file UMLInterface.java.

References UMLInterface._outputDir, and UMLInterface.separator.

void setLog Logger  logger  ) 
 

Sets the logger (_log) to logger.

Definition at line 153 of file UMLInterface.java.

void setOutputDir String  dir  ) 
 

Sets the outputPath to path.

Definition at line 170 of file UMLInterface.java.

References UMLInterface._outputDir.

void setProject Project  proj  ) 
 

Sets the project to proj.

Definition at line 165 of file UMLInterface.java.

void setProjectBrowser ProjectBrowser  browser  ) 
 

Sets the projectBrowswer to browser.

Definition at line 158 of file UMLInterface.java.

boolean trySaveAllDiagrams boolean  overwrite  ) 
 

Tests saving of diagrams as gif-files.

TODO: Solve bug that causes only open diagram to be saved.

Definition at line 463 of file UMLInterface.java.

References UMLInterface.separator.


Member Data Documentation

String _outputDir [package]
 

The ArgoPrint output dir.

Used when saving diagrams as pictures. Must be set prior to use.

Definition at line 123 of file UMLInterface.java.

Referenced by UMLInterface.saveDiagram(), and UMLInterface.setOutputDir().

final String separator = "/" [static]
 

Definition at line 95 of file UMLInterface.java.

Referenced by UMLInterface.saveDiagram(), and UMLInterface.trySaveAllDiagrams().


The documentation for this class was generated from the following file:
Generated on Tue Dec 2 22:50:57 2003 for ArgoPrint by doxygen 1.3.4