changeset 2766:7dc4681a2bed

Allow easy change of sticky axis for annotations. flys-artifacts/trunk@4505 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Thu, 24 May 2012 13:43:35 +0000
parents 79f6d0802b06
children 1cb072d0978d
files flys-artifacts/ChangeLog flys-artifacts/src/main/java/de/intevation/flys/artifacts/FLYSArtifact.java flys-artifacts/src/main/java/de/intevation/flys/jfree/StickyAxisAnnotation.java
diffstat 3 files changed, 19 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/flys-artifacts/ChangeLog	Thu May 24 13:39:59 2012 +0000
+++ b/flys-artifacts/ChangeLog	Thu May 24 13:43:35 2012 +0000
@@ -1,3 +1,9 @@
+2012-05-24	Felix Wolfsteller	<felix.wolfsteller@intevation.de>
+
+	* src/main/java/de/intevation/flys/jfree/StickyAxisAnnotation.java,
+	  src/main/java/de/intevation/flys/jfree/FLYSAnnotation.java:
+          (flipStickyAxis): Allow easy change of sticky axes.
+
 2012-05-24	Felix Wolfsteller	<felix.wolfsteller@intevation.de>
 
 	* src/main/java/de/intevation/flys/artifacts/WINFOArtifact.java
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/FLYSArtifact.java	Thu May 24 13:39:59 2012 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/FLYSArtifact.java	Thu May 24 13:43:35 2012 +0000
@@ -158,7 +158,8 @@
         logger.debug("Set initial state for artifact '" + name + "'");
 
         if (states == null) {
-            logger.error("No states found from which a state could be picked.");
+            logger.error("No states found from which an initial "
+                + "state could be picked.");
         }
         setCurrentState(states.get(0));
 
@@ -1178,6 +1179,7 @@
     protected void dumpArtifact() {
         if (logger.isDebugEnabled()) {
             logger.debug("++++++++++++++ DUMP ARTIFACT DATA +++++++++++++++++");
+            // Include uuid, type, name
 
             logger.debug("------ DUMP DATA ------");
             Collection<StateData> allData = data.values();
--- a/flys-artifacts/src/main/java/de/intevation/flys/jfree/StickyAxisAnnotation.java	Thu May 24 13:39:59 2012 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/jfree/StickyAxisAnnotation.java	Thu May 24 13:43:35 2012 +0000
@@ -95,5 +95,15 @@
     public int getAxisSymbol() {
         return this.axisSymbol;
     }
+
+    /** Set sticky axis to the X axis if it is currently Y, and vice versa. */
+    public void flipStickyAxis() {
+        if (this.getStickyAxis() == SimpleAxis.X_AXIS) {
+            this.setStickyAxis(SimpleAxis.Y_AXIS);
+        }
+        else {
+            this.setStickyAxis(SimpleAxis.X_AXIS);
+        }
+    }
 }
 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org