From 38cb4b0b42c4c35a696bb46ffcf8129ca8d89103 Mon Sep 17 00:00:00 2001 From: Reino Ruusu Date: Thu, 6 Jun 2019 16:58:25 +0300 Subject: [PATCH] Refactoring: Move style definitions to a separate package Change-Id: I7ceed42bbad039bf6b6d4ec383a94012b2e3248c --- org.simantics.district.network.ui/adapters.xml | 8 ++++---- .../network/ui/{nodes => styles}/ConnectionLineStyle.java | 3 ++- .../{nodes => styles}/DistrictNetworkHoverInfoStyle.java | 4 +++- .../{nodes => styles}/DistrictNetworkStaticInfoStyle.java | 4 +++- .../ui/{nodes => styles}/ElevationRectangleStyle.java | 3 ++- 5 files changed, 14 insertions(+), 8 deletions(-) rename org.simantics.district.network.ui/src/org/simantics/district/network/ui/{nodes => styles}/ConnectionLineStyle.java (98%) rename org.simantics.district.network.ui/src/org/simantics/district/network/ui/{nodes => styles}/DistrictNetworkHoverInfoStyle.java (97%) rename org.simantics.district.network.ui/src/org/simantics/district/network/ui/{nodes => styles}/DistrictNetworkStaticInfoStyle.java (97%) rename org.simantics.district.network.ui/src/org/simantics/district/network/ui/{nodes => styles}/ElevationRectangleStyle.java (95%) diff --git a/org.simantics.district.network.ui/adapters.xml b/org.simantics.district.network.ui/adapters.xml index c2a02562..f4dea68a 100644 --- a/org.simantics.district.network.ui/adapters.xml +++ b/org.simantics.district.network.ui/adapters.xml @@ -21,18 +21,18 @@ + class="org.simantics.district.network.ui.styles.ConnectionLineStyle"> + class="org.simantics.district.network.ui.styles.DistrictNetworkHoverInfoStyle"> + class="org.simantics.district.network.ui.styles.DistrictNetworkStaticInfoStyle"> + class="org.simantics.district.network.ui.styles.ElevationRectangleStyle"> diff --git a/org.simantics.district.network.ui/src/org/simantics/district/network/ui/nodes/ConnectionLineStyle.java b/org.simantics.district.network.ui/src/org/simantics/district/network/ui/styles/ConnectionLineStyle.java similarity index 98% rename from org.simantics.district.network.ui/src/org/simantics/district/network/ui/nodes/ConnectionLineStyle.java rename to org.simantics.district.network.ui/src/org/simantics/district/network/ui/styles/ConnectionLineStyle.java index 5b3d2b43..b74cbba6 100644 --- a/org.simantics.district.network.ui/src/org/simantics/district/network/ui/nodes/ConnectionLineStyle.java +++ b/org.simantics.district.network.ui/src/org/simantics/district/network/ui/styles/ConnectionLineStyle.java @@ -1,4 +1,4 @@ -package org.simantics.district.network.ui.nodes; +package org.simantics.district.network.ui.styles; import java.awt.BasicStroke; import java.awt.Color; @@ -21,6 +21,7 @@ import org.simantics.diagram.profile.StyleBase; import org.simantics.diagram.stubs.DiagramResource; import org.simantics.district.network.DistrictNetworkUtil; import org.simantics.district.network.ontology.DistrictNetworkResource; +import org.simantics.district.network.ui.nodes.DistrictNetworkNodeUtils; import org.simantics.layer0.Layer0; import org.simantics.modeling.ModelingResources; import org.simantics.scenegraph.INode; diff --git a/org.simantics.district.network.ui/src/org/simantics/district/network/ui/nodes/DistrictNetworkHoverInfoStyle.java b/org.simantics.district.network.ui/src/org/simantics/district/network/ui/styles/DistrictNetworkHoverInfoStyle.java similarity index 97% rename from org.simantics.district.network.ui/src/org/simantics/district/network/ui/nodes/DistrictNetworkHoverInfoStyle.java rename to org.simantics.district.network.ui/src/org/simantics/district/network/ui/styles/DistrictNetworkHoverInfoStyle.java index ddcf1dde..f01fa2ae 100644 --- a/org.simantics.district.network.ui/src/org/simantics/district/network/ui/nodes/DistrictNetworkHoverInfoStyle.java +++ b/org.simantics.district.network.ui/src/org/simantics/district/network/ui/styles/DistrictNetworkHoverInfoStyle.java @@ -1,4 +1,4 @@ -package org.simantics.district.network.ui.nodes; +package org.simantics.district.network.ui.styles; import java.awt.geom.Point2D; import java.util.Collections; @@ -20,6 +20,8 @@ import org.simantics.diagram.profile.StyleBase; import org.simantics.diagram.stubs.DiagramResource; import org.simantics.district.network.DistrictNetworkUtil; import org.simantics.district.network.ontology.DistrictNetworkResource; +import org.simantics.district.network.ui.nodes.DistrictNetworkHoverInfoNode; +import org.simantics.district.network.ui.nodes.DistrictNetworkNodeUtils; import org.simantics.layer0.Layer0; import org.simantics.modeling.ModelingResources; import org.simantics.scenegraph.INode; diff --git a/org.simantics.district.network.ui/src/org/simantics/district/network/ui/nodes/DistrictNetworkStaticInfoStyle.java b/org.simantics.district.network.ui/src/org/simantics/district/network/ui/styles/DistrictNetworkStaticInfoStyle.java similarity index 97% rename from org.simantics.district.network.ui/src/org/simantics/district/network/ui/nodes/DistrictNetworkStaticInfoStyle.java rename to org.simantics.district.network.ui/src/org/simantics/district/network/ui/styles/DistrictNetworkStaticInfoStyle.java index 20e8ecbc..e452a17b 100644 --- a/org.simantics.district.network.ui/src/org/simantics/district/network/ui/nodes/DistrictNetworkStaticInfoStyle.java +++ b/org.simantics.district.network.ui/src/org/simantics/district/network/ui/styles/DistrictNetworkStaticInfoStyle.java @@ -1,4 +1,4 @@ -package org.simantics.district.network.ui.nodes; +package org.simantics.district.network.ui.styles; import java.awt.geom.Point2D; import java.util.Set; @@ -19,6 +19,8 @@ import org.simantics.diagram.stubs.DiagramResource; import org.simantics.district.network.DistrictNetworkUtil; import org.simantics.district.network.ontology.DistrictNetworkResource; import org.simantics.district.network.profile.MidBranchEdgeSetRequest; +import org.simantics.district.network.ui.nodes.DistrictNetworkNodeUtils; +import org.simantics.district.network.ui.nodes.DistrictNetworkStaticInfoNode; import org.simantics.layer0.Layer0; import org.simantics.scenegraph.INode; import org.simantics.scenegraph.profile.EvaluationContext; diff --git a/org.simantics.district.network.ui/src/org/simantics/district/network/ui/nodes/ElevationRectangleStyle.java b/org.simantics.district.network.ui/src/org/simantics/district/network/ui/styles/ElevationRectangleStyle.java similarity index 95% rename from org.simantics.district.network.ui/src/org/simantics/district/network/ui/nodes/ElevationRectangleStyle.java rename to org.simantics.district.network.ui/src/org/simantics/district/network/ui/styles/ElevationRectangleStyle.java index c6846495..59506e75 100644 --- a/org.simantics.district.network.ui/src/org/simantics/district/network/ui/nodes/ElevationRectangleStyle.java +++ b/org.simantics.district.network.ui/src/org/simantics/district/network/ui/styles/ElevationRectangleStyle.java @@ -1,4 +1,4 @@ -package org.simantics.district.network.ui.nodes; +package org.simantics.district.network.ui.styles; import java.awt.geom.Rectangle2D; import java.util.Collection; @@ -7,6 +7,7 @@ import java.util.Collections; import org.simantics.db.RequestProcessor; import org.simantics.db.Resource; import org.simantics.db.exception.DatabaseException; +import org.simantics.district.network.ui.nodes.ElevationServerNode; import org.simantics.maps.elevation.server.SingletonTiffTileInterface; import org.simantics.scenegraph.g2d.IG2DNode; import org.simantics.scenegraph.profile.EvaluationContext; -- 2.47.0