Package jadex.tools.comanalyzer.graph
Class EdgeTransformer.WeightStroke
- java.lang.Object
- 
- jadex.tools.comanalyzer.graph.EdgeTransformer.WeightStroke
 
- 
- All Implemented Interfaces:
- org.apache.commons.collections15.Transformer
 - Enclosing class:
- EdgeTransformer
 
 public static final class EdgeTransformer.WeightStroke extends java.lang.Object implements org.apache.commons.collections15.TransformerA Transformer for assigning a weighted stroke to the message group (the edge). The size is calculated from the edge weight of the message group (the number of elements (messages) inside the group) in relation to the highest edge weight of all message groups in the graph.
- 
- 
Field SummaryFields Modifier and Type Field Description static java.awt.StrokebasicThe basic strokestatic java.awt.StrokedottedThe dotted strokeprotected ComponentGroupMultiGraphgraphThe graphstatic java.awt.StrokeheavyThe heavy strokestatic intMAX_EDGE_SIZEThe max edge sizestatic intMIN_EDGE_SIZEThe min edge sizeprotected intpropFactorThe proportional factor (1<= proFactor<= 100)protected booleanscaleIf stroke scaling is enabledprotected intscaleRangeThe scale range.
 - 
Constructor SummaryConstructors Constructor Description WeightStroke(ComponentGroupMultiGraph graph)Creates a WeightStroke transformer for the graph.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanisScaling()voidsetPropValue(int value)voidsetScaleRange(int scaleRange)voidsetScaling(boolean scale)java.lang.Objecttransform(java.lang.Object group)Returns the stroke for the given message group.
 
- 
- 
- 
Field Detail- 
MIN_EDGE_SIZEpublic static final int MIN_EDGE_SIZE The min edge size- See Also:
- Constant Field Values
 
 - 
MAX_EDGE_SIZEpublic static final int MAX_EDGE_SIZE The max edge size- See Also:
- Constant Field Values
 
 - 
basicpublic static final java.awt.Stroke basic The basic stroke
 - 
heavypublic static final java.awt.Stroke heavy The heavy stroke
 - 
dottedpublic static final java.awt.Stroke dotted The dotted stroke
 - 
graphprotected ComponentGroupMultiGraph graph The graph
 - 
scaleprotected boolean scale If stroke scaling is enabled
 - 
scaleRangeprotected int scaleRange The scale range. (0<= scaleRange <= MAX_EDGE_SIZE - MIN_EDGE_SIZE
 - 
propFactorprotected int propFactor The proportional factor (1<= proFactor<= 100)
 
- 
 - 
Constructor Detail- 
WeightStrokepublic WeightStroke(ComponentGroupMultiGraph graph) Creates a WeightStroke transformer for the graph.- Parameters:
- graph- The graph.
 
 
- 
 - 
Method Detail- 
transformpublic java.lang.Object transform(java.lang.Object group) Returns the stroke for the given message group.- Specified by:
- transformin interface- org.apache.commons.collections15.Transformer
- Parameters:
- group- The message 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.
 
 - 
setPropValuepublic void setPropValue(int value) - Parameters:
- value- The proportional factor to set.
 
 
- 
 
-