diff options
| author | Andrew Branson <andrew.branson@cern.ch> | 2014-09-29 10:33:41 +0200 |
|---|---|---|
| committer | Andrew Branson <andrew.branson@cern.ch> | 2014-09-29 10:33:41 +0200 |
| commit | b305b9ae7e44ce00d947b44f9cc516cac74f6d70 (patch) | |
| tree | 63591c13aaa262b927b93840ce1d66bb34bb3986 /src/main/java/com/c2kernel/collection/gui/model/AggregationVertexOutlineCreator.java | |
| parent | 202041b7fb62b1075d23b2e6ab8a5366d71f1766 (diff) | |
Merge vertex gui classes into main collection package to simplify
Diffstat (limited to 'src/main/java/com/c2kernel/collection/gui/model/AggregationVertexOutlineCreator.java')
| -rw-r--r-- | src/main/java/com/c2kernel/collection/gui/model/AggregationVertexOutlineCreator.java | 44 |
1 files changed, 0 insertions, 44 deletions
diff --git a/src/main/java/com/c2kernel/collection/gui/model/AggregationVertexOutlineCreator.java b/src/main/java/com/c2kernel/collection/gui/model/AggregationVertexOutlineCreator.java deleted file mode 100644 index b28af2e..0000000 --- a/src/main/java/com/c2kernel/collection/gui/model/AggregationVertexOutlineCreator.java +++ /dev/null @@ -1,44 +0,0 @@ -package com.c2kernel.collection.gui.model;
-
-import com.c2kernel.graph.model.GraphPoint;
-import com.c2kernel.graph.model.Vertex;
-import com.c2kernel.graph.model.VertexOutlineCreator;
-
-
-public class AggregationVertexOutlineCreator implements VertexOutlineCreator
-{
- @Override
- public void setOutline(Vertex vertex)
- {
- GraphPoint centre = vertex.getCentrePoint();
- int height = vertex.getHeight();
- int width = vertex.getWidth();
-
-
- if (height==0 || width==0)
- vertex.setOutlinePoints
- (
- new GraphPoint[]
- {
- new GraphPoint(centre.x-20, centre.y-20),
- new GraphPoint(centre.x+20, centre.y-20),
- new GraphPoint(centre.x+20, centre.y+20),
- new GraphPoint(centre.x-20, centre.y+20)
-
- }
- );
- else
-
- vertex.setOutlinePoints
- (
- new GraphPoint[]
- {
- new GraphPoint(centre.x-width/2, centre.y-height/2),
- new GraphPoint(centre.x+width/2, centre.y-height/2),
- new GraphPoint(centre.x+width/2, centre.y+height/2),
- new GraphPoint(centre.x-width/2, centre.y+height/2)
-
- }
- );
- }
-}
|
