Package jadex.tools.comanalyzer.graph
Class VertexTransformer.IconSize
- java.lang.Object
- 
- jadex.tools.comanalyzer.graph.VertexTransformer.IconSize
 
- 
- All Implemented Interfaces:
- org.apache.commons.collections15.Transformer
 - Enclosing class:
- VertexTransformer
 
 public static final class VertexTransformer.IconSize extends java.lang.Object implements org.apache.commons.collections15.TransformerA transformer for assigning an icon of a specific size to the agent group. The size is calculated from the degree (vertex weight) of the agent group (the number of incomimng and outgoing edges from the vertex) in relation to the highest degree of all agent groups in the graph.
- 
- 
Field SummaryFields Modifier and Type Field Description protected ComponentGroupMultiGraphgraphThe graphprotected java.util.MapiconMapThe icon map to save transformed icons for performance reasonstatic intMAX_VERTEX_SIZEThe max vertex icon sizestatic intMIN_VERTEX_SIZEThe min vertex icon sizeprotected intpropFactorThe proportional factor (1<= proFactor<= 100)protected booleanscaleIf icon scaling is enabledprotected intscaleRangeThe scale range.
 - 
Constructor SummaryConstructors Constructor Description IconSize(ComponentGroupMultiGraph graph)Creates a IconSize transformer for the graph.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanisScaling()voidsetPropFactor(int value)voidsetScaleRange(int scaleRange)voidsetScaling(boolean scale)java.lang.Objecttransform(java.lang.Object group)Returns the icon for the given agent group.
 
- 
- 
- 
Field Detail- 
MIN_VERTEX_SIZEpublic static final int MIN_VERTEX_SIZE The min vertex icon size- See Also:
- Constant Field Values
 
 - 
MAX_VERTEX_SIZEpublic static final int MAX_VERTEX_SIZE The max vertex icon size- See Also:
- Constant Field Values
 
 - 
iconMapprotected java.util.Map iconMap The icon map to save transformed icons for performance reason
 - 
scaleprotected boolean scale If icon scaling is enabled
 - 
scaleRangeprotected int scaleRange The scale range. (0<= scaleRange <= MAX_ICON_SIZE - MIN_ICON_SIZE
 - 
propFactorprotected int propFactor The proportional factor (1<= proFactor<= 100)
 - 
graphprotected ComponentGroupMultiGraph graph The graph
 
- 
 - 
Constructor Detail- 
IconSizepublic IconSize(ComponentGroupMultiGraph graph) Creates a IconSize transformer for the graph.- Parameters:
- graph- The graph.
 
 
- 
 - 
Method Detail- 
transformpublic java.lang.Object transform(java.lang.Object group) Returns the icon for the given agent group.- Specified by:
- transformin interface- org.apache.commons.collections15.Transformer
- Parameters:
- group- The agent group.
- Returns:
- The icon.
 
 - 
setScalingpublic void setScaling(boolean scale) - Parameters:
- scale-- trueif scaling ought to be enabled.
 
 - 
isScalingpublic boolean isScaling() - Returns:
- trueif scaling is enabled
 
 - 
setScaleRangepublic void setScaleRange(int scaleRange) - Parameters:
- scaleRange- The scale range to set.
 
 - 
setPropFactorpublic void setPropFactor(int value) - Parameters:
- value- The proportional factor to set.
 
 
- 
 
-