com.sodius.mdw.core.model.diagram
Class DiagramOptions

java.lang.Object
  extended by com.sodius.mdw.core.model.diagram.DiagramOptions

public class DiagramOptions
extends Object

Defines options that helps a DiagramProvider to retrieve images.

Clients may instantiate or subclass this class.

Since:
2.1.0

Constructor Summary
DiagramOptions()
           
 
Method Summary
 File getDirectory()
          Returns the directory where the image should be exported, or null if not specified.
 String[] getFormats()
          Returns a list of preferred file formats (ex: png, jpg, etc.).
 Map<String,Object> getProperties()
          Returns a modifiable Map of user-defined properties.
 void setDirectory(File directory)
          Set the directory where the image should be exported.
 void setFormats(String[] formats)
          Set the preferred file formats (ex: png, jpg, etc.).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DiagramOptions

public DiagramOptions()
Method Detail

getDirectory

public File getDirectory()
Returns the directory where the image should be exported, or null if not specified.

Returns:
the directory where the image should be exported, or null if not specified.

setDirectory

public void setDirectory(File directory)
Set the directory where the image should be exported.

Parameters:
directory - the directory where the image should be exported.

getProperties

public Map<String,Object> getProperties()
Returns a modifiable Map of user-defined properties. These properties can be used to pass information to a diagram provider.

Returns:
a modifiable Map of user-defined properties.

getFormats

public String[] getFormats()
Returns a list of preferred file formats (ex: png, jpg, etc.). The list is ordered by preference (the first format in the list is the preferred one). A diagram provider may consult these preferred formats to determine the image type to return.

Returns:
a list of of preferred file formats.

setFormats

public void setFormats(String[] formats)
Set the preferred file formats (ex: png, jpg, etc.).

Parameters:
formats - a list of of preferred file formats.
See Also:
getFormats()