Commit 826076a8 authored by Tiziano Munaro's avatar Tiziano Munaro
Browse files

[UI] Assign static variables directly instead of in a dedicated block

Issue-Ref: 3876
Issue-Url: https://af3-developer.fortiss.org/issues/3876

Signed-off-by: Tiziano Munaro's avatarTiziano Munaro <munaro@fortiss.org>
parent 59476ffc
ChannelVisual.java 3606276076119c36b149fc4e340944c1cd9d9e0f GREEN
DiagramComponentPortVisual.java 5c49bf5e1b411bd2392d5f8452fa527f32cefc0b GREEN
SubComponentPortVisual.java 80dbee8463840c9551ff8f8bea6a419155abaed5 GREEN
SubComponentVisual.java 7096cebf78d7bd8186f025cae9131cfa24f5f9da RED
SubComponentVisual.java 6760324c1ccdf63c72c28390c6d65a260fbd82b7 YELLOW
......@@ -39,21 +39,16 @@ import javafx.scene.paint.Paint;
public final class SubComponentVisual
extends LayoutedModelElementBasedRectangularContentVisualBase {
/** The fill color used by composite components. */
private static final Color COMPOSITE_COLOR;
private static final Color COMPOSITE_COLOR = convertColor(SUBSTRUCTURE_COMPONENT_BACKGROUND);
/** The fill color used by strongly causal components. */
private static final Color STRONGLY_CAUSAL_COLOR;
private static final Color STRONGLY_CAUSAL_COLOR =
convertColor(STRONGLY_CAUSAL_COMPONENT_BACKGROUND);
/** The fill color used by weakly causal components. */
private static final Color WEAKLY_CAUSAL_COLOR;
private static final Color WEAKLY_CAUSAL_COLOR =
convertColor(WEAKLY_CAUSAL_COMPONENT_BACKGROUND);
/** The icon image. */
private static final Image ICON = getFXImage("/icons/component.gif");
// TODO(AD): This can be directly assigned.
static {
COMPOSITE_COLOR = convertColor(SUBSTRUCTURE_COMPONENT_BACKGROUND);
STRONGLY_CAUSAL_COLOR = convertColor(STRONGLY_CAUSAL_COMPONENT_BACKGROUND);
WEAKLY_CAUSAL_COLOR = convertColor(WEAKLY_CAUSAL_COMPONENT_BACKGROUND);
}
/** Constructor. */
public SubComponentVisual(IContentMVCBundle mvcb) {
super(mvcb);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment