diff options
Diffstat (limited to 'src')
10 files changed, 30 insertions, 33 deletions
diff --git a/src/jogl/classes/javax/media/opengl/GLCapabilitiesImmutable.java b/src/jogl/classes/javax/media/opengl/GLCapabilitiesImmutable.java index d12909d33..b91ceae7a 100644 --- a/src/jogl/classes/javax/media/opengl/GLCapabilitiesImmutable.java +++ b/src/jogl/classes/javax/media/opengl/GLCapabilitiesImmutable.java @@ -28,7 +28,6 @@ package javax.media.opengl; -import com.jogamp.common.type.WriteCloneable; import javax.media.nativewindow.CapabilitiesImmutable; /** @@ -137,8 +136,6 @@ public interface GLCapabilitiesImmutable extends CapabilitiesImmutable { */ boolean isPBuffer(); - Object cloneMutable(); - @Override boolean equals(Object obj); diff --git a/src/nativewindow/classes/javax/media/nativewindow/CapabilitiesImmutable.java b/src/nativewindow/classes/javax/media/nativewindow/CapabilitiesImmutable.java index 8fb704bad..eccdf7797 100644 --- a/src/nativewindow/classes/javax/media/nativewindow/CapabilitiesImmutable.java +++ b/src/nativewindow/classes/javax/media/nativewindow/CapabilitiesImmutable.java @@ -101,8 +101,6 @@ public interface CapabilitiesImmutable extends WriteCloneable { */ int getTransparentAlphaValue(); - Object cloneMutable(); - /** Equality over the immutable attributes of both objects */ @Override boolean equals(Object obj); diff --git a/src/nativewindow/classes/javax/media/nativewindow/util/Dimension.java b/src/nativewindow/classes/javax/media/nativewindow/util/Dimension.java index ebf5b9e81..0a5a94565 100644 --- a/src/nativewindow/classes/javax/media/nativewindow/util/Dimension.java +++ b/src/nativewindow/classes/javax/media/nativewindow/util/Dimension.java @@ -45,6 +45,10 @@ public class Dimension implements Cloneable, DimensionImmutable { this.height=height; } + public Object cloneMutable() { + return clone(); + } + public Object clone() { try { return super.clone(); diff --git a/src/nativewindow/classes/javax/media/nativewindow/util/DimensionImmutable.java b/src/nativewindow/classes/javax/media/nativewindow/util/DimensionImmutable.java index 262086ba3..d14e94c10 100644 --- a/src/nativewindow/classes/javax/media/nativewindow/util/DimensionImmutable.java +++ b/src/nativewindow/classes/javax/media/nativewindow/util/DimensionImmutable.java @@ -29,13 +29,15 @@ package javax.media.nativewindow.util; +import com.jogamp.common.type.WriteCloneable; + /** Immutable Dimension Interface, consisting of it's read only components:<br> * <ul> * <li><code>width</code></li> * <li><code>height</code></li> * </ul> */ -public interface DimensionImmutable extends Cloneable { +public interface DimensionImmutable extends WriteCloneable { int getHeight(); diff --git a/src/nativewindow/classes/javax/media/nativewindow/util/Point.java b/src/nativewindow/classes/javax/media/nativewindow/util/Point.java index 89a87541e..0a5036eda 100644 --- a/src/nativewindow/classes/javax/media/nativewindow/util/Point.java +++ b/src/nativewindow/classes/javax/media/nativewindow/util/Point.java @@ -42,6 +42,10 @@ public class Point implements Cloneable, PointImmutable { this(0, 0); } + public Object cloneMutable() { + return clone(); + } + public Object clone() { try { return super.clone(); @@ -59,11 +63,11 @@ public class Point implements Cloneable, PointImmutable { return false; } - public int getX() { + public final int getX() { return x; } - public int getY() { + public final int getY() { return y; } diff --git a/src/nativewindow/classes/javax/media/nativewindow/util/PointImmutable.java b/src/nativewindow/classes/javax/media/nativewindow/util/PointImmutable.java index 7f42138eb..d7eb0e7b4 100644 --- a/src/nativewindow/classes/javax/media/nativewindow/util/PointImmutable.java +++ b/src/nativewindow/classes/javax/media/nativewindow/util/PointImmutable.java @@ -29,8 +29,10 @@ package javax.media.nativewindow.util; +import com.jogamp.common.type.WriteCloneable; + /** Immutable Point interface */ -public interface PointImmutable extends Cloneable { +public interface PointImmutable extends WriteCloneable { int getX(); diff --git a/src/nativewindow/classes/javax/media/nativewindow/util/Rectangle.java b/src/nativewindow/classes/javax/media/nativewindow/util/Rectangle.java index 67bdcbfc7..8d6bfe48f 100644 --- a/src/nativewindow/classes/javax/media/nativewindow/util/Rectangle.java +++ b/src/nativewindow/classes/javax/media/nativewindow/util/Rectangle.java @@ -44,7 +44,11 @@ public class Rectangle implements Cloneable, RectangleImmutable { this.width=width; this.height=height; } - + + public Object cloneMutable() { + return clone(); + } + protected Object clone() { try { return super.clone(); @@ -53,10 +57,10 @@ public class Rectangle implements Cloneable, RectangleImmutable { } } - public int getX() { return x; } - public int getY() { return y; } - public int getWidth() { return width; } - public int getHeight() { return height; } + public final int getX() { return x; } + public final int getY() { return y; } + public final int getWidth() { return width; } + public final int getHeight() { return height; } public void setX(int x) { this.x = x; } public void setY(int y) { this.y = y; } public void setWidth(int width) { this.width = width; } diff --git a/src/nativewindow/classes/javax/media/nativewindow/util/RectangleImmutable.java b/src/nativewindow/classes/javax/media/nativewindow/util/RectangleImmutable.java index ede8ba9c5..d3b43c864 100644 --- a/src/nativewindow/classes/javax/media/nativewindow/util/RectangleImmutable.java +++ b/src/nativewindow/classes/javax/media/nativewindow/util/RectangleImmutable.java @@ -28,8 +28,10 @@ package javax.media.nativewindow.util; +import com.jogamp.common.type.WriteCloneable; + /** Immutable Rectangle interface */ -public interface RectangleImmutable extends Cloneable { +public interface RectangleImmutable extends WriteCloneable { int getHeight(); diff --git a/src/nativewindow/classes/javax/media/nativewindow/util/SurfaceSize.java b/src/nativewindow/classes/javax/media/nativewindow/util/SurfaceSize.java index 19786af2a..8f21bc49b 100644 --- a/src/nativewindow/classes/javax/media/nativewindow/util/SurfaceSize.java +++ b/src/nativewindow/classes/javax/media/nativewindow/util/SurfaceSize.java @@ -35,7 +35,7 @@ package javax.media.nativewindow.util; * <li><code>bits per pixel</code></li> * </ul> */ -public class SurfaceSize implements Cloneable { +public class SurfaceSize { DimensionImmutable resolution; int bitsPerPixel; @@ -47,14 +47,6 @@ public class SurfaceSize implements Cloneable { this.bitsPerPixel=bitsPerPixel; } - public Object clone() { - try { - return super.clone(); - } catch (CloneNotSupportedException ex) { - throw new InternalError(); - } - } - public final DimensionImmutable getResolution() { return resolution; } diff --git a/src/newt/classes/com/jogamp/newt/util/MonitorMode.java b/src/newt/classes/com/jogamp/newt/util/MonitorMode.java index 69dc584d3..5a8bf5bf2 100644 --- a/src/newt/classes/com/jogamp/newt/util/MonitorMode.java +++ b/src/newt/classes/com/jogamp/newt/util/MonitorMode.java @@ -37,7 +37,7 @@ import javax.media.nativewindow.util.*; * <li><code>refresh rate</code></li> * </ul> */ -public class MonitorMode implements Cloneable { +public class MonitorMode { SurfaceSize surfaceSize; DimensionImmutable screenSizeMM; // in [mm] int refreshRate; @@ -51,14 +51,6 @@ public class MonitorMode implements Cloneable { this.refreshRate=refreshRate; } - public Object clone() { - try { - return super.clone(); - } catch (CloneNotSupportedException ex) { - throw new InternalError(); - } - } - public final SurfaceSize getSurfaceSize() { return surfaceSize; } |