[Arakhnę-Dev] [402] * Add axis invertion in zoomable contexts.

[ Thread Index | Date Index | More arakhne.org/dev Archives ]


Revision: 402
Author:   galland
Date:     2013-03-29 11:09:01 +0100 (Fri, 29 Mar 2013)
Log Message:
-----------
* Add axis invertion in zoomable contexts.

Modified Paths:
--------------
    trunk/ui/ui-base/src/main/java/org/arakhne/afc/ui/ZoomableContext.java
    trunk/ui/ui-swing/src/main/java/org/arakhne/afc/ui/swing/zoompanel/ZoomableGraphics2D.java
    trunk/ui/ui-swing/src/main/java/org/arakhne/afc/ui/swing/zoompanel/ZoomableViewport.java

Modified: trunk/ui/ui-base/src/main/java/org/arakhne/afc/ui/ZoomableContext.java
===================================================================
--- trunk/ui/ui-base/src/main/java/org/arakhne/afc/ui/ZoomableContext.java	2013-03-29 10:08:09 UTC (rev 401)
+++ trunk/ui/ui-base/src/main/java/org/arakhne/afc/ui/ZoomableContext.java	2013-03-29 10:09:01 UTC (rev 402)
@@ -118,5 +118,21 @@
 	 * @return the Y coordinate of the view center. 
 	 */
 	public float getFocusY();
+	
+	/** Replies if the X axis is inverted (positives are to the left)
+	 * than the standard UI X axis (positives are to the right).
+	 * 
+	 * @return <code>true</code> if the positives are to the left;
+	 * <code>false</code> if the positives are to the right. 
+	 */
+	public boolean isXAxisInverted();
 
+	/** Replies if the Y axis is inverted (positives are to the top)
+	 * than the standard UI Y axis (positives are to the bottom).
+	 * 
+	 * @return <code>true</code> if the positives are to the top;
+	 * <code>false</code> if the positives are to the bottom. 
+	 */
+	public boolean isYAxisInverted();
+
 }
\ No newline at end of file

Modified: trunk/ui/ui-swing/src/main/java/org/arakhne/afc/ui/swing/zoompanel/ZoomableGraphics2D.java
===================================================================
--- trunk/ui/ui-swing/src/main/java/org/arakhne/afc/ui/swing/zoompanel/ZoomableGraphics2D.java	2013-03-29 10:08:09 UTC (rev 401)
+++ trunk/ui/ui-swing/src/main/java/org/arakhne/afc/ui/swing/zoompanel/ZoomableGraphics2D.java	2013-03-29 10:09:01 UTC (rev 402)
@@ -2163,4 +2163,14 @@
 		return this.focusY;
 	}
 
+	@Override
+	public boolean isXAxisInverted() {
+		return this.flipX;
+	}
+
+	@Override
+	public boolean isYAxisInverted() {
+		return this.flipY;
+	}
+
 }

Modified: trunk/ui/ui-swing/src/main/java/org/arakhne/afc/ui/swing/zoompanel/ZoomableViewport.java
===================================================================
--- trunk/ui/ui-swing/src/main/java/org/arakhne/afc/ui/swing/zoompanel/ZoomableViewport.java	2013-03-29 10:08:09 UTC (rev 401)
+++ trunk/ui/ui-swing/src/main/java/org/arakhne/afc/ui/swing/zoompanel/ZoomableViewport.java	2013-03-29 10:09:01 UTC (rev 402)
@@ -43,20 +43,6 @@
  */
 public interface ZoomableViewport extends ZoomableContext, Printable {
     
-    /** Replies if the X axis may be inverted.
-     * 
-     * @return <code>true</code> if the X axis is inverted,
-     * otherwise <code>false</code>.
-     */
-    public boolean isXAxisInverted();
-
-    /** Replies if the Y axis may be inverted.
-     * 
-     * @return <code>true</code> if the Y axis is inverted,
-     * otherwise <code>false</code>.
-     */
-    public boolean isYAxisInverted();
-    
     /** Replies the target point in the screen coordinate system.
      * 
      * @return the target point in the screen coordinate system


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/