de.cau.cs.kieler.kiml
Class LayoutProviderData

java.lang.Object
  extended by de.cau.cs.kieler.kiml.LayoutProviderData

public class LayoutProviderData
extends Object

Data type used to store information for a layout provider.

Rating proposed yellow
(2009-12-11) msp

Field Summary
static int MIN_PRIORITY
          The minimal allowed priority value.
 
Constructor Summary
LayoutProviderData()
           
 
Method Summary
 String getCategory()
          Returns the category.
 String getId()
          Returns the id.
 AbstractLayoutProvider getInstance()
          Returns the instance.
 Collection<String> getKnownOptions()
          Returns a collection of all known options of this layout provider.
 String getName()
          Returns the name.
 int getSupportedPriority(String diagramType)
          Returns the supported priority for the given diagram type.
 String getType()
          Returns the type.
 boolean knowsOption(String layoutOption)
          Determines whether the layout provider knows the given layout option.
 void setCategory(String thecategory)
          Sets the category.
 void setDiagramSupport(String diagramType, int priority)
          Sets support for the given diagram type.
 void setId(String theid)
          Sets the id.
 void setInstance(AbstractLayoutProvider theinstance)
          Sets the instance.
 void setName(String thename)
          Sets the name.
 void setOption(String layoutOption, boolean known)
          Sets the knowledge status of the given layout option.
 void setType(String thetype)
          Sets the type.
 String toString()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

MIN_PRIORITY

public static final int MIN_PRIORITY
The minimal allowed priority value. Values less or equal to this value are treated as 'not supported'.

See Also:
Constant Field Values
Constructor Detail

LayoutProviderData

public LayoutProviderData()
Method Detail

toString

public String toString()

Overrides:
toString in class Object

setOption

public void setOption(String layoutOption,
                      boolean known)
Sets the knowledge status of the given layout option.

Parameters:
layoutOption - identifier of layout option
known - indicates whether the layout provider should know the option

getKnownOptions

public Collection<String> getKnownOptions()
Returns a collection of all known options of this layout provider.

Returns:
the known options

knowsOption

public boolean knowsOption(String layoutOption)
Determines whether the layout provider knows the given layout option.

Parameters:
layoutOption - identifier of layout option
Returns:
true if the associated layout provider know the option

setDiagramSupport

public void setDiagramSupport(String diagramType,
                              int priority)
Sets support for the given diagram type. If the priority is less or equal to MIN_PRIORITY, the type is treated as not supported.

Parameters:
diagramType - identifier of diagram type
priority - priority value, or MIN_PRIORITY if the diagram type is not supported

getSupportedPriority

public int getSupportedPriority(String diagramType)
Returns the supported priority for the given diagram type. If the type is not supported, MIN_PRIORITY is returned.

Parameters:
diagramType - diagram type identifier
Returns:
associated priority, or MIN_PRIORITY if the diagram type is not supported

setId

public void setId(String theid)
Sets the id.

Parameters:
theid - the id to set

getId

public String getId()
Returns the id.

Returns:
the id

setName

public void setName(String thename)
Sets the name.

Parameters:
thename - the name to set

getName

public String getName()
Returns the name.

Returns:
the name

setInstance

public void setInstance(AbstractLayoutProvider theinstance)
Sets the instance.

Parameters:
theinstance - the instance to set

getInstance

public AbstractLayoutProvider getInstance()
Returns the instance.

Returns:
the instance

setType

public void setType(String thetype)
Sets the type.

Parameters:
thetype - the type to set

getType

public String getType()
Returns the type.

Returns:
the type

setCategory

public void setCategory(String thecategory)
Sets the category.

Parameters:
thecategory - the category to set

getCategory

public String getCategory()
Returns the category.

Returns:
the category