From 5e9c02bce7b241a0bf95c8abca9a91cd25e51ed3 Mon Sep 17 00:00:00 2001 From: Harvey Harrison Date: Thu, 17 Oct 2013 22:27:27 -0700 Subject: jogl: remove all trailing whitespace Signed-off-by: Harvey Harrison --- .../jogamp/graph/curve/opengl/RegionFactory.java | 20 +-- .../graph/curve/opengl/RegionRendererImpl01.java | 24 +-- .../jogamp/graph/curve/opengl/RenderStateImpl.java | 14 +- .../graph/curve/opengl/TextRendererImpl01.java | 26 +-- .../jogamp/graph/curve/opengl/VBORegion2PES2.java | 178 ++++++++++----------- .../jogamp/graph/curve/opengl/VBORegionSPES2.java | 34 ++-- .../graph/curve/opengl/shader/AttributeNames.java | 12 +- .../graph/curve/opengl/shader/UniformNames.java | 2 +- .../jogamp/graph/curve/tess/CDTriangulator2D.java | 30 ++-- .../jogamp/graph/curve/tess/GraphOutline.java | 10 +- .../jogamp/graph/curve/tess/GraphVertex.java | 12 +- .../classes/jogamp/graph/curve/tess/HEdge.java | 12 +- src/jogl/classes/jogamp/graph/curve/tess/Loop.java | 30 ++-- .../jogamp/graph/curve/text/GlyphShape.java | 20 +-- .../jogamp/graph/curve/text/GlyphString.java | 58 +++---- src/jogl/classes/jogamp/graph/font/FontInt.java | 2 +- .../classes/jogamp/graph/font/JavaFontLoader.java | 46 +++--- .../jogamp/graph/font/UbuntuFontLoader.java | 36 ++--- .../jogamp/graph/font/typecast/TypecastFont.java | 56 +++---- .../font/typecast/TypecastFontConstructor.java | 10 +- .../jogamp/graph/font/typecast/TypecastGlyph.java | 88 +++++----- .../graph/font/typecast/TypecastHMetrics.java | 14 +- .../graph/font/typecast/TypecastRenderer.java | 26 +-- .../graph/font/typecast/ot/Disassembler.java | 8 +- .../jogamp/graph/font/typecast/ot/Fixed.java | 4 +- .../jogamp/graph/font/typecast/ot/Mnemonic.java | 8 +- .../jogamp/graph/font/typecast/ot/OTFont.java | 36 ++--- .../graph/font/typecast/ot/OTFontCollection.java | 4 +- .../jogamp/graph/font/typecast/ot/OTGlyph.java | 8 +- .../graph/font/typecast/ot/mac/ResourceData.java | 2 +- .../graph/font/typecast/ot/mac/ResourceFile.java | 10 +- .../graph/font/typecast/ot/mac/ResourceHeader.java | 6 +- .../graph/font/typecast/ot/mac/ResourceMap.java | 10 +- .../font/typecast/ot/mac/ResourceReference.java | 12 +- .../graph/font/typecast/ot/mac/ResourceType.java | 10 +- .../graph/font/typecast/ot/table/BaseTable.java | 98 ++++++------ .../graph/font/typecast/ot/table/CffTable.java | 122 +++++++------- .../graph/font/typecast/ot/table/Charstring.java | 2 +- .../font/typecast/ot/table/CharstringType2.java | 18 +-- .../graph/font/typecast/ot/table/ClassDef.java | 8 +- .../font/typecast/ot/table/ClassDefFormat1.java | 8 +- .../font/typecast/ot/table/ClassDefFormat2.java | 8 +- .../graph/font/typecast/ot/table/CmapFormat.java | 14 +- .../graph/font/typecast/ot/table/CmapFormat0.java | 2 +- .../graph/font/typecast/ot/table/CmapFormat2.java | 28 ++-- .../graph/font/typecast/ot/table/CmapFormat4.java | 4 +- .../graph/font/typecast/ot/table/CmapFormat6.java | 4 +- .../font/typecast/ot/table/CmapFormatUnknown.java | 6 +- .../font/typecast/ot/table/CmapIndexEntry.java | 2 +- .../graph/font/typecast/ot/table/CmapTable.java | 10 +- .../graph/font/typecast/ot/table/Coverage.java | 2 +- .../graph/font/typecast/ot/table/CvtTable.java | 12 +- .../graph/font/typecast/ot/table/Device.java | 8 +- .../font/typecast/ot/table/DirectoryEntry.java | 4 +- .../graph/font/typecast/ot/table/DsigEntry.java | 14 +- .../graph/font/typecast/ot/table/DsigTable.java | 12 +- .../graph/font/typecast/ot/table/FeatureList.java | 8 +- .../font/typecast/ot/table/FeatureRecord.java | 2 +- .../graph/font/typecast/ot/table/FpgmTable.java | 12 +- .../graph/font/typecast/ot/table/GaspRange.java | 12 +- .../graph/font/typecast/ot/table/GaspTable.java | 14 +- .../typecast/ot/table/GlyfCompositeDescript.java | 2 +- .../graph/font/typecast/ot/table/GlyfDescript.java | 2 +- .../font/typecast/ot/table/GlyfSimpleDescript.java | 4 +- .../graph/font/typecast/ot/table/GlyfTable.java | 6 +- .../font/typecast/ot/table/GlyphDescription.java | 24 +-- .../graph/font/typecast/ot/table/GposTable.java | 4 +- .../graph/font/typecast/ot/table/GsubTable.java | 20 +-- .../graph/font/typecast/ot/table/HdmxTable.java | 20 +-- .../graph/font/typecast/ot/table/HeadTable.java | 4 +- .../graph/font/typecast/ot/table/HheaTable.java | 12 +- .../jogamp/graph/font/typecast/ot/table/ID.java | 4 +- .../graph/font/typecast/ot/table/KernSubtable.java | 12 +- .../typecast/ot/table/KernSubtableFormat0.java | 10 +- .../typecast/ot/table/KernSubtableFormat2.java | 8 +- .../graph/font/typecast/ot/table/KernTable.java | 14 +- .../graph/font/typecast/ot/table/KerningPair.java | 8 +- .../graph/font/typecast/ot/table/LangSys.java | 10 +- .../font/typecast/ot/table/LangSysRecord.java | 2 +- .../graph/font/typecast/ot/table/Ligature.java | 4 +- .../typecast/ot/table/LigatureSubstFormat1.java | 2 +- .../graph/font/typecast/ot/table/LocaTable.java | 10 +- .../graph/font/typecast/ot/table/Lookup.java | 2 +- .../graph/font/typecast/ot/table/LookupList.java | 8 +- .../typecast/ot/table/LookupSubtableFactory.java | 4 +- .../graph/font/typecast/ot/table/LtshTable.java | 16 +- .../graph/font/typecast/ot/table/MaxpTable.java | 14 +- .../graph/font/typecast/ot/table/NameRecord.java | 18 +-- .../graph/font/typecast/ot/table/NameTable.java | 14 +- .../graph/font/typecast/ot/table/Os2Table.java | 14 +- .../graph/font/typecast/ot/table/Panose.java | 26 +-- .../graph/font/typecast/ot/table/PcltTable.java | 14 +- .../graph/font/typecast/ot/table/PostTable.java | 18 +-- .../graph/font/typecast/ot/table/PrepTable.java | 12 +- .../graph/font/typecast/ot/table/Program.java | 8 +- .../graph/font/typecast/ot/table/RangeRecord.java | 2 +- .../graph/font/typecast/ot/table/Script.java | 6 +- .../graph/font/typecast/ot/table/ScriptList.java | 12 +- .../graph/font/typecast/ot/table/ScriptRecord.java | 4 +- .../font/typecast/ot/table/SignatureBlock.java | 10 +- .../graph/font/typecast/ot/table/SingleSubst.java | 2 +- .../font/typecast/ot/table/SingleSubstFormat1.java | 2 +- .../font/typecast/ot/table/SingleSubstFormat2.java | 2 +- .../graph/font/typecast/ot/table/TTCHeader.java | 12 +- .../jogamp/graph/font/typecast/ot/table/Table.java | 12 +- .../font/typecast/ot/table/TableDirectory.java | 2 +- .../font/typecast/ot/table/TableException.java | 6 +- .../graph/font/typecast/ot/table/TableFactory.java | 10 +- .../graph/font/typecast/ot/table/VdmxTable.java | 40 ++--- .../graph/font/typecast/ot/table/VheaTable.java | 2 +- .../graph/font/typecast/t2/T2Interpreter.java | 146 ++++++++--------- .../graph/font/typecast/tt/engine/Interpreter.java | 4 +- .../jogamp/graph/geom/plane/AffineTransform.java | 50 +++--- .../classes/jogamp/graph/geom/plane/Crossing.java | 26 +-- .../classes/jogamp/graph/geom/plane/Path2D.java | 42 ++--- 115 files changed, 1027 insertions(+), 1027 deletions(-) (limited to 'src/jogl/classes/jogamp/graph') diff --git a/src/jogl/classes/jogamp/graph/curve/opengl/RegionFactory.java b/src/jogl/classes/jogamp/graph/curve/opengl/RegionFactory.java index 1f59b5805..515583b14 100644 --- a/src/jogl/classes/jogamp/graph/curve/opengl/RegionFactory.java +++ b/src/jogl/classes/jogamp/graph/curve/opengl/RegionFactory.java @@ -30,20 +30,20 @@ package jogamp.graph.curve.opengl; import com.jogamp.graph.curve.Region; import com.jogamp.graph.curve.opengl.GLRegion; -/** RegionFactory to create a Context specific Region implementation. - * +/** RegionFactory to create a Context specific Region implementation. + * * @see GLRegion */ public class RegionFactory { - + /** * Create a Region using the passed render mode - * + * *

In case {@link Region#VBAA_RENDERING_BIT} is being requested the default texture unit * {@link Region#TWO_PASS_DEFAULT_TEXTURE_UNIT} is being used.

- * + * * @param rs the RenderState to be used - * @param renderModes bit-field of modes, e.g. {@link Region#VARIABLE_CURVE_WEIGHT_BIT}, {@link Region#VBAA_RENDERING_BIT} + * @param renderModes bit-field of modes, e.g. {@link Region#VARIABLE_CURVE_WEIGHT_BIT}, {@link Region#VBAA_RENDERING_BIT} */ public static GLRegion create(int renderModes) { if( 0 != ( Region.VBAA_RENDERING_BIT & renderModes ) ){ @@ -53,18 +53,18 @@ public class RegionFactory { return new VBORegionSPES2(renderModes); } } - + /** Create a Single Pass Region using the passed render mode - * @param renderModes bit-field of modes, e.g. {@link Region#VARIABLE_CURVE_WEIGHT_BIT}, + * @param renderModes bit-field of modes, e.g. {@link Region#VARIABLE_CURVE_WEIGHT_BIT}, * {@link Region#VBAA_RENDERING_BIT} * @return */ public static GLRegion createSinglePass(int renderModes) { return new VBORegionSPES2(renderModes); } - + /** Create a Two Pass (VBAA) Region using the passed render mode - * @param renderModes bit-field of modes, e.g. {@link Region#VARIABLE_CURVE_WEIGHT_BIT}, + * @param renderModes bit-field of modes, e.g. {@link Region#VARIABLE_CURVE_WEIGHT_BIT}, * {@link Region#VBAA_RENDERING_BIT} * @return */ diff --git a/src/jogl/classes/jogamp/graph/curve/opengl/RegionRendererImpl01.java b/src/jogl/classes/jogamp/graph/curve/opengl/RegionRendererImpl01.java index 7f5afcd02..22600cb89 100644 --- a/src/jogl/classes/jogamp/graph/curve/opengl/RegionRendererImpl01.java +++ b/src/jogl/classes/jogamp/graph/curve/opengl/RegionRendererImpl01.java @@ -43,12 +43,12 @@ import com.jogamp.opengl.util.glsl.ShaderState; public class RegionRendererImpl01 extends RegionRenderer { public RegionRendererImpl01(RenderState rs, int renderModes) { super(rs, renderModes); - + } - + protected boolean initShaderProgram(GL2ES2 gl) { final ShaderState st = rs.getShaderState(); - + final ShaderCode rsVp = ShaderCode.create(gl, GL2ES2.GL_VERTEX_SHADER, RegionRendererImpl01.class, "shader", "shader/bin", getVertexShaderName(), true); final ShaderCode rsFp = ShaderCode.create(gl, GL2ES2.GL_FRAGMENT_SHADER, RegionRendererImpl01.class, "shader", @@ -57,29 +57,29 @@ public class RegionRendererImpl01 extends RegionRenderer { // rsFp.defaultShaderCustomization(gl, true, true); int pos = rsFp.addGLSLVersion(gl); if( gl.isGLES2() ) { - pos = rsFp.insertShaderSource(0, pos, ShaderCode.extOESDerivativesEnable); + pos = rsFp.insertShaderSource(0, pos, ShaderCode.extOESDerivativesEnable); } final String rsFpDefPrecision = getFragmentShaderPrecision(gl); if( null != rsFpDefPrecision ) { rsFp.insertShaderSource(0, pos, rsFpDefPrecision); } - + final ShaderProgram sp = new ShaderProgram(); sp.add(rsVp); sp.add(rsFp); - if( !sp.init(gl) ) { + if( !sp.init(gl) ) { throw new GLException("RegionRenderer: Couldn't init program: "+sp); } - st.attachShaderProgram(gl, sp, false); + st.attachShaderProgram(gl, sp, false); st.bindAttribLocation(gl, AttributeNames.VERTEX_ATTR_IDX, AttributeNames.VERTEX_ATTR_NAME); - st.bindAttribLocation(gl, AttributeNames.TEXCOORD_ATTR_IDX, AttributeNames.TEXCOORD_ATTR_NAME); - + st.bindAttribLocation(gl, AttributeNames.TEXCOORD_ATTR_IDX, AttributeNames.TEXCOORD_ATTR_NAME); + if(!sp.link(gl, System.err)) { throw new GLException("RegionRenderer: Couldn't link program: "+sp); - } + } st.useProgram(gl, true); - + if(DEBUG) { System.err.println("RegionRendererImpl01 initialized: " + Thread.currentThread()+" "+st); } @@ -94,5 +94,5 @@ public class RegionRendererImpl01 extends RegionRenderer { @Override protected void drawImpl(GL2ES2 gl, Region region, float[] position, int[] texSize) { ((GLRegion)region).draw(gl, rs, vp_width, vp_height, texSize); - } + } } diff --git a/src/jogl/classes/jogamp/graph/curve/opengl/RenderStateImpl.java b/src/jogl/classes/jogamp/graph/curve/opengl/RenderStateImpl.java index 51356ca13..8ca29b9f0 100644 --- a/src/jogl/classes/jogamp/graph/curve/opengl/RenderStateImpl.java +++ b/src/jogl/classes/jogamp/graph/curve/opengl/RenderStateImpl.java @@ -38,9 +38,9 @@ import com.jogamp.graph.geom.Vertex; import com.jogamp.opengl.util.PMVMatrix; import com.jogamp.opengl.util.glsl.ShaderState; -public class RenderStateImpl extends RenderState { +public class RenderStateImpl extends RenderState { /** - * weight is equivalent to the + * weight is equivalent to the * global off-curve vertex weight. * TODO: change to per vertex */ @@ -50,7 +50,7 @@ public class RenderStateImpl extends RenderState { public RenderStateImpl(ShaderState st, Vertex.Factory pointFactory, PMVMatrix pmvMatrix) { super(st, pointFactory, pmvMatrix); - + gcu_Weight = new GLUniformData(UniformNames.gcu_Weight, 1.0f); st.ownUniform(gcu_PMVMatrix); gcu_Alpha = new GLUniformData(UniformNames.gcu_Alpha, 1.0f); @@ -60,15 +60,15 @@ public class RenderStateImpl extends RenderState { // gcu_Strength = new GLUniformData(UniformNames.gcu_Strength, 3.0f); // st.ownUniform(gcu_Strength); } - + public RenderStateImpl(ShaderState st, Vertex.Factory pointFactory) { this(st, pointFactory, new PMVMatrix()); } - + public final GLUniformData getWeight() { return gcu_Weight; } public final GLUniformData getAlpha() { return gcu_Alpha; } public final GLUniformData getColorStatic() { return gcu_ColorStatic; } //public final GLUniformData getStrength() { return gcu_Strength; } - - + + } diff --git a/src/jogl/classes/jogamp/graph/curve/opengl/TextRendererImpl01.java b/src/jogl/classes/jogamp/graph/curve/opengl/TextRendererImpl01.java index 81c421371..60758b90b 100644 --- a/src/jogl/classes/jogamp/graph/curve/opengl/TextRendererImpl01.java +++ b/src/jogl/classes/jogamp/graph/curve/opengl/TextRendererImpl01.java @@ -40,11 +40,11 @@ import com.jogamp.opengl.util.glsl.ShaderCode; import com.jogamp.opengl.util.glsl.ShaderProgram; import com.jogamp.opengl.util.glsl.ShaderState; -public class TextRendererImpl01 extends TextRenderer { +public class TextRendererImpl01 extends TextRenderer { public TextRendererImpl01(RenderState rs, int type) { - super(rs, type); + super(rs, type); } - + @Override protected boolean initShaderProgram(GL2ES2 gl){ final ShaderState st = rs.getShaderState(); @@ -63,18 +63,18 @@ public class TextRendererImpl01 extends TextRenderer { if( null != rsFpDefPrecision ) { rsFp.insertShaderSource(0, pos, rsFpDefPrecision); } - + final ShaderProgram sp = new ShaderProgram(); sp.add(rsVp); sp.add(rsFp); - - if( !sp.init(gl) ) { + + if( !sp.init(gl) ) { throw new GLException("RegionRenderer: Couldn't init program: "+sp); } - st.attachShaderProgram(gl, sp, false); + st.attachShaderProgram(gl, sp, false); st.bindAttribLocation(gl, AttributeNames.VERTEX_ATTR_IDX, AttributeNames.VERTEX_ATTR_NAME); - st.bindAttribLocation(gl, AttributeNames.TEXCOORD_ATTR_IDX, AttributeNames.TEXCOORD_ATTR_NAME); - + st.bindAttribLocation(gl, AttributeNames.TEXCOORD_ATTR_IDX, AttributeNames.TEXCOORD_ATTR_NAME); + if(!sp.link(gl, System.err)) { throw new GLException("TextRendererImpl01: Couldn't link program: "+sp); } @@ -82,15 +82,15 @@ public class TextRendererImpl01 extends TextRenderer { if(DEBUG) { System.err.println("TextRendererImpl01 initialized: " + Thread.currentThread()+" "+st); - } + } return true; } - + @Override protected void destroyImpl(GL2ES2 gl) { super.destroyImpl(gl); } - + @Override public void drawString3D(GL2ES2 gl, Font font, String str, float[] position, int fontSize, int[/*1*/] texSize) { if(!isInitialized()){ @@ -101,7 +101,7 @@ public class TextRendererImpl01 extends TextRenderer { glyphString = createString(gl, font, fontSize, str); addCachedGlyphString(gl, font, str, fontSize, glyphString); } - + glyphString.renderString3D(gl, rs, vp_width, vp_height, texSize); } } diff --git a/src/jogl/classes/jogamp/graph/curve/opengl/VBORegion2PES2.java b/src/jogl/classes/jogamp/graph/curve/opengl/VBORegion2PES2.java index 85d3ad5a7..86c0db8c6 100644 --- a/src/jogl/classes/jogamp/graph/curve/opengl/VBORegion2PES2.java +++ b/src/jogl/classes/jogamp/graph/curve/opengl/VBORegion2PES2.java @@ -30,7 +30,7 @@ package jogamp.graph.curve.opengl; import java.nio.FloatBuffer; import javax.media.opengl.GL2ES2; -// FIXME: Subsume GL2GL3.GL_DRAW_FRAMEBUFFER -> GL2ES2.GL_DRAW_FRAMEBUFFER ! +// FIXME: Subsume GL2GL3.GL_DRAW_FRAMEBUFFER -> GL2ES2.GL_DRAW_FRAMEBUFFER ! import javax.media.opengl.GL; import javax.media.opengl.GLUniformData; import javax.media.opengl.fixedfunc.GLMatrixFunc; @@ -58,90 +58,90 @@ public class VBORegion2PES2 extends GLRegion { private GLArrayDataServer verticeFboAttr; private GLArrayDataServer texCoordFboAttr; private GLArrayDataServer indicesFbo; - - + + private FBObject fbo; private TextureAttachment texA; private PMVMatrix fboPMVMatrix; GLUniformData mgl_fboPMVMatrix; - + private int tex_width_c = 0; private int tex_height_c = 0; - GLUniformData mgl_ActiveTexture; + GLUniformData mgl_ActiveTexture; GLUniformData mgl_TextureSize; // if GLSL < 1.30 - + public VBORegion2PES2(int renderModes, int textureEngine) { super(renderModes); fboPMVMatrix = new PMVMatrix(); - mgl_fboPMVMatrix = new GLUniformData(UniformNames.gcu_PMVMatrix, 4, 4, fboPMVMatrix.glGetPMvMatrixf()); - mgl_ActiveTexture = new GLUniformData(UniformNames.gcu_TextureUnit, textureEngine); + mgl_fboPMVMatrix = new GLUniformData(UniformNames.gcu_PMVMatrix, 4, 4, fboPMVMatrix.glGetPMvMatrixf()); + mgl_ActiveTexture = new GLUniformData(UniformNames.gcu_TextureUnit, textureEngine); } - + public void update(GL2ES2 gl, RenderState rs) { if(!isDirty()) { - return; + return; } if(null == indicesFbo) { final int initialElementCount = 256; final ShaderState st = rs.getShaderState(); - - indicesFbo = GLArrayDataServer.createData(3, GL2ES2.GL_SHORT, initialElementCount, GL.GL_STATIC_DRAW, GL.GL_ELEMENT_ARRAY_BUFFER); + + indicesFbo = GLArrayDataServer.createData(3, GL2ES2.GL_SHORT, initialElementCount, GL.GL_STATIC_DRAW, GL.GL_ELEMENT_ARRAY_BUFFER); indicesFbo.puts((short) 0); indicesFbo.puts((short) 1); indicesFbo.puts((short) 3); indicesFbo.puts((short) 1); indicesFbo.puts((short) 2); indicesFbo.puts((short) 3); indicesFbo.seal(true); - - texCoordFboAttr = GLArrayDataServer.createGLSL(AttributeNames.TEXCOORD_ATTR_NAME, 2, GL2ES2.GL_FLOAT, + + texCoordFboAttr = GLArrayDataServer.createGLSL(AttributeNames.TEXCOORD_ATTR_NAME, 2, GL2ES2.GL_FLOAT, false, initialElementCount, GL.GL_STATIC_DRAW); st.ownAttribute(texCoordFboAttr, true); - texCoordFboAttr.putf(5); texCoordFboAttr.putf(5); - texCoordFboAttr.putf(5); texCoordFboAttr.putf(6); - texCoordFboAttr.putf(6); texCoordFboAttr.putf(6); - texCoordFboAttr.putf(6); texCoordFboAttr.putf(5); + texCoordFboAttr.putf(5); texCoordFboAttr.putf(5); + texCoordFboAttr.putf(5); texCoordFboAttr.putf(6); + texCoordFboAttr.putf(6); texCoordFboAttr.putf(6); + texCoordFboAttr.putf(6); texCoordFboAttr.putf(5); texCoordFboAttr.seal(true); - - verticeFboAttr = GLArrayDataServer.createGLSL(AttributeNames.VERTEX_ATTR_NAME, 3, GL2ES2.GL_FLOAT, - false, initialElementCount, GL.GL_STATIC_DRAW); + + verticeFboAttr = GLArrayDataServer.createGLSL(AttributeNames.VERTEX_ATTR_NAME, 3, GL2ES2.GL_FLOAT, + false, initialElementCount, GL.GL_STATIC_DRAW); st.ownAttribute(verticeFboAttr, true); - - - indicesTxt = GLArrayDataServer.createData(3, GL2ES2.GL_SHORT, initialElementCount, GL.GL_STATIC_DRAW, GL.GL_ELEMENT_ARRAY_BUFFER); - - verticeTxtAttr = GLArrayDataServer.createGLSL(AttributeNames.VERTEX_ATTR_NAME, 3, GL2ES2.GL_FLOAT, + + + indicesTxt = GLArrayDataServer.createData(3, GL2ES2.GL_SHORT, initialElementCount, GL.GL_STATIC_DRAW, GL.GL_ELEMENT_ARRAY_BUFFER); + + verticeTxtAttr = GLArrayDataServer.createGLSL(AttributeNames.VERTEX_ATTR_NAME, 3, GL2ES2.GL_FLOAT, false, initialElementCount, GL.GL_STATIC_DRAW); st.ownAttribute(verticeTxtAttr, true); - - texCoordTxtAttr = GLArrayDataServer.createGLSL(AttributeNames.TEXCOORD_ATTR_NAME, 2, GL2ES2.GL_FLOAT, + + texCoordTxtAttr = GLArrayDataServer.createGLSL(AttributeNames.TEXCOORD_ATTR_NAME, 2, GL2ES2.GL_FLOAT, false, initialElementCount, GL.GL_STATIC_DRAW); st.ownAttribute(texCoordTxtAttr, true); - + if(DEBUG_INSTANCE) { System.err.println("VBORegion2PES2 Create: " + this); - } + } } // process triangles indicesTxt.seal(gl, false); - indicesTxt.rewind(); + indicesTxt.rewind(); for(int i=0; i maxTexSize[0]) { texWidth[0] = maxTexSize[0]; // clip to max - write-back user value! } - renderRegion2FBO(gl, rs, texWidth); + renderRegion2FBO(gl, rs, texWidth); } // System.out.println("Scale: " + matrix.glGetMatrixf().get(1+4*3) +" " + matrix.glGetMatrixf().get(2+4*3)); renderFBO(gl, rs, vp_width, vp_height); } } - + private void renderFBO(GL2ES2 gl, RenderState rs, int width, int hight) { final ShaderState st = rs.getShaderState(); - - gl.glViewport(0, 0, width, hight); - st.uniform(gl, mgl_ActiveTexture); + + gl.glViewport(0, 0, width, hight); + st.uniform(gl, mgl_ActiveTexture); gl.glActiveTexture(GL.GL_TEXTURE0 + mgl_ActiveTexture.intValue()); - fbo.use(gl, texA); - verticeFboAttr.enableBuffer(gl, true); - texCoordFboAttr.enableBuffer(gl, true); + fbo.use(gl, texA); + verticeFboAttr.enableBuffer(gl, true); + texCoordFboAttr.enableBuffer(gl, true); indicesFbo.bindBuffer(gl, true); // keeps VBO binding - + gl.glDrawElements(GL2ES2.GL_TRIANGLES, indicesFbo.getElementCount() * indicesFbo.getComponentCount(), GL2ES2.GL_UNSIGNED_SHORT, 0); - - indicesFbo.bindBuffer(gl, false); + + indicesFbo.bindBuffer(gl, false); texCoordFboAttr.enableBuffer(gl, false); - verticeFboAttr.enableBuffer(gl, false); + verticeFboAttr.enableBuffer(gl, false); fbo.unuse(gl); - + // setback: gl.glActiveTexture(currentActiveTextureEngine[0]); } - + private void renderRegion2FBO(GL2ES2 gl, RenderState rs, int[/*1*/] texWidth) { final ShaderState st = rs.getShaderState(); - + if(0>=texWidth[0]) { throw new IllegalArgumentException("texWidth must be greater than 0: "+texWidth[0]); } - + tex_width_c = texWidth[0]; tex_height_c = (int) ( ( ( tex_width_c * box.getHeight() ) / box.getWidth() ) + 0.5f ); - + // System.out.println("FBO Size: "+texWidth[0]+" -> "+tex_width_c+"x"+tex_height_c); // System.out.println("FBO Scale: " + m.glGetMatrixf().get(0) +" " + m.glGetMatrixf().get(5)); - + if(null != fbo && fbo.getWidth() != tex_width_c && fbo.getHeight() != tex_height_c ) { fbo.reset(gl, tex_width_c, tex_height_c); } - - if(null == fbo) { + + if(null == fbo) { fbo = new FBObject(); - fbo.reset(gl, tex_width_c, tex_height_c); + fbo.reset(gl, tex_width_c, tex_height_c); // FIXME: shall not use bilinear, due to own AA ? However, w/o bilinear result is not smooth texA = fbo.attachTexture2D(gl, 0, true, GL2ES2.GL_LINEAR, GL2ES2.GL_LINEAR, GL2ES2.GL_CLAMP_TO_EDGE, GL2ES2.GL_CLAMP_TO_EDGE); // texA = fbo.attachTexture2D(gl, 0, GL2ES2.GL_NEAREST, GL2ES2.GL_NEAREST, GL2ES2.GL_CLAMP_TO_EDGE, GL2ES2.GL_CLAMP_TO_EDGE); @@ -260,18 +260,18 @@ public class VBORegion2PES2 extends GLRegion { } else { fbo.bind(gl); } - + //render texture gl.glViewport(0, 0, tex_width_c, tex_height_c); st.uniform(gl, mgl_fboPMVMatrix); // use orthogonal matrix - + gl.glClearColor(0.0f, 0.0f, 0.0f, 0.0f); gl.glClear(GL2ES2.GL_COLOR_BUFFER_BIT | GL2ES2.GL_DEPTH_BUFFER_BIT); renderRegion(gl); fbo.unbind(gl); - + st.uniform(gl, rs.getPMVMatrix()); // switch back to real PMV matrix - + // if( !gl.isGL3() ) { // GLSL < 1.30 if(null == mgl_TextureSize) { @@ -281,21 +281,21 @@ public class VBORegion2PES2 extends GLRegion { texSize.put(0, (float)fbo.getWidth()); texSize.put(1, (float)fbo.getHeight()); st.uniform(gl, mgl_TextureSize); - //} + //} } - + private void renderRegion(GL2ES2 gl) { - verticeTxtAttr.enableBuffer(gl, true); + verticeTxtAttr.enableBuffer(gl, true); texCoordTxtAttr.enableBuffer(gl, true); indicesTxt.bindBuffer(gl, true); // keeps VBO binding - + gl.glDrawElements(GL2ES2.GL_TRIANGLES, indicesTxt.getElementCount() * indicesTxt.getComponentCount(), GL2ES2.GL_UNSIGNED_SHORT, 0); - - indicesTxt.bindBuffer(gl, false); + + indicesTxt.bindBuffer(gl, false); texCoordTxtAttr.enableBuffer(gl, false); - verticeTxtAttr.enableBuffer(gl, false); + verticeTxtAttr.enableBuffer(gl, false); } - + public void destroy(GL2ES2 gl, RenderState rs) { if(DEBUG_INSTANCE) { System.err.println("VBORegion2PES2 Destroy: " + this); @@ -305,7 +305,7 @@ public class VBORegion2PES2 extends GLRegion { fbo.destroy(gl); fbo = null; texA = null; - } + } if(null != verticeTxtAttr) { st.ownAttribute(verticeTxtAttr, false); verticeTxtAttr.destroy(gl); @@ -335,6 +335,6 @@ public class VBORegion2PES2 extends GLRegion { indicesFbo = null; } triangles.clear(); - vertices.clear(); - } + vertices.clear(); + } } diff --git a/src/jogl/classes/jogamp/graph/curve/opengl/VBORegionSPES2.java b/src/jogl/classes/jogamp/graph/curve/opengl/VBORegionSPES2.java index 0cba444ad..0a867b45c 100644 --- a/src/jogl/classes/jogamp/graph/curve/opengl/VBORegionSPES2.java +++ b/src/jogl/classes/jogamp/graph/curve/opengl/VBORegionSPES2.java @@ -44,13 +44,13 @@ public class VBORegionSPES2 extends GLRegion { private GLArrayDataServer texCoordAttr = null; private GLArrayDataServer indices = null; - protected VBORegionSPES2(int renderModes) { + protected VBORegionSPES2(int renderModes) { super(renderModes); } protected void update(GL2ES2 gl, RenderState rs) { if(!isDirty()) { - return; + return; } if(null == indices) { @@ -59,11 +59,11 @@ public class VBORegionSPES2 extends GLRegion { indices = GLArrayDataServer.createData(3, GL2ES2.GL_SHORT, initialElementCount, GL.GL_STATIC_DRAW, GL.GL_ELEMENT_ARRAY_BUFFER); - verticeAttr = GLArrayDataServer.createGLSL(AttributeNames.VERTEX_ATTR_NAME, 3, GL2ES2.GL_FLOAT, - false, initialElementCount, GL.GL_STATIC_DRAW); + verticeAttr = GLArrayDataServer.createGLSL(AttributeNames.VERTEX_ATTR_NAME, 3, GL2ES2.GL_FLOAT, + false, initialElementCount, GL.GL_STATIC_DRAW); st.ownAttribute(verticeAttr, true); - texCoordAttr = GLArrayDataServer.createGLSL(AttributeNames.TEXCOORD_ATTR_NAME, 2, GL2ES2.GL_FLOAT, + texCoordAttr = GLArrayDataServer.createGLSL(AttributeNames.TEXCOORD_ATTR_NAME, 2, GL2ES2.GL_FLOAT, false, initialElementCount, GL.GL_STATIC_DRAW); st.ownAttribute(texCoordAttr, true); @@ -74,7 +74,7 @@ public class VBORegionSPES2 extends GLRegion { // process triangles indices.seal(gl, false); - indices.rewind(); + indices.rewind(); for(int i=0; i loops; private ArrayList vertices; - + private ArrayList triangles; private int maxTriID = 0; - + /** Constructor for a new Delaunay triangulator */ public CDTriangulator2D() { reset(); } - + /** Reset the triangulation to initial state * Clearing cached data */ @@ -71,14 +71,14 @@ public class CDTriangulator2D implements Triangulator{ triangles = new ArrayList(3); loops = new ArrayList(); } - + public void addCurve(Outline polyline) { Loop loop = null; - + if(!loops.isEmpty()) { loop = getContainerLoop(polyline); } - + if(loop == null) { GraphOutline outline = new GraphOutline(polyline); GraphOutline innerPoly = extractBoundaryTriangles(outline, false); @@ -92,8 +92,8 @@ public class CDTriangulator2D implements Triangulator{ loop.addConstraintCurve(innerPoly); } } - - public ArrayList generate() { + + public ArrayList generate() { for(int i=0;i vertices = polyline.getVertices(); for(int i=0; i < loops.size(); i++) { diff --git a/src/jogl/classes/jogamp/graph/curve/tess/GraphOutline.java b/src/jogl/classes/jogamp/graph/curve/tess/GraphOutline.java index c8251af15..2e8d4f58f 100644 --- a/src/jogl/classes/jogamp/graph/curve/tess/GraphOutline.java +++ b/src/jogl/classes/jogamp/graph/curve/tess/GraphOutline.java @@ -35,13 +35,13 @@ import com.jogamp.graph.geom.Vertex; public class GraphOutline { final private Outline outline; final private ArrayList controlpoints = new ArrayList(3); - + public GraphOutline(){ this.outline = new Outline(); } - + /**Create a control polyline of control vertices - * the curve pieces can be identified by onCurve flag + * the curve pieces can be identified by onCurve flag * of each cp the control polyline is open by default */ public GraphOutline(Outline ol){ @@ -59,7 +59,7 @@ public class GraphOutline { public ArrayList getGraphPoint() { return controlpoints; } - + public ArrayList getVertices() { return outline.getVertices(); } @@ -68,5 +68,5 @@ public class GraphOutline { controlpoints.add(v); outline.addVertex(v.getPoint()); } - + } diff --git a/src/jogl/classes/jogamp/graph/curve/tess/GraphVertex.java b/src/jogl/classes/jogamp/graph/curve/tess/GraphVertex.java index 52d02baa5..1ef1d8c7f 100644 --- a/src/jogl/classes/jogamp/graph/curve/tess/GraphVertex.java +++ b/src/jogl/classes/jogamp/graph/curve/tess/GraphVertex.java @@ -35,7 +35,7 @@ public class GraphVertex { private Vertex point; private ArrayList edges = null; private boolean boundaryContained = false; - + public GraphVertex(Vertex point) { this.point = point; } @@ -43,15 +43,15 @@ public class GraphVertex { public Vertex getPoint() { return point; } - + public float getX(){ return point.getX(); } - + public float getY(){ return point.getY(); } - + public float getZ(){ return point.getZ(); } @@ -70,7 +70,7 @@ public class GraphVertex { public void setEdges(ArrayList edges) { this.edges = edges; } - + public void addEdge(HEdge edge){ if(edges == null){ edges = new ArrayList(); @@ -112,7 +112,7 @@ public class GraphVertex { } return null; } - + public boolean isBoundaryContained() { return boundaryContained; } diff --git a/src/jogl/classes/jogamp/graph/curve/tess/HEdge.java b/src/jogl/classes/jogamp/graph/curve/tess/HEdge.java index 4d29a81f3..acaa3d708 100644 --- a/src/jogl/classes/jogamp/graph/curve/tess/HEdge.java +++ b/src/jogl/classes/jogamp/graph/curve/tess/HEdge.java @@ -35,14 +35,14 @@ public class HEdge { public static int BOUNDARY = 3; public static int INNER = 1; public static int HOLE = 2; - + private GraphVertex vert; private HEdge prev = null; private HEdge next = null; private HEdge sibling = null; private int type = BOUNDARY; private Triangle triangle = null; - + public HEdge(GraphVertex vert, int type) { this.vert = vert; this.type = type; @@ -112,19 +112,19 @@ public class HEdge { public void setTriangle(Triangle triangle) { this.triangle = triangle; } - + public static void connect(HEdge first, HEdge next){ first.setNext(next); next.setPrev(first); } - + public static void makeSiblings(HEdge first, HEdge second){ first.setSibling(second); second.setSibling(first); } - + public boolean vertexOnCurveVertex(){ return vert.getPoint().isOnCurve(); } - + } diff --git a/src/jogl/classes/jogamp/graph/curve/tess/Loop.java b/src/jogl/classes/jogamp/graph/curve/tess/Loop.java index 651179062..c1dafc0d1 100644 --- a/src/jogl/classes/jogamp/graph/curve/tess/Loop.java +++ b/src/jogl/classes/jogamp/graph/curve/tess/Loop.java @@ -51,7 +51,7 @@ public class Loop { public Triangle cut(boolean delaunay){ if(isSimplex()){ - Triangle t = new Triangle(root.getGraphPoint().getPoint(), root.getNext().getGraphPoint().getPoint(), + Triangle t = new Triangle(root.getGraphPoint().getPoint(), root.getNext().getGraphPoint().getPoint(), root.getNext().getNext().getGraphPoint().getPoint()); t.setVerticesBoundary(checkVerticesBoundary(root)); return t; @@ -103,20 +103,20 @@ public class Loop { throw new IllegalArgumentException("outline's vertices < 3: " + vertices.size()); } final VectorUtil.Winding hasWinding = VectorUtil.getWinding( - vertices.get(0).getPoint(), + vertices.get(0).getPoint(), vertices.get(1).getPoint(), vertices.get(2).getPoint()); //FIXME: handle case when vertices come inverted - Rami // skips inversion CW -> CCW final boolean invert = hasWinding != reqWinding && reqWinding == VectorUtil.Winding.CW; - + final int max; final int edgeType = reqWinding == VectorUtil.Winding.CCW ? HEdge.BOUNDARY : HEdge.HOLE ; int index; HEdge firstEdge = null; HEdge lastEdge = null; - + if(!invert) { max = vertices.size(); index = 0; @@ -160,7 +160,7 @@ public class Loop { public void addConstraintCurve(GraphOutline polyline) { // GraphOutline outline = new GraphOutline(polyline); /**needed to generate vertex references.*/ - initFromPolyline(polyline, VectorUtil.Winding.CW); + initFromPolyline(polyline, VectorUtil.Winding.CW); GraphVertex v3 = locateClosestVertex(polyline); HEdge v3Edge = v3.findBoundEdge(); @@ -180,9 +180,9 @@ public class Loop { HEdge.connect(crossEdgeSib, root); } - /** Locates the vertex and update the loops root - * to have (root + vertex) as closest pair - * @param polyline the control polyline + /** Locates the vertex and update the loops root + * to have (root + vertex) as closest pair + * @param polyline the control polyline * to search for closestvertices * @return the vertex that is closest to the newly set root Hedge. */ @@ -205,7 +205,7 @@ public class Loop { for (GraphVertex vert:vertices){ if(vert == v || vert == nextV || vert == cand) continue; - inValid = VectorUtil.inCircle(v.getPoint(), nextV.getPoint(), + inValid = VectorUtil.inCircle(v.getPoint(), nextV.getPoint(), cand.getPoint(), vert.getPoint()); if(inValid){ break; @@ -243,8 +243,8 @@ public class Loop { Vertex cand = candEdge.getGraphPoint().getPoint(); HEdge e = candEdge.getNext(); while (e != candEdge){ - if(e.getGraphPoint() == root.getGraphPoint() - || e.getGraphPoint() == next.getGraphPoint() + if(e.getGraphPoint() == root.getGraphPoint() + || e.getGraphPoint() == next.getGraphPoint() || e.getGraphPoint().getPoint() == cand){ e = e.getNext(); continue; @@ -311,15 +311,15 @@ public class Loop { (v.getX() < (v2.getX() - v1.getX()) * (v.getY() - v1.getY()) / (v2.getY() - v1.getY()) + v1.getX()) ){ inside = !inside; } - + current = next; next = current.getNext(); - + } while(current != root); - + return inside; } - + public int computeLoopSize(){ int size = 0; HEdge e = root; diff --git a/src/jogl/classes/jogamp/graph/curve/text/GlyphShape.java b/src/jogl/classes/jogamp/graph/curve/text/GlyphShape.java index 751a7e7ac..ff46c3338 100644 --- a/src/jogl/classes/jogamp/graph/curve/text/GlyphShape.java +++ b/src/jogl/classes/jogamp/graph/curve/text/GlyphShape.java @@ -37,17 +37,17 @@ import com.jogamp.graph.curve.OutlineShape; import com.jogamp.opengl.math.Quaternion; public class GlyphShape { - + private Quaternion quat= null; private OutlineShape shape = null; - + /** Create a new Glyph shape * based on Parametric curve control polyline */ public GlyphShape(Vertex.Factory factory){ shape = new OutlineShape(factory); } - + /** Create a new GlyphShape from a {@link OutlineShape} * @param factory vertex impl factory {@link Factory} * @param shape {@link OutlineShape} representation of the Glyph @@ -57,24 +57,24 @@ public class GlyphShape { this.shape = shape; this.shape.transformOutlines(OutlineShape.VerticesState.QUADRATIC_NURBS); } - + public final Vertex.Factory vertexFactory() { return shape.vertexFactory(); } - + public OutlineShape getShape() { return shape; } - + public int getNumVertices() { return shape.getVertices().size(); } - + /** Get the rotational Quaternion attached to this Shape * @return the Quaternion Object */ public Quaternion getQuat() { return quat; } - + /** Set the Quaternion that shall defien the rotation * of this shape. * @param quat @@ -82,7 +82,7 @@ public class GlyphShape { public void setQuat(Quaternion quat) { this.quat = quat; } - + /** Triangluate the glyph shape * @return ArrayList of triangles which define this shape */ @@ -95,5 +95,5 @@ public class GlyphShape { */ public ArrayList getVertices(){ return shape.getVertices(); - } + } } diff --git a/src/jogl/classes/jogamp/graph/curve/text/GlyphString.java b/src/jogl/classes/jogamp/graph/curve/text/GlyphString.java index cc850b823..2284ab669 100644 --- a/src/jogl/classes/jogamp/graph/curve/text/GlyphString.java +++ b/src/jogl/classes/jogamp/graph/curve/text/GlyphString.java @@ -52,51 +52,51 @@ public class GlyphString { *

The actual font size shall be accomplished by the GL PMV matrix.

*/ public static final int STATIC_FONT_SIZE = 10; - + private ArrayList glyphs = new ArrayList(); private CharSequence str; private String fontname; private GLRegion region; - + private SVertex origin = new SVertex(); /** *

Uses {@link #STATIC_FONT_SIZE}.

*

No caching is performed.

- * + * * @param shape is not null, add all {@link GlyphShape}'s {@link Outline} to this instance. * @param vertexFactory vertex impl factory {@link Factory} - * @param font the target {@link Font} + * @param font the target {@link Font} * @param str string text * @return the created {@link GlyphString} instance */ public static GlyphString createString(OutlineShape shape, Factory vertexFactory, Font font, String str) { - return createString(shape, vertexFactory, font, STATIC_FONT_SIZE, str); + return createString(shape, vertexFactory, font, STATIC_FONT_SIZE, str); } - + /** *

No caching is performed.

- * + * * @param shape is not null, add all {@link GlyphShape}'s {@link Outline} to this instance. * @param vertexFactory vertex impl factory {@link Factory} - * @param font the target {@link Font} + * @param font the target {@link Font} * @param fontSize font size * @param str string text * @return the created {@link GlyphString} instance */ public static GlyphString createString(OutlineShape shape, Factory vertexFactory, Font font, int fontSize, String str) { ArrayList shapes = ((FontInt)font).getOutlineShapes(str, fontSize, vertexFactory); - + GlyphString glyphString = new GlyphString(font.getName(Font.NAME_UNIQUNAME), str); glyphString.createfromOutlineShapes(vertexFactory, shapes); if(null != shape) { for(int i=0; i vertexFactory, ArrayList shapes) { final int numGlyps = shapes.size(); @@ -126,31 +126,31 @@ public class GlyphString { continue; } GlyphShape glyphShape = new GlyphShape(vertexFactory, shapes.get(index)); - + if(glyphShape.getNumVertices() < 3) { continue; - } + } addGlyphShape(glyphShape); } } - - + + /** Generate a OGL Region to represent this Object. * @param gl the current gl object * @param rs the current attached RenderState - * @param renderModes bit-field of modes, e.g. {@link Region#VARIABLE_CURVE_WEIGHT_BIT}, {@link Region#VBAA_RENDERING_BIT} + * @param renderModes bit-field of modes, e.g. {@link Region#VARIABLE_CURVE_WEIGHT_BIT}, {@link Region#VBAA_RENDERING_BIT} */ public GLRegion createRegion(GL2ES2 gl, int renderModes){ region = RegionFactory.create(renderModes); // region.setFlipped(true); - + int numVertices = region.getNumVertices(); - + for(int i=0; i< glyphs.size(); i++) { final GlyphShape glyph = glyphs.get(i); ArrayList gtris = glyph.triangulate(); region.addTriangles(gtris); - + final ArrayList gVertices = glyph.getVertices(); for(int j=0; j getOutlineShapes(CharSequence string, float pixelSize, Factory vertexFactory); diff --git a/src/jogl/classes/jogamp/graph/font/JavaFontLoader.java b/src/jogl/classes/jogamp/graph/font/JavaFontLoader.java index 3736c5f13..5978e937d 100644 --- a/src/jogl/classes/jogamp/graph/font/JavaFontLoader.java +++ b/src/jogl/classes/jogamp/graph/font/JavaFontLoader.java @@ -40,16 +40,16 @@ import com.jogamp.graph.font.FontSet; import com.jogamp.graph.font.FontFactory; public class JavaFontLoader implements FontSet { - - // FIXME: Add cache size to limit memory usage + + // FIXME: Add cache size to limit memory usage private static final IntObjectHashMap fontMap = new IntObjectHashMap(); - + private static final FontSet fontLoader = new JavaFontLoader(); public static FontSet get() { return fontLoader; } - + final static String availableFontFileNames[] = { /* 00 */ "LucidaBrightRegular.ttf", @@ -61,9 +61,9 @@ public class JavaFontLoader implements FontSet { /* 06 */ "LucidaTypewriterRegular.ttf", /* 07 */ "LucidaTypewriterBold.ttf", }; - + final String javaFontPath; - + private JavaFontLoader() { final String javaHome = AccessController.doPrivileged(new PrivilegedAction() { public String run() { @@ -80,11 +80,11 @@ public class JavaFontLoader implements FontSet { static boolean is(int bits, int bit) { return 0 != ( bits & bit ) ; } - + public Font getDefault() throws IOException { - return get(FAMILY_REGULAR, 0) ; // Sans Serif Regular + return get(FAMILY_REGULAR, 0) ; // Sans Serif Regular } - + public Font get(int family, int style) throws IOException { Font font = (Font)fontMap.get( ( family << 8 ) | style ); if (font != null) { @@ -92,8 +92,8 @@ public class JavaFontLoader implements FontSet { } // 1st process Sans Serif (2 fonts) - if( is(style, STYLE_SERIF) ) { - if( is(style, STYLE_BOLD) ) { + if( is(style, STYLE_SERIF) ) { + if( is(style, STYLE_BOLD) ) { font = abspath(availableFontFileNames[5], family, style); } else { font = abspath(availableFontFileNames[4], family, style); @@ -103,53 +103,53 @@ public class JavaFontLoader implements FontSet { } return font; } - + // Serif Fonts .. switch (family) { case FAMILY_LIGHT: case FAMILY_MEDIUM: case FAMILY_CONDENSED: case FAMILY_REGULAR: - if( is(style, STYLE_BOLD) ) { - if( is(style, STYLE_ITALIC) ) { + if( is(style, STYLE_BOLD) ) { + if( is(style, STYLE_ITALIC) ) { font = abspath(availableFontFileNames[3], family, style); } else { font = abspath(availableFontFileNames[2], family, style); } - } else if( is(style, STYLE_ITALIC) ) { + } else if( is(style, STYLE_ITALIC) ) { font = abspath(availableFontFileNames[1], family, style); } else { font = abspath(availableFontFileNames[0], family, style); } break; - + case FAMILY_MONOSPACED: - if( is(style, STYLE_BOLD) ) { + if( is(style, STYLE_BOLD) ) { font = abspath(availableFontFileNames[7], family, style); } else { font = abspath(availableFontFileNames[6], family, style); } - break; + break; } return font; } - + Font abspath(String fname, int family, int style) throws IOException { if(null == javaFontPath) { throw new GLException("java font path undefined"); } final String err = "Problem loading font "+fname+", file "+javaFontPath+fname ; - + try { final Font f = FontFactory.get( new File(javaFontPath+fname) ); if(null != f) { fontMap.put( ( family << 8 ) | style, f ); return f; } - throw new IOException (err); + throw new IOException (err); } catch (IOException ioe) { - throw new IOException(err, ioe); + throw new IOException(err, ioe); } - } + } } diff --git a/src/jogl/classes/jogamp/graph/font/UbuntuFontLoader.java b/src/jogl/classes/jogamp/graph/font/UbuntuFontLoader.java index c4c580290..254583739 100644 --- a/src/jogl/classes/jogamp/graph/font/UbuntuFontLoader.java +++ b/src/jogl/classes/jogamp/graph/font/UbuntuFontLoader.java @@ -39,23 +39,23 @@ import com.jogamp.graph.font.FontFactory; import java.net.URLConnection; public class UbuntuFontLoader implements FontSet { - - // FIXME: Add cache size to limit memory usage + + // FIXME: Add cache size to limit memory usage private static final IntObjectHashMap fontMap = new IntObjectHashMap(); - - private static final String relPath = "fonts/ubuntu/" ; - + + private static final String relPath = "fonts/ubuntu/" ; + private static final FontSet fontLoader = new UbuntuFontLoader(); public static final FontSet get() { return fontLoader; } - + final static String availableFontFileNames[] = { /* 00 */ "Ubuntu-R.ttf", // regular /* 01 */ "Ubuntu-RI.ttf", // regular italic - /* 02 */ "Ubuntu-B.ttf", // bold + /* 02 */ "Ubuntu-B.ttf", // bold /* 03 */ "Ubuntu-BI.ttf", // bold italic /* 04 */ "Ubuntu-L.ttf", // light /* 05 */ "Ubuntu-LI.ttf", // light italic @@ -63,18 +63,18 @@ public class UbuntuFontLoader implements FontSet { /* 07 */ "Ubuntu-MI.ttf", // medium italic }; - + private UbuntuFontLoader() { } static boolean is(int bits, int bit) { return 0 != ( bits & bit ) ; } - + public Font getDefault() throws IOException { - return get(FAMILY_REGULAR, 0) ; // Sans Serif Regular + return get(FAMILY_REGULAR, 0) ; // Sans Serif Regular } - + public Font get(int family, int style) throws IOException { Font font = (Font)fontMap.get( ( family << 8 ) | style ); if (font != null) { @@ -97,7 +97,7 @@ public class UbuntuFontLoader implements FontSet { font = abspath(availableFontFileNames[0], family, style); } break; - + case FAMILY_LIGHT: if( is(style, STYLE_ITALIC) ) { font = abspath(availableFontFileNames[5], family, style); @@ -105,19 +105,19 @@ public class UbuntuFontLoader implements FontSet { font = abspath(availableFontFileNames[4], family, style); } break; - + case FAMILY_MEDIUM: if( is(style, STYLE_ITALIC) ) { font = abspath(availableFontFileNames[6], family, style); } else { font = abspath(availableFontFileNames[7], family, style); } - break; + break; } return font; } - + Font abspath(String fname, int family, int style) throws IOException { final String err = "Problem loading font "+fname+", stream "+relPath+fname; try { @@ -129,10 +129,10 @@ public class UbuntuFontLoader implements FontSet { if(null != f) { fontMap.put( ( family << 8 ) | style, f ); return f; - } + } throw new IOException(err); } catch(IOException ioe) { - throw new IOException(err, ioe); + throw new IOException(err, ioe); } - } + } } diff --git a/src/jogl/classes/jogamp/graph/font/typecast/TypecastFont.java b/src/jogl/classes/jogamp/graph/font/typecast/TypecastFont.java index 0441bf836..ba6c72650 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/TypecastFont.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/TypecastFont.java @@ -51,20 +51,20 @@ import com.jogamp.opengl.math.geom.AABBox; class TypecastFont implements FontInt { static final boolean DEBUG = false; - + final OTFontCollection fontset; final OTFont font; TypecastHMetrics metrics; final CmapFormat cmapFormat; int cmapentries; - - // FIXME: Add cache size to limit memory usage ?? - IntObjectHashMap char2Glyph; + + // FIXME: Add cache size to limit memory usage ?? + IntObjectHashMap char2Glyph; public TypecastFont(OTFontCollection fontset) { this.fontset = fontset; this.font = fontset.getFont(0); - + // FIXME: Generic attempt to find the best CmapTable, // which is assumed to be the one with the most entries (stupid 'eh?) CmapTable cmapTable = font.getCmapTable(); @@ -77,14 +77,14 @@ class TypecastFont implements FontInt { int pidx = cmapIdxEntry.getPlatformId(); CmapFormat cf = cmapIdxEntry.getFormat(); if(DEBUG) { - System.err.println("CmapFormat["+i+"]: platform " + pidx + + System.err.println("CmapFormat["+i+"]: platform " + pidx + ", encoding "+cmapIdxEntry.getEncodingId() + ": "+cf); } - if( _cmapFormatP[pidx] == null || + if( _cmapFormatP[pidx] == null || _cmapFormatP[pidx].getLength() < cf.getLength() ) { _cmapFormatP[pidx] = cf; if( cf.getLength() > platformLength ) { - platformLength = cf.getLength() ; + platformLength = cf.getLength() ; platform = pidx; encoding = cmapIdxEntry.getEncodingId(); } @@ -93,10 +93,10 @@ class TypecastFont implements FontInt { if(0 <= platform) { cmapFormat = _cmapFormatP[platform]; if(DEBUG) { - System.err.println("Selected CmapFormat: platform " + platform + + System.err.println("Selected CmapFormat: platform " + platform + ", encoding "+encoding + ": "+cmapFormat); } - } else { + } else { CmapFormat _cmapFormat = null; /*if(null == _cmapFormat) { platform = ID.platformMacintosh; @@ -127,14 +127,14 @@ class TypecastFont implements FontInt { cmapentries = 0; for (int i = 0; i < cmapFormat.getRangeCount(); ++i) { CmapFormat.Range range = cmapFormat.getRange(i); - cmapentries += range.getEndCode() - range.getStartCode() + 1; // end included - } + cmapentries += range.getEndCode() - range.getStartCode() + 1; // end included + } if(DEBUG) { System.err.println("font direction hint: "+font.getHeadTable().getFontDirectionHint()); System.err.println("num glyphs: "+font.getNumGlyphs()); System.err.println("num cmap entries: "+cmapentries); System.err.println("num cmap ranges: "+cmapFormat.getRangeCount()); - + for (int i = 0; i < cmapFormat.getRangeCount(); ++i) { CmapFormat.Range range = cmapFormat.getRange(i); for (int j = range.getStartCode(); j <= range.getEndCode(); ++j) { @@ -147,7 +147,7 @@ class TypecastFont implements FontInt { } char2Glyph = new IntObjectHashMap(cmapentries + cmapentries/4); } - + public StringBuilder getName(StringBuilder sb, int nameIndex) { return font.getName(nameIndex, sb); } @@ -161,12 +161,12 @@ class TypecastFont implements FontInt { sb = getName(sb, Font.NAME_FAMILY).append("-"); getName(sb, Font.NAME_SUBFAMILY); return sb; - } + } public float getAdvanceWidth(int i, float pixelSize) { - return font.getHmtxTable().getAdvanceWidth(i) * metrics.getScale(pixelSize); + return font.getHmtxTable().getAdvanceWidth(i) * metrics.getScale(pixelSize); } - + public Metrics getMetrics() { if (metrics == null) { metrics = new TypecastHMetrics(this); @@ -175,7 +175,7 @@ class TypecastFont implements FontInt { } public Glyph getGlyph(char symbol) { - TypecastGlyph result = (TypecastGlyph) char2Glyph.get(symbol); + TypecastGlyph result = (TypecastGlyph) char2Glyph.get(symbol); if (null == result) { // final short code = (short) char2Code.get(symbol); short code = (short) cmapFormat.mapCharCode(symbol); @@ -187,7 +187,7 @@ class TypecastFont implements FontInt { default: code = Glyph.ID_UNKNOWN; } } - + jogamp.graph.font.typecast.ot.OTGlyph glyph = font.getGlyph(code); if(null == glyph) { glyph = font.getGlyph(Glyph.ID_UNKNOWN); @@ -200,25 +200,25 @@ class TypecastFont implements FontInt { if(DEBUG) { System.err.println("New glyph: " + (int)symbol + " ( " + (char)symbol +" ) -> " + code + ", contours " + glyph.getPointCount() + ": " + path); } - final HdmxTable hdmx = font.getHdmxTable(); + final HdmxTable hdmx = font.getHdmxTable(); if (null!= result && null != hdmx) { /*if(DEBUG) { System.err.println("hdmx "+hdmx); }*/ for (int i=0; i getOutlineShapes(CharSequence string, float pixelSize, Factory vertexFactory) { AffineTransform transform = new AffineTransform(vertexFactory); return TypecastRenderer.getOutlineShapes(this, string, pixelSize, transform, vertexFactory); @@ -238,7 +238,7 @@ class TypecastFont implements FontInt { } } - return (int)(width + 0.5f); + return (int)(width + 0.5f); } public float getStringHeight(CharSequence string, float pixelSize) { @@ -254,7 +254,7 @@ class TypecastFont implements FontInt { height = (int)Math.ceil(Math.max(bbox.getHeight(), height)); } } - return height; + return height; } public AABBox getStringBounds(CharSequence string, float pixelSize) { @@ -284,17 +284,17 @@ class TypecastFont implements FontInt { totalHeight -= advanceY; totalWidth = Math.max(curLineWidth, totalWidth); } - return new AABBox(0, 0, 0, totalWidth, totalHeight,0); + return new AABBox(0, 0, 0, totalWidth, totalHeight,0); } final public int getNumGlyphs() { return font.getNumGlyphs(); } - + public boolean isPrintableChar( char c ) { return FontFactory.isPrintableChar(c); } - + public String toString() { return getFullFamilyName(null).toString(); } diff --git a/src/jogl/classes/jogamp/graph/font/typecast/TypecastFontConstructor.java b/src/jogl/classes/jogamp/graph/font/typecast/TypecastFontConstructor.java index 8479c08ca..77b5a9aa9 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/TypecastFontConstructor.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/TypecastFontConstructor.java @@ -46,7 +46,7 @@ public class TypecastFontConstructor implements FontConstructor { public Font create(final File ffile) throws IOException { Object o = AccessController.doPrivileged(new PrivilegedAction() { public Object run() { - OTFontCollection fontset; + OTFontCollection fontset; try { fontset = OTFontCollection.create(ffile); return new TypecastFont(fontset); @@ -63,14 +63,14 @@ public class TypecastFontConstructor implements FontConstructor { } throw new InternalError("Unexpected Object: "+o); } - + public Font create(final URLConnection fconn) throws IOException { return AccessController.doPrivileged(new PrivilegedAction() { public Font run() { File tf = null; int len=0; Font f = null; - try { + try { tf = IOUtil.createTempFile( "jogl.font", ".ttf", false); len = IOUtil.copyURLConn2File(fconn, tf); if(len==0) { @@ -84,7 +84,7 @@ public class TypecastFontConstructor implements FontConstructor { } return f; } - }); + }); } - + } diff --git a/src/jogl/classes/jogamp/graph/font/typecast/TypecastGlyph.java b/src/jogl/classes/jogamp/graph/font/typecast/TypecastGlyph.java index 1205c6539..476b3fd4e 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/TypecastGlyph.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/TypecastGlyph.java @@ -40,45 +40,45 @@ public class TypecastGlyph implements FontInt.GlyphInt { public class Advance { final Font font; - final float advance; - HashMap size2advance = new HashMap(); - + final float advance; + HashMap size2advance = new HashMap(); + public Advance(Font font, float advance) { this.font = font; this.advance = advance; } - + public void reset() { size2advance.clear(); } - + public float getScale(float pixelSize) { return this.font.getMetrics().getScale(pixelSize); } - + public void add(float advance, float size) { size2advance.put(size, advance); } - + public float get(float size, boolean useFrationalMetrics) { Float fo = size2advance.get(size); - if(null == fo) { + if(null == fo) { float value = (this.advance * getScale(size)); if (useFrationalMetrics == false) { //value = (float)Math.ceil(value); // value = (int)value; - value = (int) ( value + 0.5f ) ; // TODO: check + value = (int) ( value + 0.5f ) ; // TODO: check } size2advance.put(size, value); return value; } return fo.floatValue(); } - + public String toString() { return "\nAdvance:"+ @@ -86,147 +86,147 @@ public class TypecastGlyph implements FontInt.GlyphInt { "\n advances: \n"+size2advance; } } - + public class Metrics { AABBox bbox; Advance advance; - + public Metrics(Font font, AABBox bbox, float advance) { this.bbox = bbox; this.advance = new Advance(font, advance); } - + public void reset() { advance.reset(); } - + public float getScale(float pixelSize) { return this.advance.getScale(pixelSize); } - + public AABBox getBBox() { return this.bbox; } - + public void addAdvance(float advance, float size) { this.advance.add(advance, size); } - + public float getAdvance(float size, boolean useFrationalMetrics) { return this.advance.get(size, useFrationalMetrics); } - + public String toString() { return "\nMetrics:"+ "\n bbox: "+this.bbox+ this.advance; } - } + } public static final short INVALID_ID = (short)((1 << 16) - 1); public static final short MAX_ID = (short)((1 << 16) - 2); - + private final Font font; - + char symbol; short id; int advance; Metrics metrics; - + protected Path2D path; // in EM units protected Path2D pathSized; protected float numberSized; - + protected TypecastGlyph(Font font, char symbol) { this.font = font; this.symbol = symbol; } - + protected TypecastGlyph(Font font, char symbol, short id, AABBox bbox, int advance, Path2D path) { this.font = font; this.symbol = symbol; this.advance = advance; - + init(id, bbox, advance); - + this.path = path; this.pathSized = null; this.numberSized = 0.0f; } - + void init(short id, AABBox bbox, int advance) { this.id = id; this.advance = advance; this.metrics = new Metrics(this.font, bbox, this.advance); } - + public void reset(Path2D path) { this.path = path; this.metrics.reset(); } - + public Font getFont() { return this.font; } - + public char getSymbol() { return this.symbol; } - + AABBox getBBoxUnsized() { return this.metrics.getBBox(); } - + public AABBox getBBox() { return this.metrics.getBBox(); } - + public Metrics getMetrics() { return this.metrics; } - + public short getID() { return this.id; } - + public float getScale(float pixelSize) { return this.metrics.getScale(pixelSize); } - + public AABBox getBBox(float pixelSize) { final float size = getScale(pixelSize); AABBox newBox = getBBox().clone(); newBox.scale(size); - return newBox; + return newBox; } - + protected void addAdvance(float advance, float size) { this.metrics.addAdvance(advance, size); } - + public float getAdvance(float pixelSize, boolean useFrationalMetrics) { return this.metrics.getAdvance(pixelSize, useFrationalMetrics); } - + public Path2D getPath() { return this.path; } - + public Path2D getPath(float pixelSize) { final float size = getScale(pixelSize); - + if (this.numberSized != size) { this.numberSized = size; this.pathSized = AffineTransform.getScaleInstance(null, size, size).createTransformedShape(getPath()); - } + } return this.pathSized; - } + } } diff --git a/src/jogl/classes/jogamp/graph/font/typecast/TypecastHMetrics.java b/src/jogl/classes/jogamp/graph/font/typecast/TypecastHMetrics.java index f170f5819..a6ce58ae2 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/TypecastHMetrics.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/TypecastHMetrics.java @@ -35,7 +35,7 @@ import com.jogamp.opengl.math.geom.AABBox; class TypecastHMetrics implements Metrics { private final TypecastFont fontImpl; - + // HeadTable private final HeadTable headTable; private final float unitsPerEM_Inv; @@ -44,23 +44,23 @@ class TypecastHMetrics implements Metrics { private final HheaTable hheaTable; // VheaTable (for horizontal fonts) // private final VheaTable vheaTable; - + public TypecastHMetrics(TypecastFont fontImpl) { this.fontImpl = fontImpl; headTable = this.fontImpl.font.getHeadTable(); - hheaTable = this.fontImpl.font.getHheaTable(); + hheaTable = this.fontImpl.font.getHheaTable(); // vheaTable = this.fontImpl.font.getVheaTable(); unitsPerEM_Inv = 1.0f / ( (float) headTable.getUnitsPerEm() ); - + int maxWidth = headTable.getXMax() - headTable.getXMin(); - int maxHeight = headTable.getYMax() - headTable.getYMin(); + int maxHeight = headTable.getYMax() - headTable.getYMin(); float lowx= headTable.getXMin(); float lowy = -(headTable.getYMin()+maxHeight); float highx = lowx + maxWidth; float highy = lowy + maxHeight; bbox = new AABBox(lowx, lowy, 0, highx, highy, 0); // invert } - + public final float getAscent(float pixelSize) { return getScale(pixelSize) * -hheaTable.getAscender(); // invert } @@ -78,7 +78,7 @@ class TypecastHMetrics implements Metrics { } public final AABBox getBBox(float pixelSize) { AABBox res = new AABBox(bbox.getLow(), bbox.getHigh()); - res.scale(getScale(pixelSize)); + res.scale(getScale(pixelSize)); return res; } } \ No newline at end of file diff --git a/src/jogl/classes/jogamp/graph/font/typecast/TypecastRenderer.java b/src/jogl/classes/jogamp/graph/font/typecast/TypecastRenderer.java index f155345aa..127e260ca 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/TypecastRenderer.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/TypecastRenderer.java @@ -43,14 +43,14 @@ import com.jogamp.graph.geom.Vertex; import com.jogamp.graph.geom.Vertex.Factory; /** - * Factory to build a {@link com.jogamp.graph.geom.Path2D Path2D} from - * {@link jogamp.graph.font.typecast.ot.OTGlyph Glyph}s. + * Factory to build a {@link com.jogamp.graph.geom.Path2D Path2D} from + * {@link jogamp.graph.font.typecast.ot.OTGlyph Glyph}s. */ public class TypecastRenderer { - private static void getPaths(TypecastFont font, + private static void getPaths(TypecastFont font, CharSequence string, float pixelSize, AffineTransform transform, Path2D[] p) - { + { if (string == null) { return; } @@ -79,14 +79,14 @@ public class TypecastRenderer { } else if (character == ' ') { advanceTotal += font.getAdvanceWidth(Glyph.ID_SPACE, pixelSize); continue; - } + } Glyph glyph = font.getGlyph(character); Path2D gp = ((GlyphInt)glyph).getPath(); float scale = metrics.getScale(pixelSize); t.translate(advanceTotal, y); t.scale(scale, scale); p[i].append(gp.iterator(t), false); - advanceTotal += glyph.getAdvance(pixelSize, true); + advanceTotal += glyph.getAdvance(pixelSize, true); } } @@ -119,19 +119,19 @@ public class TypecastRenderer { case PathIterator.SEG_MOVETO: shape.closeLastOutline(); shape.addEmptyOutline(); - shape.addVertex(0, vertexFactory.create(coords, 0, 2, true)); + shape.addVertex(0, vertexFactory.create(coords, 0, 2, true)); break; case PathIterator.SEG_LINETO: - shape.addVertex(0, vertexFactory.create(coords, 0, 2, true)); + shape.addVertex(0, vertexFactory.create(coords, 0, 2, true)); break; case PathIterator.SEG_QUADTO: shape.addVertex(0, vertexFactory.create(coords, 0, 2, false)); - shape.addVertex(0, vertexFactory.create(coords, 2, 2, true)); + shape.addVertex(0, vertexFactory.create(coords, 2, 2, true)); break; case PathIterator.SEG_CUBICTO: shape.addVertex(0, vertexFactory.create(coords, 0, 2, false)); shape.addVertex(0, vertexFactory.create(coords, 2, 2, false)); - shape.addVertex(0, vertexFactory.create(coords, 4, 2, true)); + shape.addVertex(0, vertexFactory.create(coords, 4, 2, true)); break; case PathIterator.SEG_CLOSE: shape.closeLastOutline(); @@ -184,12 +184,12 @@ public class TypecastRenderer { if (point_plus1.onCurve) { // s = new Line2D.Float(point.x, point.y, point_plus1.x, point_plus1.y); gp.lineTo( point_plus1.x, point_plus1.y ); - offset++; + offset++; } else { if (point_plus2.onCurve) { // s = new QuadCurve2D.Float( point.x, point.y, point_plus1.x, point_plus1.y, point_plus2.x, point_plus2.y); gp.quadTo(point_plus1.x, point_plus1.y, point_plus2.x, point_plus2.y); - offset+=2; + offset+=2; } else { // s = new QuadCurve2D.Float(point.x,point.y,point_plus1.x,point_plus1.y, // midValue(point_plus1.x, point_plus2.x), midValue(point_plus1.y, point_plus2.y)); @@ -210,7 +210,7 @@ public class TypecastRenderer { // midValue(point.x, point_plus1.x), midValue(point.y, point_plus1.y)); //gp.curve3(midValue(point.x, point_plus1.x), midValue(point.y, point_plus1.y), point.x, point.y); gp.quadTo(point.x, point.y, midValue(point.x, point_plus1.x), midValue(point.y, point_plus1.y)); - offset++; + offset++; } } } diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/Disassembler.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/Disassembler.java index b5535758d..8b685659e 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/Disassembler.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/Disassembler.java @@ -1,9 +1,9 @@ /***************************************************************************** * Copyright (C) The Apache Software Foundation. All rights reserved. * - * ------------------------------------------------------------------------- * - * This software is published under the terms of the Apache Software License * - * version 1.1, a copy of which has been included with this distribution in * - * the LICENSE file. * + * ------------------------------------------------------------------------- * + * This software is published under the terms of the Apache Software License * + * version 1.1, a copy of which has been included with this distribution in * + * the LICENSE file. * *****************************************************************************/ package jogamp.graph.font.typecast.ot; diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/Fixed.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/Fixed.java index ece0aae4b..0a4786f82 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/Fixed.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/Fixed.java @@ -840,11 +840,11 @@ public class Fixed { } return n; } - + public static float floatValue(long fixed) { return (fixed >> 16) + (float)(fixed & 0xffff) / 0x10000; } - + public static float roundedFloatValue(long fixed, int decimalPlaces) { int factor = 10 * decimalPlaces; return (float)((int)(floatValue(fixed) * factor)) / factor; diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/Mnemonic.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/Mnemonic.java index 6b3dc1f6f..d6c9da268 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/Mnemonic.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/Mnemonic.java @@ -1,9 +1,9 @@ /***************************************************************************** * Copyright (C) The Apache Software Foundation. All rights reserved. * - * ------------------------------------------------------------------------- * - * This software is published under the terms of the Apache Software License * - * version 1.1, a copy of which has been included with this distribution in * - * the LICENSE file. * + * ------------------------------------------------------------------------- * + * This software is published under the terms of the Apache Software License * + * version 1.1, a copy of which has been included with this distribution in * + * the LICENSE file. * *****************************************************************************/ package jogamp.graph.font.typecast.ot; diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/OTFont.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/OTFont.java index 8c14b7302..8fc4be92d 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/OTFont.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/OTFont.java @@ -104,10 +104,10 @@ public class OTFont { public StringBuilder getName(int nameIndex, StringBuilder sb) { if(null == sb) { sb = new StringBuilder(); - } + } return _name.getRecordsRecordString(sb, nameIndex); } - + public StringBuilder getAllNames(StringBuilder sb, String separator) { if(null != _name) { if(null == sb) { @@ -117,9 +117,9 @@ public class OTFont { _name.getRecord(i).getRecordString(sb).append(separator); } } - return sb; + return sb; } - + public Table getTable(int tableType) { for (int i = 0; i < _tables.length; i++) { if ((_tables[i] != null) && (_tables[i].getType() == tableType)) { @@ -132,31 +132,31 @@ public class OTFont { public Os2Table getOS2Table() { return _os2; } - + public CmapTable getCmapTable() { return _cmap; } - + public HeadTable getHeadTable() { return _head; } - + public HheaTable getHheaTable() { return _hhea; } - + public HdmxTable getHdmxTable() { return _hdmx; } - + public HmtxTable getHmtxTable() { return _hmtx; } - + public LocaTable getLocaTable() { return _loca; } - + public MaxpTable getMaxpTable() { return _maxp; } @@ -186,8 +186,8 @@ public class OTFont { } public OTGlyph getGlyph(int i) { - - final GlyfDescript _glyfDescr = _glyf.getDescription(i); + + final GlyfDescript _glyfDescr = _glyf.getDescription(i); return (null != _glyfDescr) ? new OTGlyph( _glyfDescr, @@ -195,11 +195,11 @@ public class OTFont { _hmtx.getAdvanceWidth(i)) : null; } - + public TableDirectory getTableDirectory() { return _tableDirectory; } - + private Table readTable( DataInputStream dis, int tablesOrigin, @@ -228,13 +228,13 @@ public class OTFont { DataInputStream dis, int directoryOffset, int tablesOrigin) throws IOException { - + // Load the table directory dis.reset(); dis.skip(directoryOffset); _tableDirectory = new TableDirectory(dis); _tables = new Table[_tableDirectory.getNumTables()]; - + // Load some prerequisite tables _head = (HeadTable) readTable(dis, tablesOrigin, Table.head); _hhea = (HheaTable) readTable(dis, tablesOrigin, Table.hhea); @@ -252,7 +252,7 @@ public class OTFont { if (_vhea != null) { _tables[index++] = _vhea; } - + // Load all other tables for (int i = 0; i < _tableDirectory.getNumTables(); i++) { DirectoryEntry entry = _tableDirectory.getEntry(i); diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/OTFontCollection.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/OTFontCollection.java index 4a041604d..c79380f16 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/OTFontCollection.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/OTFontCollection.java @@ -75,11 +75,11 @@ public class OTFontCollection { public OTFont getFont(int i) { return _fonts[i]; } - + public int getFontCount() { return _fonts.length; } - + public TTCHeader getTtcHeader() { return _ttcHeader; } diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/OTGlyph.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/OTGlyph.java index 244ab400a..e0d652bd4 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/OTGlyph.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/OTGlyph.java @@ -102,10 +102,10 @@ public class OTGlyph { } } - public AABBox getBBox() { - return _bbox; + public AABBox getBBox() { + return _bbox; } - + public int getAdvanceWidth() { return _advanceWidth; } @@ -163,7 +163,7 @@ public class OTGlyph { // Append the origin and advanceWidth points (n & n+1) // _points[gd.getPointCount()] = new Point(0, 0, true, true); // _points[gd.getPointCount()+1] = new Point(_advanceWidth, 0, true, true); - + _bbox = new AABBox(gd.getXMinimum(), gd.getYMinimum(), 0, gd.getXMaximum(), gd.getYMaximum(), 0); } } diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/mac/ResourceData.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/mac/ResourceData.java index 433ff6051..7a5b0c4d2 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/mac/ResourceData.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/mac/ResourceData.java @@ -31,7 +31,7 @@ import java.io.IOException; public class ResourceData { private byte[] data; - + /** Creates new ResourceData */ public ResourceData(DataInput di) throws IOException { int dataLen = di.readInt(); diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/mac/ResourceFile.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/mac/ResourceFile.java index 2ada22c82..468ab2e1c 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/mac/ResourceFile.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/mac/ResourceFile.java @@ -33,14 +33,14 @@ public class ResourceFile { private ResourceHeader header; private ResourceMap map; - + /** Creates new Resource */ public ResourceFile(RandomAccessFile raf) throws IOException { // Read header at the beginning of the file raf.seek(0); header = new ResourceHeader(raf); - + // Seek to the map offset and read the map raf.seek(header.getMapOffset()); map = new ResourceMap(raf); @@ -53,18 +53,18 @@ public class ResourceFile { public static void main(String[] args) { try { //RandomAccessFile raf = new RandomAccessFile("/Library/Fonts/GillSans.dfont", "r"); - + // Tests loading a font from a resource fork on Mac OS X RandomAccessFile raf = new RandomAccessFile("/Library/Fonts/Georgia/..namedfork/rsrc", "r"); ResourceFile resource = new ResourceFile(raf); for (int i = 0; i < resource.getResourceMap().getResourceTypeCount(); i++) { System.out.println(resource.getResourceMap().getResourceType(i).getTypeAsString()); } - + // Get the first 'sfnt' resource ResourceType type = resource.getResourceMap().getResourceType("sfnt"); ResourceReference reference = type.getReference(0); - + type = resource.getResourceMap().getResourceType("FOND"); for (int i = 0; i < type.getCount(); ++i) { reference = type.getReference(i); diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/mac/ResourceHeader.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/mac/ResourceHeader.java index 8f5224632..de13b116f 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/mac/ResourceHeader.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/mac/ResourceHeader.java @@ -46,15 +46,15 @@ public class ResourceHeader { public int getDataOffset() { return dataOffset; } - + public int getMapOffset() { return mapOffset; } - + public int getDataLength() { return dataLen; } - + public int getMapLength() { return mapLen; } diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/mac/ResourceMap.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/mac/ResourceMap.java index 96ba06087..d348c645e 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/mac/ResourceMap.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/mac/ResourceMap.java @@ -35,7 +35,7 @@ public class ResourceMap { private int fileReferenceNumber; private int attributes; private ResourceType[] types; - + /** Creates new ResourceMap */ public ResourceMap(DataInput di) throws IOException { di.readFully(headerCopy); @@ -45,18 +45,18 @@ public class ResourceMap { int typeOffset = di.readUnsignedShort(); int nameOffset = di.readUnsignedShort(); int typeCount = di.readUnsignedShort() + 1; - + // Read types types = new ResourceType[typeCount]; for (int i = 0; i < typeCount; i++) { types[i] = new ResourceType(di); } - + // Read the references for (int i = 0; i < typeCount; i++) { types[i].readRefs(di); } - + // Read the names for (int i = 0; i < typeCount; i++) { types[i].readNames(di); @@ -76,7 +76,7 @@ public class ResourceMap { public ResourceType getResourceType(int i) { return types[i]; } - + public int getResourceTypeCount() { return types.length; } diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/mac/ResourceReference.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/mac/ResourceReference.java index fd7ec46b2..9d1534821 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/mac/ResourceReference.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/mac/ResourceReference.java @@ -36,7 +36,7 @@ public class ResourceReference { private int dataOffset; private int handle; private String name; - + /** Creates new ResourceReference */ protected ResourceReference(DataInput di) throws IOException { id = di.readUnsignedShort(); @@ -58,23 +58,23 @@ public class ResourceReference { public int getId() { return id; } - + public short getNameOffset() { return nameOffset; } - + public short getAttributes() { return attributes; } - + public int getDataOffset() { return dataOffset; } - + public int getHandle() { return handle; } - + public String getName() { return name; } diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/mac/ResourceType.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/mac/ResourceType.java index 1c7e24c0f..2ad002e6a 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/mac/ResourceType.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/mac/ResourceType.java @@ -34,7 +34,7 @@ public class ResourceType { private int count; private int offset; private ResourceReference[] references; - + /** Creates new ResourceType */ protected ResourceType(DataInput di) throws IOException { type = di.readInt(); @@ -42,7 +42,7 @@ public class ResourceType { offset = di.readUnsignedShort(); references = new ResourceReference[count]; } - + protected void readRefs(DataInput di) throws IOException { for (int i = 0; i < count; i++) { references[i] = new ResourceReference(di); @@ -58,7 +58,7 @@ public class ResourceType { public int getType() { return type; } - + public String getTypeAsString() { return new StringBuilder() .append((char)((type>>24)&0xff)) @@ -67,11 +67,11 @@ public class ResourceType { .append((char)((type)&0xff)) .toString(); } - + public int getCount() { return count; } - + public int getOffset() { return offset; } diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/BaseTable.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/BaseTable.java index ed615eb72..b6626a9cc 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/BaseTable.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/BaseTable.java @@ -31,18 +31,18 @@ import java.io.IOException; * @author David Schweinsberg */ public class BaseTable implements Table { - + private abstract class BaseCoord { public abstract int getBaseCoordFormat(); - + public abstract short getCoordinate(); } - + private class BaseCoordFormat1 extends BaseCoord { private short _coordinate; - + protected BaseCoordFormat1(DataInput di) throws IOException { _coordinate = di.readShort(); } @@ -50,19 +50,19 @@ public class BaseTable implements Table { public int getBaseCoordFormat() { return 1; } - + public short getCoordinate() { return _coordinate; } - + } - + private class BaseCoordFormat2 extends BaseCoord { private short _coordinate; private int _referenceGlyph; private int _baseCoordPoint; - + protected BaseCoordFormat2(DataInput di) throws IOException { _coordinate = di.readShort(); _referenceGlyph = di.readUnsignedShort(); @@ -72,18 +72,18 @@ public class BaseTable implements Table { public int getBaseCoordFormat() { return 2; } - + public short getCoordinate() { return _coordinate; } - + } - + private class BaseCoordFormat3 extends BaseCoord { private short _coordinate; private int _deviceTableOffset; - + protected BaseCoordFormat3(DataInput di) throws IOException { _coordinate = di.readShort(); _deviceTableOffset = di.readUnsignedShort(); @@ -92,33 +92,33 @@ public class BaseTable implements Table { public int getBaseCoordFormat() { return 2; } - + public short getCoordinate() { return _coordinate; } - + } - + private class FeatMinMaxRecord { - + private int _tag; private int _minCoordOffset; private int _maxCoordOffset; - + protected FeatMinMaxRecord(DataInput di) throws IOException { _tag = di.readInt(); _minCoordOffset = di.readUnsignedShort(); _maxCoordOffset = di.readUnsignedShort(); } } - + private class MinMax { - + private int _minCoordOffset; private int _maxCoordOffset; private int _featMinMaxCount; private FeatMinMaxRecord[] _featMinMaxRecord; - + protected MinMax(int minMaxOffset) throws IOException { DataInput di = getDataInputForOffset(minMaxOffset); _minCoordOffset = di.readUnsignedShort(); @@ -130,14 +130,14 @@ public class BaseTable implements Table { } } } - + private class BaseValues { - + private int _defaultIndex; private int _baseCoordCount; private int[] _baseCoordOffset; private BaseCoord[] _baseCoords; - + protected BaseValues(int baseValuesOffset) throws IOException { DataInput di = getDataInputForOffset(baseValuesOffset); _defaultIndex = di.readUnsignedShort(); @@ -163,12 +163,12 @@ public class BaseTable implements Table { } } } - + private class BaseLangSysRecord { - + private int _baseLangSysTag; private int _minMaxOffset; - + protected BaseLangSysRecord(DataInput di) throws IOException { _baseLangSysTag = di.readInt(); _minMaxOffset = di.readUnsignedShort(); @@ -177,14 +177,14 @@ public class BaseTable implements Table { public int getBaseLangSysTag() { return _baseLangSysTag; } - + public int getMinMaxOffset() { return _minMaxOffset; } } - + private class BaseScript { - + private int _thisOffset; private int _baseValuesOffset; private int _defaultMinMaxOffset; @@ -192,7 +192,7 @@ public class BaseTable implements Table { private BaseLangSysRecord[] _baseLangSysRecord; private BaseValues _baseValues; private MinMax[] _minMax; - + protected BaseScript(int baseScriptOffset) throws IOException { _thisOffset = baseScriptOffset; DataInput di = getDataInputForOffset(baseScriptOffset); @@ -231,9 +231,9 @@ public class BaseTable implements Table { return sb.toString(); } } - + private class BaseScriptRecord { - + private int _baseScriptTag; private int _baseScriptOffset; @@ -245,19 +245,19 @@ public class BaseTable implements Table { public int getBaseScriptTag() { return _baseScriptTag; } - + public int getBaseScriptOffset() { return _baseScriptOffset; } } - + private class BaseScriptList { - + private int _thisOffset; private int _baseScriptCount; private BaseScriptRecord[] _baseScriptRecord; private BaseScript[] _baseScripts; - + protected BaseScriptList(int baseScriptListOffset) throws IOException { _thisOffset = baseScriptListOffset; DataInput di = getDataInputForOffset(baseScriptListOffset); @@ -288,13 +288,13 @@ public class BaseTable implements Table { return sb.toString(); } } - + private class BaseTagList { - + private int _thisOffset; private int _baseTagCount; private int[] _baselineTag; - + protected BaseTagList(int baseTagListOffset) throws IOException { _thisOffset = baseTagListOffset; DataInput di = getDataInputForOffset(baseTagListOffset); @@ -315,9 +315,9 @@ public class BaseTable implements Table { return sb.toString(); } } - + private class Axis { - + private int _thisOffset; private int _baseTagListOffset; private int _baseScriptListOffset; @@ -348,7 +348,7 @@ public class BaseTable implements Table { .toString(); } } - + private DirectoryEntry _de; private int _version; private int _horizAxisOffset; @@ -375,25 +375,25 @@ public class BaseTable implements Table { if (_vertAxisOffset != 0) { _vertAxis = new Axis(_vertAxisOffset); } - + // Let go of the buffer _buf = null; } - + private DataInput getDataInputForOffset(int offset) { return new DataInputStream(new ByteArrayInputStream( _buf, offset, _de.getLength() - offset)); } - + // private String valueAsShortHex(int value) { // return String.format("%1$4x", value); // } -// +// // private String valueAsLongHex(int value) { // return String.format("%1$8x", value); // } - + static protected String tagAsString(int tag) { char[] c = new char[4]; c[0] = (char)((tag >> 24) & 0xff); @@ -402,7 +402,7 @@ public class BaseTable implements Table { c[3] = (char)(tag & 0xff); return String.valueOf(c); } - + public int getType() { return BASE; } @@ -422,7 +422,7 @@ public class BaseTable implements Table { } return sb.toString(); } - + /** * Get a directory entry for this table. This uniquely identifies the * table in collections where there may be more than one instance of a diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CffTable.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CffTable.java index 966f6e17b..62486fb7f 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CffTable.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CffTable.java @@ -36,13 +36,13 @@ import java.util.Hashtable; * @author David Schweinsberg */ public class CffTable implements Table { - + public class Dict { - + private Dictionary _entries = new Hashtable(); private int[] _data; private int _index; - + protected Dict(int[] data, int offset, int length) { _data = data; _index = offset; @@ -50,11 +50,11 @@ public class CffTable implements Table { addKeyAndValueEntry(); } } - + public Object getValue(int key) { return _entries.get(key); } - + private boolean addKeyAndValueEntry() { ArrayList operands = new ArrayList(); Object operand = null; @@ -74,7 +74,7 @@ public class CffTable implements Table { } return true; } - + private boolean isOperandAtIndex() { int b0 = _data[_index]; if ((32 <= b0 && b0 <= 254) @@ -97,31 +97,31 @@ public class CffTable implements Table { private Object nextOperand() { int b0 = _data[_index]; if (32 <= b0 && b0 <= 246) { - + // 1 byte integer ++_index; return new Integer(b0 - 139); } else if (247 <= b0 && b0 <= 250) { - + // 2 byte integer int b1 = _data[_index + 1]; _index += 2; return new Integer((b0 - 247) * 256 + b1 + 108); } else if (251 <= b0 && b0 <= 254) { - + // 2 byte integer int b1 = _data[_index + 1]; _index += 2; return new Integer(-(b0 - 251) * 256 - b1 - 108); } else if (b0 == 28) { - + // 3 byte integer int b1 = _data[_index + 1]; int b2 = _data[_index + 2]; _index += 3; return new Integer(b1 << 8 | b2); } else if (b0 == 29) { - + // 5 byte integer int b1 = _data[_index + 1]; int b2 = _data[_index + 2]; @@ -130,7 +130,7 @@ public class CffTable implements Table { _index += 5; return new Integer(b1 << 24 | b2 << 16 | b3 << 8 | b4); } else if (b0 == 30) { - + // Real number StringBuilder fString = new StringBuilder(); int nibble1 = 0; @@ -142,13 +142,13 @@ public class CffTable implements Table { ++_index; fString.append(decodeRealNibble(nibble1)); fString.append(decodeRealNibble(nibble2)); - } + } return new Float(fString.toString()); } else { return null; } } - + private String decodeRealNibble(int nibble) { if (nibble < 0xa) { return Integer.toString(nibble); @@ -163,7 +163,7 @@ public class CffTable implements Table { } return ""; } - + public String toString() { StringBuilder sb = new StringBuilder(); Enumeration keys = _entries.keys(); @@ -179,14 +179,14 @@ public class CffTable implements Table { return sb.toString(); } } - + public class Index { - + private int _count; private int _offSize; private int[] _offset; private int[] _data; - + protected Index(DataInput di) throws IOException { _count = di.readUnsignedShort(); _offset = new int[_count + 1]; @@ -203,19 +203,19 @@ public class CffTable implements Table { _data[i] = di.readUnsignedByte(); } } - + public int getCount() { return _count; } - + public int getOffset(int index) { return _offset[index]; } - + public int getDataLength() { return _offset[_offset.length - 1] - 1; } - + public int[] getData() { return _data; } @@ -241,13 +241,13 @@ public class CffTable implements Table { return sb.toString(); } } - + public class TopDictIndex extends Index { protected TopDictIndex(DataInput di) throws IOException { super(di); } - + public Dict getTopDict(int index) { int offset = getOffset(index) - 1; int len = getOffset(index + 1) - offset - 1; @@ -262,13 +262,13 @@ public class CffTable implements Table { return sb.toString(); } } - + public class NameIndex extends Index { protected NameIndex(DataInput di) throws IOException { super(di); } - + public String getName(int index) { String name = null; int offset = getOffset(index) - 1; @@ -286,7 +286,7 @@ public class CffTable implements Table { } return name; } - + public String toString() { StringBuilder sb = new StringBuilder(); for (int i = 0; i < getCount(); ++i) { @@ -301,7 +301,7 @@ public class CffTable implements Table { protected StringIndex(DataInput di) throws IOException { super(di); } - + public String getString(int index) { if (index < CffStandardStrings.standardStrings.length) { return CffStandardStrings.standardStrings[index]; @@ -320,7 +320,7 @@ public class CffTable implements Table { return sb.toString(); } } - + public String toString() { int nonStandardBase = CffStandardStrings.standardStrings.length; StringBuilder sb = new StringBuilder(); @@ -331,12 +331,12 @@ public class CffTable implements Table { return sb.toString(); } } - + private class CharsetRange { - + private int _first; private int _left; - + public int getFirst() { return _first; } @@ -344,7 +344,7 @@ public class CffTable implements Table { protected void setFirst(int first) { _first = first; } - + public int getLeft() { return _left; } @@ -355,39 +355,39 @@ public class CffTable implements Table { } private class CharsetRange1 extends CharsetRange { - + protected CharsetRange1(DataInput di) throws IOException { setFirst(di.readUnsignedShort()); setLeft(di.readUnsignedByte()); } } - + private class CharsetRange2 extends CharsetRange { - + protected CharsetRange2(DataInput di) throws IOException { setFirst(di.readUnsignedShort()); setLeft(di.readUnsignedShort()); } } - + private abstract class Charset { - + public abstract int getFormat(); - + public abstract int getSID(int gid); } - + private class CharsetFormat0 extends Charset { - + private int[] _glyph; - + protected CharsetFormat0(DataInput di, int glyphCount) throws IOException { _glyph = new int[glyphCount - 1]; // minus 1 because .notdef is omitted for (int i = 0; i < glyphCount - 1; ++i) { _glyph[i] = di.readUnsignedShort(); } } - + public int getFormat() { return 0; } @@ -399,11 +399,11 @@ public class CffTable implements Table { return _glyph[gid - 1]; } } - + private class CharsetFormat1 extends Charset { - + private ArrayList _charsetRanges = new ArrayList(); - + protected CharsetFormat1(DataInput di, int glyphCount) throws IOException { int glyphsCovered = glyphCount - 1; // minus 1 because .notdef is omitted while (glyphsCovered > 0) { @@ -421,7 +421,7 @@ public class CffTable implements Table { if (gid == 0) { return 0; } - + // Count through the ranges to find the one of interest int count = 0; for (CharsetRange range : _charsetRanges) { @@ -436,9 +436,9 @@ public class CffTable implements Table { } private class CharsetFormat2 extends Charset { - + private ArrayList _charsetRanges = new ArrayList(); - + protected CharsetFormat2(DataInput di, int glyphCount) throws IOException { int glyphsCovered = glyphCount - 1; // minus 1 because .notdef is omitted while (glyphsCovered > 0) { @@ -456,7 +456,7 @@ public class CffTable implements Table { if (gid == 0) { return 0; } - + // Count through the ranges to find the one of interest int count = 0; for (CharsetRange range : _charsetRanges) { @@ -469,7 +469,7 @@ public class CffTable implements Table { return 0; } } - + private DirectoryEntry _de; private int _major; private int _minor; @@ -499,24 +499,24 @@ public class CffTable implements Table { _minor = di2.readUnsignedByte(); _hdrSize = di2.readUnsignedByte(); _offSize = di2.readUnsignedByte(); - + // Name INDEX di2 = getDataInputForOffset(_hdrSize); _nameIndex = new NameIndex(di2); - + // Top DICT INDEX _topDictIndex = new TopDictIndex(di2); // String INDEX _stringIndex = new StringIndex(di2); - + // Global Subr INDEX _globalSubrIndex = new Index(di2); - + // Encodings go here -- but since this is an OpenType font will this // not always be a CIDFont? In which case there are no encodings // within the CFF data. - + // Load each of the fonts _charStringsIndexArray = new Index[_topDictIndex.getCount()]; _charsets = new Charset[_topDictIndex.getCount()]; @@ -530,7 +530,7 @@ public class CffTable implements Table { di2 = getDataInputForOffset(charStringsOffset); _charStringsIndexArray[i] = new Index(di2); int glyphCount = _charStringsIndexArray[i].getCount(); - + // Charsets Integer charsetOffset = (Integer) _topDictIndex.getTopDict(i).getValue(15); di2 = getDataInputForOffset(charsetOffset); @@ -563,7 +563,7 @@ public class CffTable implements Table { } } } - + private DataInput getDataInputForOffset(int offset) { return new DataInputStream(new ByteArrayInputStream( _buf, offset, @@ -573,7 +573,7 @@ public class CffTable implements Table { public NameIndex getNameIndex() { return _nameIndex; } - + public Charset getCharset(int fontIndex) { return _charsets[fontIndex]; } @@ -581,7 +581,7 @@ public class CffTable implements Table { public Charstring getCharstring(int fontIndex, int gid) { return _charstringsArray[fontIndex][gid]; } - + public int getCharstringCount(int fontIndex) { return _charstringsArray[fontIndex].length; } @@ -607,7 +607,7 @@ public class CffTable implements Table { } return sb.toString(); } - + /** * Get a directory entry for this table. This uniquely identifies the * table in collections where there may be more than one instance of a diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/Charstring.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/Charstring.java index d411d1e00..01e2d4934 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/Charstring.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/Charstring.java @@ -28,6 +28,6 @@ package jogamp.graph.font.typecast.ot.table; public abstract class Charstring { public abstract int getIndex(); - + public abstract String getName(); } diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CharstringType2.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CharstringType2.java index 9c40a0e5e..93ff60988 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CharstringType2.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CharstringType2.java @@ -28,7 +28,7 @@ import jogamp.graph.font.typecast.ot.table.CffTable; * @author David Schweinsberg */ public class CharstringType2 extends Charstring { - + private static final String[] _oneByteOperators = { "-Reserved-", "hstem", @@ -105,7 +105,7 @@ public class CharstringType2 extends Charstring { "flex1", "-Reserved-" }; - + private int _index; private String _name; private int[] _data; @@ -132,7 +132,7 @@ public class CharstringType2 extends Charstring { _localSubrIndex = localSubrIndex; _globalSubrIndex = globalSubrIndex; } - + public int getIndex() { return _index; } @@ -140,7 +140,7 @@ public class CharstringType2 extends Charstring { public String getName() { return _name; } - + private void disassemble(StringBuilder sb) { Number operand = null; while (isOperandAtIndex()) { @@ -151,7 +151,7 @@ public class CharstringType2 extends Charstring { String mnemonic; if (operator == 12) { operator = nextByte(); - + // Check we're not exceeding the upper limit of our mnemonics if (operator > 38) { operator = 38; @@ -162,7 +162,7 @@ public class CharstringType2 extends Charstring { } sb.append(mnemonic); } - + public void resetIP() { _ip = _offset; } @@ -214,15 +214,15 @@ public class CharstringType2 extends Charstring { return null; } } - + public int nextByte() { return _data[_ip++]; } - + public boolean moreBytes() { return _ip < _offset + _length; } - + public String toString() { StringBuilder sb = new StringBuilder(); resetIP(); diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/ClassDef.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/ClassDef.java index 4c2f3decb..21698c76b 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/ClassDef.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/ClassDef.java @@ -1,9 +1,9 @@ /***************************************************************************** * Copyright (C) The Apache Software Foundation. All rights reserved. * - * ------------------------------------------------------------------------- * - * This software is published under the terms of the Apache Software License * - * version 1.1, a copy of which has been included with this distribution in * - * the LICENSE file. * + * ------------------------------------------------------------------------- * + * This software is published under the terms of the Apache Software License * + * version 1.1, a copy of which has been included with this distribution in * + * the LICENSE file. * *****************************************************************************/ package jogamp.graph.font.typecast.ot.table; diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/ClassDefFormat1.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/ClassDefFormat1.java index 0c99ad66a..1079aeed4 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/ClassDefFormat1.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/ClassDefFormat1.java @@ -1,9 +1,9 @@ /***************************************************************************** * Copyright (C) The Apache Software Foundation. All rights reserved. * - * ------------------------------------------------------------------------- * - * This software is published under the terms of the Apache Software License * - * version 1.1, a copy of which has been included with this distribution in * - * the LICENSE file. * + * ------------------------------------------------------------------------- * + * This software is published under the terms of the Apache Software License * + * version 1.1, a copy of which has been included with this distribution in * + * the LICENSE file. * *****************************************************************************/ package jogamp.graph.font.typecast.ot.table; diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/ClassDefFormat2.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/ClassDefFormat2.java index 5b7c4d655..59bc7b329 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/ClassDefFormat2.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/ClassDefFormat2.java @@ -1,9 +1,9 @@ /***************************************************************************** * Copyright (C) The Apache Software Foundation. All rights reserved. * - * ------------------------------------------------------------------------- * - * This software is published under the terms of the Apache Software License * - * version 1.1, a copy of which has been included with this distribution in * - * the LICENSE file. * + * ------------------------------------------------------------------------- * + * This software is published under the terms of the Apache Software License * + * version 1.1, a copy of which has been included with this distribution in * + * the LICENSE file. * *****************************************************************************/ package jogamp.graph.font.typecast.ot.table; diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapFormat.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapFormat.java index 7ce531cd9..62ce5ae4c 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapFormat.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapFormat.java @@ -58,21 +58,21 @@ import java.io.IOException; * @author David Schweinsberg */ public abstract class CmapFormat { - + public class Range { - + private int _startCode; private int _endCode; - + protected Range(int startCode, int endCode) { _startCode = startCode; _endCode = endCode; } - + public int getStartCode() { return _startCode; } - + public int getEndCode() { return _endCode; } @@ -116,12 +116,12 @@ public abstract class CmapFormat { } public abstract int getRangeCount(); - + public abstract Range getRange(int index) throws ArrayIndexOutOfBoundsException; public abstract int mapCharCode(int charCode); - + public String toString() { return new StringBuilder() .append("format: ") diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapFormat0.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapFormat0.java index e374f82d2..2093158bd 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapFormat0.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapFormat0.java @@ -74,7 +74,7 @@ public class CmapFormat0 extends CmapFormat { public int getRangeCount() { return 1; } - + public Range getRange(int index) throws ArrayIndexOutOfBoundsException { if (index != 0) { throw new ArrayIndexOutOfBoundsException(); diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapFormat2.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapFormat2.java index 319d8c0d0..222c93852 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapFormat2.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapFormat2.java @@ -67,7 +67,7 @@ public class CmapFormat2 extends CmapFormat { int _idRangeOffset; int _arrayIndex; } - + private int[] _subHeaderKeys = new int[256]; private SubHeader[] _subHeaders; private int[] _glyphIndexArray; @@ -75,9 +75,9 @@ public class CmapFormat2 extends CmapFormat { protected CmapFormat2(DataInput di) throws IOException { super(di); _format = 2; - + int pos = 6; - + // Read the subheader keys, noting the highest value, as this will // determine the number of subheaders to read. int highest = 0; @@ -88,7 +88,7 @@ public class CmapFormat2 extends CmapFormat { } int subHeaderCount = highest / 8 + 1; _subHeaders = new SubHeader[subHeaderCount]; - + // Read the subheaders, once again noting the highest glyphIndexArray // index range. int indexArrayOffset = 8 * subHeaderCount + 518; @@ -99,18 +99,18 @@ public class CmapFormat2 extends CmapFormat { sh._entryCount = di.readUnsignedShort(); sh._idDelta = di.readShort(); sh._idRangeOffset = di.readUnsignedShort(); - + // Calculate the offset into the _glyphIndexArray pos += 8; sh._arrayIndex = (pos - 2 + sh._idRangeOffset - indexArrayOffset) / 2; - + // What is the highest range within the glyphIndexArray? highest = Math.max(highest, sh._arrayIndex + sh._entryCount); - + _subHeaders[i] = sh; } - + // Read the glyphIndexArray _glyphIndexArray = new int[highest]; for (int i = 0; i < _glyphIndexArray.length; ++i) { @@ -121,12 +121,12 @@ public class CmapFormat2 extends CmapFormat { public int getRangeCount() { return _subHeaders.length; } - + public Range getRange(int index) throws ArrayIndexOutOfBoundsException { if (index < 0 || index >= _subHeaders.length) { throw new ArrayIndexOutOfBoundsException(); } - + // Find the high-byte (if any) int highByte = 0; if (index != 0) { @@ -137,7 +137,7 @@ public class CmapFormat2 extends CmapFormat { } } } - + return new Range( highByte | _subHeaders[index]._firstCode, highByte | (_subHeaders[index]._firstCode + @@ -145,7 +145,7 @@ public class CmapFormat2 extends CmapFormat { } public int mapCharCode(int charCode) { - + // Get the appropriate subheader int index = 0; int highByte = charCode >> 8; @@ -153,14 +153,14 @@ public class CmapFormat2 extends CmapFormat { index = _subHeaderKeys[highByte] / 8; } SubHeader sh = _subHeaders[index]; - + // Is the charCode out-of-range? int lowByte = charCode & 0xff; if (lowByte < sh._firstCode || lowByte >= (sh._firstCode + sh._entryCount)) { return 0; } - + // Now calculate the glyph index int glyphIndex = _glyphIndexArray[sh._arrayIndex + (lowByte - sh._firstCode)]; diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapFormat4.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapFormat4.java index c09bdc8c3..ef65867af 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapFormat4.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapFormat4.java @@ -102,7 +102,7 @@ public class CmapFormat4 extends CmapFormat { for (int i = 0; i < count; i++) { _glyphIdArray[i] = di.readUnsignedShort(); } // + 2*count (8*segCount + 2*count + 18) - + // Are there any padding bytes we need to consume? // int leftover = length - (8*segCount + 2*count + 18); // if (leftover > 0) { @@ -113,7 +113,7 @@ public class CmapFormat4 extends CmapFormat { public int getRangeCount() { return _segCount; } - + public Range getRange(int index) throws ArrayIndexOutOfBoundsException { if (index < 0 || index >= _segCount) { throw new ArrayIndexOutOfBoundsException(); diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapFormat6.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapFormat6.java index a58531d11..a22e33244 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapFormat6.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapFormat6.java @@ -67,7 +67,7 @@ public class CmapFormat6 extends CmapFormat { protected CmapFormat6(DataInput di) throws IOException { super(di); _format = 6; - + // HACK: As this is not yet implemented, we need to skip over the bytes // we should be consuming //di.skipBytes(_length - 4); @@ -76,7 +76,7 @@ public class CmapFormat6 extends CmapFormat { public int getRangeCount() { return 0; } - + public Range getRange(int index) throws ArrayIndexOutOfBoundsException { throw new ArrayIndexOutOfBoundsException(); } diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapFormatUnknown.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapFormatUnknown.java index 83366b593..3544b6f62 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapFormatUnknown.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapFormatUnknown.java @@ -30,12 +30,12 @@ import java.io.IOException; * @version $Id: CmapFormatUnknown.java,v 1.1 2004-12-21 10:21:23 davidsch Exp $ */ public class CmapFormatUnknown extends CmapFormat { - + /** Creates a new instance of CmapFormatUnknown */ protected CmapFormatUnknown(int format, DataInput di) throws IOException { super(di); _format = format; - + // We don't know how to handle this data, so we'll just skip over it di.skipBytes(_length - 4); } @@ -43,7 +43,7 @@ public class CmapFormatUnknown extends CmapFormat { public int getRangeCount() { return 0; } - + public Range getRange(int index) throws ArrayIndexOutOfBoundsException { throw new ArrayIndexOutOfBoundsException(); } diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapIndexEntry.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapIndexEntry.java index 85fdf7225..47f6c470d 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapIndexEntry.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapIndexEntry.java @@ -85,7 +85,7 @@ public class CmapIndexEntry implements Comparable { public CmapFormat getFormat() { return _format; } - + public void setFormat(CmapFormat format) { _format = format; } diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapTable.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapTable.java index 0050fdd8e..016efa093 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapTable.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapTable.java @@ -94,7 +94,7 @@ public class CmapTable implements Table { } else if (_entries[i].getOffset() > bytesRead) { di.skipBytes(_entries[i].getOffset() - (int) bytesRead); } else if (_entries[i].getOffset() != bytesRead) { - + // Something is amiss throw new IOException(); } @@ -109,15 +109,15 @@ public class CmapTable implements Table { public int getVersion() { return _version; } - + public int getNumTables() { return _numTables; } - + public CmapIndexEntry getCmapIndexEntry(int i) { return _entries[i]; } - + public CmapFormat getCmapFormat(short platformId, short encodingId) { // Find the requested format @@ -148,7 +148,7 @@ public class CmapTable implements Table { // } return sb.toString(); } - + /** * Get a directory entry for this table. This uniquely identifies the * table in collections where there may be more than one instance of a diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/Coverage.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/Coverage.java index e85fadb5e..4f526f51d 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/Coverage.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/Coverage.java @@ -68,7 +68,7 @@ public abstract class Coverage { * can't be found. */ public abstract int findGlyph(int glyphId); - + protected static Coverage read(DataInput di) throws IOException { Coverage c = null; int format = di.readUnsignedShort(); diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CvtTable.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CvtTable.java index 963163584..867ef1823 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CvtTable.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CvtTable.java @@ -1,9 +1,9 @@ /***************************************************************************** * Copyright (C) The Apache Software Foundation. All rights reserved. * - * ------------------------------------------------------------------------- * - * This software is published under the terms of the Apache Software License * - * version 1.1, a copy of which has been included with this distribution in * - * the LICENSE file. * + * ------------------------------------------------------------------------- * + * This software is published under the terms of the Apache Software License * + * version 1.1, a copy of which has been included with this distribution in * + * the LICENSE file. * *****************************************************************************/ package jogamp.graph.font.typecast.ot.table; @@ -47,7 +47,7 @@ public class CvtTable implements Table { } return sb.toString(); } - + /** * Get a directory entry for this table. This uniquely identifies the * table in collections where there may be more than one instance of a @@ -57,5 +57,5 @@ public class CvtTable implements Table { public DirectoryEntry getDirectoryEntry() { return de; } - + } diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/Device.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/Device.java index 6b4af6908..5451f4502 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/Device.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/Device.java @@ -1,9 +1,9 @@ /***************************************************************************** * Copyright (C) The Apache Software Foundation. All rights reserved. * - * ------------------------------------------------------------------------- * - * This software is published under the terms of the Apache Software License * - * version 1.1, a copy of which has been included with this distribution in * - * the LICENSE file. * + * ------------------------------------------------------------------------- * + * This software is published under the terms of the Apache Software License * + * version 1.1, a copy of which has been included with this distribution in * + * the LICENSE file. * *****************************************************************************/ package jogamp.graph.font.typecast.ot.table; diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/DirectoryEntry.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/DirectoryEntry.java index c98f03fe9..7abcec0ce 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/DirectoryEntry.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/DirectoryEntry.java @@ -70,7 +70,7 @@ public class DirectoryEntry implements Cloneable { _offset = di.readInt(); _length = di.readInt(); } - + public Object clone() { try { return super.clone(); @@ -103,7 +103,7 @@ public class DirectoryEntry implements Cloneable { .append((char)((_tag)&0xff)) .toString(); } - + public String toString() { return new StringBuilder() .append("'").append(getTagAsString()) diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/DsigEntry.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/DsigEntry.java index 4b41f451d..4a09a4c34 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/DsigEntry.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/DsigEntry.java @@ -1,9 +1,9 @@ /***************************************************************************** * Copyright (C) The Apache Software Foundation. All rights reserved. * - * ------------------------------------------------------------------------- * - * This software is published under the terms of the Apache Software License * - * version 1.1, a copy of which has been included with this distribution in * - * the LICENSE file. * + * ------------------------------------------------------------------------- * + * This software is published under the terms of the Apache Software License * + * version 1.1, a copy of which has been included with this distribution in * + * the LICENSE file. * *****************************************************************************/ package jogamp.graph.font.typecast.ot.table; @@ -21,7 +21,7 @@ public class DsigEntry { private int format; private int length; private int offset; - + /** Creates new DsigEntry */ protected DsigEntry(DataInput di) throws IOException { format = di.readInt(); @@ -32,11 +32,11 @@ public class DsigEntry { public int getFormat() { return format; } - + public int getLength() { return length; } - + public int getOffset() { return offset; } diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/DsigTable.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/DsigTable.java index e2784f9e6..f25c595d0 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/DsigTable.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/DsigTable.java @@ -1,9 +1,9 @@ /***************************************************************************** * Copyright (C) The Apache Software Foundation. All rights reserved. * - * ------------------------------------------------------------------------- * - * This software is published under the terms of the Apache Software License * - * version 1.1, a copy of which has been included with this distribution in * - * the LICENSE file. * + * ------------------------------------------------------------------------- * + * This software is published under the terms of the Apache Software License * + * version 1.1, a copy of which has been included with this distribution in * + * the LICENSE file. * *****************************************************************************/ package jogamp.graph.font.typecast.ot.table; @@ -48,7 +48,7 @@ public class DsigTable implements Table { public int getType() { return DSIG; } - + /** * Get a directory entry for this table. This uniquely identifies the * table in collections where there may be more than one instance of a @@ -58,7 +58,7 @@ public class DsigTable implements Table { public DirectoryEntry getDirectoryEntry() { return de; } - + public String toString() { StringBuilder sb = new StringBuilder().append("DSIG\n"); for (int i = 0; i < numSigs; i++) { diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/FeatureList.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/FeatureList.java index 3cfb54a38..fdedca94a 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/FeatureList.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/FeatureList.java @@ -66,11 +66,11 @@ public class FeatureList { /** Creates new FeatureList */ public FeatureList(DataInputStream dis, int offset) throws IOException { - + // Ensure we're in the right place dis.reset(); dis.skipBytes(offset); - + // Start reading _featureCount = dis.readUnsignedShort(); _featureRecords = new FeatureRecord[_featureCount]; @@ -88,11 +88,11 @@ public class FeatureList { public int getFeatureCount() { return _featureCount; } - + public FeatureRecord getFeatureRecord(int i) { return _featureRecords[i]; } - + public Feature getFeature(int i) { return _features[i]; } diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/FeatureRecord.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/FeatureRecord.java index eb610814b..1da74f4d5 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/FeatureRecord.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/FeatureRecord.java @@ -72,7 +72,7 @@ public class FeatureRecord { public int getTag() { return _tag; } - + public int getOffset() { return _offset; } diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/FpgmTable.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/FpgmTable.java index 9a6000156..b662265d9 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/FpgmTable.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/FpgmTable.java @@ -1,9 +1,9 @@ /***************************************************************************** * Copyright (C) The Apache Software Foundation. All rights reserved. * - * ------------------------------------------------------------------------- * - * This software is published under the terms of the Apache Software License * - * version 1.1, a copy of which has been included with this distribution in * - * the LICENSE file. * + * ------------------------------------------------------------------------- * + * This software is published under the terms of the Apache Software License * + * version 1.1, a copy of which has been included with this distribution in * + * the LICENSE file. * *****************************************************************************/ package jogamp.graph.font.typecast.ot.table; @@ -33,7 +33,7 @@ public class FpgmTable extends Program implements Table { public String toString() { return Disassembler.disassemble(getInstructions(), 0); } - + /** * Get a directory entry for this table. This uniquely identifies the * table in collections where there may be more than one instance of a @@ -43,5 +43,5 @@ public class FpgmTable extends Program implements Table { public DirectoryEntry getDirectoryEntry() { return de; } - + } diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/GaspRange.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/GaspRange.java index 2748406df..cf4afa88e 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/GaspRange.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/GaspRange.java @@ -1,9 +1,9 @@ /***************************************************************************** * Copyright (C) The Apache Software Foundation. All rights reserved. * - * ------------------------------------------------------------------------- * - * This software is published under the terms of the Apache Software License * - * version 1.1, a copy of which has been included with this distribution in * - * the LICENSE file. * + * ------------------------------------------------------------------------- * + * This software is published under the terms of the Apache Software License * + * version 1.1, a copy of which has been included with this distribution in * + * the LICENSE file. * *****************************************************************************/ package jogamp.graph.font.typecast.ot.table; @@ -20,10 +20,10 @@ public class GaspRange { public static final int GASP_GRIDFIT = 1; public static final int GASP_DOGRAY = 2; - + private int rangeMaxPPEM; private int rangeGaspBehavior; - + /** Creates new GaspRange */ protected GaspRange(DataInput di) throws IOException { rangeMaxPPEM = di.readUnsignedShort(); diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/GaspTable.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/GaspTable.java index a83db5bff..45498eda1 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/GaspTable.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/GaspTable.java @@ -1,9 +1,9 @@ /***************************************************************************** * Copyright (C) The Apache Software Foundation. All rights reserved. * - * ------------------------------------------------------------------------- * - * This software is published under the terms of the Apache Software License * - * version 1.1, a copy of which has been included with this distribution in * - * the LICENSE file. * + * ------------------------------------------------------------------------- * + * This software is published under the terms of the Apache Software License * + * version 1.1, a copy of which has been included with this distribution in * + * the LICENSE file. * *****************************************************************************/ package jogamp.graph.font.typecast.ot.table; @@ -22,7 +22,7 @@ public class GaspTable implements Table { private int version; private int numRanges; private GaspRange[] gaspRange; - + /** Creates new GaspTable */ protected GaspTable(DirectoryEntry de, DataInput di) throws IOException { this.de = (DirectoryEntry) de.clone(); @@ -49,7 +49,7 @@ public class GaspTable implements Table { } return sb.toString(); } - + /** * Get a directory entry for this table. This uniquely identifies the * table in collections where there may be more than one instance of a @@ -59,5 +59,5 @@ public class GaspTable implements Table { public DirectoryEntry getDirectoryEntry() { return de; } - + } diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/GlyfCompositeDescript.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/GlyfCompositeDescript.java index 4cf254198..50f62ed62 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/GlyfCompositeDescript.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/GlyfCompositeDescript.java @@ -73,7 +73,7 @@ public class GlyfCompositeDescript extends GlyfDescript { int glyphIndex, DataInput di) throws IOException { super(parentTable, glyphIndex, (short) -1, di); - + // Get all of the composite components GlyfCompositeComp comp; int firstIndex = 0; diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/GlyfDescript.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/GlyfDescript.java index a9342a434..a7e2e7b69 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/GlyfDescript.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/GlyfDescript.java @@ -111,7 +111,7 @@ public abstract class GlyfDescript extends Program implements GlyphDescription { public short getYMinimum() { return _yMin; } - + public String toString() { return new StringBuilder() .append(" numberOfContours: ").append(_numberOfContours) diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/GlyfSimpleDescript.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/GlyfSimpleDescript.java index c11d2d8ff..f67162cff 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/GlyfSimpleDescript.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/GlyfSimpleDescript.java @@ -73,7 +73,7 @@ public class GlyfSimpleDescript extends GlyfDescript { short numberOfContours, DataInput di) throws IOException { super(parentTable, glyphIndex, numberOfContours, di); - + // Simple glyph description _endPtsOfContours = new int[numberOfContours]; for (int i = 0; i < numberOfContours; i++) { @@ -184,7 +184,7 @@ public class GlyfSimpleDescript extends GlyfDescript { System.out.println("error: array index out of bounds"); } } - + public String toString() { StringBuilder sb = new StringBuilder(); sb.append(super.toString()); diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/GlyfTable.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/GlyfTable.java index 22fdd8886..34a8218d9 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/GlyfTable.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/GlyfTable.java @@ -71,12 +71,12 @@ public class GlyfTable implements Table { LocaTable loca) throws IOException { _de = (DirectoryEntry) de.clone(); _descript = new GlyfDescript[maxp.getNumGlyphs()]; - + // Buffer the whole table so we can randomly access it byte[] buf = new byte[de.getLength()]; di.readFully(buf); ByteArrayInputStream bais = new ByteArrayInputStream(buf); - + // Process all the simple glyphs for (int i = 0; i < maxp.getNumGlyphs(); i++) { int len = loca.getOffset(i + 1) - loca.getOffset(i); @@ -119,7 +119,7 @@ public class GlyfTable implements Table { public int getType() { return glyf; } - + /** * Get a directory entry for this table. This uniquely identifies the * table in collections where there may be more than one instance of a diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/GlyphDescription.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/GlyphDescription.java index 106e17917..025778dfc 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/GlyphDescription.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/GlyphDescription.java @@ -56,29 +56,29 @@ package jogamp.graph.font.typecast.ot.table; * @author David Schweinsberg */ public interface GlyphDescription { - + public int getGlyphIndex(); - + public int getEndPtOfContours(int i); - + public byte getFlags(int i); - + public short getXCoordinate(int i); - + public short getYCoordinate(int i); - + public short getXMaximum(); - + public short getXMinimum(); - + public short getYMaximum(); - + public short getYMinimum(); - + public boolean isComposite(); - + public int getPointCount(); - + public int getContourCount(); // public int getComponentIndex(int c); diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/GposTable.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/GposTable.java index 91a62362a..9a367412d 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/GposTable.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/GposTable.java @@ -48,7 +48,7 @@ public class GposTable implements Table { public int getType() { return GPOS; } - + public String toString() { return "GPOS"; } @@ -62,5 +62,5 @@ public class GposTable implements Table { public DirectoryEntry getDirectoryEntry() { return _de; } - + } diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/GsubTable.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/GsubTable.java index c002de374..0351c903d 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/GsubTable.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/GsubTable.java @@ -66,10 +66,10 @@ public class GsubTable implements Table, LookupSubtableFactory { private ScriptList _scriptList; private FeatureList _featureList; private LookupList _lookupList; - + protected GsubTable(DirectoryEntry de, DataInput di) throws IOException { _de = (DirectoryEntry) de.clone(); - + // Load into a temporary buffer, and create another input stream byte[] buf = new byte[de.getLength()]; di.readFully(buf); @@ -86,17 +86,17 @@ public class GsubTable implements Table, LookupSubtableFactory { // Feature List _featureList = new FeatureList(dis, featureListOffset); - + // Lookup List _lookupList = new LookupList(dis, lookupListOffset, this); } /** - * 1 - Single - Replace one glyph with one glyph - * 2 - Multiple - Replace one glyph with more than one glyph - * 3 - Alternate - Replace one glyph with one of many glyphs - * 4 - Ligature - Replace multiple glyphs with one glyph - * 5 - Context - Replace one or more glyphs in context + * 1 - Single - Replace one glyph with one glyph + * 2 - Multiple - Replace one glyph with more than one glyph + * 3 - Alternate - Replace one glyph with one of many glyphs + * 4 - Ligature - Replace multiple glyphs with one glyph + * 5 - Context - Replace one or more glyphs in context * 6 - Chaining - Context Replace one or more glyphs in chained context */ public LookupSubtable read( @@ -167,7 +167,7 @@ public class GsubTable implements Table, LookupSubtableFactory { } return "Unknown"; } - + /** * Get a directory entry for this table. This uniquely identifies the * table in collections where there may be more than one instance of a @@ -177,5 +177,5 @@ public class GsubTable implements Table, LookupSubtableFactory { public DirectoryEntry getDirectoryEntry() { return _de; } - + } diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/HdmxTable.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/HdmxTable.java index 5b1fa2020..42f9bf0d0 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/HdmxTable.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/HdmxTable.java @@ -30,9 +30,9 @@ import java.io.IOException; * @version $Id: HdmxTable.java,v 1.2 2007-07-26 11:12:30 davidsch Exp $ */ public class HdmxTable implements Table { - + public class DeviceRecord { - + private short _pixelSize; private short _maxWidth; private short[] _widths; @@ -49,11 +49,11 @@ public class HdmxTable implements Table { public short getPixelSize() { return _pixelSize; } - + public short getMaxWidth() { return _maxWidth; } - + public short[] getWidths() { return _widths; } @@ -61,9 +61,9 @@ public class HdmxTable implements Table { public short getWidth(int glyphidx) { return _widths[glyphidx]; } - + } - + private DirectoryEntry _de; private int _version; private short _numRecords; @@ -78,7 +78,7 @@ public class HdmxTable implements Table { _numRecords = di.readShort(); _sizeDeviceRecords = di.readInt(); _records = new DeviceRecord[_numRecords]; - + // Read the device records for (int i = 0; i < _numRecords; ++i) { _records[i] = new DeviceRecord(maxp.getNumGlyphs(), di); @@ -88,15 +88,15 @@ public class HdmxTable implements Table { public int getNumberOfRecords() { return _numRecords; } - + public DeviceRecord getRecord(int i) { return _records[i]; } - + public int getType() { return hdmx; } - + public String toString() { StringBuilder sb = new StringBuilder(); sb.append("'hdmx' Table - Horizontal Device Metrics\n----------------------------------------\n"); diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/HeadTable.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/HeadTable.java index 9d7fe4251..cf7c58449 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/HeadTable.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/HeadTable.java @@ -192,7 +192,7 @@ public class HeadTable implements Table { .append("\n glyphDataFormat: ").append(_glyphDataFormat) .toString(); } - + /** * Get a directory entry for this table. This uniquely identifies the * table in collections where there may be more than one instance of a @@ -202,5 +202,5 @@ public class HeadTable implements Table { public DirectoryEntry getDirectoryEntry() { return _de; } - + } diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/HheaTable.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/HheaTable.java index 20a21e4d9..0278929f1 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/HheaTable.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/HheaTable.java @@ -1,9 +1,9 @@ /***************************************************************************** * Copyright (C) The Apache Software Foundation. All rights reserved. * - * ------------------------------------------------------------------------- * - * This software is published under the terms of the Apache Software License * - * version 1.1, a copy of which has been included with this distribution in * - * the LICENSE file. * + * ------------------------------------------------------------------------- * + * This software is published under the terms of the Apache Software License * + * version 1.1, a copy of which has been included with this distribution in * + * the LICENSE file. * *****************************************************************************/ package jogamp.graph.font.typecast.ot.table; @@ -122,7 +122,7 @@ public class HheaTable implements Table { .append("\n numOf_LongHorMetrics: ").append(numberOfHMetrics) .toString(); } - + /** * Get a directory entry for this table. This uniquely identifies the * table in collections where there may be more than one instance of a @@ -132,5 +132,5 @@ public class HheaTable implements Table { public DirectoryEntry getDirectoryEntry() { return de; } - + } diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/ID.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/ID.java index 9fd66e728..eed8c1841 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/ID.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/ID.java @@ -38,7 +38,7 @@ public abstract class ID { public static final short encodingUnicode11Semantics = 1; public static final short encodingISO10646Semantics = 2; public static final short encodingUnicode20Semantics = 3; - + // Microsoft Encoding IDs // public static final short encodingUndefined = 0; // public static final short encodingUGL = 1; @@ -203,7 +203,7 @@ public abstract class ID { public static String getEncodingName(short platformId, short encodingId) { if (platformId == platformUnicode) { - + // Unicode specific encodings switch (encodingId) { case encodingUnicode10Semantics: return "Unicode 1.0 semantics"; diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/KernSubtable.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/KernSubtable.java index 7a4cccba2..04fd646a7 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/KernSubtable.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/KernSubtable.java @@ -1,9 +1,9 @@ /***************************************************************************** * Copyright (C) The Apache Software Foundation. All rights reserved. * - * ------------------------------------------------------------------------- * - * This software is published under the terms of the Apache Software License * - * version 1.1, a copy of which has been included with this distribution in * - * the LICENSE file. * + * ------------------------------------------------------------------------- * + * This software is published under the terms of the Apache Software License * + * version 1.1, a copy of which has been included with this distribution in * + * the LICENSE file. * *****************************************************************************/ package jogamp.graph.font.typecast.ot.table; @@ -21,7 +21,7 @@ public abstract class KernSubtable { /** Creates new KernSubtable */ protected KernSubtable() { } - + public abstract int getKerningPairCount(); public abstract KerningPair getKerningPair(int i); @@ -32,7 +32,7 @@ public abstract class KernSubtable { int length = di.readUnsignedShort(); int coverage = di.readUnsignedShort(); int format = coverage >> 8; - + switch (format) { case 0: table = new KernSubtableFormat0(di); diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/KernSubtableFormat0.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/KernSubtableFormat0.java index b55bef6d5..89e6f9f11 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/KernSubtableFormat0.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/KernSubtableFormat0.java @@ -1,9 +1,9 @@ /***************************************************************************** * Copyright (C) The Apache Software Foundation. All rights reserved. * - * ------------------------------------------------------------------------- * - * This software is published under the terms of the Apache Software License * - * version 1.1, a copy of which has been included with this distribution in * - * the LICENSE file. * + * ------------------------------------------------------------------------- * + * This software is published under the terms of the Apache Software License * + * version 1.1, a copy of which has been included with this distribution in * + * the LICENSE file. * *****************************************************************************/ package jogamp.graph.font.typecast.ot.table; @@ -17,7 +17,7 @@ import java.io.IOException; * @version $Id: KernSubtableFormat0.java,v 1.1.1.1 2004-12-05 23:14:48 davidsch Exp $ */ public class KernSubtableFormat0 extends KernSubtable { - + private int nPairs; private int searchRange; private int entrySelector; diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/KernSubtableFormat2.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/KernSubtableFormat2.java index 60d584ca6..6f5e1f5e8 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/KernSubtableFormat2.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/KernSubtableFormat2.java @@ -1,9 +1,9 @@ /***************************************************************************** * Copyright (C) The Apache Software Foundation. All rights reserved. * - * ------------------------------------------------------------------------- * - * This software is published under the terms of the Apache Software License * - * version 1.1, a copy of which has been included with this distribution in * - * the LICENSE file. * + * ------------------------------------------------------------------------- * + * This software is published under the terms of the Apache Software License * + * version 1.1, a copy of which has been included with this distribution in * + * the LICENSE file. * *****************************************************************************/ package jogamp.graph.font.typecast.ot.table; diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/KernTable.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/KernTable.java index 70aee70d2..1d526865a 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/KernTable.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/KernTable.java @@ -1,9 +1,9 @@ /***************************************************************************** * Copyright (C) The Apache Software Foundation. All rights reserved. * - * ------------------------------------------------------------------------- * - * This software is published under the terms of the Apache Software License * - * version 1.1, a copy of which has been included with this distribution in * - * the LICENSE file. * + * ------------------------------------------------------------------------- * + * This software is published under the terms of the Apache Software License * + * version 1.1, a copy of which has been included with this distribution in * + * the LICENSE file. * *****************************************************************************/ package jogamp.graph.font.typecast.ot.table; @@ -17,7 +17,7 @@ import java.io.IOException; * @version $Id: KernTable.java,v 1.1.1.1 2004-12-05 23:14:48 davidsch Exp $ */ public class KernTable implements Table { - + private DirectoryEntry de; private int version; private int nTables; @@ -37,7 +37,7 @@ public class KernTable implements Table { public int getSubtableCount() { return nTables; } - + public KernSubtable getSubtable(int i) { return tables[i]; } @@ -58,5 +58,5 @@ public class KernTable implements Table { public DirectoryEntry getDirectoryEntry() { return de; } - + } diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/KerningPair.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/KerningPair.java index ce7cebc97..52f82cc85 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/KerningPair.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/KerningPair.java @@ -1,9 +1,9 @@ /***************************************************************************** * Copyright (C) The Apache Software Foundation. All rights reserved. * - * ------------------------------------------------------------------------- * - * This software is published under the terms of the Apache Software License * - * version 1.1, a copy of which has been included with this distribution in * - * the LICENSE file. * + * ------------------------------------------------------------------------- * + * This software is published under the terms of the Apache Software License * + * version 1.1, a copy of which has been included with this distribution in * + * the LICENSE file. * *****************************************************************************/ package jogamp.graph.font.typecast.ot.table; diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/LangSys.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/LangSys.java index 6759208f5..1ab112a78 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/LangSys.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/LangSys.java @@ -64,7 +64,7 @@ public class LangSys { private int _reqFeatureIndex; private int _featureCount; private int[] _featureIndex; - + /** Creates new LangSys */ protected LangSys(DataInput di) throws IOException { _lookupOrder = di.readUnsignedShort(); @@ -75,19 +75,19 @@ public class LangSys { _featureIndex[i] = di.readUnsignedShort(); } } - + public int getLookupOrder() { return _lookupOrder; } - + public int getReqFeatureIndex() { return _reqFeatureIndex; } - + public int getFeatureCount() { return _featureCount; } - + public int getFeatureIndex(int i) { return _featureIndex[i]; } diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/LangSysRecord.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/LangSysRecord.java index 9511f66ba..f3befe3b6 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/LangSysRecord.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/LangSysRecord.java @@ -62,7 +62,7 @@ public class LangSysRecord { private int _tag; private int _offset; - + /** Creates new LangSysRecord */ public LangSysRecord(DataInput di) throws IOException { _tag = di.readInt(); diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/Ligature.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/Ligature.java index d3e2ad5cd..de862a983 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/Ligature.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/Ligature.java @@ -73,11 +73,11 @@ public class Ligature { _components[i] = di.readUnsignedShort(); } } - + public int getGlyphCount() { return _compCount; } - + public int getGlyphId(int i) { return (i == 0) ? _ligGlyph : _components[i-1]; } diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/LigatureSubstFormat1.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/LigatureSubstFormat1.java index a0f42662c..cad5e106a 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/LigatureSubstFormat1.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/LigatureSubstFormat1.java @@ -91,5 +91,5 @@ public class LigatureSubstFormat1 extends LigatureSubst { public String getTypeAsString() { return "LigatureSubstFormat1"; - } + } } diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/LocaTable.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/LocaTable.java index 5eb7c5856..ce0862eea 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/LocaTable.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/LocaTable.java @@ -1,9 +1,9 @@ /***************************************************************************** * Copyright (C) The Apache Software Foundation. All rights reserved. * - * ------------------------------------------------------------------------- * - * This software is published under the terms of the Apache Software License * - * version 1.1, a copy of which has been included with this distribution in * - * the LICENSE file. * + * ------------------------------------------------------------------------- * + * This software is published under the terms of the Apache Software License * + * version 1.1, a copy of which has been included with this distribution in * + * the LICENSE file. * *****************************************************************************/ package jogamp.graph.font.typecast.ot.table; @@ -64,7 +64,7 @@ public class LocaTable implements Table { } return sb.toString(); } - + /** * Get a directory entry for this table. This uniquely identifies the * table in collections where there may be more than one instance of a diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/Lookup.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/Lookup.java index 2899c24d9..6496c3791 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/Lookup.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/Lookup.java @@ -79,7 +79,7 @@ public class Lookup { // Ensure we're in the right place dis.reset(); dis.skipBytes(offset); - + // Start reading _type = dis.readUnsignedShort(); _flag = dis.readUnsignedShort(); diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/LookupList.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/LookupList.java index a3b71b639..e70a932e4 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/LookupList.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/LookupList.java @@ -67,11 +67,11 @@ public class LookupList { /** Creates new LookupList */ public LookupList(DataInputStream dis, int offset, LookupSubtableFactory factory) throws IOException { - + // Ensure we're in the right place dis.reset(); dis.skipBytes(offset); - + // Start reading _lookupCount = dis.readUnsignedShort(); _lookupOffsets = new int[_lookupCount]; @@ -87,11 +87,11 @@ public class LookupList { public int getLookupCount() { return _lookupCount; } - + public int getLookupOffset(int i) { return _lookupOffsets[i]; } - + public Lookup getLookup(int i) { return _lookups[i]; } diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/LookupSubtableFactory.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/LookupSubtableFactory.java index cb4d28d2c..ca67df7fb 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/LookupSubtableFactory.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/LookupSubtableFactory.java @@ -47,13 +47,13 @@ Apache Software Foundation, please see . */ - + package jogamp.graph.font.typecast.ot.table; import java.io.DataInputStream; import java.io.IOException; -/** +/** * * @author David Schweinsberg * @version $Id: LookupSubtableFactory.java,v 1.2 2007-01-24 09:47:46 davidsch Exp $ diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/LtshTable.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/LtshTable.java index ace3d38b5..9b0c8e6b4 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/LtshTable.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/LtshTable.java @@ -1,9 +1,9 @@ /***************************************************************************** * Copyright (C) The Apache Software Foundation. All rights reserved. * - * ------------------------------------------------------------------------- * - * This software is published under the terms of the Apache Software License * - * version 1.1, a copy of which has been included with this distribution in * - * the LICENSE file. * + * ------------------------------------------------------------------------- * + * This software is published under the terms of the Apache Software License * + * version 1.1, a copy of which has been included with this distribution in * + * the LICENSE file. * *****************************************************************************/ package jogamp.graph.font.typecast.ot.table; @@ -22,7 +22,7 @@ public class LtshTable implements Table { private int version; private int numGlyphs; private int[] yPels; - + /** Creates new LtshTable */ protected LtshTable(DirectoryEntry de, DataInput di) throws IOException { this.de = (DirectoryEntry) de.clone(); @@ -41,7 +41,7 @@ public class LtshTable implements Table { public int getType() { return LTSH; } - + public String toString() { StringBuilder sb = new StringBuilder(); sb.append("'LTSH' Table - Linear Threshold Table\n-------------------------------------") @@ -54,7 +54,7 @@ public class LtshTable implements Table { } return sb.toString(); } - + /** * Get a directory entry for this table. This uniquely identifies the * table in collections where there may be more than one instance of a @@ -64,5 +64,5 @@ public class LtshTable implements Table { public DirectoryEntry getDirectoryEntry() { return de; } - + } diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/MaxpTable.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/MaxpTable.java index 0e8ec44c7..5ab6b51ca 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/MaxpTable.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/MaxpTable.java @@ -1,9 +1,9 @@ /***************************************************************************** * Copyright (C) The Apache Software Foundation. All rights reserved. * - * ------------------------------------------------------------------------- * - * This software is published under the terms of the Apache Software License * - * version 1.1, a copy of which has been included with this distribution in * - * the LICENSE file. * + * ------------------------------------------------------------------------- * + * This software is published under the terms of the Apache Software License * + * version 1.1, a copy of which has been included with this distribution in * + * the LICENSE file. * *****************************************************************************/ package jogamp.graph.font.typecast.ot.table; @@ -39,7 +39,7 @@ public class MaxpTable implements Table { protected MaxpTable(DirectoryEntry de, DataInput di) throws IOException { this.de = (DirectoryEntry) de.clone(); versionNumber = di.readInt(); - + // CFF fonts use version 0.5, TrueType fonts use version 1.0 if (versionNumber == 0x00005000) { numGlyphs = di.readUnsignedShort(); @@ -149,7 +149,7 @@ public class MaxpTable implements Table { } return sb.toString(); } - + /** * Get a directory entry for this table. This uniquely identifies the * table in collections where there may be more than one instance of a @@ -159,5 +159,5 @@ public class MaxpTable implements Table { public DirectoryEntry getDirectoryEntry() { return de; } - + } diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/NameRecord.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/NameRecord.java index 268d6cfca..9f9822986 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/NameRecord.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/NameRecord.java @@ -75,19 +75,19 @@ public class NameRecord { _stringLength = di.readShort(); _stringOffset = di.readShort(); } - + public short getEncodingId() { return _encodingId; } - + public short getLanguageId() { return _languageId; } - + public short getNameId() { return _nameId; } - + public short getPlatformId() { return _platformId; } @@ -101,7 +101,7 @@ public class NameRecord { StringBuilder sb = new StringBuilder(); di.skipBytes(_stringOffset); if (_platformId == ID.platformUnicode) { - + // Unicode (big-endian) for (int i = 0; i < _stringLength/2; i++) { sb.append(di.readChar()); @@ -113,13 +113,13 @@ public class NameRecord { sb.append((char) di.readByte()); } } else if (_platformId == ID.platformISO) { - + // ISO encoding, ASCII for (int i = 0; i < _stringLength; i++) { sb.append((char) di.readByte()); } } else if (_platformId == ID.platformMicrosoft) { - + // Microsoft encoding, Unicode char c; for (int i = 0; i < _stringLength/2; i++) { @@ -132,7 +132,7 @@ public class NameRecord { public String toString() { StringBuilder sb = new StringBuilder(); - + sb.append(" Platform ID: ").append(_platformId) .append("\n Specific ID: ").append(_encodingId) .append("\n Language ID: ").append(_languageId) @@ -140,7 +140,7 @@ public class NameRecord { .append("\n Length: ").append(_stringLength) .append("\n Offset: ").append(_stringOffset) .append("\n\n").append(_record); - + return sb.toString(); } } diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/NameTable.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/NameTable.java index 6daf2ad60..5b7a17d3b 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/NameTable.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/NameTable.java @@ -68,25 +68,25 @@ public class NameTable implements Table { private short _numberOfNameRecords; private short _stringStorageOffset; private NameRecord[] _records; - + protected NameTable(DirectoryEntry de, DataInput di) throws IOException { _de = (DirectoryEntry) de.clone(); _formatSelector = di.readShort(); _numberOfNameRecords = di.readShort(); _stringStorageOffset = di.readShort(); _records = new NameRecord[_numberOfNameRecords]; - + // Load the records, which contain the encoding information and string // offsets for (int i = 0; i < _numberOfNameRecords; i++) { _records[i] = new NameRecord(di); } - + // Load the string data into a buffer so the records can copy out the // bits they are interested in byte[] buffer = new byte[_de.getLength() - _stringStorageOffset]; di.readFully(buffer); - + // Now let the records get their hands on them for (int i = 0; i < _numberOfNameRecords; i++) { _records[i].loadString( @@ -98,7 +98,7 @@ public class NameTable implements Table { return _numberOfNameRecords; } - + public NameRecord getRecord(int i) { if(_numberOfNameRecords > i) { return _records[i]; @@ -133,7 +133,7 @@ public class NameTable implements Table { public int getType() { return name; } - + /** * Get a directory entry for this table. This uniquely identifies the * table in collections where there may be more than one instance of a @@ -143,5 +143,5 @@ public class NameTable implements Table { public DirectoryEntry getDirectoryEntry() { return _de; } - + } diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/Os2Table.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/Os2Table.java index f4fa76e81..9dfbceb99 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/Os2Table.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/Os2Table.java @@ -134,7 +134,7 @@ public class Os2Table implements Table { _usWinDescent = di.readUnsignedShort(); _ulCodePageRange1 = di.readInt(); _ulCodePageRange2 = di.readInt(); - + // OpenType 1.3 if (_version == 2) { _sxHeight = di.readShort(); @@ -276,19 +276,19 @@ public class Os2Table implements Table { public short getXHeight() { return _sxHeight; } - + public short getCapHeight() { return _sCapHeight; } - + public int getDefaultChar() { return _usDefaultChar; } - + public int getBreakChar() { return _usBreakChar; } - + public int getMaxContext() { return _usMaxContext; } @@ -335,7 +335,7 @@ public class Os2Table implements Table { .append("\n CodePage Range 2( Bits 32- 63 ): ").append(Integer.toHexString(_ulCodePageRange2).toUpperCase()) .toString(); } - + private String getVendorIDAsString() { return new StringBuilder() .append((char)((_achVendorID>>24)&0xff)) @@ -344,7 +344,7 @@ public class Os2Table implements Table { .append((char)((_achVendorID)&0xff)) .toString(); } - + /** * Get a directory entry for this table. This uniquely identifies the * table in collections where there may be more than one instance of a diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/Panose.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/Panose.java index 6127140d1..1f6c5a1dd 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/Panose.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/Panose.java @@ -1,9 +1,9 @@ /***************************************************************************** * Copyright (C) The Apache Software Foundation. All rights reserved. * - * ------------------------------------------------------------------------- * - * This software is published under the terms of the Apache Software License * - * version 1.1, a copy of which has been included with this distribution in * - * the LICENSE file. * + * ------------------------------------------------------------------------- * + * This software is published under the terms of the Apache Software License * + * version 1.1, a copy of which has been included with this distribution in * + * the LICENSE file. * *****************************************************************************/ package jogamp.graph.font.typecast.ot.table; @@ -42,11 +42,11 @@ public class Panose { public byte getFamilyType() { return bFamilyType; } - + public byte getSerifStyle() { return bSerifStyle; } - + public byte getWeight() { return bWeight; } @@ -54,31 +54,31 @@ public class Panose { public byte getProportion() { return bProportion; } - + public byte getContrast() { return bContrast; } - + public byte getStrokeVariation() { return bStrokeVariation; } - + public byte getArmStyle() { return bArmStyle; } - + public byte getLetterForm() { return bLetterform; } - + public byte getMidline() { return bMidline; } - + public byte getXHeight() { return bXHeight; } - + public String toString() { StringBuilder sb = new StringBuilder(); sb.append(String.valueOf(bFamilyType)).append(" ") diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/PcltTable.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/PcltTable.java index f9dcf2ce7..6ed9b2b9c 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/PcltTable.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/PcltTable.java @@ -1,9 +1,9 @@ /***************************************************************************** * Copyright (C) The Apache Software Foundation. All rights reserved. * - * ------------------------------------------------------------------------- * - * This software is published under the terms of the Apache Software License * - * version 1.1, a copy of which has been included with this distribution in * - * the LICENSE file. * + * ------------------------------------------------------------------------- * + * This software is published under the terms of the Apache Software License * + * version 1.1, a copy of which has been included with this distribution in * + * the LICENSE file. * *****************************************************************************/ package jogamp.graph.font.typecast.ot.table; @@ -68,7 +68,7 @@ public class PcltTable implements Table { public int getType() { return PCLT; } - + public String toString() { return new StringBuilder() .append("'PCLT' Table - Printer Command Language Table\n---------------------------------------------") @@ -91,7 +91,7 @@ public class PcltTable implements Table { .append("\n reserved: ").append(reserved) .toString(); } - + /** * Get a directory entry for this table. This uniquely identifies the * table in collections where there may be more than one instance of a @@ -101,5 +101,5 @@ public class PcltTable implements Table { public DirectoryEntry getDirectoryEntry() { return de; } - + } diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/PostTable.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/PostTable.java index c913b4c71..46f1ac088 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/PostTable.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/PostTable.java @@ -1,9 +1,9 @@ /***************************************************************************** * Copyright (C) The Apache Software Foundation. All rights reserved. * - * ------------------------------------------------------------------------- * - * This software is published under the terms of the Apache Software License * - * version 1.1, a copy of which has been included with this distribution in * - * the LICENSE file. * + * ------------------------------------------------------------------------- * + * This software is published under the terms of the Apache Software License * + * version 1.1, a copy of which has been included with this distribution in * + * the LICENSE file. * *****************************************************************************/ package jogamp.graph.font.typecast.ot.table; @@ -294,7 +294,7 @@ public class PostTable implements Table { private int maxMemType42; private int minMemType1; private int maxMemType1; - + // v2 private int numGlyphs; private int[] glyphNameIndex; @@ -312,7 +312,7 @@ public class PostTable implements Table { maxMemType42 = di.readInt(); minMemType1 = di.readInt(); maxMemType1 = di.readInt(); - + if (version == 0x00020000) { numGlyphs = di.readUnsignedShort(); glyphNameIndex = new int[numGlyphs]; @@ -366,7 +366,7 @@ public class PostTable implements Table { return false; } } - + /** Get the table type, as a table directory value. * @return The table type */ @@ -409,7 +409,7 @@ public class PostTable implements Table { } return sb.toString(); } - + /** * Get a directory entry for this table. This uniquely identifies the * table in collections where there may be more than one instance of a @@ -419,5 +419,5 @@ public class PostTable implements Table { public DirectoryEntry getDirectoryEntry() { return de; } - + } diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/PrepTable.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/PrepTable.java index aac10c539..2046d7fe4 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/PrepTable.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/PrepTable.java @@ -1,9 +1,9 @@ /***************************************************************************** * Copyright (C) The Apache Software Foundation. All rights reserved. * - * ------------------------------------------------------------------------- * - * This software is published under the terms of the Apache Software License * - * version 1.1, a copy of which has been included with this distribution in * - * the LICENSE file. * + * ------------------------------------------------------------------------- * + * This software is published under the terms of the Apache Software License * + * version 1.1, a copy of which has been included with this distribution in * + * the LICENSE file. * *****************************************************************************/ package jogamp.graph.font.typecast.ot.table; @@ -33,7 +33,7 @@ public class PrepTable extends Program implements Table { public String toString() { return Disassembler.disassemble(getInstructions(), 0); } - + /** * Get a directory entry for this table. This uniquely identifies the * table in collections where there may be more than one instance of a @@ -43,5 +43,5 @@ public class PrepTable extends Program implements Table { public DirectoryEntry getDirectoryEntry() { return de; } - + } diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/Program.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/Program.java index 28c148c2b..e3beabef8 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/Program.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/Program.java @@ -1,9 +1,9 @@ /***************************************************************************** * Copyright (C) The Apache Software Foundation. All rights reserved. * - * ------------------------------------------------------------------------- * - * This software is published under the terms of the Apache Software License * - * version 1.1, a copy of which has been included with this distribution in * - * the LICENSE file. * + * ------------------------------------------------------------------------- * + * This software is published under the terms of the Apache Software License * + * version 1.1, a copy of which has been included with this distribution in * + * the LICENSE file. * *****************************************************************************/ package jogamp.graph.font.typecast.ot.table; diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/RangeRecord.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/RangeRecord.java index 72d703bb4..40ddf4215 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/RangeRecord.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/RangeRecord.java @@ -75,7 +75,7 @@ public class RangeRecord { public boolean isInRange(int glyphId) { return (_start <= glyphId && glyphId <= _end); } - + public int getCoverageIndex(int glyphId) { if (isInRange(glyphId)) { return _startCoverageIndex + glyphId - _start; diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/Script.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/Script.java index eb534b5dd..04781a8f9 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/Script.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/Script.java @@ -65,14 +65,14 @@ public class Script { private LangSysRecord[] _langSysRecords; private LangSys _defaultLangSys; private LangSys[] _langSys; - + /** Creates new ScriptTable */ protected Script(DataInputStream dis, int offset) throws IOException { // Ensure we're in the right place dis.reset(); dis.skipBytes(offset); - + // Start reading _defaultLangSysOffset = dis.readUnsignedShort(); _langSysCount = dis.readUnsignedShort(); @@ -102,7 +102,7 @@ public class Script { public int getLangSysCount() { return _langSysCount; } - + public LangSysRecord getLangSysRecord(int i) { return _langSysRecords[i]; } diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/ScriptList.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/ScriptList.java index 4af62b0ee..18589b712 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/ScriptList.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/ScriptList.java @@ -63,14 +63,14 @@ public class ScriptList { private int _scriptCount = 0; private ScriptRecord[] _scriptRecords; private Script[] _scripts; - + /** Creates new ScriptList */ protected ScriptList(DataInputStream dis, int offset) throws IOException { - + // Ensure we're in the right place dis.reset(); dis.skipBytes(offset); - + // Start reading _scriptCount = dis.readUnsignedShort(); _scriptRecords = new ScriptRecord[_scriptCount]; @@ -86,15 +86,15 @@ public class ScriptList { public int getScriptCount() { return _scriptCount; } - + public ScriptRecord getScriptRecord(int i) { return _scriptRecords[i]; } - + public Script getScript(int i) { return _scripts[i]; } - + public Script findScript(String tag) { if (tag.length() != 4) { return null; diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/ScriptRecord.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/ScriptRecord.java index 5da0608dd..183ca2ffd 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/ScriptRecord.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/ScriptRecord.java @@ -62,7 +62,7 @@ public class ScriptRecord { private int _tag; private int _offset; - + /** Creates new ScriptRecord */ protected ScriptRecord(DataInput di) throws IOException { _tag = di.readInt(); @@ -72,7 +72,7 @@ public class ScriptRecord { public int getTag() { return _tag; } - + public int getOffset() { return _offset; } diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/SignatureBlock.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/SignatureBlock.java index 5a5de119f..15f0cd04f 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/SignatureBlock.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/SignatureBlock.java @@ -1,9 +1,9 @@ /***************************************************************************** * Copyright (C) The Apache Software Foundation. All rights reserved. * - * ------------------------------------------------------------------------- * - * This software is published under the terms of the Apache Software License * - * version 1.1, a copy of which has been included with this distribution in * - * the LICENSE file. * + * ------------------------------------------------------------------------- * + * This software is published under the terms of the Apache Software License * + * version 1.1, a copy of which has been included with this distribution in * + * the LICENSE file. * *****************************************************************************/ package jogamp.graph.font.typecast.ot.table; @@ -22,7 +22,7 @@ public class SignatureBlock { private int reserved2; private int signatureLen; private byte[] signature; - + /** Creates new SignatureBlock */ protected SignatureBlock(DataInput di) throws IOException { reserved1 = di.readUnsignedShort(); diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/SingleSubst.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/SingleSubst.java index 8c56a740f..e31281f2e 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/SingleSubst.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/SingleSubst.java @@ -63,7 +63,7 @@ public abstract class SingleSubst extends LookupSubtable { public abstract int getFormat(); public abstract int substitute(int glyphId); - + public static SingleSubst read(DataInputStream dis, int offset) throws IOException { SingleSubst s = null; dis.reset(); diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/SingleSubstFormat1.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/SingleSubstFormat1.java index 99b85f35c..a8df78504 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/SingleSubstFormat1.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/SingleSubstFormat1.java @@ -84,7 +84,7 @@ public class SingleSubstFormat1 extends SingleSubst { } return glyphId; } - + public String getTypeAsString() { return "SingleSubstFormat1"; } diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/SingleSubstFormat2.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/SingleSubstFormat2.java index cd3b6d147..2e47b2924 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/SingleSubstFormat2.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/SingleSubstFormat2.java @@ -92,6 +92,6 @@ public class SingleSubstFormat2 extends SingleSubst { public String getTypeAsString() { return "SingleSubstFormat2"; - } + } } diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/TTCHeader.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/TTCHeader.java index b801517f8..f7c7d99b5 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/TTCHeader.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/TTCHeader.java @@ -1,9 +1,9 @@ /***************************************************************************** * Copyright (C) The Apache Software Foundation. All rights reserved. * - * ------------------------------------------------------------------------- * - * This software is published under the terms of the Apache Software License * - * version 1.1, a copy of which has been included with this distribution in * - * the LICENSE file. * + * ------------------------------------------------------------------------- * + * This software is published under the terms of the Apache Software License * + * version 1.1, a copy of which has been included with this distribution in * + * the LICENSE file. * *****************************************************************************/ package jogamp.graph.font.typecast.ot.table; @@ -17,7 +17,7 @@ import java.io.IOException; * @author David Schweinsberg */ public class TTCHeader { - + public static final int ttcf = 0x74746366; private int ttcTag; @@ -47,7 +47,7 @@ public class TTCHeader { public int getDirectoryCount() { return directoryCount; } - + public int getTableDirectory(int i) { return tableDirectory[i]; } diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/Table.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/Table.java index 624f47bef..30fd2f457 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/Table.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/Table.java @@ -1,9 +1,9 @@ /***************************************************************************** * Copyright (C) The Apache Software Foundation. All rights reserved. * - * ------------------------------------------------------------------------- * - * This software is published under the terms of the Apache Software License * - * version 1.1, a copy of which has been included with this distribution in * - * the LICENSE file. * + * ------------------------------------------------------------------------- * + * This software is published under the terms of the Apache Software License * + * version 1.1, a copy of which has been included with this distribution in * + * the LICENSE file. * *****************************************************************************/ package jogamp.graph.font.typecast.ot.table; @@ -51,7 +51,7 @@ public interface Table { public static final int vmtx = 0x766d7478; // Vertical Metrics public static final String notAvailable = "n/a"; - + /** * Get the table type, as a table directory value. * @return The table type @@ -65,5 +65,5 @@ public interface Table { * @return A directory entry */ public DirectoryEntry getDirectoryEntry(); - + } diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/TableDirectory.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/TableDirectory.java index bacc26d30..8c5678088 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/TableDirectory.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/TableDirectory.java @@ -112,7 +112,7 @@ public class TableDirectory { public int getVersion() { return _version; } - + public String toString() { StringBuilder sb = new StringBuilder() .append("Offset Table\n------ -----") diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/TableException.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/TableException.java index 7749ea856..65aa84bff 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/TableException.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/TableException.java @@ -26,7 +26,7 @@ package jogamp.graph.font.typecast.ot.table; * @version $Id: TableException.java,v 1.1.1.1 2004-12-05 23:15:00 davidsch Exp $ */ public class TableException extends java.lang.Exception { - + private static final long serialVersionUID = 1L; /** @@ -34,8 +34,8 @@ public class TableException extends java.lang.Exception { */ public TableException() { } - - + + /** * Constructs an instance of TableException with the specified detail message. * @param msg the detail message. diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/TableFactory.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/TableFactory.java index 998ce08e3..956d1aecd 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/TableFactory.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/TableFactory.java @@ -47,7 +47,7 @@ Apache Software Foundation, please see . */ - + package jogamp.graph.font.typecast.ot.table; import java.io.DataInputStream; @@ -56,7 +56,7 @@ import java.io.IOException; import jogamp.graph.font.typecast.ot.OTFont; import jogamp.graph.font.typecast.ot.OTFontCollection; -/** +/** * * @version $Id: TableFactory.java,v 1.7 2007-02-05 12:39:51 davidsch Exp $ * @author David Schweinsberg @@ -69,7 +69,7 @@ public class TableFactory { DirectoryEntry de, DataInputStream dis) throws IOException { Table t = null; - + // First, if we have a font collection, look for the table there if (fc != null) { t = fc.getTable(de); @@ -77,7 +77,7 @@ public class TableFactory { return t; } } - + // Create the table switch (de.getTag()) { case Table.BASE: @@ -175,7 +175,7 @@ public class TableFactory { t = new VmtxTable(de, dis, font.getVheaTable(), font.getMaxpTable()); break; } - + // If we have a font collection, add this table to it if ((fc != null) && (t != null)) { fc.addTable(t); diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/VdmxTable.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/VdmxTable.java index 80579f5cd..28f9aa6e3 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/VdmxTable.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/VdmxTable.java @@ -31,12 +31,12 @@ import java.io.IOException; public class VdmxTable implements Table { private class Ratio { - + private byte _bCharSet; private byte _xRatio; private byte _yStartRatio; private byte _yEndRatio; - + protected Ratio(DataInput di) throws IOException { _bCharSet = di.readByte(); _xRatio = di.readByte(); @@ -47,26 +47,26 @@ public class VdmxTable implements Table { public byte getBCharSet() { return _bCharSet; } - + public byte getXRatio() { return _xRatio; } - + public byte getYStartRatio() { return _yStartRatio; } - + public byte getYEndRatio() { return _yEndRatio; } } - + private class VTableRecord { - + private int _yPelHeight; private short _yMax; private short _yMin; - + protected VTableRecord(DataInput di) throws IOException { _yPelHeight = di.readUnsignedShort(); _yMax = di.readShort(); @@ -76,23 +76,23 @@ public class VdmxTable implements Table { public int getYPelHeight() { return _yPelHeight; } - + public short getYMax() { return _yMax; } - + public short getYMin() { return _yMin; } } - + private class Group { - + private int _recs; private int _startsz; private int _endsz; private VTableRecord[] _entry; - + protected Group(DataInput di) throws IOException { _recs = di.readUnsignedShort(); _startsz = di.readUnsignedByte(); @@ -106,20 +106,20 @@ public class VdmxTable implements Table { public int getRecs() { return _recs; } - + public int getStartSZ() { return _startsz; } - + public int getEndSZ() { return _endsz; } - + public VTableRecord[] getEntry() { return _entry; } } - + private DirectoryEntry _de; private int _version; private int _numRecs; @@ -127,7 +127,7 @@ public class VdmxTable implements Table { private Ratio[] _ratRange; private int _offset[]; private Group[] _groups; - + /** Creates a new instance of VdmxTable */ protected VdmxTable(DirectoryEntry de, DataInput di) throws IOException { _de = (DirectoryEntry) de.clone(); @@ -147,11 +147,11 @@ public class VdmxTable implements Table { _groups[i] = new Group(di); } } - + public int getType() { return VDMX; } - + public String toString() { StringBuilder sb = new StringBuilder(); sb.append("'VDMX' Table - Precomputed Vertical Device Metrics\n") diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/VheaTable.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/VheaTable.java index 19c91765b..f42da119b 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/VheaTable.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/VheaTable.java @@ -135,7 +135,7 @@ public class VheaTable implements Table { .append("\n numOf_LongVerMetrics: ").append(_numberOfLongVerMetrics) .toString(); } - + /** * Get a directory entry for this table. This uniquely identifies the * table in collections where there may be more than one instance of a diff --git a/src/jogl/classes/jogamp/graph/font/typecast/t2/T2Interpreter.java b/src/jogl/classes/jogamp/graph/font/typecast/t2/T2Interpreter.java index 887f8c34f..181ec7e10 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/t2/T2Interpreter.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/t2/T2Interpreter.java @@ -34,23 +34,23 @@ import jogamp.graph.font.typecast.ot.table.CharstringType2; * @version $Id: T2Interpreter.java,v 1.2 2007-07-26 11:10:18 davidsch Exp $ */ public class T2Interpreter { - + private static final int ARGUMENT_STACK_LIMIT = 48; private static final int SUBR_STACK_LIMIT = 10; private static final int TRANSIENT_ARRAY_ELEMENT_COUNT = 32; - + private Number[] _argStack = new Number[ARGUMENT_STACK_LIMIT]; private int _argStackIndex = 0; private int[] _subrStack = new int[SUBR_STACK_LIMIT]; private int _subrStackIndex = 0; private Number[] _transientArray = new Number[TRANSIENT_ARRAY_ELEMENT_COUNT]; - + private ArrayList _points; /** Creates a new instance of T2Interpreter */ public T2Interpreter() { } - + /** * Moves the current point to a position at the relative coordinates * (dx1, dy1). @@ -72,7 +72,7 @@ public class T2Interpreter { Point lastPoint = getLastPoint(); moveTo(lastPoint.x + dx1, lastPoint.y); } - + /** * Moves the current point dy1 units in the vertical direction. */ @@ -82,7 +82,7 @@ public class T2Interpreter { Point lastPoint = getLastPoint(); moveTo(lastPoint.x, lastPoint.y + dy1); } - + /** * Appends a line from the current point to a position at the * relative coordinates dxa, dya. Additional rlineto operations are @@ -103,7 +103,7 @@ public class T2Interpreter { } clearArg(); } - + /** * Appends a horizontal line of length dx1 to the current point. * With an odd number of arguments, subsequent argument pairs @@ -130,7 +130,7 @@ public class T2Interpreter { } clearArg(); } - + /** * Appends a vertical line of length dy1 to the current point. With * an odd number of arguments, subsequent argument pairs are @@ -157,7 +157,7 @@ public class T2Interpreter { } clearArg(); } - + /** * Appends a Bezier curve, defined by dxa...dyc, to the current * point. For each subsequent set of six arguments, an additional @@ -194,7 +194,7 @@ public class T2Interpreter { } clearArg(); } - + /** * Appends one or more Bezier curves, as described by the * dxa...dxc set of arguments, to the current point. For each curve, @@ -230,7 +230,7 @@ public class T2Interpreter { } clearArg(); } - + /** * Appends one or more Bezier curves to the current point. The * tangent for the first Bezier must be horizontal, and the second @@ -327,13 +327,13 @@ public class T2Interpreter { int yf = ye + dyf[i]; curveTo(xa, ya, xb, yb, xc, yc); curveTo(xd, yd, xe, ye, xf, yf); - + // What on earth do we do with dx1, dx2, dy2 and dy3? } } clearArg(); } - + /** * Is equivalent to one rrcurveto for each set of six arguments * dxa...dyc, followed by exactly one rlineto using the dxd, dyd @@ -373,7 +373,7 @@ public class T2Interpreter { lineTo(xc + dxd, yc + dyd); clearArg(); } - + /** * Is equivalent to one rlineto for each pair of arguments beyond * the six arguments dxb...dyd needed for the one rrcurveto @@ -411,7 +411,7 @@ public class T2Interpreter { curveTo(xb, yb, xc, yc, xd, yd); clearArg(); } - + /** * Appends one or more Bezier curves to the current point, where * the first tangent is vertical and the second tangent is horizontal. @@ -465,7 +465,7 @@ public class T2Interpreter { } clearArg(); } - + /** * Appends one or more curves to the current point. If the argument * count is a multiple of four, the curve starts and ends vertical. If @@ -473,10 +473,10 @@ public class T2Interpreter { * vertical tangent. */ private void _vvcurveto() { - + clearArg(); } - + /** * Causes two Bezier curves, as described by the arguments (as * shown in Figure 2 below), to be rendered as a straight line when @@ -485,10 +485,10 @@ public class T2Interpreter { * pixels. */ private void _flex() { - + clearArg(); } - + /** * Causes the two curves described by the arguments dx1...dx6 to * be rendered as a straight line when the flex depth is less than @@ -496,10 +496,10 @@ public class T2Interpreter { * flex depth is greater than or equal to 0.5 device pixels. */ private void _hflex() { - + clearArg(); } - + /** * Causes the two curves described by the arguments to be * rendered as a straight line when the flex depth is less than 0.5 @@ -507,10 +507,10 @@ public class T2Interpreter { * than or equal to 0.5 device pixels. */ private void _hflex1() { - + clearArg(); } - + /** * Causes the two curves described by the arguments to be * rendered as a straight line when the flex depth is less than 0.5 @@ -518,10 +518,10 @@ public class T2Interpreter { * than or equal to 0.5 device pixels. */ private void _flex1() { - + clearArg(); } - + /** * Finishes a charstring outline definition, and must be the * last operator in a character's outline. @@ -530,37 +530,37 @@ public class T2Interpreter { endContour(); clearArg(); } - + private void _hstem() { - + clearArg(); } - + private void _vstem() { - + clearArg(); } - + private void _hstemhm() { - + clearArg(); } - + private void _vstemhm() { - + clearArg(); } - + private void _hintmask() { - + clearArg(); } - + private void _cntrmask() { - + clearArg(); } - + /** * Returns the absolute value of num. */ @@ -568,7 +568,7 @@ public class T2Interpreter { double num = popArg().doubleValue(); pushArg(Math.abs(num)); } - + /** * Returns the sum of the two numbers num1 and num2. */ @@ -577,7 +577,7 @@ public class T2Interpreter { double num1 = popArg().doubleValue(); pushArg(num1 + num2); } - + /** * Returns the result of subtracting num2 from num1. */ @@ -586,7 +586,7 @@ public class T2Interpreter { double num1 = popArg().doubleValue(); pushArg(num1 - num2); } - + /** * Returns the quotient of num1 divided by num2. The result is * undefined if overflow occurs and is zero for underflow. @@ -596,7 +596,7 @@ public class T2Interpreter { double num1 = popArg().doubleValue(); pushArg(num1 / num2); } - + /** * Returns the negative of num. */ @@ -604,7 +604,7 @@ public class T2Interpreter { double num = popArg().doubleValue(); pushArg(-num); } - + /** * Returns a pseudo random number num2 in the range (0,1], that * is, greater than zero and less than or equal to one. @@ -612,7 +612,7 @@ public class T2Interpreter { private void _random() { pushArg(1.0 - Math.random()); } - + /** * Returns the product of num1 and num2. If overflow occurs, the * result is undefined, and zero is returned for underflow. @@ -622,7 +622,7 @@ public class T2Interpreter { double num1 = popArg().doubleValue(); pushArg(num1 * num2); } - + /** * Returns the square root of num. If num is negative, the result is * undefined. @@ -631,14 +631,14 @@ public class T2Interpreter { double num = popArg().doubleValue(); pushArg(Math.sqrt(num)); } - + /** * Removes the top element num from the Type 2 argument stack. */ private void _drop() { popArg(); } - + /** * Exchanges the top two elements on the argument stack. */ @@ -648,7 +648,7 @@ public class T2Interpreter { pushArg(num2); pushArg(num1); } - + /** * Retrieves the element i from the top of the argument stack and * pushes a copy of that element onto that stack. If i is negative, @@ -666,7 +666,7 @@ public class T2Interpreter { } pushArg(nums[i]); } - + /** * Performs a circular shift of the elements num(Nx1) ... num0 on * the argument stack by the amount J. Positive J indicates upward @@ -685,7 +685,7 @@ public class T2Interpreter { pushArg(nums[(n + i + j) % n]); } } - + /** * Duplicates the top element on the argument stack. */ @@ -694,7 +694,7 @@ public class T2Interpreter { pushArg(any); pushArg(any); } - + /** * Stores val into the transient array at the location given by i. */ @@ -703,7 +703,7 @@ public class T2Interpreter { Number val = popArg(); _transientArray[i] = val; } - + /** * Retrieves the value stored in the transient array at the location * given by i and pushes the value onto the argument stack. If get @@ -714,7 +714,7 @@ public class T2Interpreter { int i = popArg().intValue(); pushArg(_transientArray[i]); } - + /** * Puts a 1 on the stack if num1 and num2 are both non-zero, and * puts a 0 on the stack if either argument is zero. @@ -724,7 +724,7 @@ public class T2Interpreter { double num1 = popArg().doubleValue(); pushArg((num1!=0.0) && (num2!=0.0) ? 1 : 0); } - + /** * Puts a 1 on the stack if either num1 or num2 are non-zero, and * puts a 0 on the stack if both arguments are zero. @@ -734,7 +734,7 @@ public class T2Interpreter { double num1 = popArg().doubleValue(); pushArg((num1!=0.0) || (num2!=0.0) ? 1 : 0); } - + /** * Returns a 0 if num1 is non-zero; returns a 1 if num1 is zero. */ @@ -742,7 +742,7 @@ public class T2Interpreter { double num1 = popArg().doubleValue(); pushArg((num1!=0.0) ? 0 : 1); } - + /** * Puts a 1 on the stack if num1 equals num2, otherwise a 0 (zero) * is put on the stack. @@ -752,7 +752,7 @@ public class T2Interpreter { double num1 = popArg().doubleValue(); pushArg(num1 == num2 ? 1 : 0); } - + /** * Leaves the value s1 on the stack if v1 ? v2, or leaves s2 on the * stack if v1 > v2. The value of s1 and s2 is usually the biased @@ -765,7 +765,7 @@ public class T2Interpreter { Number s1 = popArg(); pushArg(v1 <= v2 ? s1 : s2); } - + /** * Calls a charstring subroutine with index subr# (actually the subr * number plus the subroutine bias number, as described in section @@ -777,25 +777,25 @@ public class T2Interpreter { * Calling an undefined subr (gsubr) has undefined results. */ private void _callsubr() { - + } - + /** * Operates in the same manner as callsubr except that it calls a * global subroutine. */ private void _callgsubr() { - + } - + /** * Returns from either a local or global charstring subroutine, and * continues execution after the corresponding call(g)subr. */ private void _return() { - + } - + public Point[] execute(CharstringType2 cs) { _points = new ArrayList(); cs.resetIP(); @@ -975,7 +975,7 @@ public class T2Interpreter { private int getArgCount() { return _argStackIndex; } - + /** * Pop a value off the argument stack */ @@ -989,7 +989,7 @@ public class T2Interpreter { private void pushArg(Number n) { _argStack[_argStackIndex++] = n; } - + /** * Pop a value off the subroutine stack */ @@ -1003,14 +1003,14 @@ public class T2Interpreter { private void pushSubr(int n) { _subrStack[_subrStackIndex++] = n; } - + /** * Clear the argument stack */ private void clearArg() { _argStackIndex = 0; } - + private Point getLastPoint() { int size = _points.size(); if (size > 0) { @@ -1019,22 +1019,22 @@ public class T2Interpreter { return new Point(0, 0, true, false); } } - + private void moveTo(int x, int y) { endContour(); _points.add(new Point(x, y, true, false)); } - + private void lineTo(int x, int y) { _points.add(new Point(x, y, true, false)); } - + private void curveTo(int cx1, int cy1, int cx2, int cy2, int x, int y) { _points.add(new Point(cx1, cy1, false, false)); _points.add(new Point(cx2, cy2, false, false)); _points.add(new Point(x, y, true, false)); } - + private void endContour() { Point lastPoint = getLastPoint(); if (lastPoint != null) { diff --git a/src/jogl/classes/jogamp/graph/font/typecast/tt/engine/Interpreter.java b/src/jogl/classes/jogamp/graph/font/typecast/tt/engine/Interpreter.java index a659a7003..2bb5cec0c 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/tt/engine/Interpreter.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/tt/engine/Interpreter.java @@ -570,7 +570,7 @@ public class Interpreter { private void _mps() { push(0); } - + private void _msirp(short param) { pop(); pop(); @@ -1190,7 +1190,7 @@ public class Interpreter { while (ip < ((ip & 0xffff0000) | parser.getISLength(ip >> 16))) { short opcode = parser.getOpcode(ip); if (inFuncDef) { - + // We're within a function definition, so don't execute the code if (opcode == Mnemonic.ENDF) { inFuncDef = false; diff --git a/src/jogl/classes/jogamp/graph/geom/plane/AffineTransform.java b/src/jogl/classes/jogamp/graph/geom/plane/AffineTransform.java index 0fd174cda..32e2b6a39 100644 --- a/src/jogl/classes/jogamp/graph/geom/plane/AffineTransform.java +++ b/src/jogl/classes/jogamp/graph/geom/plane/AffineTransform.java @@ -33,7 +33,7 @@ public class AffineTransform implements Cloneable, Serializable { private static final long serialVersionUID = 1330973210523860834L; static final String determinantIsZero = "Determinant is zero"; - + public static final int TYPE_IDENTITY = 0; public static final int TYPE_TRANSLATION = 1; public static final int TYPE_UNIFORM_SCALE = 2; @@ -49,14 +49,14 @@ public class AffineTransform implements Cloneable, Serializable { * The TYPE_UNKNOWN is an initial type value */ static final int TYPE_UNKNOWN = -1; - + /** - * The min value equivalent to zero. If absolute value less then ZERO it considered as zero. + * The min value equivalent to zero. If absolute value less then ZERO it considered as zero. */ static final float ZERO = (float) 1E-10; - + private final Vertex.Factory pointFactory; - + /** * The values of transformation matrix */ @@ -68,7 +68,7 @@ public class AffineTransform implements Cloneable, Serializable { float m12; /** - * The transformation type + * The transformation type */ transient int type; @@ -123,20 +123,20 @@ public class AffineTransform implements Cloneable, Serializable { /* * Method returns type of affine transformation. - * + * * Transform matrix is * m00 m01 m02 * m10 m11 m12 - * - * According analytic geometry new basis vectors are (m00, m01) and (m10, m11), - * translation vector is (m02, m12). Original basis vectors are (1, 0) and (0, 1). - * Type transformations classification: + * + * According analytic geometry new basis vectors are (m00, m01) and (m10, m11), + * translation vector is (m02, m12). Original basis vectors are (1, 0) and (0, 1). + * Type transformations classification: * TYPE_IDENTITY - new basis equals original one and zero translation - * TYPE_TRANSLATION - translation vector isn't zero + * TYPE_TRANSLATION - translation vector isn't zero * TYPE_UNIFORM_SCALE - vectors length of new basis equals - * TYPE_GENERAL_SCALE - vectors length of new basis doesn't equal + * TYPE_GENERAL_SCALE - vectors length of new basis doesn't equal * TYPE_FLIP - new basis vector orientation differ from original one - * TYPE_QUADRANT_ROTATION - new basis is rotated by 90, 180, 270, or 360 degrees + * TYPE_QUADRANT_ROTATION - new basis is rotated by 90, 180, 270, or 360 degrees * TYPE_GENERAL_ROTATION - new basis is rotated by arbitrary angle * TYPE_GENERAL_TRANSFORM - transformation can't be inversed */ @@ -322,7 +322,7 @@ public class AffineTransform implements Cloneable, Serializable { } public static AffineTransform getShearInstance(Vertex.Factory factory, float shx, float shy) { - AffineTransform t = new AffineTransform(factory); + AffineTransform t = new AffineTransform(factory); t.setToShear(shx, shy); return t; } @@ -359,13 +359,13 @@ public class AffineTransform implements Cloneable, Serializable { concatenate(AffineTransform.getRotateInstance(pointFactory, angle, px, py)); } - /** + /** * Multiply matrix of two AffineTransform objects. * The first argument's {@link Vertex.Factory} is being used. - * + * * @param t1 - the AffineTransform object is a multiplicand * @param t2 - the AffineTransform object is a multiplier - * @return an AffineTransform object that is a result of t1 multiplied by matrix t2. + * @return an AffineTransform object that is a result of t1 multiplied by matrix t2. */ AffineTransform multiply(AffineTransform t1, AffineTransform t2) { return new AffineTransform(t1.pointFactory, @@ -415,7 +415,7 @@ public class AffineTransform implements Cloneable, Serializable { public void transform(Vertex[] src, int srcOff, Vertex[] dst, int dstOff, int length) { while (--length >= 0) { - Vertex srcPoint = src[srcOff++]; + Vertex srcPoint = src[srcOff++]; float x = srcPoint.getX(); float y = srcPoint.getY(); Vertex dstPoint = dst[dstOff]; @@ -426,7 +426,7 @@ public class AffineTransform implements Cloneable, Serializable { dst[dstOff++] = dstPoint; } } - + public void transform(float[] src, int srcOff, float[] dst, int dstOff, int length) { int step = 2; if (src == dst && srcOff < dstOff && dstOff < srcOff + length * 2) { @@ -443,7 +443,7 @@ public class AffineTransform implements Cloneable, Serializable { dstOff += step; } } - + public Vertex deltaTransform(Vertex src, Vertex dst) { if (dst == null) { dst = pointFactory.create(); @@ -486,7 +486,7 @@ public class AffineTransform implements Cloneable, Serializable { { float det = getDeterminant(); if (FloatUtil.abs(det) < ZERO) { - throw new NoninvertibleTransformException(determinantIsZero); + throw new NoninvertibleTransformException(determinantIsZero); } while (--length >= 0) { @@ -554,7 +554,7 @@ public class AffineTransform implements Cloneable, Serializable { return false; } - + /** * Write AffineTrasform object to the output steam. * @param stream - the output stream @@ -564,12 +564,12 @@ public class AffineTransform implements Cloneable, Serializable { stream.defaultWriteObject(); } - + /** * Read AffineTransform object from the input stream * @param stream - the input steam * @throws IOException - if there are I/O errors while reading from the input strem - * @throws ClassNotFoundException - if class could not be found + * @throws ClassNotFoundException - if class could not be found */ private void readObject(java.io.ObjectInputStream stream) throws IOException, ClassNotFoundException { stream.defaultReadObject(); diff --git a/src/jogl/classes/jogamp/graph/geom/plane/Crossing.java b/src/jogl/classes/jogamp/graph/geom/plane/Crossing.java index cd4ee2a91..4ee0c250d 100644 --- a/src/jogl/classes/jogamp/graph/geom/plane/Crossing.java +++ b/src/jogl/classes/jogamp/graph/geom/plane/Crossing.java @@ -29,17 +29,17 @@ public class Crossing { * Allowable tolerance for bounds comparison */ static final float DELTA = (float) 1E-5; - + /** * If roots have distance less then ROOT_DELTA they are double */ static final float ROOT_DELTA = (float) 1E-10; - + /** * Rectangle cross segment */ public static final int CROSSING = 255; - + /** * Unknown crossing result */ @@ -130,8 +130,8 @@ public class Crossing { } /** - * Excludes float roots. Roots are float if they lies enough close with each other. - * @param res - the roots + * Excludes float roots. Roots are float if they lies enough close with each other. + * @param res - the roots * @param rc - the roots count * @return new roots count */ @@ -384,12 +384,12 @@ public class Crossing { // START if (x == x1) { - return x1 < x2 ? 0 : -1; + return x1 < x2 ? 0 : -1; } - + // END if (x == x2) { - return x1 < x2 ? 1 : 0; + return x1 < x2 ? 1 : 0; } // INSIDE-DOWN @@ -493,10 +493,10 @@ public class Crossing { } break; default: - throw new IllegalArgumentException("Unhandled Segment Type: "+segmentType); + throw new IllegalArgumentException("Unhandled Segment Type: "+segmentType); } - - // checks if the point (x,y) is the vertex of shape with PathIterator p + + // checks if the point (x,y) is the vertex of shape with PathIterator p if (x == cx && y == cy) { cross = 0; cy = my; @@ -554,9 +554,9 @@ public class Crossing { } } } - + /** - * Returns are bounds intersect or not intersect rectangle + * Returns are bounds intersect or not intersect rectangle */ static int crossBound(float bound[], int bc, float py1, float py2) { diff --git a/src/jogl/classes/jogamp/graph/geom/plane/Path2D.java b/src/jogl/classes/jogamp/graph/geom/plane/Path2D.java index 945eeceeb..c1ee17a4b 100644 --- a/src/jogl/classes/jogamp/graph/geom/plane/Path2D.java +++ b/src/jogl/classes/jogamp/graph/geom/plane/Path2D.java @@ -33,12 +33,12 @@ public final class Path2D implements Cloneable { static final String invalidWindingRuleValue = "Invalid winding rule value"; static final String iteratorOutOfBounds = "Iterator out of bounds"; - + /** * The buffers size */ private static final int BUFFER_SIZE = 10; - + /** * The buffers capacity */ @@ -48,24 +48,24 @@ public final class Path2D implements Cloneable { * The point's types buffer */ byte[] types; - + /** * The points buffer */ float[] points; - + /** * The point's type buffer size */ int typeSize; - + /** * The points buffer size */ int pointSize; - + /** - * The path rule + * The path rule */ int rule; @@ -80,7 +80,7 @@ public final class Path2D implements Cloneable { 0}; // CLOSE /* - * GeneralPath path iterator + * GeneralPath path iterator */ class Iterator implements PathIterator { @@ -88,17 +88,17 @@ public final class Path2D implements Cloneable { * The current cursor position in types buffer */ int typeIndex; - + /** * The current cursor position in points buffer */ int pointIndex; - + /** * The source GeneralPath object */ Path2D p; - + /** * The path iterator transformation */ @@ -183,7 +183,7 @@ public final class Path2D implements Cloneable { } /** - * Checks points and types buffer size to add pointCount points. If necessary realloc buffers to enlarge size. + * Checks points and types buffer size to add pointCount points. If necessary realloc buffers to enlarge size. * @param pointCount - the point count to be added in buffer */ void checkBuf(int pointCount, boolean checkMove) { @@ -244,18 +244,18 @@ public final class Path2D implements Cloneable { final public int size() { return typeSize; } - + final public boolean isClosed() { return typeSize > 0 && types[typeSize - 1] == PathIterator.SEG_CLOSE ; } - + public void closePath() { if (!isClosed()) { checkBuf(0, true); types[typeSize++] = PathIterator.SEG_CLOSE; } } - + public String toString() { return "[size "+size()+", closed "+isClosed()+"]"; } @@ -295,7 +295,7 @@ public final class Path2D implements Cloneable { closePath(); break; default: - throw new IllegalArgumentException("Unhandled Segment Type: "+segmentType); + throw new IllegalArgumentException("Unhandled Segment Type: "+segmentType); } path.next(); connect = false; @@ -366,9 +366,9 @@ public final class Path2D implements Cloneable { } /** - * Checks cross count according to path rule to define is it point inside shape or not. + * Checks cross count according to path rule to define is it point inside shape or not. * @param cross - the point cross count - * @return true if point is inside path, or false otherwise + * @return true if point is inside path, or false otherwise */ boolean isInside(int cross) { if (rule == WIND_NON_ZERO) { @@ -396,7 +396,7 @@ public final class Path2D implements Cloneable { } public boolean contains(AABBox r) { - return contains(r.getMinX(), r.getMinY(), r.getWidth(), r.getHeight()); + return contains(r.getMinX(), r.getMinY(), r.getWidth(), r.getHeight()); } public boolean intersects(AABBox r) { @@ -404,9 +404,9 @@ public final class Path2D implements Cloneable { } public PathIterator iterator() { - return new Iterator(this); + return new Iterator(this); } - + public PathIterator iterator(AffineTransform t) { return new Iterator(this, t); } -- cgit v1.2.3 From f1ae8ddb87c88a57dce4593f006881ef6a7f0932 Mon Sep 17 00:00:00 2001 From: Harvey Harrison Date: Thu, 17 Oct 2013 22:51:47 -0700 Subject: jogl: add missing @Override annotations Signed-off-by: Harvey Harrison --- .../com/jogamp/audio/windows/waveout/Mixer.java | 2 ++ .../com/jogamp/audio/windows/waveout/Vec3f.java | 1 + .../gluegen/opengl/BuildComposablePipeline.java | 31 +++++++++++++++++ .../com/jogamp/gluegen/opengl/GLEmitter.java | 3 ++ .../jogamp/gluegen/opengl/ant/StaticGLGenTask.java | 1 + .../NativeSignatureJavaMethodBindingEmitter.java | 6 ++++ .../runtime/opengl/GLProcAddressResolver.java | 1 + .../com/jogamp/graph/curve/OutlineShape.java | 3 ++ .../com/jogamp/graph/curve/opengl/RenderState.java | 1 + src/jogl/classes/com/jogamp/graph/font/Font.java | 1 + .../classes/com/jogamp/graph/geom/Outline.java | 3 ++ .../classes/com/jogamp/graph/geom/Triangle.java | 1 + src/jogl/classes/com/jogamp/graph/geom/Vertex.java | 1 + .../com/jogamp/graph/geom/opengl/SVertex.java | 21 ++++++++++++ src/jogl/classes/com/jogamp/opengl/FBObject.java | 4 +++ .../com/jogamp/opengl/GLRendererQuirks.java | 1 + .../opengl/cg/CgDynamicLibraryBundleInfo.java | 1 + .../com/jogamp/opengl/math/geom/AABBox.java | 3 ++ .../classes/com/jogamp/opengl/swt/GLCanvas.java | 1 + .../com/jogamp/opengl/util/AWTAnimatorImpl.java | 3 ++ .../classes/com/jogamp/opengl/util/Animator.java | 13 ++++++++ .../com/jogamp/opengl/util/AnimatorBase.java | 4 +++ .../jogamp/opengl/util/DefaultAnimatorImpl.java | 2 ++ .../com/jogamp/opengl/util/FPSAnimator.java | 14 ++++++++ .../com/jogamp/opengl/util/GLArrayDataClient.java | 1 + .../jogamp/opengl/util/GLArrayDataEditable.java | 1 + .../com/jogamp/opengl/util/GLArrayDataServer.java | 5 +++ .../com/jogamp/opengl/util/GLPixelBuffer.java | 2 ++ .../com/jogamp/opengl/util/ImmModeSink.java | 2 ++ .../classes/com/jogamp/opengl/util/PMVMatrix.java | 1 + .../com/jogamp/opengl/util/TileRendererBase.java | 1 + .../classes/com/jogamp/opengl/util/TimeFrameI.java | 1 + .../com/jogamp/opengl/util/av/AudioSink.java | 3 ++ .../com/jogamp/opengl/util/av/GLMediaPlayer.java | 1 + .../jogamp/opengl/util/awt/AWTGLPixelBuffer.java | 4 +++ .../com/jogamp/opengl/util/awt/TextRenderer.java | 32 ++++++++++++++++++ .../com/jogamp/opengl/util/glsl/ShaderCode.java | 3 ++ .../com/jogamp/opengl/util/glsl/ShaderProgram.java | 3 ++ .../jogamp/opengl/util/glsl/sdk/CompileShader.java | 1 + .../opengl/util/glsl/sdk/CompileShaderNVidia.java | 4 +++ .../com/jogamp/opengl/util/packrect/Level.java | 2 ++ .../com/jogamp/opengl/util/packrect/Rect.java | 1 + .../opengl/util/packrect/RectanglePacker.java | 2 ++ .../com/jogamp/opengl/util/texture/Texture.java | 1 + .../jogamp/opengl/util/texture/TextureCoords.java | 1 + .../jogamp/opengl/util/texture/TextureData.java | 1 + .../com/jogamp/opengl/util/texture/TextureIO.java | 14 ++++++++ .../opengl/util/texture/TextureSequence.java | 1 + .../jogamp/opengl/util/texture/TextureState.java | 1 + .../jogamp/opengl/util/texture/spi/JPEGImage.java | 2 ++ .../opengl/util/texture/spi/LEDataInputStream.java | 18 ++++++++++ .../util/texture/spi/LEDataOutputStream.java | 15 +++++++++ .../util/texture/spi/NetPbmTextureWriter.java | 1 + .../jogamp/opengl/util/texture/spi/PNGImage.java | 1 + .../jogamp/opengl/util/texture/spi/SGIImage.java | 2 ++ .../jogamp/opengl/util/texture/spi/TGAImage.java | 1 + .../util/texture/spi/awt/IIOTextureProvider.java | 3 ++ .../util/texture/spi/awt/IIOTextureWriter.java | 1 + .../classes/javax/media/opengl/GLArrayData.java | 1 + .../classes/javax/media/opengl/GLDebugMessage.java | 1 + .../javax/media/opengl/GLDrawableFactory.java | 1 + src/jogl/classes/javax/media/opengl/GLProfile.java | 5 +++ .../classes/javax/media/opengl/GLUniformData.java | 1 + .../classes/javax/media/opengl/awt/GLCanvas.java | 10 ++++-- .../opengl/glu/GLUtessellatorCallbackAdapter.java | 12 +++++++ .../graph/curve/opengl/RegionRendererImpl01.java | 1 + .../jogamp/graph/curve/opengl/RenderStateImpl.java | 3 ++ .../jogamp/graph/curve/opengl/VBORegion2PES2.java | 3 ++ .../jogamp/graph/curve/opengl/VBORegionSPES2.java | 3 ++ .../jogamp/graph/curve/tess/CDTriangulator2D.java | 3 ++ .../classes/jogamp/graph/font/JavaFontLoader.java | 3 ++ .../jogamp/graph/font/UbuntuFontLoader.java | 2 ++ .../jogamp/graph/font/typecast/TypecastFont.java | 14 ++++++++ .../font/typecast/TypecastFontConstructor.java | 4 +++ .../jogamp/graph/font/typecast/TypecastGlyph.java | 8 +++++ .../graph/font/typecast/TypecastHMetrics.java | 6 ++++ .../jogamp/graph/font/typecast/ot/OTFont.java | 1 + .../graph/font/typecast/ot/table/BaseTable.java | 13 ++++++++ .../graph/font/typecast/ot/table/CffTable.java | 14 ++++++++ .../font/typecast/ot/table/CharstringType2.java | 3 ++ .../font/typecast/ot/table/ClassDefFormat1.java | 1 + .../font/typecast/ot/table/ClassDefFormat2.java | 1 + .../graph/font/typecast/ot/table/CmapFormat.java | 1 + .../graph/font/typecast/ot/table/CmapFormat0.java | 3 ++ .../graph/font/typecast/ot/table/CmapFormat2.java | 3 ++ .../graph/font/typecast/ot/table/CmapFormat4.java | 4 +++ .../graph/font/typecast/ot/table/CmapFormat6.java | 3 ++ .../font/typecast/ot/table/CmapFormatUnknown.java | 3 ++ .../font/typecast/ot/table/CmapIndexEntry.java | 2 ++ .../graph/font/typecast/ot/table/CmapTable.java | 3 ++ .../font/typecast/ot/table/CoverageFormat1.java | 2 ++ .../font/typecast/ot/table/CoverageFormat2.java | 2 ++ .../graph/font/typecast/ot/table/CvtTable.java | 3 ++ .../font/typecast/ot/table/DirectoryEntry.java | 2 ++ .../graph/font/typecast/ot/table/DsigTable.java | 3 ++ .../graph/font/typecast/ot/table/FpgmTable.java | 3 ++ .../graph/font/typecast/ot/table/GaspRange.java | 1 + .../graph/font/typecast/ot/table/GaspTable.java | 3 ++ .../typecast/ot/table/GlyfCompositeDescript.java | 7 ++++ .../graph/font/typecast/ot/table/GlyfDescript.java | 6 ++++ .../font/typecast/ot/table/GlyfSimpleDescript.java | 8 +++++ .../graph/font/typecast/ot/table/GlyfTable.java | 2 ++ .../graph/font/typecast/ot/table/GposTable.java | 3 ++ .../graph/font/typecast/ot/table/GsubTable.java | 4 +++ .../graph/font/typecast/ot/table/HdmxTable.java | 3 ++ .../graph/font/typecast/ot/table/HeadTable.java | 3 ++ .../graph/font/typecast/ot/table/HheaTable.java | 3 ++ .../graph/font/typecast/ot/table/HmtxTable.java | 3 ++ .../typecast/ot/table/KernSubtableFormat0.java | 2 ++ .../typecast/ot/table/KernSubtableFormat2.java | 2 ++ .../graph/font/typecast/ot/table/KernTable.java | 2 ++ .../typecast/ot/table/LigatureSubstFormat1.java | 1 + .../graph/font/typecast/ot/table/LocaTable.java | 3 ++ .../graph/font/typecast/ot/table/LtshTable.java | 3 ++ .../graph/font/typecast/ot/table/MaxpTable.java | 3 ++ .../graph/font/typecast/ot/table/NameRecord.java | 1 + .../graph/font/typecast/ot/table/NameTable.java | 2 ++ .../graph/font/typecast/ot/table/Os2Table.java | 3 ++ .../graph/font/typecast/ot/table/Panose.java | 1 + .../graph/font/typecast/ot/table/PcltTable.java | 3 ++ .../graph/font/typecast/ot/table/PostTable.java | 3 ++ .../graph/font/typecast/ot/table/PrepTable.java | 3 ++ .../font/typecast/ot/table/SignatureBlock.java | 1 + .../font/typecast/ot/table/SingleSubstFormat1.java | 3 ++ .../font/typecast/ot/table/SingleSubstFormat2.java | 3 ++ .../font/typecast/ot/table/TableDirectory.java | 1 + .../graph/font/typecast/ot/table/VdmxTable.java | 3 ++ .../graph/font/typecast/ot/table/VheaTable.java | 3 ++ .../graph/font/typecast/ot/table/VmtxTable.java | 3 ++ .../graph/font/typecast/tt/engine/Parser.java | 1 + .../classes/jogamp/graph/geom/plane/Path2D.java | 5 +++ src/jogl/classes/jogamp/opengl/Debug.java | 1 + .../opengl/DesktopGLDynamicLookupHelper.java | 1 + src/jogl/classes/jogamp/opengl/FPSCounterImpl.java | 11 ++++++ src/jogl/classes/jogamp/opengl/GLContextImpl.java | 1 + .../jogamp/opengl/GLDebugMessageHandler.java | 2 ++ .../classes/jogamp/opengl/GLDrawableHelper.java | 4 ++- .../jogamp/opengl/GLDynamicLibraryBundleInfo.java | 1 + .../jogamp/opengl/GLOffscreenAutoDrawableImpl.java | 1 + src/jogl/classes/jogamp/opengl/GLRunnableTask.java | 1 + src/jogl/classes/jogamp/opengl/GLWorkerThread.java | 1 + src/jogl/classes/jogamp/opengl/MemoryObject.java | 2 ++ .../jogamp/opengl/SharedResourceRunner.java | 1 + src/jogl/classes/jogamp/opengl/ThreadingImpl.java | 1 + .../jogamp/opengl/awt/AWTThreadingPlugin.java | 3 ++ .../classes/jogamp/opengl/awt/AWTTilePainter.java | 1 + src/jogl/classes/jogamp/opengl/awt/Java2D.java | 3 ++ .../classes/jogamp/opengl/awt/VersionApplet.java | 9 +++++ .../egl/DesktopES2DynamicLibraryBundleInfo.java | 5 +++ .../classes/jogamp/opengl/egl/EGLDisplayUtil.java | 3 ++ .../classes/jogamp/opengl/egl/EGLDrawable.java | 1 + .../opengl/egl/EGLES1DynamicLibraryBundleInfo.java | 1 + .../opengl/egl/EGLES2DynamicLibraryBundleInfo.java | 1 + .../egl/EGLGraphicsConfigurationFactory.java | 1 + .../jogamp/opengl/egl/EGLUpstreamSurfaceHook.java | 1 + .../classes/jogamp/opengl/glu/GLUquadricImpl.java | 6 ++++ .../opengl/glu/gl2/nurbs/GL2CurveEvaluator.java | 6 ++++ .../opengl/glu/gl2/nurbs/GL2SurfaceEvaluator.java | 8 +++++ .../jogamp/opengl/glu/mipmap/Extract1010102.java | 2 ++ .../jogamp/opengl/glu/mipmap/Extract1555rev.java | 2 ++ .../opengl/glu/mipmap/Extract2101010rev.java | 2 ++ .../jogamp/opengl/glu/mipmap/Extract233rev.java | 2 ++ .../jogamp/opengl/glu/mipmap/Extract332.java | 2 ++ .../jogamp/opengl/glu/mipmap/Extract4444.java | 2 ++ .../jogamp/opengl/glu/mipmap/Extract4444rev.java | 2 ++ .../jogamp/opengl/glu/mipmap/Extract5551.java | 2 ++ .../jogamp/opengl/glu/mipmap/Extract565.java | 2 ++ .../jogamp/opengl/glu/mipmap/Extract565rev.java | 2 ++ .../jogamp/opengl/glu/mipmap/Extract8888.java | 2 ++ .../jogamp/opengl/glu/mipmap/Extract8888rev.java | 2 ++ .../jogamp/opengl/glu/mipmap/ExtractFloat.java | 2 ++ .../jogamp/opengl/glu/mipmap/ExtractSByte.java | 2 ++ .../jogamp/opengl/glu/mipmap/ExtractSInt.java | 2 ++ .../jogamp/opengl/glu/mipmap/ExtractSShort.java | 2 ++ .../jogamp/opengl/glu/mipmap/ExtractUByte.java | 2 ++ .../jogamp/opengl/glu/mipmap/ExtractUInt.java | 2 ++ .../jogamp/opengl/glu/mipmap/ExtractUShort.java | 2 ++ .../opengl/glu/tessellator/PriorityQHeap.java | 7 ++++ .../opengl/glu/tessellator/PriorityQSort.java | 7 ++++ .../jogamp/opengl/glu/tessellator/Render.java | 3 ++ .../jogamp/opengl/glu/tessellator/Sweep.java | 2 ++ .../jogamp/opengl/macosx/cgl/MacOSXCGLContext.java | 1 + .../macosx/cgl/MacOSXCGLDrawableFactory.java | 1 + .../macosx/cgl/MacOSXCGLGraphicsConfiguration.java | 1 + .../cgl/MacOSXCGLGraphicsConfigurationFactory.java | 1 + .../MacOSXAWTCGLGraphicsConfigurationFactory.java | 1 + .../opengl/util/GLArrayHandlerInterleaved.java | 3 ++ .../jogamp/opengl/util/GLDataArrayHandler.java | 3 ++ .../jogamp/opengl/util/GLFixedArrayHandler.java | 3 ++ .../opengl/util/GLFixedArrayHandlerFlat.java | 3 ++ .../jogamp/opengl/util/GLVBOArrayHandler.java | 1 + .../jogamp/opengl/util/av/EGLMediaPlayerImpl.java | 1 + .../jogamp/opengl/util/av/GLMediaPlayerImpl.java | 5 +++ .../av/impl/FFMPEGDynamicLibraryBundleInfo.java | 2 ++ .../opengl/util/av/impl/FFMPEGMediaPlayer.java | 1 + .../jogamp/opengl/util/glsl/GLSLArrayHandler.java | 3 ++ .../opengl/util/glsl/GLSLArrayHandlerFlat.java | 3 ++ .../util/glsl/GLSLArrayHandlerInterleaved.java | 3 ++ .../opengl/util/glsl/fixedfunc/FixedFuncHook.java | 39 ++++++++++++++++++++++ .../util/glsl/fixedfunc/FixedFuncPipeline.java | 1 + .../jogamp/opengl/util/jpeg/JPEGDecoder.java | 12 +++++++ .../classes/jogamp/opengl/util/pngj/ImageLine.java | 1 + .../jogamp/opengl/util/pngj/ImageLineHelper.java | 1 + .../jogamp/opengl/util/pngj/PngHelperInternal.java | 1 + .../classes/jogamp/opengl/util/pngj/PngReader.java | 1 + .../opengl/util/pngj/chunks/ChunkHelper.java | 2 ++ .../jogamp/opengl/util/pngj/chunks/ChunkRaw.java | 1 + .../jogamp/opengl/util/pngj/chunks/ChunksList.java | 4 +++ .../util/pngj/chunks/ChunksListForWrite.java | 2 ++ .../opengl/util/pngj/chunks/PngChunkSingle.java | 1 + .../opengl/util/pngj/chunks/PngMetadata.java | 1 + .../windows/wgl/WindowsWGLDrawableFactory.java | 1 + .../wgl/WindowsWGLGraphicsConfiguration.java | 2 ++ .../WindowsWGLGraphicsConfigurationFactory.java | 1 + .../WindowsAWTWGLGraphicsConfigurationFactory.java | 1 + .../opengl/x11/glx/X11GLXDrawableFactory.java | 1 + .../x11/glx/X11GLXGraphicsConfiguration.java | 2 ++ .../glx/X11GLXGraphicsConfigurationFactory.java | 1 + .../nativewindow/awt/AWTGraphicsConfiguration.java | 1 + .../jogamp/nativewindow/awt/AWTGraphicsScreen.java | 1 + .../nativewindow/awt/AWTWindowClosingProtocol.java | 2 ++ .../nativewindow/awt/DirectDataBufferInt.java | 4 +++ .../nativewindow/macosx/MacOSXGraphicsDevice.java | 1 + .../com/jogamp/nativewindow/swt/SWTAccessor.java | 4 +++ .../windows/WindowsGraphicsDevice.java | 1 + .../jogamp/nativewindow/x11/X11GraphicsScreen.java | 1 + .../nativewindow/DefaultCapabilitiesChooser.java | 1 + .../nativewindow/DefaultGraphicsConfiguration.java | 4 +++ .../media/nativewindow/DefaultGraphicsScreen.java | 2 ++ .../nativewindow/GraphicsConfigurationFactory.java | 2 ++ .../media/nativewindow/NativeWindowFactory.java | 4 +++ .../javax/media/nativewindow/ProxySurface.java | 1 + .../javax/media/nativewindow/VisualIDHolder.java | 1 + .../javax/media/nativewindow/util/Dimension.java | 2 ++ .../nativewindow/util/DimensionImmutable.java | 2 ++ .../javax/media/nativewindow/util/Insets.java | 3 ++ .../media/nativewindow/util/InsetsImmutable.java | 2 ++ .../javax/media/nativewindow/util/Point.java | 3 ++ .../media/nativewindow/util/PointImmutable.java | 2 ++ .../javax/media/nativewindow/util/Rectangle.java | 3 ++ .../nativewindow/util/RectangleImmutable.java | 2 ++ .../javax/media/nativewindow/util/SurfaceSize.java | 3 ++ .../classes/jogamp/nativewindow/Debug.java | 1 + .../DefaultGraphicsConfigurationFactoryImpl.java | 1 + .../jogamp/nativewindow/GlobalToolkitLock.java | 1 + .../jogamp/nativewindow/NWJNILibLoader.java | 1 + .../nativewindow/NativeWindowFactoryImpl.java | 1 + .../jogamp/nativewindow/NullToolkitLock.java | 1 + .../jogamp/nativewindow/ProxySurfaceImpl.java | 1 + .../jogamp/nativewindow/ResourceToolkitLock.java | 1 + .../nativewindow/SharedResourceToolkitLock.java | 1 + .../jogamp/nativewindow/SurfaceUpdatedHelper.java | 1 + .../jogamp/nativewindow/jawt/JAWTJNILibLoader.java | 1 + .../classes/jogamp/nativewindow/jawt/JAWTUtil.java | 4 +++ .../nativewindow/jawt/macosx/MacOSXJAWTWindow.java | 10 ++++++ .../jawt/windows/Win32SunJDKReflection.java | 1 + .../jawt/windows/WindowsJAWTWindow.java | 5 +++ .../nativewindow/jawt/x11/X11JAWTWindow.java | 5 +++ .../nativewindow/jawt/x11/X11SunJDKReflection.java | 1 + .../jogamp/nativewindow/macosx/OSXUtil.java | 2 +- .../x11/X11GraphicsConfigurationFactory.java | 1 + .../classes/jogamp/nativewindow/x11/X11Util.java | 2 ++ .../awt/X11AWTGraphicsConfigurationFactory.java | 1 + src/newt/classes/com/jogamp/newt/Display.java | 2 ++ .../classes/com/jogamp/newt/MonitorDevice.java | 3 ++ src/newt/classes/com/jogamp/newt/MonitorMode.java | 8 +++++ src/newt/classes/com/jogamp/newt/NewtFactory.java | 1 + src/newt/classes/com/jogamp/newt/Screen.java | 2 ++ .../classes/com/jogamp/newt/awt/NewtCanvasAWT.java | 13 ++++++++ .../jogamp/newt/awt/applet/JOGLNewtApplet1Run.java | 4 +++ .../jogamp/newt/awt/applet/JOGLNewtAppletBase.java | 6 ++++ .../jogamp/newt/event/DoubleTapScrollGesture.java | 1 + .../classes/com/jogamp/newt/event/InputEvent.java | 2 ++ .../classes/com/jogamp/newt/event/KeyAdapter.java | 2 ++ .../classes/com/jogamp/newt/event/KeyEvent.java | 2 ++ .../com/jogamp/newt/event/MonitorEvent.java | 2 ++ .../com/jogamp/newt/event/MouseAdapter.java | 8 +++++ .../classes/com/jogamp/newt/event/MouseEvent.java | 2 ++ .../classes/com/jogamp/newt/event/NEWTEvent.java | 1 + .../com/jogamp/newt/event/PinchToZoomGesture.java | 1 + .../com/jogamp/newt/event/TraceKeyAdapter.java | 2 ++ .../com/jogamp/newt/event/TraceMouseAdapter.java | 8 +++++ .../com/jogamp/newt/event/TraceWindowAdapter.java | 7 ++++ .../com/jogamp/newt/event/WindowAdapter.java | 7 ++++ .../classes/com/jogamp/newt/event/WindowEvent.java | 2 ++ .../com/jogamp/newt/event/WindowUpdateEvent.java | 2 ++ .../com/jogamp/newt/event/awt/AWTKeyAdapter.java | 2 ++ .../com/jogamp/newt/event/awt/AWTMouseAdapter.java | 10 ++++++ .../jogamp/newt/event/awt/AWTWindowAdapter.java | 22 ++++++++++++ .../classes/com/jogamp/newt/opengl/GLWindow.java | 2 ++ .../classes/com/jogamp/newt/swt/NewtCanvasSWT.java | 3 ++ src/newt/classes/jogamp/newt/Debug.java | 1 + src/newt/classes/jogamp/newt/DisplayImpl.java | 9 +++++ src/newt/classes/jogamp/newt/NEWTJNILibLoader.java | 1 + src/newt/classes/jogamp/newt/OffscreenWindow.java | 7 ++++ src/newt/classes/jogamp/newt/WindowImpl.java | 16 +++++++++ .../newt/awt/event/AWTParentWindowAdapter.java | 11 ++++++ .../classes/jogamp/newt/driver/awt/AWTCanvas.java | 4 +++ .../classes/jogamp/newt/driver/awt/AWTEDTUtil.java | 1 + .../jogamp/newt/driver/awt/DisplayDriver.java | 4 +++ .../jogamp/newt/driver/awt/ScreenDriver.java | 3 ++ .../jogamp/newt/driver/awt/WindowDriver.java | 6 ++++ .../jogamp/newt/driver/bcm/egl/DisplayDriver.java | 3 ++ .../jogamp/newt/driver/bcm/egl/ScreenDriver.java | 4 +++ .../jogamp/newt/driver/bcm/egl/WindowDriver.java | 6 ++++ .../newt/driver/bcm/vc/iv/DisplayDriver.java | 3 ++ .../jogamp/newt/driver/bcm/vc/iv/ScreenDriver.java | 3 ++ .../jogamp/newt/driver/bcm/vc/iv/WindowDriver.java | 6 ++++ .../newt/driver/intel/gdl/DisplayDriver.java | 3 ++ .../jogamp/newt/driver/intel/gdl/ScreenDriver.java | 4 +++ .../jogamp/newt/driver/intel/gdl/WindowDriver.java | 6 ++++ .../jogamp/newt/driver/kd/DisplayDriver.java | 3 ++ .../jogamp/newt/driver/kd/ScreenDriver.java | 4 +++ .../jogamp/newt/driver/kd/WindowDriver.java | 6 ++++ .../jogamp/newt/driver/macosx/DisplayDriver.java | 3 ++ .../jogamp/newt/driver/macosx/ScreenDriver.java | 3 ++ .../jogamp/newt/driver/macosx/WindowDriver.java | 12 +++++++ .../jogamp/newt/driver/windows/DisplayDriver.java | 3 ++ .../jogamp/newt/driver/windows/WindowDriver.java | 9 +++++ .../jogamp/newt/driver/x11/DisplayDriver.java | 2 ++ .../jogamp/newt/driver/x11/ScreenDriver.java | 5 +++ .../jogamp/newt/driver/x11/WindowDriver.java | 8 +++++ src/newt/classes/jogamp/newt/swt/SWTEDTUtil.java | 2 ++ 323 files changed, 1132 insertions(+), 4 deletions(-) (limited to 'src/jogl/classes/jogamp/graph') diff --git a/src/jogl/classes/com/jogamp/audio/windows/waveout/Mixer.java b/src/jogl/classes/com/jogamp/audio/windows/waveout/Mixer.java index 0a502c123..3b76d2ebf 100644 --- a/src/jogl/classes/com/jogamp/audio/windows/waveout/Mixer.java +++ b/src/jogl/classes/com/jogamp/audio/windows/waveout/Mixer.java @@ -129,6 +129,7 @@ public class Mixer { super("Mixer Thread"); } + @Override public void run() { while (!shutdown) { List/**/ curTracks = tracks; @@ -166,6 +167,7 @@ public class Mixer { } } + @Override public void run() { while (!shutdown) { // Get the next buffer diff --git a/src/jogl/classes/com/jogamp/audio/windows/waveout/Vec3f.java b/src/jogl/classes/com/jogamp/audio/windows/waveout/Vec3f.java index 0726e5762..79fb80169 100644 --- a/src/jogl/classes/com/jogamp/audio/windows/waveout/Vec3f.java +++ b/src/jogl/classes/com/jogamp/audio/windows/waveout/Vec3f.java @@ -206,6 +206,7 @@ class Vec3f { z *= arg.z; } + @Override public String toString() { return "(" + x + ", " + y + ", " + z + ")"; } diff --git a/src/jogl/classes/com/jogamp/gluegen/opengl/BuildComposablePipeline.java b/src/jogl/classes/com/jogamp/gluegen/opengl/BuildComposablePipeline.java index 8429fbcfd..5f358a6d3 100644 --- a/src/jogl/classes/com/jogamp/gluegen/opengl/BuildComposablePipeline.java +++ b/src/jogl/classes/com/jogamp/gluegen/opengl/BuildComposablePipeline.java @@ -402,6 +402,7 @@ public class BuildComposablePipeline { ifNames, null, new CodeGenUtils.EmissionCallback() { + @Override public void emit(PrintWriter w) { emitClassDocComment(w); } @@ -752,18 +753,22 @@ public class BuildComposablePipeline { this.mode = mode; } + @Override protected String getOutputName() { return className; } + @Override protected int getMode() { return mode; } + @Override protected boolean emptyMethodAllowed() { return true; } + @Override protected boolean emptyDownstreamAllowed() { return true; } @@ -773,6 +778,7 @@ public class BuildComposablePipeline { super.preMethodEmissionHook(output); } + @Override protected void constructorHook(PrintWriter output) { output.print(" public " + getOutputName() + "("); output.print(downstreamName + " " + getDownstreamObjectName()); @@ -803,6 +809,7 @@ public class BuildComposablePipeline { } } + @Override protected void emitClassDocComment(PrintWriter output) { output.println("/**"); output.println(" * Composable pipeline {@link " + outputPackage + "." + outputName + "}, implementing the interface"); @@ -837,10 +844,12 @@ public class BuildComposablePipeline { output.println("*/"); } + @Override protected boolean hasPreDownstreamCallHook(Method m) { return null != getMethod(prologClassOpt, m); } + @Override protected void preDownstreamCallHook(PrintWriter output, Method m) { if (null != prologNameOpt) { output.print(getPrologObjectNameOpt()); @@ -852,10 +861,12 @@ public class BuildComposablePipeline { } } + @Override protected boolean hasPostDownstreamCallHook(Method m) { return false; } + @Override protected void postDownstreamCallHook(PrintWriter output, Method m) { } } // end class CustomPipeline @@ -869,18 +880,22 @@ public class BuildComposablePipeline { className = "Debug" + getBaseInterfaceName(); } + @Override protected String getOutputName() { return className; } + @Override protected int getMode() { return 0; } + @Override protected boolean emptyMethodAllowed() { return false; } + @Override protected boolean emptyDownstreamAllowed() { return false; } @@ -890,6 +905,7 @@ public class BuildComposablePipeline { super.preMethodEmissionHook(output); } + @Override protected void constructorHook(PrintWriter output) { output.print(" public " + getOutputName() + "("); output.println(downstreamName + " " + getDownstreamObjectName() + ")"); @@ -971,6 +987,7 @@ public class BuildComposablePipeline { output.println(" private GLContext _context;"); } + @Override protected void emitClassDocComment(PrintWriter output) { output.println("/**"); output.println(" *

"); @@ -988,18 +1005,22 @@ public class BuildComposablePipeline { output.println(" */"); } + @Override protected boolean hasPreDownstreamCallHook(Method m) { return true; } + @Override protected void preDownstreamCallHook(PrintWriter output, Method m) { output.println(" checkContext();"); } + @Override protected boolean hasPostDownstreamCallHook(Method m) { return true; } + @Override protected void postDownstreamCallHook(PrintWriter output, Method m) { if (m.getName().equals("glBegin")) { output.println(" insideBeginEndPair = true;"); @@ -1041,18 +1062,22 @@ public class BuildComposablePipeline { className = "Trace" + getBaseInterfaceName(); } + @Override protected String getOutputName() { return className; } + @Override protected int getMode() { return 0; } + @Override protected boolean emptyMethodAllowed() { return false; } + @Override protected boolean emptyDownstreamAllowed() { return false; } @@ -1062,6 +1087,7 @@ public class BuildComposablePipeline { super.preMethodEmissionHook(output); } + @Override protected void constructorHook(PrintWriter output) { output.print(" public " + getOutputName() + "("); output.println(downstreamName + " " + getDownstreamObjectName() + ", PrintStream " + getOutputStreamName() + ")"); @@ -1112,6 +1138,7 @@ public class BuildComposablePipeline { output.println("}"); } + @Override protected void emitClassDocComment(PrintWriter output) { output.println("/**"); output.println(" *

"); @@ -1129,10 +1156,12 @@ public class BuildComposablePipeline { output.println(" */"); } + @Override protected boolean hasPreDownstreamCallHook(Method m) { return true; } + @Override protected void preDownstreamCallHook(PrintWriter output, Method m) { if (m.getName().equals("glEnd") || m.getName().equals("glEndList")) { output.println("indent-=2;"); @@ -1146,10 +1175,12 @@ public class BuildComposablePipeline { output.println(");"); } + @Override protected boolean hasPostDownstreamCallHook(Method m) { return true; } + @Override protected void postDownstreamCallHook(PrintWriter output, Method m) { Class ret = m.getReturnType(); if (ret != Void.TYPE) { diff --git a/src/jogl/classes/com/jogamp/gluegen/opengl/GLEmitter.java b/src/jogl/classes/com/jogamp/gluegen/opengl/GLEmitter.java index 1af632682..547382ed1 100644 --- a/src/jogl/classes/com/jogamp/gluegen/opengl/GLEmitter.java +++ b/src/jogl/classes/com/jogamp/gluegen/opengl/GLEmitter.java @@ -134,6 +134,7 @@ public class GLEmitter extends ProcAddressEmitter { private List constants; private List functions; + @Override public void filterSymbols(List constants, List functions) { this.constants = constants; @@ -141,10 +142,12 @@ public class GLEmitter extends ProcAddressEmitter { doWork(); } + @Override public List getConstants() { return constants; } + @Override public List getFunctions() { return functions; } diff --git a/src/jogl/classes/com/jogamp/gluegen/opengl/ant/StaticGLGenTask.java b/src/jogl/classes/com/jogamp/gluegen/opengl/ant/StaticGLGenTask.java index b98f17117..21946ea89 100644 --- a/src/jogl/classes/com/jogamp/gluegen/opengl/ant/StaticGLGenTask.java +++ b/src/jogl/classes/com/jogamp/gluegen/opengl/ant/StaticGLGenTask.java @@ -186,6 +186,7 @@ public class StaticGLGenTask extends Task * * @see org.apache.tools.ant.Task#execute() */ + @Override public void execute() throws BuildException { diff --git a/src/jogl/classes/com/jogamp/gluegen/opengl/nativesig/NativeSignatureJavaMethodBindingEmitter.java b/src/jogl/classes/com/jogamp/gluegen/opengl/nativesig/NativeSignatureJavaMethodBindingEmitter.java index a17657382..6d9d6f2bb 100644 --- a/src/jogl/classes/com/jogamp/gluegen/opengl/nativesig/NativeSignatureJavaMethodBindingEmitter.java +++ b/src/jogl/classes/com/jogamp/gluegen/opengl/nativesig/NativeSignatureJavaMethodBindingEmitter.java @@ -131,6 +131,7 @@ public class NativeSignatureJavaMethodBindingEmitter extends GLJavaMethodBinding } } + @Override protected String getReturnTypeString(boolean skipArray) { if (isForImplementingMethodCall()) { JavaType returnType = getBinding().getJavaReturnType(); @@ -142,6 +143,7 @@ public class NativeSignatureJavaMethodBindingEmitter extends GLJavaMethodBinding return super.getReturnTypeString(skipArray); } + @Override protected void emitPreCallSetup(MethodBinding binding, PrintWriter writer) { super.emitPreCallSetup(binding, writer); for (int i = 0; i < binding.getNumArguments(); i++) { @@ -162,6 +164,7 @@ public class NativeSignatureJavaMethodBindingEmitter extends GLJavaMethodBinding return "__buffer_array_" + argNumber; } + @Override protected int emitArguments(PrintWriter writer) { boolean needComma = false; @@ -242,6 +245,7 @@ public class NativeSignatureJavaMethodBindingEmitter extends GLJavaMethodBinding return numEmitted; } + @Override protected void emitReturnVariableSetupAndCall(MethodBinding binding, PrintWriter writer) { writer.print(" "); JavaType returnType = binding.getJavaReturnType(); @@ -455,6 +459,7 @@ public class NativeSignatureJavaMethodBindingEmitter extends GLJavaMethodBinding return numArgsEmitted; } + @Override protected void emitCallResultReturn(MethodBinding binding, PrintWriter writer) { for (int i = 0; i < binding.getNumArguments(); i++) { JavaType type = binding.getJavaArgumentType(i); @@ -468,6 +473,7 @@ public class NativeSignatureJavaMethodBindingEmitter extends GLJavaMethodBinding super.emitCallResultReturn(binding, writer); } + @Override public String getName() { String res = super.getName(); if (forImplementingMethodCall && bufferObjectVariant) { diff --git a/src/jogl/classes/com/jogamp/gluegen/runtime/opengl/GLProcAddressResolver.java b/src/jogl/classes/com/jogamp/gluegen/runtime/opengl/GLProcAddressResolver.java index f8406075c..3fb315c99 100644 --- a/src/jogl/classes/com/jogamp/gluegen/runtime/opengl/GLProcAddressResolver.java +++ b/src/jogl/classes/com/jogamp/gluegen/runtime/opengl/GLProcAddressResolver.java @@ -42,6 +42,7 @@ public class GLProcAddressResolver implements FunctionAddressResolver { public static final boolean DEBUG = false; + @Override public long resolve(String name, DynamicLookupHelper lookup) { long newProcAddress = 0; diff --git a/src/jogl/classes/com/jogamp/graph/curve/OutlineShape.java b/src/jogl/classes/com/jogamp/graph/curve/OutlineShape.java index cb2885e0f..60d5199eb 100644 --- a/src/jogl/classes/com/jogamp/graph/curve/OutlineShape.java +++ b/src/jogl/classes/com/jogamp/graph/curve/OutlineShape.java @@ -554,6 +554,7 @@ public class OutlineShape implements Comparable { * as criteria. * @see java.lang.Comparable#compareTo(java.lang.Object) */ + @Override public final int compareTo(OutlineShape outline) { float size = getBounds().getSize(); float newSize = outline.getBounds().getSize(); @@ -586,6 +587,7 @@ public class OutlineShape implements Comparable { * @return true if {@code obj} is an OutlineShape, not null, * same outlineState, equal bounds and equal outlines in the same order */ + @Override public boolean equals(Object obj) { if( obj == this) { return true; @@ -614,6 +616,7 @@ public class OutlineShape implements Comparable { /** * @return deep clone of this OutlineShape w/o Region */ + @Override public OutlineShape clone() { OutlineShape o; try { diff --git a/src/jogl/classes/com/jogamp/graph/curve/opengl/RenderState.java b/src/jogl/classes/com/jogamp/graph/curve/opengl/RenderState.java index 9c833fd24..6a8fb6a67 100644 --- a/src/jogl/classes/com/jogamp/graph/curve/opengl/RenderState.java +++ b/src/jogl/classes/com/jogamp/graph/curve/opengl/RenderState.java @@ -105,6 +105,7 @@ public abstract class RenderState { return sb; } + @Override public String toString() { return toString(null, false).toString(); } diff --git a/src/jogl/classes/com/jogamp/graph/font/Font.java b/src/jogl/classes/com/jogamp/graph/font/Font.java index 82211da92..a4a8fd53d 100644 --- a/src/jogl/classes/com/jogamp/graph/font/Font.java +++ b/src/jogl/classes/com/jogamp/graph/font/Font.java @@ -109,5 +109,6 @@ public interface Font { public boolean isPrintableChar( char c ); /** Shall return {@link #getFullFamilyName()} */ + @Override public String toString(); } \ No newline at end of file diff --git a/src/jogl/classes/com/jogamp/graph/geom/Outline.java b/src/jogl/classes/com/jogamp/graph/geom/Outline.java index dfa6a8635..77a318078 100644 --- a/src/jogl/classes/com/jogamp/graph/geom/Outline.java +++ b/src/jogl/classes/com/jogamp/graph/geom/Outline.java @@ -173,6 +173,7 @@ public class Outline implements Cloneable, Comparable { * as criteria. * @see java.lang.Comparable#compareTo(java.lang.Object) */ + @Override public final int compareTo(Outline outline) { float size = getBounds().getSize(); float newSize = outline.getBounds().getSize(); @@ -204,6 +205,7 @@ public class Outline implements Cloneable, Comparable { * @param obj the Object to compare this Outline with * @return true if {@code obj} is an Outline, not null, equals bounds and equal vertices in the same order */ + @Override public boolean equals(Object obj) { if( obj == this) { return true; @@ -229,6 +231,7 @@ public class Outline implements Cloneable, Comparable { /** * @return deep clone of this Outline */ + @Override public Outline clone() { Outline o; try { diff --git a/src/jogl/classes/com/jogamp/graph/geom/Triangle.java b/src/jogl/classes/com/jogamp/graph/geom/Triangle.java index bd0900495..a01cd834f 100644 --- a/src/jogl/classes/com/jogamp/graph/geom/Triangle.java +++ b/src/jogl/classes/com/jogamp/graph/geom/Triangle.java @@ -73,6 +73,7 @@ public class Triangle { this.boundaryVertices = boundaryVertices; } + @Override public String toString() { return "Tri ID: " + id + "\n" + vertices[0] + "\n" + vertices[1] + "\n" + vertices[2]; } diff --git a/src/jogl/classes/com/jogamp/graph/geom/Vertex.java b/src/jogl/classes/com/jogamp/graph/geom/Vertex.java index 40048235e..994253f71 100644 --- a/src/jogl/classes/com/jogamp/graph/geom/Vertex.java +++ b/src/jogl/classes/com/jogamp/graph/geom/Vertex.java @@ -76,6 +76,7 @@ public interface Vertex extends Vert3fImmutable, Cloneable { * @param obj the Object to compare this Vertex with * @return true if {@code obj} is a Vertex and not null, on-curve flag is equal and has same vertex- and tex-coords. */ + @Override boolean equals(Object obj); /** diff --git a/src/jogl/classes/com/jogamp/graph/geom/opengl/SVertex.java b/src/jogl/classes/com/jogamp/graph/geom/opengl/SVertex.java index 6b07688a7..b27604a44 100644 --- a/src/jogl/classes/com/jogamp/graph/geom/opengl/SVertex.java +++ b/src/jogl/classes/com/jogamp/graph/geom/opengl/SVertex.java @@ -45,14 +45,17 @@ public class SVertex implements Vertex { public static Factory factory() { return factory; } public static class Factory implements Vertex.Factory { + @Override public SVertex create() { return new SVertex(); } + @Override public SVertex create(float x, float y, float z, boolean onCurve) { return new SVertex(x, y, z, onCurve); } + @Override public SVertex create(float[] coordsBuffer, int offset, int length, boolean onCurve) { return new SVertex(coordsBuffer, offset, length, onCurve); } @@ -78,12 +81,14 @@ public class SVertex implements Vertex { setOnCurve(onCurve); } + @Override public final void setCoord(float x, float y, float z) { this.coord[0] = x; this.coord[1] = y; this.coord[2] = z; } + @Override public final void setCoord(float[] coordsBuffer, int offset, int length) { System.arraycopy(coordsBuffer, offset, coord, 0, length); } @@ -98,46 +103,57 @@ public class SVertex implements Vertex { return coord; } + @Override public final void setX(float x) { this.coord[0] = x; } + @Override public final void setY(float y) { this.coord[1] = y; } + @Override public final void setZ(float z) { this.coord[2] = z; } + @Override public final float getX() { return this.coord[0]; } + @Override public final float getY() { return this.coord[1]; } + @Override public final float getZ() { return this.coord[2]; } + @Override public final boolean isOnCurve() { return onCurve; } + @Override public final void setOnCurve(boolean onCurve) { this.onCurve = onCurve; } + @Override public final int getId(){ return id; } + @Override public final void setId(int id){ this.id = id; } + @Override public boolean equals(Object obj) { if( obj == this) { return true; @@ -152,15 +168,18 @@ public class SVertex implements Vertex { VectorUtil.checkEquality(getCoord(), v.getCoord()) ; } + @Override public final float[] getTexCoord() { return texCoord; } + @Override public final void setTexCoord(float s, float t) { this.texCoord[0] = s; this.texCoord[1] = t; } + @Override public final void setTexCoord(float[] texCoordsBuffer, int offset, int length) { System.arraycopy(texCoordsBuffer, offset, texCoord, 0, length); } @@ -168,10 +187,12 @@ public class SVertex implements Vertex { /** * @return deep clone of this Vertex, but keeping the id blank */ + @Override public SVertex clone(){ return new SVertex(this.coord, 0, 3, this.texCoord, 0, 2, this.onCurve); } + @Override public String toString() { return "[ID: " + id + ", onCurve: " + onCurve + ": p " + coord[0] + ", " + coord[1] + ", " + coord[2] + diff --git a/src/jogl/classes/com/jogamp/opengl/FBObject.java b/src/jogl/classes/com/jogamp/opengl/FBObject.java index c78b2b83d..72041a389 100644 --- a/src/jogl/classes/com/jogamp/opengl/FBObject.java +++ b/src/jogl/classes/com/jogamp/opengl/FBObject.java @@ -292,6 +292,7 @@ public class FBObject { int objectHashCode() { return super.hashCode(); } + @Override public String toString() { return getClass().getSimpleName()+"[type "+type+", format "+toHexString(format)+", "+width+"x"+height+ "; name "+toHexString(name)+", obj "+toHexString(objectHashCode())+"]"; @@ -414,6 +415,7 @@ public class FBObject { } } + @Override public String toString() { return getClass().getSimpleName()+"[type "+type+", format "+toHexString(format)+", samples "+samples+", "+getWidth()+"x"+getHeight()+ ", name "+toHexString(getName())+", obj "+toHexString(objectHashCode())+"]"; @@ -527,6 +529,7 @@ public class FBObject { setName(0); } } + @Override public String toString() { return getClass().getSimpleName()+"[type "+type+", target GL_TEXTURE_2D, level 0, format "+toHexString(format)+ ", "+getWidth()+"x"+getHeight()+", border 0, dataFormat "+toHexString(dataFormat)+ @@ -2306,6 +2309,7 @@ public class FBObject { int objectHashCode() { return super.hashCode(); } + @Override public final String toString() { final String caps = null != colorAttachmentPoints ? Arrays.asList(colorAttachmentPoints).toString() : null ; return "FBO[name r/w "+fbName+"/"+getReadFramebuffer()+", init "+initialized+", bound "+bound+", size "+width+"x"+height+ diff --git a/src/jogl/classes/com/jogamp/opengl/GLRendererQuirks.java b/src/jogl/classes/com/jogamp/opengl/GLRendererQuirks.java index ee77f8d2d..9c9129ae6 100644 --- a/src/jogl/classes/com/jogamp/opengl/GLRendererQuirks.java +++ b/src/jogl/classes/com/jogamp/opengl/GLRendererQuirks.java @@ -262,6 +262,7 @@ public class GLRendererQuirks { return sb; } + @Override public final String toString() { return toString(null).toString(); } diff --git a/src/jogl/classes/com/jogamp/opengl/cg/CgDynamicLibraryBundleInfo.java b/src/jogl/classes/com/jogamp/opengl/cg/CgDynamicLibraryBundleInfo.java index 8d2d07d58..4270607f2 100644 --- a/src/jogl/classes/com/jogamp/opengl/cg/CgDynamicLibraryBundleInfo.java +++ b/src/jogl/classes/com/jogamp/opengl/cg/CgDynamicLibraryBundleInfo.java @@ -43,6 +43,7 @@ public final class CgDynamicLibraryBundleInfo implements DynamicLibraryBundleInf private static final List glueLibNames; static { AccessController.doPrivileged(new PrivilegedAction() { + @Override public Object run() { Platform.initSingleton(); diff --git a/src/jogl/classes/com/jogamp/opengl/math/geom/AABBox.java b/src/jogl/classes/com/jogamp/opengl/math/geom/AABBox.java index f1880a61b..d48677da5 100644 --- a/src/jogl/classes/com/jogamp/opengl/math/geom/AABBox.java +++ b/src/jogl/classes/com/jogamp/opengl/math/geom/AABBox.java @@ -333,10 +333,12 @@ public class AABBox implements Cloneable { return high[2] - low[2]; } + @Override public final AABBox clone() { return new AABBox(this.low, this.high); } + @Override public final boolean equals(Object obj) { if( obj == this ) { return true; @@ -349,6 +351,7 @@ public class AABBox implements Cloneable { VectorUtil.checkEquality(high, other.high) ; } + @Override public final String toString() { return "[ "+low[0]+"/"+low[1]+"/"+low[1]+" .. "+high[0]+"/"+high[0]+"/"+high[0]+", ctr "+ center[0]+"/"+center[1]+"/"+center[1]+" ]"; diff --git a/src/jogl/classes/com/jogamp/opengl/swt/GLCanvas.java b/src/jogl/classes/com/jogamp/opengl/swt/GLCanvas.java index 33941a407..1a3e1e0c0 100644 --- a/src/jogl/classes/com/jogamp/opengl/swt/GLCanvas.java +++ b/src/jogl/classes/com/jogamp/opengl/swt/GLCanvas.java @@ -286,6 +286,7 @@ public class GLCanvas extends Canvas implements GLAutoDrawable { final GLCapabilitiesChooser chooser, final GLContext shareWith) { final GLCanvas[] res = new GLCanvas[] { null }; parent.getDisplay().syncExec(new Runnable() { + @Override public void run() { res[0] = new GLCanvas( parent, style, caps, chooser, shareWith ); } diff --git a/src/jogl/classes/com/jogamp/opengl/util/AWTAnimatorImpl.java b/src/jogl/classes/com/jogamp/opengl/util/AWTAnimatorImpl.java index 80289acf3..d0de3b3a0 100644 --- a/src/jogl/classes/com/jogamp/opengl/util/AWTAnimatorImpl.java +++ b/src/jogl/classes/com/jogamp/opengl/util/AWTAnimatorImpl.java @@ -58,6 +58,7 @@ class AWTAnimatorImpl implements AnimatorBase.AnimatorImpl { private Map repaintManagers = new IdentityHashMap(); private Map dirtyRegions = new IdentityHashMap(); + @Override public void display(ArrayList drawables, boolean ignoreExceptions, boolean printExceptions) { @@ -97,6 +98,7 @@ class AWTAnimatorImpl implements AnimatorBase.AnimatorImpl { // Uses RepaintManager APIs to implement more efficient redrawing of // the Swing widgets we're animating private Runnable drawWithRepaintManagerRunnable = new Runnable() { + @Override public void run() { for (Iterator iter = lightweights.iterator(); iter.hasNext(); ) { JComponent comp = iter.next(); @@ -164,6 +166,7 @@ class AWTAnimatorImpl implements AnimatorBase.AnimatorImpl { } }; + @Override public boolean blockUntilDone(Thread thread) { return Thread.currentThread() != thread && !EventQueue.isDispatchThread(); } diff --git a/src/jogl/classes/com/jogamp/opengl/util/Animator.java b/src/jogl/classes/com/jogamp/opengl/util/Animator.java index cdfb73b21..27b9427eb 100644 --- a/src/jogl/classes/com/jogamp/opengl/util/Animator.java +++ b/src/jogl/classes/com/jogamp/opengl/util/Animator.java @@ -109,6 +109,7 @@ public class Animator extends AnimatorBase { } } + @Override protected String getBaseName(String prefix) { return prefix + "Animator" ; } @@ -138,10 +139,12 @@ public class Animator extends AnimatorBase { } class MainLoop implements Runnable { + @Override public String toString() { return "[started "+isStartedImpl()+", animating "+isAnimatingImpl()+", paused "+isPausedImpl()+", drawable "+drawables.size()+", drawablesEmpty "+drawablesEmpty+"]"; } + @Override public void run() { try { if(DEBUG) { @@ -228,6 +231,7 @@ public class Animator extends AnimatorBase { private final boolean isAnimatingImpl() { return animThread != null && isAnimating ; } + @Override public final boolean isAnimating() { stateSync.lock(); try { @@ -240,6 +244,7 @@ public class Animator extends AnimatorBase { private final boolean isPausedImpl() { return animThread != null && pauseIssued ; } + @Override public final boolean isPaused() { stateSync.lock(); try { @@ -262,6 +267,7 @@ public class Animator extends AnimatorBase { threadGroup = tg; } + @Override public synchronized boolean start() { if ( isStartedImpl() ) { return false; @@ -286,10 +292,12 @@ public class Animator extends AnimatorBase { return finishLifecycleAction(waitForStartedCondition, 0); } private final Condition waitForStartedCondition = new Condition() { + @Override public boolean eval() { return !isStartedImpl() || (!drawablesEmpty && !isAnimating) ; } }; + @Override public synchronized boolean stop() { if ( !isStartedImpl() ) { return false; @@ -298,10 +306,12 @@ public class Animator extends AnimatorBase { return finishLifecycleAction(waitForStoppedCondition, 0); } private final Condition waitForStoppedCondition = new Condition() { + @Override public boolean eval() { return isStartedImpl(); } }; + @Override public synchronized boolean pause() { if ( !isStartedImpl() || pauseIssued ) { return false; @@ -310,11 +320,13 @@ public class Animator extends AnimatorBase { return finishLifecycleAction(waitForPausedCondition, 0); } private final Condition waitForPausedCondition = new Condition() { + @Override public boolean eval() { // end waiting if stopped as well return isStartedImpl() && isAnimating; } }; + @Override public synchronized boolean resume() { if ( !isStartedImpl() || !pauseIssued ) { return false; @@ -323,6 +335,7 @@ public class Animator extends AnimatorBase { return finishLifecycleAction(waitForResumeCondition, 0); } private final Condition waitForResumeCondition = new Condition() { + @Override public boolean eval() { // end waiting if stopped as well return isStartedImpl() && ( !drawablesEmpty && !isAnimating || drawablesEmpty && !pauseIssued ) ; diff --git a/src/jogl/classes/com/jogamp/opengl/util/AnimatorBase.java b/src/jogl/classes/com/jogamp/opengl/util/AnimatorBase.java index b447a339b..f6ee3376f 100644 --- a/src/jogl/classes/com/jogamp/opengl/util/AnimatorBase.java +++ b/src/jogl/classes/com/jogamp/opengl/util/AnimatorBase.java @@ -194,6 +194,7 @@ public abstract class AnimatorBase implements GLAnimatorControl { resume(); } final Condition waitForAnimatingAndECTCondition = new Condition() { + @Override public boolean eval() { final Thread dect = drawable.getExclusiveContextThread(); return isStarted() && !isPaused() && !isAnimating() && ( exclusiveContext && null == dect || !exclusiveContext && null != dect ); @@ -217,6 +218,7 @@ public abstract class AnimatorBase implements GLAnimatorControl { if( exclusiveContext && isAnimating() ) { drawable.setExclusiveContextThread( null ); final Condition waitForNullECTCondition = new Condition() { + @Override public boolean eval() { return null != drawable.getExclusiveContextThread(); } }; @@ -240,6 +242,7 @@ public abstract class AnimatorBase implements GLAnimatorControl { notifyAll(); } private final Condition waitForNotAnimatingIfEmptyCondition = new Condition() { + @Override public boolean eval() { return isStarted() && drawablesEmpty && isAnimating(); } }; @@ -577,6 +580,7 @@ public abstract class AnimatorBase implements GLAnimatorControl { protected static String getThreadName() { return Thread.currentThread().getName(); } + @Override public String toString() { return getClass().getName()+"[started "+isStarted()+", animating "+isAnimating()+", paused "+isPaused()+", drawable "+drawables.size()+ ", totals[dt "+getTotalFPSDuration()+", frames "+getTotalFPSFrames()+", fps "+getTotalFPS()+ diff --git a/src/jogl/classes/com/jogamp/opengl/util/DefaultAnimatorImpl.java b/src/jogl/classes/com/jogamp/opengl/util/DefaultAnimatorImpl.java index 0477e1903..a9c6e6456 100644 --- a/src/jogl/classes/com/jogamp/opengl/util/DefaultAnimatorImpl.java +++ b/src/jogl/classes/com/jogamp/opengl/util/DefaultAnimatorImpl.java @@ -41,6 +41,7 @@ import javax.media.opengl.GLAutoDrawable; up this behavior if desired. */ class DefaultAnimatorImpl implements AnimatorBase.AnimatorImpl { + @Override public void display(ArrayList drawables, boolean ignoreExceptions, boolean printExceptions) { @@ -60,6 +61,7 @@ class DefaultAnimatorImpl implements AnimatorBase.AnimatorImpl { } } + @Override public boolean blockUntilDone(Thread thread) { return Thread.currentThread() != thread; } diff --git a/src/jogl/classes/com/jogamp/opengl/util/FPSAnimator.java b/src/jogl/classes/com/jogamp/opengl/util/FPSAnimator.java index b48169c27..351c47e7e 100644 --- a/src/jogl/classes/com/jogamp/opengl/util/FPSAnimator.java +++ b/src/jogl/classes/com/jogamp/opengl/util/FPSAnimator.java @@ -64,6 +64,7 @@ public class FPSAnimator extends AnimatorBase { private volatile boolean shouldRun; // MainTask trigger private volatile boolean shouldStop; // MainTask trigger + @Override protected String getBaseName(String prefix) { return "FPS" + prefix + "Animator" ; } @@ -140,10 +141,12 @@ public class FPSAnimator extends AnimatorBase { public boolean isActive() { return !alreadyStopped && !alreadyPaused; } + @Override public String toString() { return "Task[thread "+animThread+", stopped "+alreadyStopped+", paused "+alreadyPaused+" shouldRun "+shouldRun+", shouldStop "+shouldStop+" -- started "+isStartedImpl()+", animating "+isAnimatingImpl()+", paused "+isPausedImpl()+", drawable "+drawables.size()+", drawablesEmpty "+drawablesEmpty+"]"; } + @Override public void run() { if( justStarted ) { justStarted = false; @@ -208,6 +211,7 @@ public class FPSAnimator extends AnimatorBase { private final boolean isAnimatingImpl() { return animThread != null && isAnimating ; } + @Override public final boolean isAnimating() { stateSync.lock(); try { @@ -220,6 +224,7 @@ public class FPSAnimator extends AnimatorBase { private final boolean isPausedImpl() { return animThread != null && ( !shouldRun && !shouldStop ) ; } + @Override public final boolean isPaused() { stateSync.lock(); try { @@ -231,6 +236,7 @@ public class FPSAnimator extends AnimatorBase { static int timerNo = 0; + @Override public synchronized boolean start() { if ( null != timer || null != task || isStartedImpl() ) { return false; @@ -254,10 +260,12 @@ public class FPSAnimator extends AnimatorBase { return res; } private final Condition waitForStartedAddedCondition = new Condition() { + @Override public boolean eval() { return !isStartedImpl() || !isAnimating ; } }; private final Condition waitForStartedEmptyCondition = new Condition() { + @Override public boolean eval() { return !isStartedImpl() || isAnimating ; } }; @@ -265,6 +273,7 @@ public class FPSAnimator extends AnimatorBase { /** Stops this FPSAnimator. Due to the implementation of the FPSAnimator it is not guaranteed that the FPSAnimator will be completely stopped by the time this method returns. */ + @Override public synchronized boolean stop() { if ( null == timer || !isStartedImpl() ) { return false; @@ -297,10 +306,12 @@ public class FPSAnimator extends AnimatorBase { return res; } private final Condition waitForStoppedCondition = new Condition() { + @Override public boolean eval() { return isStartedImpl(); } }; + @Override public synchronized boolean pause() { if ( !isStartedImpl() || ( null != task && isPausedImpl() ) ) { return false; @@ -327,11 +338,13 @@ public class FPSAnimator extends AnimatorBase { return res; } private final Condition waitForPausedCondition = new Condition() { + @Override public boolean eval() { // end waiting if stopped as well return isAnimating && isStartedImpl(); } }; + @Override public synchronized boolean resume() { if ( null != task || !isStartedImpl() || !isPausedImpl() ) { return false; @@ -353,6 +366,7 @@ public class FPSAnimator extends AnimatorBase { return res; } private final Condition waitForResumeCondition = new Condition() { + @Override public boolean eval() { // end waiting if stopped as well return !drawablesEmpty && !isAnimating && isStartedImpl(); diff --git a/src/jogl/classes/com/jogamp/opengl/util/GLArrayDataClient.java b/src/jogl/classes/com/jogamp/opengl/util/GLArrayDataClient.java index 2d685a1a8..f480c4bde 100644 --- a/src/jogl/classes/com/jogamp/opengl/util/GLArrayDataClient.java +++ b/src/jogl/classes/com/jogamp/opengl/util/GLArrayDataClient.java @@ -321,6 +321,7 @@ public class GLArrayDataClient extends GLArrayDataWrapper implements GLArrayData Buffers.putf(buffer, v); } + @Override public String toString() { return "GLArrayDataClient["+name+ ", index "+index+ diff --git a/src/jogl/classes/com/jogamp/opengl/util/GLArrayDataEditable.java b/src/jogl/classes/com/jogamp/opengl/util/GLArrayDataEditable.java index 701f88e59..9a0f1cb37 100644 --- a/src/jogl/classes/com/jogamp/opengl/util/GLArrayDataEditable.java +++ b/src/jogl/classes/com/jogamp/opengl/util/GLArrayDataEditable.java @@ -31,6 +31,7 @@ public interface GLArrayDataEditable extends GLArrayData { // Data and GL state modification .. // + @Override public void destroy(GL gl); public void reset(GL gl); diff --git a/src/jogl/classes/com/jogamp/opengl/util/GLArrayDataServer.java b/src/jogl/classes/com/jogamp/opengl/util/GLArrayDataServer.java index 80639c5c7..e30fea2f4 100644 --- a/src/jogl/classes/com/jogamp/opengl/util/GLArrayDataServer.java +++ b/src/jogl/classes/com/jogamp/opengl/util/GLArrayDataServer.java @@ -327,6 +327,7 @@ public class GLArrayDataServer extends GLArrayDataClient implements GLArrayDataE // Data and GL state modification .. // + @Override public void destroy(GL gl) { // super.destroy(gl): // - GLArrayDataClient.destroy(gl): disables & clears client-side buffer @@ -349,11 +350,13 @@ public class GLArrayDataServer extends GLArrayDataClient implements GLArrayDataE * switch to client side data one * Only possible if buffer is defined. */ + @Override public void setVBOEnabled(boolean vboUsage) { checkSeal(false); super.setVBOEnabled(vboUsage); } + @Override public String toString() { return "GLArrayDataServer["+name+ ", index "+index+ @@ -384,6 +387,7 @@ public class GLArrayDataServer extends GLArrayDataClient implements GLArrayDataE // non public matters .. // + @Override protected void init(String name, int index, int comps, int dataType, boolean normalized, int stride, Buffer data, int initialElementCount, boolean isVertexAttribute, GLArrayHandler glArrayHandler, @@ -396,6 +400,7 @@ public class GLArrayDataServer extends GLArrayDataClient implements GLArrayDataE vboEnabled=true; } + @Override protected void init_vbo(GL gl) { super.init_vbo(gl); if(vboEnabled && vboName==0) { diff --git a/src/jogl/classes/com/jogamp/opengl/util/GLPixelBuffer.java b/src/jogl/classes/com/jogamp/opengl/util/GLPixelBuffer.java index f0c6be44f..50124c349 100644 --- a/src/jogl/classes/com/jogamp/opengl/util/GLPixelBuffer.java +++ b/src/jogl/classes/com/jogamp/opengl/util/GLPixelBuffer.java @@ -216,6 +216,7 @@ public class GLPixelBuffer { } } } + @Override public String toString() { return "PixelAttributes[comp "+componentCount+", fmt 0x"+Integer.toHexString(format)+", type 0x"+Integer.toHexString(type)+", bytesPerPixel "+bytesPerPixel+"]"; } @@ -258,6 +259,7 @@ public class GLPixelBuffer { .append(", buffer[bytes ").append(byteSize).append(", elemSize ").append(bufferElemSize).append(", ").append(buffer).append("]"); return sb; } + @Override public String toString() { return "GLPixelBuffer["+toString(null).toString()+"]"; } diff --git a/src/jogl/classes/com/jogamp/opengl/util/ImmModeSink.java b/src/jogl/classes/com/jogamp/opengl/util/ImmModeSink.java index 697b7cca0..986f6d8d3 100644 --- a/src/jogl/classes/com/jogamp/opengl/util/ImmModeSink.java +++ b/src/jogl/classes/com/jogamp/opengl/util/ImmModeSink.java @@ -173,6 +173,7 @@ public class ImmModeSink { vboSet.reset(gl); } + @Override public String toString() { StringBuilder sb = new StringBuilder("ImmModeSink["); sb.append(",\n\tVBO list: "+vboSetList.size()+" ["); @@ -1236,6 +1237,7 @@ public class ImmModeSink { } } + @Override public String toString() { final String glslS = useGLSL ? ", useShaderState "+(null!=shaderState)+ diff --git a/src/jogl/classes/com/jogamp/opengl/util/PMVMatrix.java b/src/jogl/classes/com/jogamp/opengl/util/PMVMatrix.java index b4a0156e9..218897ffe 100644 --- a/src/jogl/classes/com/jogamp/opengl/util/PMVMatrix.java +++ b/src/jogl/classes/com/jogamp/opengl/util/PMVMatrix.java @@ -897,6 +897,7 @@ public class PMVMatrix implements GLMatrixFunc { return sb; } + @Override public String toString() { return toString(null, "%10.5f").toString(); } diff --git a/src/jogl/classes/com/jogamp/opengl/util/TileRendererBase.java b/src/jogl/classes/com/jogamp/opengl/util/TileRendererBase.java index ff7cc5516..2ac4b1f82 100644 --- a/src/jogl/classes/com/jogamp/opengl/util/TileRendererBase.java +++ b/src/jogl/classes/com/jogamp/opengl/util/TileRendererBase.java @@ -244,6 +244,7 @@ public abstract class TileRendererBase { sb.append(", isSetup "+isSetup()); return sb; } + @Override public String toString() { StringBuilder sb = new StringBuilder(); return getClass().getSimpleName()+ diff --git a/src/jogl/classes/com/jogamp/opengl/util/TimeFrameI.java b/src/jogl/classes/com/jogamp/opengl/util/TimeFrameI.java index 45f5d2694..b29846d91 100644 --- a/src/jogl/classes/com/jogamp/opengl/util/TimeFrameI.java +++ b/src/jogl/classes/com/jogamp/opengl/util/TimeFrameI.java @@ -74,6 +74,7 @@ public class TimeFrameI { /** Set this frame's duration in milliseconds. */ public final void setDuration(int duration) { this.duration = duration; } + @Override public String toString() { return "TimeFrame[pts " + pts + " ms, l " + duration + " ms]"; } diff --git a/src/jogl/classes/com/jogamp/opengl/util/av/AudioSink.java b/src/jogl/classes/com/jogamp/opengl/util/av/AudioSink.java index dffdfae8e..b964245ad 100644 --- a/src/jogl/classes/com/jogamp/opengl/util/av/AudioSink.java +++ b/src/jogl/classes/com/jogamp/opengl/util/av/AudioSink.java @@ -193,6 +193,7 @@ public interface AudioSink { return ( byteCount << 3 ) / sampleSize; } + @Override public String toString() { return "AudioDataFormat[sampleRate "+sampleRate+", sampleSize "+sampleSize+", channelCount "+channelCount+ ", signed "+signed+", fixedP "+fixedP+", "+(planar?"planar":"packed")+", "+(littleEndian?"little":"big")+"-endian]"; } @@ -217,6 +218,7 @@ public interface AudioSink { /** Set this frame's size in bytes. */ public final void setByteSize(int size) { this.byteSize=size; } + @Override public String toString() { return "AudioFrame[pts " + pts + " ms, l " + duration + " ms, "+byteSize + " bytes]"; } @@ -235,6 +237,7 @@ public interface AudioSink { /** Get this frame's data. */ public final ByteBuffer getData() { return data; } + @Override public String toString() { return "AudioDataFrame[pts " + pts + " ms, l " + duration + " ms, "+byteSize + " bytes, " + data + "]"; } diff --git a/src/jogl/classes/com/jogamp/opengl/util/av/GLMediaPlayer.java b/src/jogl/classes/com/jogamp/opengl/util/av/GLMediaPlayer.java index db6f5fdee..3f6b78d7e 100644 --- a/src/jogl/classes/com/jogamp/opengl/util/av/GLMediaPlayer.java +++ b/src/jogl/classes/com/jogamp/opengl/util/av/GLMediaPlayer.java @@ -609,6 +609,7 @@ public interface GLMediaPlayer extends TextureSequence { public int getHeight(); /** Returns a string represantation of this player, incl. state and audio/video details. */ + @Override public String toString(); /** Returns a string represantation of this player's performance values. */ diff --git a/src/jogl/classes/com/jogamp/opengl/util/awt/AWTGLPixelBuffer.java b/src/jogl/classes/com/jogamp/opengl/util/awt/AWTGLPixelBuffer.java index fb2bdbbcb..77b14b424 100644 --- a/src/jogl/classes/com/jogamp/opengl/util/awt/AWTGLPixelBuffer.java +++ b/src/jogl/classes/com/jogamp/opengl/util/awt/AWTGLPixelBuffer.java @@ -117,11 +117,13 @@ public class AWTGLPixelBuffer extends GLPixelBuffer { return new BufferedImage (cm, raster1, cm.isAlphaPremultiplied(), null); } + @Override public StringBuilder toString(StringBuilder sb) { sb = super.toString(sb); sb.append(", allowRowStride ").append(allowRowStride).append(", image [").append(image.getWidth()).append("x").append(image.getHeight()).append(", ").append(image.toString()).append("]"); return sb; } + @Override public String toString() { return "AWTGLPixelBuffer["+toString(null).toString()+"]"; } @@ -213,6 +215,7 @@ public class AWTGLPixelBuffer extends GLPixelBuffer { } /** Return the last {@link #allocate(GL, GLPixelAttributes, int, int, int, boolean, int) allocated} {@link AWTGLPixelBuffer} w/ {@link GLPixelAttributes#componentCount}. */ + @Override public AWTGLPixelBuffer getSingleBuffer(GLPixelAttributes pixelAttributes) { return 4 == pixelAttributes.componentCount ? singleRGBA4 : singleRGB3; } @@ -221,6 +224,7 @@ public class AWTGLPixelBuffer extends GLPixelBuffer { * Initializes the single {@link AWTGLPixelBuffer} w/ a given size, if not yet {@link #allocate(GL, GLPixelAttributes, int, int, int, boolean, int) allocated}. * @return the newly initialized single {@link AWTGLPixelBuffer}, or null if already allocated. */ + @Override public AWTGLPixelBuffer initSingleton(int componentCount, int width, int height, int depth, boolean pack) { if( 4 == componentCount ) { if( null != singleRGBA4 ) { diff --git a/src/jogl/classes/com/jogamp/opengl/util/awt/TextRenderer.java b/src/jogl/classes/com/jogamp/opengl/util/awt/TextRenderer.java index 6e504c089..73d06cae0 100644 --- a/src/jogl/classes/com/jogamp/opengl/util/awt/TextRenderer.java +++ b/src/jogl/classes/com/jogamp/opengl/util/awt/TextRenderer.java @@ -755,6 +755,7 @@ public class TextRenderer { // Iterate through the contents of the backing store, removing // text strings that haven't been used recently packer.visit(new RectVisitor() { + @Override public void visit(Rect rect) { TextData data = (TextData) rect.getUserData(); @@ -914,11 +915,13 @@ public class TextRenderer { final FPSAnimator anim = new FPSAnimator(dbgCanvas, 10); dbgFrame.addWindowListener(new WindowAdapter() { + @Override public void windowClosing(WindowEvent e) { // Run this on another thread than the AWT event queue to // make sure the call to Animator.stop() completes before // exiting new Thread(new Runnable() { + @Override public void run() { anim.stop(); } @@ -1009,12 +1012,14 @@ public class TextRenderer { mCurrentIndex = 0; } + @Override public char last() { mCurrentIndex = Math.max(0, mLength - 1); return current(); } + @Override public char current() { if ((mLength == 0) || (mCurrentIndex >= mLength)) { return CharacterIterator.DONE; @@ -1023,36 +1028,43 @@ public class TextRenderer { return mSequence.charAt(mCurrentIndex); } + @Override public char next() { mCurrentIndex++; return current(); } + @Override public char previous() { mCurrentIndex = Math.max(mCurrentIndex - 1, 0); return current(); } + @Override public char setIndex(int position) { mCurrentIndex = position; return current(); } + @Override public int getBeginIndex() { return 0; } + @Override public int getEndIndex() { return mLength; } + @Override public int getIndex() { return mCurrentIndex; } + @Override public Object clone() { CharSequenceIterator iter = new CharSequenceIterator(mSequence); iter.mCurrentIndex = mCurrentIndex; @@ -1060,6 +1072,7 @@ public class TextRenderer { return iter; } + @Override public char first() { if (mLength == 0) { return CharacterIterator.DONE; @@ -1143,6 +1156,7 @@ public class TextRenderer { class Manager implements BackingStoreManager { private Graphics2D g; + @Override public Object allocateBackingStore(int w, int h) { // FIXME: should consider checking Font's attributes to see // whether we're likely to need to support a full RGBA backing @@ -1165,10 +1179,12 @@ public class TextRenderer { return renderer; } + @Override public void deleteBackingStore(Object backingStore) { ((TextureRenderer) backingStore).dispose(); } + @Override public boolean preExpand(Rect cause, int attemptNumber) { // Only try this one time; clear out potentially obsolete entries // NOTE: this heuristic and the fact that it clears the used bit @@ -1204,6 +1220,7 @@ public class TextRenderer { return false; } + @Override public boolean additionFailed(Rect cause, int attemptNumber) { // Heavy hammer -- might consider doing something different packer.clear(); @@ -1222,10 +1239,12 @@ public class TextRenderer { return false; } + @Override public boolean canCompact() { return true; } + @Override public void beginMovement(Object oldBackingStore, Object newBackingStore) { // Exit the begin / end pair if necessary if (inBeginEndPair) { @@ -1259,6 +1278,7 @@ public class TextRenderer { g = newRenderer.createGraphics(); } + @Override public void move(Object oldBackingStore, Rect oldLocation, Object newBackingStore, Rect newLocation) { TextureRenderer oldRenderer = (TextureRenderer) oldBackingStore; @@ -1280,6 +1300,7 @@ public class TextRenderer { } } + @Override public void endMovement(Object oldBackingStore, Object newBackingStore) { g.dispose(); @@ -1316,10 +1337,12 @@ public class TextRenderer { } public static class DefaultRenderDelegate implements RenderDelegate { + @Override public boolean intensityOnly() { return true; } + @Override public Rectangle2D getBounds(CharSequence str, Font font, FontRenderContext frc) { return getBounds(font.createGlyphVector(frc, @@ -1327,20 +1350,24 @@ public class TextRenderer { frc); } + @Override public Rectangle2D getBounds(String str, Font font, FontRenderContext frc) { return getBounds(font.createGlyphVector(frc, str), frc); } + @Override public Rectangle2D getBounds(GlyphVector gv, FontRenderContext frc) { return gv.getVisualBounds(); } + @Override public void drawGlyphVector(Graphics2D graphics, GlyphVector str, int x, int y) { graphics.drawGlyphVector(str, x, y); } + @Override public void draw(Graphics2D graphics, String str, int x, int y) { graphics.drawString(str, x, y); } @@ -1896,6 +1923,7 @@ public class TextRenderer { this.frame = frame; } + @Override public void display(GLAutoDrawable drawable) { GL2 gl = GLContext.getCurrentGL().getGL2(); gl.glClear(GL2.GL_DEPTH_BUFFER_BIT | GL2.GL_COLOR_BUFFER_BIT); @@ -1913,6 +1941,7 @@ public class TextRenderer { if ((frame.getWidth() != w) || (frame.getHeight() != h)) { EventQueue.invokeLater(new Runnable() { + @Override public void run() { frame.setSize(w, h); } @@ -1920,6 +1949,7 @@ public class TextRenderer { } } + @Override public void dispose(GLAutoDrawable drawable) { glu.destroy(); glu=null; @@ -1927,9 +1957,11 @@ public class TextRenderer { } // Unused methods + @Override public void init(GLAutoDrawable drawable) { } + @Override public void reshape(GLAutoDrawable drawable, int x, int y, int width, int height) { } diff --git a/src/jogl/classes/com/jogamp/opengl/util/glsl/ShaderCode.java b/src/jogl/classes/com/jogamp/opengl/util/glsl/ShaderCode.java index 68c1d0fec..6f16cc4fe 100644 --- a/src/jogl/classes/com/jogamp/opengl/util/glsl/ShaderCode.java +++ b/src/jogl/classes/com/jogamp/opengl/util/glsl/ShaderCode.java @@ -514,6 +514,7 @@ public class ShaderCode { id=-1; } + @Override public boolean equals(Object obj) { if(this==obj) { return true; } if(obj instanceof ShaderCode) { @@ -521,9 +522,11 @@ public class ShaderCode { } return false; } + @Override public int hashCode() { return id; } + @Override public String toString() { StringBuilder buf = new StringBuilder("ShaderCode[id="+id+", type="+shaderTypeStr()+", valid="+valid+", shader: "); for(int i=0; i= other.h()); } + @Override public String toString() { return "[Rect x: " + x() + " y: " + y() + " w: " + w() + " h: " + h() + "]"; } diff --git a/src/jogl/classes/com/jogamp/opengl/util/packrect/RectanglePacker.java b/src/jogl/classes/com/jogamp/opengl/util/packrect/RectanglePacker.java index a9d609745..2ee6a79b3 100644 --- a/src/jogl/classes/com/jogamp/opengl/util/packrect/RectanglePacker.java +++ b/src/jogl/classes/com/jogamp/opengl/util/packrect/RectanglePacker.java @@ -61,12 +61,14 @@ public class RectanglePacker { private int maxHeight = -1; static class RectHComparator implements Comparator { + @Override public int compare(Object o1, Object o2) { Rect r1 = (Rect) o1; Rect r2 = (Rect) o2; return r2.h() - r1.h(); } + @Override public boolean equals(Object obj) { return this == obj; } diff --git a/src/jogl/classes/com/jogamp/opengl/util/texture/Texture.java b/src/jogl/classes/com/jogamp/opengl/util/texture/Texture.java index fd026d76e..584cacf8c 100644 --- a/src/jogl/classes/com/jogamp/opengl/util/texture/Texture.java +++ b/src/jogl/classes/com/jogamp/opengl/util/texture/Texture.java @@ -188,6 +188,7 @@ public class Texture { /** The texture coordinates corresponding to the entire image. */ private TextureCoords coords; + @Override public String toString() { return "Texture[target 0x"+Integer.toHexString(target)+", name "+texID+", "+ imgWidth+"/"+texWidth+" x "+imgHeight+"/"+texHeight+", y-flip "+mustFlipVertically+ diff --git a/src/jogl/classes/com/jogamp/opengl/util/texture/TextureCoords.java b/src/jogl/classes/com/jogamp/opengl/util/texture/TextureCoords.java index 63f100630..ba59f89c5 100644 --- a/src/jogl/classes/com/jogamp/opengl/util/texture/TextureCoords.java +++ b/src/jogl/classes/com/jogamp/opengl/util/texture/TextureCoords.java @@ -94,5 +94,6 @@ public class TextureCoords { rectangle. */ public float top() { return top; } + @Override public String toString() { return "TexCoord[h: "+left+" - "+right+", v: "+bottom+" - "+top+"]"; } } diff --git a/src/jogl/classes/com/jogamp/opengl/util/texture/TextureData.java b/src/jogl/classes/com/jogamp/opengl/util/texture/TextureData.java index 28029efc5..5d88a76c0 100644 --- a/src/jogl/classes/com/jogamp/opengl/util/texture/TextureData.java +++ b/src/jogl/classes/com/jogamp/opengl/util/texture/TextureData.java @@ -499,6 +499,7 @@ public class TextureData { public void flush(); } + @Override public String toString() { return "TextureData["+width+"x"+height+", y-flip "+mustFlipVertically+", internFormat 0x"+Integer.toHexString(internalFormat)+", "+ pixelAttributes+", border "+border+", estSize "+estimatedMemorySize+", alignment "+alignment+", rowlen "+rowLength; diff --git a/src/jogl/classes/com/jogamp/opengl/util/texture/TextureIO.java b/src/jogl/classes/com/jogamp/opengl/util/texture/TextureIO.java index b6d89d6d2..67ab5176d 100644 --- a/src/jogl/classes/com/jogamp/opengl/util/texture/TextureIO.java +++ b/src/jogl/classes/com/jogamp/opengl/util/texture/TextureIO.java @@ -914,6 +914,7 @@ public class TextureIO { //---------------------------------------------------------------------- // DDS provider -- supports files only for now static class DDSTextureProvider implements TextureProvider { + @Override public TextureData newTextureData(GLProfile glp, File file, int internalFormat, int pixelFormat, @@ -928,6 +929,7 @@ public class TextureIO { return null; } + @Override public TextureData newTextureData(GLProfile glp, InputStream stream, int internalFormat, int pixelFormat, @@ -944,6 +946,7 @@ public class TextureIO { return null; } + @Override public TextureData newTextureData(GLProfile glp, URL url, int internalFormat, int pixelFormat, @@ -999,6 +1002,7 @@ public class TextureIO { } } TextureData.Flusher flusher = new TextureData.Flusher() { + @Override public void flush() { image.close(); } @@ -1042,6 +1046,7 @@ public class TextureIO { //---------------------------------------------------------------------- // Base class for SGI RGB and TGA image providers static abstract class StreamBasedTextureProvider implements TextureProvider { + @Override public TextureData newTextureData(GLProfile glp, File file, int internalFormat, int pixelFormat, @@ -1062,6 +1067,7 @@ public class TextureIO { } } + @Override public TextureData newTextureData(GLProfile glp, URL url, int internalFormat, int pixelFormat, @@ -1079,6 +1085,7 @@ public class TextureIO { //---------------------------------------------------------------------- // SGI RGB image provider static class SGITextureProvider extends StreamBasedTextureProvider { + @Override public TextureData newTextureData(GLProfile glp, InputStream stream, int internalFormat, int pixelFormat, @@ -1114,6 +1121,7 @@ public class TextureIO { //---------------------------------------------------------------------- // TGA (Targa) image provider static class TGATextureProvider extends StreamBasedTextureProvider { + @Override public TextureData newTextureData(GLProfile glp, InputStream stream, int internalFormat, int pixelFormat, @@ -1151,6 +1159,7 @@ public class TextureIO { //---------------------------------------------------------------------- // PNG image provider static class PNGTextureProvider extends StreamBasedTextureProvider { + @Override public TextureData newTextureData(GLProfile glp, InputStream stream, int internalFormat, int pixelFormat, @@ -1188,6 +1197,7 @@ public class TextureIO { //---------------------------------------------------------------------- // JPEG image provider static class JPGTextureProvider extends StreamBasedTextureProvider { + @Override public TextureData newTextureData(GLProfile glp, InputStream stream, int internalFormat, int pixelFormat, @@ -1226,6 +1236,7 @@ public class TextureIO { // DDS texture writer // static class DDSTextureWriter implements TextureWriter { + @Override public boolean write(File file, TextureData data) throws IOException { if (DDS.equals(IOUtil.getFileSuffix(file))) { @@ -1276,6 +1287,7 @@ public class TextureIO { // SGI (rgb) texture writer // static class SGITextureWriter implements TextureWriter { + @Override public boolean write(File file, TextureData data) throws IOException { String fileSuffix = IOUtil.getFileSuffix(file); @@ -1321,6 +1333,7 @@ public class TextureIO { // TGA (Targa) texture writer static class TGATextureWriter implements TextureWriter { + @Override public boolean write(File file, TextureData data) throws IOException { if (TGA.equals(IOUtil.getFileSuffix(file))) { @@ -1371,6 +1384,7 @@ public class TextureIO { // PNG texture writer static class PNGTextureWriter implements TextureWriter { + @Override public boolean write(File file, TextureData data) throws IOException { if (PNG.equals(IOUtil.getFileSuffix(file))) { // See whether the PNG writer can handle this TextureData diff --git a/src/jogl/classes/com/jogamp/opengl/util/texture/TextureSequence.java b/src/jogl/classes/com/jogamp/opengl/util/texture/TextureSequence.java index e4f72abf0..c34e019c2 100644 --- a/src/jogl/classes/com/jogamp/opengl/util/texture/TextureSequence.java +++ b/src/jogl/classes/com/jogamp/opengl/util/texture/TextureSequence.java @@ -124,6 +124,7 @@ public interface TextureSequence { public final Texture getTexture() { return texture; } + @Override public String toString() { return "TextureFrame[pts " + pts + " ms, l " + duration + " ms, texID "+ (null != texture ? texture.getTextureObject() : 0) + "]"; } diff --git a/src/jogl/classes/com/jogamp/opengl/util/texture/TextureState.java b/src/jogl/classes/com/jogamp/opengl/util/texture/TextureState.java index c8437d07c..d8320c690 100644 --- a/src/jogl/classes/com/jogamp/opengl/util/texture/TextureState.java +++ b/src/jogl/classes/com/jogamp/opengl/util/texture/TextureState.java @@ -158,6 +158,7 @@ public class TextureState { public final int getWrapT() { return state[5]; } + @Override public final String toString() { return "TextureState[unit "+(state[0] - GL.GL_TEXTURE0)+", target "+toHexString(target)+ ": obj "+toHexString(state[1])+ diff --git a/src/jogl/classes/com/jogamp/opengl/util/texture/spi/JPEGImage.java b/src/jogl/classes/com/jogamp/opengl/util/texture/spi/JPEGImage.java index 471938754..2081788ba 100644 --- a/src/jogl/classes/com/jogamp/opengl/util/texture/spi/JPEGImage.java +++ b/src/jogl/classes/com/jogamp/opengl/util/texture/spi/JPEGImage.java @@ -112,6 +112,7 @@ public class JPEGImage { data.put(i++, Cr); } + @Override public String toString() { return "JPEGPixels["+width+"x"+height+", sourceComp "+sourceComponents+", sourceCS "+sourceCS+", storageCS "+storageCS+", storageComp "+storageComponents+"]"; } @@ -171,5 +172,6 @@ public class JPEGImage { (bottom-to-top) order for calls to glTexImage2D. */ public ByteBuffer getData() { return data; } + @Override public String toString() { return "JPEGImage["+pixelWidth+"x"+pixelHeight+", bytesPerPixel "+bytesPerPixel+", reversedChannels "+reversedChannels+", "+pixelStorage+", "+data+"]"; } } diff --git a/src/jogl/classes/com/jogamp/opengl/util/texture/spi/LEDataInputStream.java b/src/jogl/classes/com/jogamp/opengl/util/texture/spi/LEDataInputStream.java index 4020ab3c0..3c90d96e4 100644 --- a/src/jogl/classes/com/jogamp/opengl/util/texture/spi/LEDataInputStream.java +++ b/src/jogl/classes/com/jogamp/opengl/util/texture/spi/LEDataInputStream.java @@ -82,38 +82,45 @@ public class LEDataInputStream extends FilterInputStream implements DataInput dataIn = new DataInputStream(in); } + @Override public void close() throws IOException { dataIn.close(); // better close as we create it. // this will close underlying as well. } + @Override public synchronized final int read(byte b[]) throws IOException { return dataIn.read(b, 0, b.length); } + @Override public synchronized final int read(byte b[], int off, int len) throws IOException { int rl = dataIn.read(b, off, len); return rl; } + @Override public final void readFully(byte b[]) throws IOException { dataIn.readFully(b, 0, b.length); } + @Override public final void readFully(byte b[], int off, int len) throws IOException { dataIn.readFully(b, off, len); } + @Override public final int skipBytes(int n) throws IOException { return dataIn.skipBytes(n); } + @Override public final boolean readBoolean() throws IOException { int ch = dataIn.read(); @@ -122,6 +129,7 @@ public class LEDataInputStream extends FilterInputStream implements DataInput return (ch != 0); } + @Override public final byte readByte() throws IOException { int ch = dataIn.read(); @@ -130,6 +138,7 @@ public class LEDataInputStream extends FilterInputStream implements DataInput return (byte)(ch); } + @Override public final int readUnsignedByte() throws IOException { int ch = dataIn.read(); @@ -138,6 +147,7 @@ public class LEDataInputStream extends FilterInputStream implements DataInput return ch; } + @Override public final short readShort() throws IOException { int ch1 = dataIn.read(); @@ -147,6 +157,7 @@ public class LEDataInputStream extends FilterInputStream implements DataInput return (short)((ch1 << 0) + (ch2 << 8)); } + @Override public final int readUnsignedShort() throws IOException { int ch1 = dataIn.read(); @@ -156,6 +167,7 @@ public class LEDataInputStream extends FilterInputStream implements DataInput return (ch1 << 0) + (ch2 << 8); } + @Override public final char readChar() throws IOException { int ch1 = dataIn.read(); @@ -165,6 +177,7 @@ public class LEDataInputStream extends FilterInputStream implements DataInput return (char)((ch1 << 0) + (ch2 << 8)); } + @Override public final int readInt() throws IOException { int ch1 = dataIn.read(); @@ -176,6 +189,7 @@ public class LEDataInputStream extends FilterInputStream implements DataInput return ((ch1 << 0) + (ch2 << 8) + (ch3 << 16) + (ch4 << 24)); } + @Override public final long readLong() throws IOException { int i1 = readInt(); @@ -183,11 +197,13 @@ public class LEDataInputStream extends FilterInputStream implements DataInput return ((long)i1 & 0xFFFFFFFFL) + ((long)i2 << 32); } + @Override public final float readFloat() throws IOException { return Float.intBitsToFloat(readInt()); } + @Override public final double readDouble() throws IOException { return Double.longBitsToDouble(readLong()); @@ -197,6 +213,7 @@ public class LEDataInputStream extends FilterInputStream implements DataInput * dont call this it is not implemented. * @return empty new string **/ + @Override public final String readLine() throws IOException { return new String(); @@ -206,6 +223,7 @@ public class LEDataInputStream extends FilterInputStream implements DataInput * dont call this it is not implemented * @return empty new string **/ + @Override public final String readUTF() throws IOException { return new String(); diff --git a/src/jogl/classes/com/jogamp/opengl/util/texture/spi/LEDataOutputStream.java b/src/jogl/classes/com/jogamp/opengl/util/texture/spi/LEDataOutputStream.java index a7101a576..93b097500 100644 --- a/src/jogl/classes/com/jogamp/opengl/util/texture/spi/LEDataOutputStream.java +++ b/src/jogl/classes/com/jogamp/opengl/util/texture/spi/LEDataOutputStream.java @@ -78,43 +78,51 @@ public class LEDataOutputStream extends FilterOutputStream implements DataOutput dataOut = new DataOutputStream(out); } + @Override public void close() throws IOException { dataOut.close(); // better close as we create it. // this will close underlying as well. } + @Override public synchronized final void write(byte b[]) throws IOException { dataOut.write(b, 0, b.length); } + @Override public synchronized final void write(byte b[], int off, int len) throws IOException { dataOut.write(b, off, len); } + @Override public final void write(int b) throws IOException { dataOut.write(b); } + @Override public final void writeBoolean(boolean v) throws IOException { dataOut.writeBoolean(v); } + @Override public final void writeByte(int v) throws IOException { dataOut.writeByte(v); } /** Don't call this -- not implemented */ + @Override public final void writeBytes(String s) throws IOException { throw new UnsupportedOperationException(); } + @Override public final void writeChar(int v) throws IOException { dataOut.writeChar(((v >> 8) & 0xff) | @@ -122,21 +130,25 @@ public class LEDataOutputStream extends FilterOutputStream implements DataOutput } /** Don't call this -- not implemented */ + @Override public final void writeChars(String s) throws IOException { throw new UnsupportedOperationException(); } + @Override public final void writeDouble(double v) throws IOException { writeLong(Double.doubleToRawLongBits(v)); } + @Override public final void writeFloat(float v) throws IOException { writeInt(Float.floatToRawIntBits(v)); } + @Override public final void writeInt(int v) throws IOException { dataOut.writeInt((v >>> 24) | @@ -145,12 +157,14 @@ public class LEDataOutputStream extends FilterOutputStream implements DataOutput (v << 24)); } + @Override public final void writeLong(long v) throws IOException { writeInt((int) v); writeInt((int) (v >>> 32)); } + @Override public final void writeShort(int v) throws IOException { dataOut.writeShort(((v >> 8) & 0xff) | @@ -158,6 +172,7 @@ public class LEDataOutputStream extends FilterOutputStream implements DataOutput } /** Don't call this -- not implemented */ + @Override public final void writeUTF(String s) throws IOException { throw new UnsupportedOperationException(); diff --git a/src/jogl/classes/com/jogamp/opengl/util/texture/spi/NetPbmTextureWriter.java b/src/jogl/classes/com/jogamp/opengl/util/texture/spi/NetPbmTextureWriter.java index 43b8eebe6..cabf4ebc5 100644 --- a/src/jogl/classes/com/jogamp/opengl/util/texture/spi/NetPbmTextureWriter.java +++ b/src/jogl/classes/com/jogamp/opengl/util/texture/spi/NetPbmTextureWriter.java @@ -84,6 +84,7 @@ public class NetPbmTextureWriter implements TextureWriter { public String getSuffix() { return (magic==6)?PPM:PAM; } + @Override public boolean write(File file, TextureData data) throws IOException { boolean res; final int magic_old = magic; diff --git a/src/jogl/classes/com/jogamp/opengl/util/texture/spi/PNGImage.java b/src/jogl/classes/com/jogamp/opengl/util/texture/spi/PNGImage.java index bfde1bfac..71cbbf97e 100644 --- a/src/jogl/classes/com/jogamp/opengl/util/texture/spi/PNGImage.java +++ b/src/jogl/classes/com/jogamp/opengl/util/texture/spi/PNGImage.java @@ -314,5 +314,6 @@ public class PNGImage { } } + @Override public String toString() { return "PNGImage["+pixelWidth+"x"+pixelHeight+", dpi "+dpi[0]+" x "+dpi[1]+", bytesPerPixel "+bytesPerPixel+", reversedChannels "+reversedChannels+", "+data+"]"; } } diff --git a/src/jogl/classes/com/jogamp/opengl/util/texture/spi/SGIImage.java b/src/jogl/classes/com/jogamp/opengl/util/texture/spi/SGIImage.java index fd96fba80..cbc8e652f 100644 --- a/src/jogl/classes/com/jogamp/opengl/util/texture/spi/SGIImage.java +++ b/src/jogl/classes/com/jogamp/opengl/util/texture/spi/SGIImage.java @@ -126,6 +126,7 @@ public class SGIImage { in.read(tmp); } + @Override public String toString() { return ("magic: " + magic + " storage: " + (int) storage + @@ -226,6 +227,7 @@ public class SGIImage { (bottom-to-top) order for calls to glTexImage2D. */ public byte[] getData() { return data; } + @Override public String toString() { return header.toString(); } diff --git a/src/jogl/classes/com/jogamp/opengl/util/texture/spi/TGAImage.java b/src/jogl/classes/com/jogamp/opengl/util/texture/spi/TGAImage.java index df9430a26..15cd63eb3 100644 --- a/src/jogl/classes/com/jogamp/opengl/util/texture/spi/TGAImage.java +++ b/src/jogl/classes/com/jogamp/opengl/util/texture/spi/TGAImage.java @@ -199,6 +199,7 @@ public class TGAImage { public byte[] imageIDbuf() { return imageIDbuf; } public String imageID() { return imageID; } + @Override public String toString() { return "TGA Header " + " id length: " + idLength + diff --git a/src/jogl/classes/com/jogamp/opengl/util/texture/spi/awt/IIOTextureProvider.java b/src/jogl/classes/com/jogamp/opengl/util/texture/spi/awt/IIOTextureProvider.java index f23cb74bf..18ad429d2 100644 --- a/src/jogl/classes/com/jogamp/opengl/util/texture/spi/awt/IIOTextureProvider.java +++ b/src/jogl/classes/com/jogamp/opengl/util/texture/spi/awt/IIOTextureProvider.java @@ -54,6 +54,7 @@ import com.jogamp.opengl.util.texture.spi.*; public class IIOTextureProvider implements TextureProvider { private static final boolean DEBUG = Debug.debug("TextureIO"); + @Override public TextureData newTextureData(GLProfile glp, File file, int internalFormat, int pixelFormat, @@ -70,6 +71,7 @@ public class IIOTextureProvider implements TextureProvider { return new AWTTextureData(glp, internalFormat, pixelFormat, mipmap, img); } + @Override public TextureData newTextureData(GLProfile glp, InputStream stream, int internalFormat, int pixelFormat, @@ -86,6 +88,7 @@ public class IIOTextureProvider implements TextureProvider { return new AWTTextureData(glp, internalFormat, pixelFormat, mipmap, img); } + @Override public TextureData newTextureData(GLProfile glp, URL url, int internalFormat, int pixelFormat, diff --git a/src/jogl/classes/com/jogamp/opengl/util/texture/spi/awt/IIOTextureWriter.java b/src/jogl/classes/com/jogamp/opengl/util/texture/spi/awt/IIOTextureWriter.java index 438ab6cc2..be82e4fb8 100644 --- a/src/jogl/classes/com/jogamp/opengl/util/texture/spi/awt/IIOTextureWriter.java +++ b/src/jogl/classes/com/jogamp/opengl/util/texture/spi/awt/IIOTextureWriter.java @@ -53,6 +53,7 @@ import com.jogamp.opengl.util.texture.*; import com.jogamp.opengl.util.texture.spi.*; public class IIOTextureWriter implements TextureWriter { + @Override public boolean write(File file, TextureData data) throws IOException { int pixelFormat = data.getPixelFormat(); diff --git a/src/jogl/classes/javax/media/opengl/GLArrayData.java b/src/jogl/classes/javax/media/opengl/GLArrayData.java index 4025170cf..97f58a92a 100644 --- a/src/jogl/classes/javax/media/opengl/GLArrayData.java +++ b/src/jogl/classes/javax/media/opengl/GLArrayData.java @@ -201,6 +201,7 @@ public interface GLArrayData { */ public int getStride(); + @Override public String toString(); public void destroy(GL gl); diff --git a/src/jogl/classes/javax/media/opengl/GLDebugMessage.java b/src/jogl/classes/javax/media/opengl/GLDebugMessage.java index 1032cf929..acb33b058 100644 --- a/src/jogl/classes/javax/media/opengl/GLDebugMessage.java +++ b/src/jogl/classes/javax/media/opengl/GLDebugMessage.java @@ -202,6 +202,7 @@ public class GLDebugMessage { return sb; } + @Override public String toString() { return toString(null).toString(); } diff --git a/src/jogl/classes/javax/media/opengl/GLDrawableFactory.java b/src/jogl/classes/javax/media/opengl/GLDrawableFactory.java index e486e2bfd..26bafd961 100644 --- a/src/jogl/classes/javax/media/opengl/GLDrawableFactory.java +++ b/src/jogl/classes/javax/media/opengl/GLDrawableFactory.java @@ -134,6 +134,7 @@ public abstract class GLDrawableFactory { private static final void initSingletonImpl() { NativeWindowFactory.initSingleton(); NativeWindowFactory.addCustomShutdownHook(false /* head */, new Runnable() { + @Override public void run() { shutdown0(); } diff --git a/src/jogl/classes/javax/media/opengl/GLProfile.java b/src/jogl/classes/javax/media/opengl/GLProfile.java index 15300e397..35dcce0f7 100644 --- a/src/jogl/classes/javax/media/opengl/GLProfile.java +++ b/src/jogl/classes/javax/media/opengl/GLProfile.java @@ -121,11 +121,13 @@ public class GLProfile { // run the whole static initialization privileged to speed up, // since this skips checking further access AccessController.doPrivileged(new PrivilegedAction() { + @Override public Object run() { Platform.initSingleton(); // Performance hack to trigger classloading of the GL classes impl, which makes up to 12%, 800ms down to 700ms new Thread(new Runnable() { + @Override public void run() { final ClassLoader cl = GLProfile.class.getClassLoader(); try { @@ -1020,6 +1022,7 @@ public class GLProfile { * @return true if given Object is a GLProfile and * if both, profile and profileImpl is equal with this. */ + @Override public final boolean equals(Object o) { if(this==o) { return true; } if(o instanceof GLProfile) { @@ -1029,6 +1032,7 @@ public class GLProfile { return false; } + @Override public int hashCode() { int hash = 5; hash = 97 * hash + getImplName().hashCode(); @@ -1469,6 +1473,7 @@ public class GLProfile { return true; } + @Override public String toString() { return "GLProfile[" + getName() + "/" + getImplName() + "."+(this.isHardwareRasterizer?"hw":"sw")+"]"; } diff --git a/src/jogl/classes/javax/media/opengl/GLUniformData.java b/src/jogl/classes/javax/media/opengl/GLUniformData.java index 700bba2eb..412bfb0a9 100644 --- a/src/jogl/classes/javax/media/opengl/GLUniformData.java +++ b/src/jogl/classes/javax/media/opengl/GLUniformData.java @@ -97,6 +97,7 @@ public class GLUniformData { return sb; } + @Override public String toString() { return toString(null).toString(); } diff --git a/src/jogl/classes/javax/media/opengl/awt/GLCanvas.java b/src/jogl/classes/javax/media/opengl/awt/GLCanvas.java index f08fbafe8..8757c7a26 100644 --- a/src/jogl/classes/javax/media/opengl/awt/GLCanvas.java +++ b/src/jogl/classes/javax/media/opengl/awt/GLCanvas.java @@ -449,8 +449,14 @@ public class GLCanvas extends Canvas implements AWTGLAutoDrawable, WindowClosing _lock.unlock(); } } - private final Runnable realizeOnEDTAction = new Runnable() { public void run() { setRealizedImpl(true); } }; - private final Runnable unrealizeOnEDTAction = new Runnable() { public void run() { setRealizedImpl(false); } }; + private final Runnable realizeOnEDTAction = new Runnable() { + @Override + public void run() { setRealizedImpl(true); } + }; + private final Runnable unrealizeOnEDTAction = new Runnable() { + @Override + public void run() { setRealizedImpl(false); } + }; @Override public final void setRealized(boolean realized) { diff --git a/src/jogl/classes/javax/media/opengl/glu/GLUtessellatorCallbackAdapter.java b/src/jogl/classes/javax/media/opengl/glu/GLUtessellatorCallbackAdapter.java index bd12dfb9d..15a7bb2a1 100644 --- a/src/jogl/classes/javax/media/opengl/glu/GLUtessellatorCallbackAdapter.java +++ b/src/jogl/classes/javax/media/opengl/glu/GLUtessellatorCallbackAdapter.java @@ -64,20 +64,32 @@ package javax.media.opengl.glu; */ public class GLUtessellatorCallbackAdapter implements GLUtessellatorCallback { + @Override public void begin(int type) {} + @Override public void edgeFlag(boolean boundaryEdge) {} + @Override public void vertex(Object vertexData) {} + @Override public void end() {} // public void mesh(jogamp.opengl.tessellator.GLUmesh mesh) {} + @Override public void error(int errnum) {} + @Override public void combine(double[] coords, Object[] data, float[] weight, Object[] outData) {} + @Override public void beginData(int type, Object polygonData) {} + @Override public void edgeFlagData(boolean boundaryEdge, Object polygonData) {} + @Override public void vertexData(Object vertexData, Object polygonData) {} + @Override public void endData(Object polygonData) {} + @Override public void errorData(int errnum, Object polygonData) {} + @Override public void combineData(double[] coords, Object[] data, float[] weight, Object[] outData, Object polygonData) {} diff --git a/src/jogl/classes/jogamp/graph/curve/opengl/RegionRendererImpl01.java b/src/jogl/classes/jogamp/graph/curve/opengl/RegionRendererImpl01.java index 22600cb89..012b1d1dd 100644 --- a/src/jogl/classes/jogamp/graph/curve/opengl/RegionRendererImpl01.java +++ b/src/jogl/classes/jogamp/graph/curve/opengl/RegionRendererImpl01.java @@ -46,6 +46,7 @@ public class RegionRendererImpl01 extends RegionRenderer { } + @Override protected boolean initShaderProgram(GL2ES2 gl) { final ShaderState st = rs.getShaderState(); diff --git a/src/jogl/classes/jogamp/graph/curve/opengl/RenderStateImpl.java b/src/jogl/classes/jogamp/graph/curve/opengl/RenderStateImpl.java index 8ca29b9f0..fe2dd7363 100644 --- a/src/jogl/classes/jogamp/graph/curve/opengl/RenderStateImpl.java +++ b/src/jogl/classes/jogamp/graph/curve/opengl/RenderStateImpl.java @@ -65,8 +65,11 @@ public class RenderStateImpl extends RenderState { this(st, pointFactory, new PMVMatrix()); } + @Override public final GLUniformData getWeight() { return gcu_Weight; } + @Override public final GLUniformData getAlpha() { return gcu_Alpha; } + @Override public final GLUniformData getColorStatic() { return gcu_ColorStatic; } //public final GLUniformData getStrength() { return gcu_Strength; } diff --git a/src/jogl/classes/jogamp/graph/curve/opengl/VBORegion2PES2.java b/src/jogl/classes/jogamp/graph/curve/opengl/VBORegion2PES2.java index 86c0db8c6..77c862ed4 100644 --- a/src/jogl/classes/jogamp/graph/curve/opengl/VBORegion2PES2.java +++ b/src/jogl/classes/jogamp/graph/curve/opengl/VBORegion2PES2.java @@ -77,6 +77,7 @@ public class VBORegion2PES2 extends GLRegion { mgl_ActiveTexture = new GLUniformData(UniformNames.gcu_TextureUnit, textureEngine); } + @Override public void update(GL2ES2 gl, RenderState rs) { if(!isDirty()) { return; @@ -194,6 +195,7 @@ public class VBORegion2PES2 extends GLRegion { int[] maxTexSize = new int[] { -1 } ; + @Override protected void drawImpl(GL2ES2 gl, RenderState rs, int vp_width, int vp_height, int[/*1*/] texWidth) { if(vp_width <=0 || vp_height <= 0 || null==texWidth || texWidth[0] <= 0){ renderRegion(gl); @@ -296,6 +298,7 @@ public class VBORegion2PES2 extends GLRegion { verticeTxtAttr.enableBuffer(gl, false); } + @Override public void destroy(GL2ES2 gl, RenderState rs) { if(DEBUG_INSTANCE) { System.err.println("VBORegion2PES2 Destroy: " + this); diff --git a/src/jogl/classes/jogamp/graph/curve/opengl/VBORegionSPES2.java b/src/jogl/classes/jogamp/graph/curve/opengl/VBORegionSPES2.java index 0a867b45c..9feb18a12 100644 --- a/src/jogl/classes/jogamp/graph/curve/opengl/VBORegionSPES2.java +++ b/src/jogl/classes/jogamp/graph/curve/opengl/VBORegionSPES2.java @@ -48,6 +48,7 @@ public class VBORegionSPES2 extends GLRegion { super(renderModes); } + @Override protected void update(GL2ES2 gl, RenderState rs) { if(!isDirty()) { return; @@ -125,6 +126,7 @@ public class VBORegionSPES2 extends GLRegion { setDirty(false); } + @Override protected void drawImpl(GL2ES2 gl, RenderState rs, int vp_width, int vp_height, int[/*1*/] texWidth) { verticeAttr.enableBuffer(gl, true); texCoordAttr.enableBuffer(gl, true); @@ -137,6 +139,7 @@ public class VBORegionSPES2 extends GLRegion { verticeAttr.enableBuffer(gl, false); } + @Override public final void destroy(GL2ES2 gl, RenderState rs) { if(DEBUG_INSTANCE) { System.err.println("VBORegionSPES2 Destroy: " + this); diff --git a/src/jogl/classes/jogamp/graph/curve/tess/CDTriangulator2D.java b/src/jogl/classes/jogamp/graph/curve/tess/CDTriangulator2D.java index 4f48b2d20..a60f91b87 100644 --- a/src/jogl/classes/jogamp/graph/curve/tess/CDTriangulator2D.java +++ b/src/jogl/classes/jogamp/graph/curve/tess/CDTriangulator2D.java @@ -65,6 +65,7 @@ public class CDTriangulator2D implements Triangulator{ /** Reset the triangulation to initial state * Clearing cached data */ + @Override public void reset() { maxTriID = 0; vertices = new ArrayList(); @@ -72,6 +73,7 @@ public class CDTriangulator2D implements Triangulator{ loops = new ArrayList(); } + @Override public void addCurve(Outline polyline) { Loop loop = null; @@ -93,6 +95,7 @@ public class CDTriangulator2D implements Triangulator{ } } + @Override public ArrayList generate() { for(int i=0;i() { + @Override public String run() { return System.getProperty("java.home"); } @@ -81,10 +82,12 @@ public class JavaFontLoader implements FontSet { return 0 != ( bits & bit ) ; } + @Override public Font getDefault() throws IOException { return get(FAMILY_REGULAR, 0) ; // Sans Serif Regular } + @Override public Font get(int family, int style) throws IOException { Font font = (Font)fontMap.get( ( family << 8 ) | style ); if (font != null) { diff --git a/src/jogl/classes/jogamp/graph/font/UbuntuFontLoader.java b/src/jogl/classes/jogamp/graph/font/UbuntuFontLoader.java index 254583739..9096f7d16 100644 --- a/src/jogl/classes/jogamp/graph/font/UbuntuFontLoader.java +++ b/src/jogl/classes/jogamp/graph/font/UbuntuFontLoader.java @@ -71,10 +71,12 @@ public class UbuntuFontLoader implements FontSet { return 0 != ( bits & bit ) ; } + @Override public Font getDefault() throws IOException { return get(FAMILY_REGULAR, 0) ; // Sans Serif Regular } + @Override public Font get(int family, int style) throws IOException { Font font = (Font)fontMap.get( ( family << 8 ) | style ); if (font != null) { diff --git a/src/jogl/classes/jogamp/graph/font/typecast/TypecastFont.java b/src/jogl/classes/jogamp/graph/font/typecast/TypecastFont.java index ba6c72650..67ae6c387 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/TypecastFont.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/TypecastFont.java @@ -148,25 +148,31 @@ class TypecastFont implements FontInt { char2Glyph = new IntObjectHashMap(cmapentries + cmapentries/4); } + @Override public StringBuilder getName(StringBuilder sb, int nameIndex) { return font.getName(nameIndex, sb); } + @Override public String getName(int nameIndex) { return getName(null, nameIndex).toString(); } + @Override public StringBuilder getAllNames(StringBuilder sb, String separator) { return font.getAllNames(sb, separator); } + @Override public StringBuilder getFullFamilyName(StringBuilder sb) { sb = getName(sb, Font.NAME_FAMILY).append("-"); getName(sb, Font.NAME_SUBFAMILY); return sb; } + @Override public float getAdvanceWidth(int i, float pixelSize) { return font.getHmtxTable().getAdvanceWidth(i) * metrics.getScale(pixelSize); } + @Override public Metrics getMetrics() { if (metrics == null) { metrics = new TypecastHMetrics(this); @@ -174,6 +180,7 @@ class TypecastFont implements FontInt { return metrics; } + @Override public Glyph getGlyph(char symbol) { TypecastGlyph result = (TypecastGlyph) char2Glyph.get(symbol); if (null == result) { @@ -219,11 +226,13 @@ class TypecastFont implements FontInt { return result; } + @Override public ArrayList getOutlineShapes(CharSequence string, float pixelSize, Factory vertexFactory) { AffineTransform transform = new AffineTransform(vertexFactory); return TypecastRenderer.getOutlineShapes(this, string, pixelSize, transform, vertexFactory); } + @Override public float getStringWidth(CharSequence string, float pixelSize) { float width = 0; final int len = string.length(); @@ -241,6 +250,7 @@ class TypecastFont implements FontInt { return (int)(width + 0.5f); } + @Override public float getStringHeight(CharSequence string, float pixelSize) { int height = 0; @@ -257,6 +267,7 @@ class TypecastFont implements FontInt { return height; } + @Override public AABBox getStringBounds(CharSequence string, float pixelSize) { if (string == null) { return new AABBox(); @@ -287,14 +298,17 @@ class TypecastFont implements FontInt { return new AABBox(0, 0, 0, totalWidth, totalHeight,0); } + @Override final public int getNumGlyphs() { return font.getNumGlyphs(); } + @Override public boolean isPrintableChar( char c ) { return FontFactory.isPrintableChar(c); } + @Override public String toString() { return getFullFamilyName(null).toString(); } diff --git a/src/jogl/classes/jogamp/graph/font/typecast/TypecastFontConstructor.java b/src/jogl/classes/jogamp/graph/font/typecast/TypecastFontConstructor.java index 77b5a9aa9..d7db981b0 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/TypecastFontConstructor.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/TypecastFontConstructor.java @@ -43,8 +43,10 @@ import com.jogamp.graph.font.Font; public class TypecastFontConstructor implements FontConstructor { + @Override public Font create(final File ffile) throws IOException { Object o = AccessController.doPrivileged(new PrivilegedAction() { + @Override public Object run() { OTFontCollection fontset; try { @@ -64,8 +66,10 @@ public class TypecastFontConstructor implements FontConstructor { throw new InternalError("Unexpected Object: "+o); } + @Override public Font create(final URLConnection fconn) throws IOException { return AccessController.doPrivileged(new PrivilegedAction() { + @Override public Font run() { File tf = null; int len=0; diff --git a/src/jogl/classes/jogamp/graph/font/typecast/TypecastGlyph.java b/src/jogl/classes/jogamp/graph/font/typecast/TypecastGlyph.java index 476b3fd4e..574aeb86d 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/TypecastGlyph.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/TypecastGlyph.java @@ -79,6 +79,7 @@ public class TypecastGlyph implements FontInt.GlyphInt { return fo.floatValue(); } + @Override public String toString() { return "\nAdvance:"+ @@ -122,6 +123,7 @@ public class TypecastGlyph implements FontInt.GlyphInt { return this.advance.get(size, useFrationalMetrics); } + @Override public String toString() { return "\nMetrics:"+ @@ -173,10 +175,12 @@ public class TypecastGlyph implements FontInt.GlyphInt { this.metrics.reset(); } + @Override public Font getFont() { return this.font; } + @Override public char getSymbol() { return this.symbol; } @@ -201,6 +205,7 @@ public class TypecastGlyph implements FontInt.GlyphInt { return this.metrics.getScale(pixelSize); } + @Override public AABBox getBBox(float pixelSize) { final float size = getScale(pixelSize); AABBox newBox = getBBox().clone(); @@ -212,14 +217,17 @@ public class TypecastGlyph implements FontInt.GlyphInt { this.metrics.addAdvance(advance, size); } + @Override public float getAdvance(float pixelSize, boolean useFrationalMetrics) { return this.metrics.getAdvance(pixelSize, useFrationalMetrics); } + @Override public Path2D getPath() { return this.path; } + @Override public Path2D getPath(float pixelSize) { final float size = getScale(pixelSize); diff --git a/src/jogl/classes/jogamp/graph/font/typecast/TypecastHMetrics.java b/src/jogl/classes/jogamp/graph/font/typecast/TypecastHMetrics.java index a6ce58ae2..ecc41e438 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/TypecastHMetrics.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/TypecastHMetrics.java @@ -61,21 +61,27 @@ class TypecastHMetrics implements Metrics { bbox = new AABBox(lowx, lowy, 0, highx, highy, 0); // invert } + @Override public final float getAscent(float pixelSize) { return getScale(pixelSize) * -hheaTable.getAscender(); // invert } + @Override public final float getDescent(float pixelSize) { return getScale(pixelSize) * -hheaTable.getDescender(); // invert } + @Override public final float getLineGap(float pixelSize) { return getScale(pixelSize) * -hheaTable.getLineGap(); // invert } + @Override public final float getMaxExtend(float pixelSize) { return getScale(pixelSize) * hheaTable.getXMaxExtent(); } + @Override public final float getScale(float pixelSize) { return pixelSize * unitsPerEM_Inv; } + @Override public final AABBox getBBox(float pixelSize) { AABBox res = new AABBox(bbox.getLow(), bbox.getHigh()); res.scale(getScale(pixelSize)); diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/OTFont.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/OTFont.java index 8fc4be92d..7c3b32e2c 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/OTFont.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/OTFont.java @@ -283,6 +283,7 @@ public class OTFont { _glyf = (GlyfTable) getTable(Table.glyf); } + @Override public String toString() { if (_tableDirectory != null) { return _tableDirectory.toString(); diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/BaseTable.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/BaseTable.java index b6626a9cc..60975dd52 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/BaseTable.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/BaseTable.java @@ -47,10 +47,12 @@ public class BaseTable implements Table { _coordinate = di.readShort(); } + @Override public int getBaseCoordFormat() { return 1; } + @Override public short getCoordinate() { return _coordinate; } @@ -69,10 +71,12 @@ public class BaseTable implements Table { _baseCoordPoint = di.readUnsignedShort(); } + @Override public int getBaseCoordFormat() { return 2; } + @Override public short getCoordinate() { return _coordinate; } @@ -89,10 +93,12 @@ public class BaseTable implements Table { _deviceTableOffset = di.readUnsignedShort(); } + @Override public int getBaseCoordFormat() { return 2; } + @Override public short getCoordinate() { return _coordinate; } @@ -211,6 +217,7 @@ public class BaseTable implements Table { } } + @Override public String toString() { StringBuilder sb = new StringBuilder() .append("\nBaseScript BaseScriptT").append(Integer.toHexString(_thisOffset)) @@ -273,6 +280,7 @@ public class BaseTable implements Table { } } + @Override public String toString() { StringBuilder sb = new StringBuilder() .append("\nBaseScriptList BaseScriptListT").append(Integer.toHexString(_thisOffset)) @@ -305,6 +313,7 @@ public class BaseTable implements Table { } } + @Override public String toString() { StringBuilder sb = new StringBuilder() .append("\nBaseTagList BaseTagListT").append(Integer.toHexString(_thisOffset)) @@ -338,6 +347,7 @@ public class BaseTable implements Table { } } + @Override public String toString() { return new StringBuilder() .append("\nAxis AxisT").append(Integer.toHexString(_thisOffset)) @@ -403,10 +413,12 @@ public class BaseTable implements Table { return String.valueOf(c); } + @Override public int getType() { return BASE; } + @Override public String toString() { StringBuilder sb = new StringBuilder() .append("; 'BASE' Table - Baseline\n;-------------------------------------\n\n") @@ -429,6 +441,7 @@ public class BaseTable implements Table { * particular table. * @return A directory entry */ + @Override public DirectoryEntry getDirectoryEntry() { return _de; } diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CffTable.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CffTable.java index 62486fb7f..a36a49923 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CffTable.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CffTable.java @@ -164,6 +164,7 @@ public class CffTable implements Table { return ""; } + @Override public String toString() { StringBuilder sb = new StringBuilder(); Enumeration keys = _entries.keys(); @@ -220,6 +221,7 @@ public class CffTable implements Table { return _data; } + @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("DICT\n"); @@ -254,6 +256,7 @@ public class CffTable implements Table { return new Dict(getData(), offset, len); } + @Override public String toString() { StringBuilder sb = new StringBuilder(); for (int i = 0; i < getCount(); ++i) { @@ -287,6 +290,7 @@ public class CffTable implements Table { return name; } + @Override public String toString() { StringBuilder sb = new StringBuilder(); for (int i = 0; i < getCount(); ++i) { @@ -321,6 +325,7 @@ public class CffTable implements Table { } } + @Override public String toString() { int nonStandardBase = CffStandardStrings.standardStrings.length; StringBuilder sb = new StringBuilder(); @@ -388,10 +393,12 @@ public class CffTable implements Table { } } + @Override public int getFormat() { return 0; } + @Override public int getSID(int gid) { if (gid == 0) { return 0; @@ -413,10 +420,12 @@ public class CffTable implements Table { } } + @Override public int getFormat() { return 1; } + @Override public int getSID(int gid) { if (gid == 0) { return 0; @@ -448,10 +457,12 @@ public class CffTable implements Table { } } + @Override public int getFormat() { return 2; } + @Override public int getSID(int gid) { if (gid == 0) { return 0; @@ -586,10 +597,12 @@ public class CffTable implements Table { return _charstringsArray[fontIndex].length; } + @Override public int getType() { return CFF; } + @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("'CFF' Table - Compact Font Format\n---------------------------------\n"); @@ -614,6 +627,7 @@ public class CffTable implements Table { * particular table. * @return A directory entry */ + @Override public DirectoryEntry getDirectoryEntry() { return _de; } diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CharstringType2.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CharstringType2.java index 93ff60988..7a7b51890 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CharstringType2.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CharstringType2.java @@ -133,10 +133,12 @@ public class CharstringType2 extends Charstring { _globalSubrIndex = globalSubrIndex; } + @Override public int getIndex() { return _index; } + @Override public String getName() { return _name; } @@ -223,6 +225,7 @@ public class CharstringType2 extends Charstring { return _ip < _offset + _length; } + @Override public String toString() { StringBuilder sb = new StringBuilder(); resetIP(); diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/ClassDefFormat1.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/ClassDefFormat1.java index 1079aeed4..94910e4f6 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/ClassDefFormat1.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/ClassDefFormat1.java @@ -32,6 +32,7 @@ public class ClassDefFormat1 extends ClassDef { } } + @Override public int getFormat() { return 1; } diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/ClassDefFormat2.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/ClassDefFormat2.java index 59bc7b329..9906ecfb1 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/ClassDefFormat2.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/ClassDefFormat2.java @@ -30,6 +30,7 @@ public class ClassDefFormat2 extends ClassDef { } } + @Override public int getFormat() { return 2; } diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapFormat.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapFormat.java index 62ce5ae4c..f7054852a 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapFormat.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapFormat.java @@ -122,6 +122,7 @@ public abstract class CmapFormat { public abstract int mapCharCode(int charCode); + @Override public String toString() { return new StringBuilder() .append("format: ") diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapFormat0.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapFormat0.java index 2093158bd..dd1ede232 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapFormat0.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapFormat0.java @@ -71,10 +71,12 @@ public class CmapFormat0 extends CmapFormat { } } + @Override public int getRangeCount() { return 1; } + @Override public Range getRange(int index) throws ArrayIndexOutOfBoundsException { if (index != 0) { throw new ArrayIndexOutOfBoundsException(); @@ -82,6 +84,7 @@ public class CmapFormat0 extends CmapFormat { return new Range(0, 255); } + @Override public int mapCharCode(int charCode) { if (0 <= charCode && charCode < 256) { return _glyphIdArray[charCode]; diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapFormat2.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapFormat2.java index 222c93852..d071e9421 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapFormat2.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapFormat2.java @@ -118,10 +118,12 @@ public class CmapFormat2 extends CmapFormat { } } + @Override public int getRangeCount() { return _subHeaders.length; } + @Override public Range getRange(int index) throws ArrayIndexOutOfBoundsException { if (index < 0 || index >= _subHeaders.length) { throw new ArrayIndexOutOfBoundsException(); @@ -144,6 +146,7 @@ public class CmapFormat2 extends CmapFormat { _subHeaders[index]._entryCount - 1)); } + @Override public int mapCharCode(int charCode) { // Get the appropriate subheader diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapFormat4.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapFormat4.java index ef65867af..2ae23d031 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapFormat4.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapFormat4.java @@ -110,10 +110,12 @@ public class CmapFormat4 extends CmapFormat { // } } + @Override public int getRangeCount() { return _segCount; } + @Override public Range getRange(int index) throws ArrayIndexOutOfBoundsException { if (index < 0 || index >= _segCount) { throw new ArrayIndexOutOfBoundsException(); @@ -121,6 +123,7 @@ public class CmapFormat4 extends CmapFormat { return new Range(_startCode[index], _endCode[index]); } + @Override public int mapCharCode(int charCode) { try { for (int i = 0; i < _segCount; i++) { @@ -142,6 +145,7 @@ public class CmapFormat4 extends CmapFormat { return 0; } + @Override public String toString() { return new StringBuilder() .append(super.toString()) diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapFormat6.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapFormat6.java index a22e33244..2a33d8d40 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapFormat6.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapFormat6.java @@ -73,14 +73,17 @@ public class CmapFormat6 extends CmapFormat { //di.skipBytes(_length - 4); } + @Override public int getRangeCount() { return 0; } + @Override public Range getRange(int index) throws ArrayIndexOutOfBoundsException { throw new ArrayIndexOutOfBoundsException(); } + @Override public int mapCharCode(int charCode) { return 0; } diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapFormatUnknown.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapFormatUnknown.java index 3544b6f62..392683bcd 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapFormatUnknown.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapFormatUnknown.java @@ -40,14 +40,17 @@ public class CmapFormatUnknown extends CmapFormat { di.skipBytes(_length - 4); } + @Override public int getRangeCount() { return 0; } + @Override public Range getRange(int index) throws ArrayIndexOutOfBoundsException { throw new ArrayIndexOutOfBoundsException(); } + @Override public int mapCharCode(int charCode) { return 0; } diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapIndexEntry.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapIndexEntry.java index 47f6c470d..4833318d5 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapIndexEntry.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapIndexEntry.java @@ -90,6 +90,7 @@ public class CmapIndexEntry implements Comparable { _format = format; } + @Override public String toString() { return new StringBuilder() .append("platform id: ") @@ -104,6 +105,7 @@ public class CmapIndexEntry implements Comparable { .append(_offset).toString(); } + @Override public int compareTo(java.lang.Object obj) { CmapIndexEntry entry = (CmapIndexEntry) obj; if (getOffset() < entry.getOffset()) { diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapTable.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapTable.java index 016efa093..2cdddb3ef 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapTable.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapTable.java @@ -130,10 +130,12 @@ public class CmapTable implements Table { return null; } + @Override public int getType() { return cmap; } + @Override public String toString() { StringBuilder sb = new StringBuilder().append("cmap\n"); @@ -155,6 +157,7 @@ public class CmapTable implements Table { * particular table. * @return A directory entry */ + @Override public DirectoryEntry getDirectoryEntry() { return _de; } diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CoverageFormat1.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CoverageFormat1.java index 712da54df..715bf11ec 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CoverageFormat1.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CoverageFormat1.java @@ -72,10 +72,12 @@ public class CoverageFormat1 extends Coverage { } } + @Override public int getFormat() { return 1; } + @Override public int findGlyph(int glyphId) { for (int i = 0; i < _glyphCount; i++) { if (_glyphIds[i] == glyphId) { diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CoverageFormat2.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CoverageFormat2.java index 7196ed595..bd2a28f79 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CoverageFormat2.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CoverageFormat2.java @@ -72,10 +72,12 @@ public class CoverageFormat2 extends Coverage { } } + @Override public int getFormat() { return 2; } + @Override public int findGlyph(int glyphId) { for (int i = 0; i < _rangeCount; i++) { int n = _rangeRecords[i].getCoverageIndex(glyphId); diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CvtTable.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CvtTable.java index 867ef1823..9e1c47de9 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CvtTable.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CvtTable.java @@ -29,6 +29,7 @@ public class CvtTable implements Table { } } + @Override public int getType() { return cvt; } @@ -37,6 +38,7 @@ public class CvtTable implements Table { return values; } + @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("'cvt ' Table - Control Value Table\n----------------------------------\n"); @@ -54,6 +56,7 @@ public class CvtTable implements Table { * particular table. * @return A directory entry */ + @Override public DirectoryEntry getDirectoryEntry() { return de; } diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/DirectoryEntry.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/DirectoryEntry.java index 7abcec0ce..e34fa32e8 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/DirectoryEntry.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/DirectoryEntry.java @@ -71,6 +71,7 @@ public class DirectoryEntry implements Cloneable { _length = di.readInt(); } + @Override public Object clone() { try { return super.clone(); @@ -104,6 +105,7 @@ public class DirectoryEntry implements Cloneable { .toString(); } + @Override public String toString() { return new StringBuilder() .append("'").append(getTagAsString()) diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/DsigTable.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/DsigTable.java index f25c595d0..2b85f52d8 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/DsigTable.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/DsigTable.java @@ -45,6 +45,7 @@ public class DsigTable implements Table { * Get the table type, as a table directory value. * @return The table type */ + @Override public int getType() { return DSIG; } @@ -55,10 +56,12 @@ public class DsigTable implements Table { * particular table. * @return A directory entry */ + @Override public DirectoryEntry getDirectoryEntry() { return de; } + @Override public String toString() { StringBuilder sb = new StringBuilder().append("DSIG\n"); for (int i = 0; i < numSigs; i++) { diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/FpgmTable.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/FpgmTable.java index b662265d9..467a4f360 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/FpgmTable.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/FpgmTable.java @@ -26,10 +26,12 @@ public class FpgmTable extends Program implements Table { readInstructions(di, de.getLength()); } + @Override public int getType() { return fpgm; } + @Override public String toString() { return Disassembler.disassemble(getInstructions(), 0); } @@ -40,6 +42,7 @@ public class FpgmTable extends Program implements Table { * particular table. * @return A directory entry */ + @Override public DirectoryEntry getDirectoryEntry() { return de; } diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/GaspRange.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/GaspRange.java index cf4afa88e..cc87b19a4 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/GaspRange.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/GaspRange.java @@ -30,6 +30,7 @@ public class GaspRange { rangeGaspBehavior = di.readUnsignedShort(); } + @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append(" rangeMaxPPEM: ").append(rangeMaxPPEM) diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/GaspTable.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/GaspTable.java index 45498eda1..8f91e6d00 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/GaspTable.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/GaspTable.java @@ -34,10 +34,12 @@ public class GaspTable implements Table { } } + @Override public int getType() { return gasp; } + @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("'gasp' Table - Grid-fitting And Scan-conversion Procedure\n---------------------------------------------------------"); @@ -56,6 +58,7 @@ public class GaspTable implements Table { * particular table. * @return A directory entry */ + @Override public DirectoryEntry getDirectoryEntry() { return de; } diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/GlyfCompositeDescript.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/GlyfCompositeDescript.java index 50f62ed62..50e0fa339 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/GlyfCompositeDescript.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/GlyfCompositeDescript.java @@ -99,6 +99,7 @@ public class GlyfCompositeDescript extends GlyfDescript { } } + @Override public int getEndPtOfContours(int i) { GlyfCompositeComp c = getCompositeCompEndPt(i); if (c != null) { @@ -108,6 +109,7 @@ public class GlyfCompositeDescript extends GlyfDescript { return 0; } + @Override public byte getFlags(int i) { GlyfCompositeComp c = getCompositeComp(i); if (c != null) { @@ -117,6 +119,7 @@ public class GlyfCompositeDescript extends GlyfDescript { return 0; } + @Override public short getXCoordinate(int i) { GlyfCompositeComp c = getCompositeComp(i); if (c != null) { @@ -131,6 +134,7 @@ public class GlyfCompositeDescript extends GlyfDescript { return 0; } + @Override public short getYCoordinate(int i) { GlyfCompositeComp c = getCompositeComp(i); if (c != null) { @@ -145,10 +149,12 @@ public class GlyfCompositeDescript extends GlyfDescript { return 0; } + @Override public boolean isComposite() { return true; } + @Override public int getPointCount() { GlyfCompositeComp c = _components.get(_components.size()-1); GlyphDescription gd = _parentTable.getDescription(c.getGlyphIndex()); @@ -159,6 +165,7 @@ public class GlyfCompositeDescript extends GlyfDescript { } } + @Override public int getContourCount() { GlyfCompositeComp c = _components.get(_components.size()-1); return c.getFirstContour() + _parentTable.getDescription(c.getGlyphIndex()).getContourCount(); diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/GlyfDescript.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/GlyfDescript.java index a7e2e7b69..6b06eb3de 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/GlyfDescript.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/GlyfDescript.java @@ -92,26 +92,32 @@ public abstract class GlyfDescript extends Program implements GlyphDescription { return _numberOfContours; } + @Override public int getGlyphIndex() { return _glyphIndex; } + @Override public short getXMaximum() { return _xMax; } + @Override public short getXMinimum() { return _xMin; } + @Override public short getYMaximum() { return _yMax; } + @Override public short getYMinimum() { return _yMin; } + @Override public String toString() { return new StringBuilder() .append(" numberOfContours: ").append(_numberOfContours) diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/GlyfSimpleDescript.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/GlyfSimpleDescript.java index f67162cff..c06ceaa13 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/GlyfSimpleDescript.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/GlyfSimpleDescript.java @@ -92,30 +92,37 @@ public class GlyfSimpleDescript extends GlyfDescript { readCoords(_count, di); } + @Override public int getEndPtOfContours(int i) { return _endPtsOfContours[i]; } + @Override public byte getFlags(int i) { return _flags[i]; } + @Override public short getXCoordinate(int i) { return _xCoordinates[i]; } + @Override public short getYCoordinate(int i) { return _yCoordinates[i]; } + @Override public boolean isComposite() { return false; } + @Override public int getPointCount() { return _count; } + @Override public int getContourCount() { return getNumberOfContours(); } @@ -185,6 +192,7 @@ public class GlyfSimpleDescript extends GlyfDescript { } } + @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append(super.toString()); diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/GlyfTable.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/GlyfTable.java index 34a8218d9..4b196c9e2 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/GlyfTable.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/GlyfTable.java @@ -116,6 +116,7 @@ public class GlyfTable implements Table { } } + @Override public int getType() { return glyf; } @@ -126,6 +127,7 @@ public class GlyfTable implements Table { * particular table. * @return A directory entry */ + @Override public DirectoryEntry getDirectoryEntry() { return _de; } diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/GposTable.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/GposTable.java index 9a367412d..30ecdd051 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/GposTable.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/GposTable.java @@ -45,10 +45,12 @@ public class GposTable implements Table { /** Get the table type, as a table directory value. * @return The table type */ + @Override public int getType() { return GPOS; } + @Override public String toString() { return "GPOS"; } @@ -59,6 +61,7 @@ public class GposTable implements Table { * particular table. * @return A directory entry */ + @Override public DirectoryEntry getDirectoryEntry() { return _de; } diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/GsubTable.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/GsubTable.java index 0351c903d..c23d420a8 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/GsubTable.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/GsubTable.java @@ -99,6 +99,7 @@ public class GsubTable implements Table, LookupSubtableFactory { * 5 - Context - Replace one or more glyphs in context * 6 - Chaining - Context Replace one or more glyphs in chained context */ + @Override public LookupSubtable read( int type, DataInputStream dis, @@ -130,6 +131,7 @@ public class GsubTable implements Table, LookupSubtableFactory { /** Get the table type, as a table directory value. * @return The table type */ + @Override public int getType() { return GSUB; } @@ -146,6 +148,7 @@ public class GsubTable implements Table, LookupSubtableFactory { return _lookupList; } + @Override public String toString() { return "GSUB"; } @@ -174,6 +177,7 @@ public class GsubTable implements Table, LookupSubtableFactory { * particular table. * @return A directory entry */ + @Override public DirectoryEntry getDirectoryEntry() { return _de; } diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/HdmxTable.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/HdmxTable.java index 42f9bf0d0..64f5e6415 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/HdmxTable.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/HdmxTable.java @@ -93,10 +93,12 @@ public class HdmxTable implements Table { return _records[i]; } + @Override public int getType() { return hdmx; } + @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("'hdmx' Table - Horizontal Device Metrics\n----------------------------------------\n"); @@ -124,6 +126,7 @@ public class HdmxTable implements Table { * particular table. * @return A directory entry */ + @Override public DirectoryEntry getDirectoryEntry() { return _de; } diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/HeadTable.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/HeadTable.java index cf7c58449..47e60f900 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/HeadTable.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/HeadTable.java @@ -142,6 +142,7 @@ public class HeadTable implements Table { return _modified; } + @Override public int getType() { return head; } @@ -170,6 +171,7 @@ public class HeadTable implements Table { return _yMin; } + @Override public String toString() { return new StringBuilder() .append("'head' Table - Font Header\n--------------------------") @@ -199,6 +201,7 @@ public class HeadTable implements Table { * particular table. * @return A directory entry */ + @Override public DirectoryEntry getDirectoryEntry() { return _de; } diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/HheaTable.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/HheaTable.java index 0278929f1..242c9b139 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/HheaTable.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/HheaTable.java @@ -92,6 +92,7 @@ public class HheaTable implements Table { return numberOfHMetrics; } + @Override public int getType() { return hhea; } @@ -100,6 +101,7 @@ public class HheaTable implements Table { return xMaxExtent; } + @Override public String toString() { return new StringBuilder() .append("'hhea' Table - Horizontal Header\n--------------------------------") @@ -129,6 +131,7 @@ public class HheaTable implements Table { * particular table. * @return A directory entry */ + @Override public DirectoryEntry getDirectoryEntry() { return de; } diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/HmtxTable.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/HmtxTable.java index dacd9e265..122a0a826 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/HmtxTable.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/HmtxTable.java @@ -106,10 +106,12 @@ public class HmtxTable implements Table { } } + @Override public int getType() { return hmtx; } + @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("'hmtx' Table - Horizontal Metrics\n---------------------------------\n"); @@ -135,6 +137,7 @@ public class HmtxTable implements Table { * particular table. * @return A directory entry */ + @Override public DirectoryEntry getDirectoryEntry() { return _de; } diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/KernSubtableFormat0.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/KernSubtableFormat0.java index 89e6f9f11..1e7ff8c2d 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/KernSubtableFormat0.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/KernSubtableFormat0.java @@ -36,10 +36,12 @@ public class KernSubtableFormat0 extends KernSubtable { } } + @Override public int getKerningPairCount() { return nPairs; } + @Override public KerningPair getKerningPair(int i) { return kerningPairs[i]; } diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/KernSubtableFormat2.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/KernSubtableFormat2.java index 6f5e1f5e8..9c7fc81f9 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/KernSubtableFormat2.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/KernSubtableFormat2.java @@ -31,10 +31,12 @@ public class KernSubtableFormat2 extends KernSubtable { array = di.readUnsignedShort(); } + @Override public int getKerningPairCount() { return 0; } + @Override public KerningPair getKerningPair(int i) { return null; } diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/KernTable.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/KernTable.java index 1d526865a..006a86895 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/KernTable.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/KernTable.java @@ -45,6 +45,7 @@ public class KernTable implements Table { /** Get the table type, as a table directory value. * @return The table type */ + @Override public int getType() { return kern; } @@ -55,6 +56,7 @@ public class KernTable implements Table { * particular table. * @return A directory entry */ + @Override public DirectoryEntry getDirectoryEntry() { return de; } diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/LigatureSubstFormat1.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/LigatureSubstFormat1.java index cad5e106a..1979ea586 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/LigatureSubstFormat1.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/LigatureSubstFormat1.java @@ -89,6 +89,7 @@ public class LigatureSubstFormat1 extends LigatureSubst { return 1; } + @Override public String getTypeAsString() { return "LigatureSubstFormat1"; } diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/LocaTable.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/LocaTable.java index ce0862eea..2c7079fec 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/LocaTable.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/LocaTable.java @@ -49,10 +49,12 @@ public class LocaTable implements Table { return _offsets[i] * _factor; } + @Override public int getType() { return loca; } + @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("'loca' Table - Index To Location Table\n--------------------------------------\n") @@ -71,6 +73,7 @@ public class LocaTable implements Table { * particular table. * @return A directory entry */ + @Override public DirectoryEntry getDirectoryEntry() { return _de; } diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/LtshTable.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/LtshTable.java index 9b0c8e6b4..47874cc56 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/LtshTable.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/LtshTable.java @@ -38,10 +38,12 @@ public class LtshTable implements Table { * Get the table type, as a table directory value. * @return The table type */ + @Override public int getType() { return LTSH; } + @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("'LTSH' Table - Linear Threshold Table\n-------------------------------------") @@ -61,6 +63,7 @@ public class LtshTable implements Table { * particular table. * @return A directory entry */ + @Override public DirectoryEntry getDirectoryEntry() { return de; } diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/MaxpTable.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/MaxpTable.java index 5ab6b51ca..abb6047fc 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/MaxpTable.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/MaxpTable.java @@ -121,10 +121,12 @@ public class MaxpTable implements Table { return numGlyphs; } + @Override public int getType() { return maxp; } + @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("'maxp' Table - Maximum Profile\n------------------------------") @@ -156,6 +158,7 @@ public class MaxpTable implements Table { * particular table. * @return A directory entry */ + @Override public DirectoryEntry getDirectoryEntry() { return de; } diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/NameRecord.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/NameRecord.java index 9f9822986..a1787e3e7 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/NameRecord.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/NameRecord.java @@ -130,6 +130,7 @@ public class NameRecord { _record = sb.toString(); } + @Override public String toString() { StringBuilder sb = new StringBuilder(); diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/NameTable.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/NameTable.java index 5b7a17d3b..ad8198b7f 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/NameTable.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/NameTable.java @@ -130,6 +130,7 @@ public class NameTable implements Table { return sb; } + @Override public int getType() { return name; } @@ -140,6 +141,7 @@ public class NameTable implements Table { * particular table. * @return A directory entry */ + @Override public DirectoryEntry getDirectoryEntry() { return _de; } diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/Os2Table.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/Os2Table.java index 9dfbceb99..5340b297c 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/Os2Table.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/Os2Table.java @@ -293,10 +293,12 @@ public class Os2Table implements Table { return _usMaxContext; } + @Override public int getType() { return OS_2; } + @Override public String toString() { return new StringBuilder() .append("'OS/2' Table - OS/2 and Windows Metrics\n---------------------------------------") @@ -351,6 +353,7 @@ public class Os2Table implements Table { * particular table. * @return A directory entry */ + @Override public DirectoryEntry getDirectoryEntry() { return _de; } diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/Panose.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/Panose.java index 1f6c5a1dd..771318108 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/Panose.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/Panose.java @@ -79,6 +79,7 @@ public class Panose { return bXHeight; } + @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append(String.valueOf(bFamilyType)).append(" ") diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/PcltTable.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/PcltTable.java index 6ed9b2b9c..a1f603d8f 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/PcltTable.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/PcltTable.java @@ -65,10 +65,12 @@ public class PcltTable implements Table { * Get the table type, as a table directory value. * @return The table type */ + @Override public int getType() { return PCLT; } + @Override public String toString() { return new StringBuilder() .append("'PCLT' Table - Printer Command Language Table\n---------------------------------------------") @@ -98,6 +100,7 @@ public class PcltTable implements Table { * particular table. * @return A directory entry */ + @Override public DirectoryEntry getDirectoryEntry() { return de; } diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/PostTable.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/PostTable.java index 46f1ac088..188b441ac 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/PostTable.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/PostTable.java @@ -370,10 +370,12 @@ public class PostTable implements Table { /** Get the table type, as a table directory value. * @return The table type */ + @Override public int getType() { return post; } + @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("'post' Table - PostScript Metrics\n---------------------------------\n") @@ -416,6 +418,7 @@ public class PostTable implements Table { * particular table. * @return A directory entry */ + @Override public DirectoryEntry getDirectoryEntry() { return de; } diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/PrepTable.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/PrepTable.java index 2046d7fe4..4c64673b7 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/PrepTable.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/PrepTable.java @@ -26,10 +26,12 @@ public class PrepTable extends Program implements Table { readInstructions(di, de.getLength()); } + @Override public int getType() { return prep; } + @Override public String toString() { return Disassembler.disassemble(getInstructions(), 0); } @@ -40,6 +42,7 @@ public class PrepTable extends Program implements Table { * particular table. * @return A directory entry */ + @Override public DirectoryEntry getDirectoryEntry() { return de; } diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/SignatureBlock.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/SignatureBlock.java index 15f0cd04f..31a2d17c9 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/SignatureBlock.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/SignatureBlock.java @@ -32,6 +32,7 @@ public class SignatureBlock { di.readFully(signature); } + @Override public String toString() { StringBuilder sb = new StringBuilder(); for (int i = 0; i < signatureLen; i += 16) { diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/SingleSubstFormat1.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/SingleSubstFormat1.java index a8df78504..e97e62a58 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/SingleSubstFormat1.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/SingleSubstFormat1.java @@ -73,10 +73,12 @@ public class SingleSubstFormat1 extends SingleSubst { _coverage = Coverage.read(dis); } + @Override public int getFormat() { return 1; } + @Override public int substitute(int glyphId) { int i = _coverage.findGlyph(glyphId); if (i > -1) { @@ -85,6 +87,7 @@ public class SingleSubstFormat1 extends SingleSubst { return glyphId; } + @Override public String getTypeAsString() { return "SingleSubstFormat1"; } diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/SingleSubstFormat2.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/SingleSubstFormat2.java index 2e47b2924..4d46b07b4 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/SingleSubstFormat2.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/SingleSubstFormat2.java @@ -78,10 +78,12 @@ public class SingleSubstFormat2 extends SingleSubst { _coverage = Coverage.read(dis); } + @Override public int getFormat() { return 2; } + @Override public int substitute(int glyphId) { int i = _coverage.findGlyph(glyphId); if (i > -1) { @@ -90,6 +92,7 @@ public class SingleSubstFormat2 extends SingleSubst { return glyphId; } + @Override public String getTypeAsString() { return "SingleSubstFormat2"; } diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/TableDirectory.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/TableDirectory.java index 8c5678088..23ecba804 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/TableDirectory.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/TableDirectory.java @@ -113,6 +113,7 @@ public class TableDirectory { return _version; } + @Override public String toString() { StringBuilder sb = new StringBuilder() .append("Offset Table\n------ -----") diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/VdmxTable.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/VdmxTable.java index 28f9aa6e3..bebd7f946 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/VdmxTable.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/VdmxTable.java @@ -148,10 +148,12 @@ public class VdmxTable implements Table { } } + @Override public int getType() { return VDMX; } + @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("'VDMX' Table - Precomputed Vertical Device Metrics\n") @@ -191,6 +193,7 @@ public class VdmxTable implements Table { * particular table. * @return A directory entry */ + @Override public DirectoryEntry getDirectoryEntry() { return _de; } diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/VheaTable.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/VheaTable.java index f42da119b..521b87cc8 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/VheaTable.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/VheaTable.java @@ -105,6 +105,7 @@ public class VheaTable implements Table { return _numberOfLongVerMetrics; } + @Override public int getType() { return vhea; } @@ -113,6 +114,7 @@ public class VheaTable implements Table { return _yMaxExtent; } + @Override public String toString() { return new StringBuilder() .append("'vhea' Table - Vertical Header\n------------------------------") @@ -142,6 +144,7 @@ public class VheaTable implements Table { * particular table. * @return A directory entry */ + @Override public DirectoryEntry getDirectoryEntry() { return _de; } diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/VmtxTable.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/VmtxTable.java index 348405380..1b77a6fdc 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/VmtxTable.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/VmtxTable.java @@ -77,10 +77,12 @@ public class VmtxTable implements Table { } } + @Override public int getType() { return vmtx; } + @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("'vmtx' Table - Vertical Metrics\n-------------------------------\n"); @@ -106,6 +108,7 @@ public class VmtxTable implements Table { * particular table. * @return A directory entry */ + @Override public DirectoryEntry getDirectoryEntry() { return _de; } diff --git a/src/jogl/classes/jogamp/graph/font/typecast/tt/engine/Parser.java b/src/jogl/classes/jogamp/graph/font/typecast/tt/engine/Parser.java index c5a2b6e87..1159b2c17 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/tt/engine/Parser.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/tt/engine/Parser.java @@ -148,6 +148,7 @@ public class Parser { instructions[2] = program; } + @Override public String toString() { StringBuilder sb = new StringBuilder(); int ip = 0; diff --git a/src/jogl/classes/jogamp/graph/geom/plane/Path2D.java b/src/jogl/classes/jogamp/graph/geom/plane/Path2D.java index c1ee17a4b..33b80d6b8 100644 --- a/src/jogl/classes/jogamp/graph/geom/plane/Path2D.java +++ b/src/jogl/classes/jogamp/graph/geom/plane/Path2D.java @@ -122,18 +122,22 @@ public final class Path2D implements Cloneable { this.t = at; } + @Override public int getWindingRule() { return p.getWindingRule(); } + @Override public boolean isDone() { return typeIndex >= p.typeSize; } + @Override public void next() { typeIndex++; } + @Override public int currentSegment(float[] coords) { if (isDone()) { throw new NoSuchElementException(iteratorOutOfBounds); @@ -256,6 +260,7 @@ public final class Path2D implements Cloneable { } } + @Override public String toString() { return "[size "+size()+", closed "+isClosed()+"]"; } diff --git a/src/jogl/classes/jogamp/opengl/Debug.java b/src/jogl/classes/jogamp/opengl/Debug.java index 74892d894..9332b670a 100644 --- a/src/jogl/classes/jogamp/opengl/Debug.java +++ b/src/jogl/classes/jogamp/opengl/Debug.java @@ -54,6 +54,7 @@ public class Debug extends PropertyAccess { static { AccessController.doPrivileged(new PrivilegedAction() { + @Override public Object run() { PropertyAccess.addTrustedPrefix("jogl."); return null; diff --git a/src/jogl/classes/jogamp/opengl/DesktopGLDynamicLookupHelper.java b/src/jogl/classes/jogamp/opengl/DesktopGLDynamicLookupHelper.java index a1023acd2..c1e1d1821 100644 --- a/src/jogl/classes/jogamp/opengl/DesktopGLDynamicLookupHelper.java +++ b/src/jogl/classes/jogamp/opengl/DesktopGLDynamicLookupHelper.java @@ -39,6 +39,7 @@ public class DesktopGLDynamicLookupHelper extends GLDynamicLookupHelper { public final DesktopGLDynamicLibraryBundleInfo getDesktopGLBundleInfo() { return (DesktopGLDynamicLibraryBundleInfo) getBundleInfo(); } + @Override public final synchronized boolean loadGLULibrary() { /** hacky code .. where all platform GLU libs are tried ..*/ if(null==gluLib) { diff --git a/src/jogl/classes/jogamp/opengl/FPSCounterImpl.java b/src/jogl/classes/jogamp/opengl/FPSCounterImpl.java index c96f7db32..08a1fe882 100644 --- a/src/jogl/classes/jogamp/opengl/FPSCounterImpl.java +++ b/src/jogl/classes/jogamp/opengl/FPSCounterImpl.java @@ -87,16 +87,19 @@ public class FPSCounterImpl implements FPSCounter { return sb; } + @Override public String toString() { return toString(null).toString(); } + @Override public final synchronized void setUpdateFPSFrames(int frames, PrintStream out) { fpsUpdateFramesInterval = frames; fpsOutputStream = out; resetFPSCounter(); } + @Override public final synchronized void resetFPSCounter() { fpsStartTime = TimeUnit.NANOSECONDS.toMillis(System.nanoTime()); // overwrite startTime to real init one fpsLastUpdateTime = fpsStartTime; @@ -106,34 +109,42 @@ public class FPSCounterImpl implements FPSCounter { fpsLastPeriod = 0; fpsTotalDuration=0; } + @Override public final synchronized int getUpdateFPSFrames() { return fpsUpdateFramesInterval; } + @Override public final synchronized long getFPSStartTime() { return fpsStartTime; } + @Override public final synchronized long getLastFPSUpdateTime() { return fpsLastUpdateTime; } + @Override public final synchronized long getLastFPSPeriod() { return fpsLastPeriod; } + @Override public final synchronized float getLastFPS() { return fpsLast; } + @Override public final synchronized int getTotalFPSFrames() { return fpsTotalFrames; } + @Override public final synchronized long getTotalFPSDuration() { return fpsTotalDuration; } + @Override public final synchronized float getTotalFPS() { return fpsTotal; } diff --git a/src/jogl/classes/jogamp/opengl/GLContextImpl.java b/src/jogl/classes/jogamp/opengl/GLContextImpl.java index 7c3a5922b..5f487fa6d 100644 --- a/src/jogl/classes/jogamp/opengl/GLContextImpl.java +++ b/src/jogl/classes/jogamp/opengl/GLContextImpl.java @@ -1189,6 +1189,7 @@ public abstract class GLContextImpl extends GLContext { GLEmitter by looking up anew all of its function pointers. */ protected final void resetProcAddressTable(final ProcAddressTable table) { AccessController.doPrivileged(new PrivilegedAction() { + @Override public Object run() { table.reset(getDrawableImpl().getGLDynamicLookupHelper() ); return null; diff --git a/src/jogl/classes/jogamp/opengl/GLDebugMessageHandler.java b/src/jogl/classes/jogamp/opengl/GLDebugMessageHandler.java index b770f3b05..2c947693c 100644 --- a/src/jogl/classes/jogamp/opengl/GLDebugMessageHandler.java +++ b/src/jogl/classes/jogamp/opengl/GLDebugMessageHandler.java @@ -109,6 +109,7 @@ public class GLDebugMessageHandler { private final long getAddressFor(final ProcAddressTable table, final String functionName) { return AccessController.doPrivileged(new PrivilegedAction() { + @Override public Long run() { try { return Long.valueOf( table.getAddressFor(functionName) ); @@ -300,6 +301,7 @@ public class GLDebugMessageHandler { public StdErrGLDebugListener(boolean threadDump) { this.threadDump = threadDump; } + @Override public void messageSent(GLDebugMessage event) { System.err.println(event); if(threadDump) { diff --git a/src/jogl/classes/jogamp/opengl/GLDrawableHelper.java b/src/jogl/classes/jogamp/opengl/GLDrawableHelper.java index 2cf384fd7..4ce6a7121 100644 --- a/src/jogl/classes/jogamp/opengl/GLDrawableHelper.java +++ b/src/jogl/classes/jogamp/opengl/GLDrawableHelper.java @@ -80,7 +80,7 @@ public class GLDrawableHelper { /** -1 release, 0 nop, 1 claim */ private volatile int exclusiveContextSwitch; private GLAnimatorControl animatorCtrl; - private static Runnable nop = new Runnable() { public void run() {} }; + private static Runnable nop = new Runnable() { @Override public void run() {} }; public GLDrawableHelper() { reset(); @@ -493,6 +493,7 @@ public class GLDrawableHelper { final boolean isPaused = isAnimatorAnimatingOnOtherThread() && animatorCtrl.pause(); final GLEventListener[] res = new GLEventListener[] { null }; final Runnable action = new Runnable() { + @Override public void run() { res[0] = disposeGLEventListener(autoDrawable, listener, remove); } @@ -525,6 +526,7 @@ public class GLDrawableHelper { final boolean isPaused = isAnimatorAnimatingOnOtherThread() && animatorCtrl.pause(); final Runnable action = new Runnable() { + @Override public void run() { disposeAllGLEventListener(autoDrawable, remove); } diff --git a/src/jogl/classes/jogamp/opengl/GLDynamicLibraryBundleInfo.java b/src/jogl/classes/jogamp/opengl/GLDynamicLibraryBundleInfo.java index 640e181ae..39de3200d 100644 --- a/src/jogl/classes/jogamp/opengl/GLDynamicLibraryBundleInfo.java +++ b/src/jogl/classes/jogamp/opengl/GLDynamicLibraryBundleInfo.java @@ -46,6 +46,7 @@ public abstract class GLDynamicLibraryBundleInfo implements DynamicLibraryBundle * *

*/ + @Override public final boolean shallLinkGlobal() { return true; } /** diff --git a/src/jogl/classes/jogamp/opengl/GLOffscreenAutoDrawableImpl.java b/src/jogl/classes/jogamp/opengl/GLOffscreenAutoDrawableImpl.java index a22454d60..f175acf28 100644 --- a/src/jogl/classes/jogamp/opengl/GLOffscreenAutoDrawableImpl.java +++ b/src/jogl/classes/jogamp/opengl/GLOffscreenAutoDrawableImpl.java @@ -127,6 +127,7 @@ public class GLOffscreenAutoDrawableImpl extends GLAutoDrawableDelegate implemen return ((GLFBODrawableImpl)drawable).getFBObject(bufferName); } + @Override public final FBObject.TextureAttachment getTextureBuffer(int bufferName) { return ((GLFBODrawableImpl)drawable).getTextureBuffer(bufferName); } diff --git a/src/jogl/classes/jogamp/opengl/GLRunnableTask.java b/src/jogl/classes/jogamp/opengl/GLRunnableTask.java index 2238d49bc..6de92f533 100644 --- a/src/jogl/classes/jogamp/opengl/GLRunnableTask.java +++ b/src/jogl/classes/jogamp/opengl/GLRunnableTask.java @@ -52,6 +52,7 @@ public class GLRunnableTask implements GLRunnable { isFlushed = false; } + @Override public boolean run(GLAutoDrawable drawable) { boolean res = true; if(null == notifyObject) { diff --git a/src/jogl/classes/jogamp/opengl/GLWorkerThread.java b/src/jogl/classes/jogamp/opengl/GLWorkerThread.java index 979c6dc0a..100b46a5e 100644 --- a/src/jogl/classes/jogamp/opengl/GLWorkerThread.java +++ b/src/jogl/classes/jogamp/opengl/GLWorkerThread.java @@ -222,6 +222,7 @@ public class GLWorkerThread { protected static String getThreadName() { return Thread.currentThread().getName(); } static class WorkerRunnable implements Runnable { + @Override public void run() { // Notify starting thread that we're ready synchronized (lock) { diff --git a/src/jogl/classes/jogamp/opengl/MemoryObject.java b/src/jogl/classes/jogamp/opengl/MemoryObject.java index df793dadd..d10747690 100644 --- a/src/jogl/classes/jogamp/opengl/MemoryObject.java +++ b/src/jogl/classes/jogamp/opengl/MemoryObject.java @@ -59,10 +59,12 @@ public class MemoryObject { /** * @return the 32bit hash value generated via {@link HashUtil#getAddrSizeHash32_EqualDist(long, long)}. */ + @Override public int hashCode() { return hash; } + @Override public String toString() { return "MemoryObject[addr 0x"+Long.toHexString(addr)+", size 0x"+Long.toHexString(size)+", hash32: 0x"+Integer.toHexString(hash)+"]"; } diff --git a/src/jogl/classes/jogamp/opengl/SharedResourceRunner.java b/src/jogl/classes/jogamp/opengl/SharedResourceRunner.java index eddb36975..283ecdb9d 100644 --- a/src/jogl/classes/jogamp/opengl/SharedResourceRunner.java +++ b/src/jogl/classes/jogamp/opengl/SharedResourceRunner.java @@ -252,6 +252,7 @@ public class SharedResourceRunner implements Runnable { // done } + @Override public final void run() { final String threadName = getThreadName(); diff --git a/src/jogl/classes/jogamp/opengl/ThreadingImpl.java b/src/jogl/classes/jogamp/opengl/ThreadingImpl.java index 6ffe46b36..bf700d970 100644 --- a/src/jogl/classes/jogamp/opengl/ThreadingImpl.java +++ b/src/jogl/classes/jogamp/opengl/ThreadingImpl.java @@ -72,6 +72,7 @@ public class ThreadingImpl { static { threadingPlugin = AccessController.doPrivileged(new PrivilegedAction() { + @Override public ToolkitThreadingPlugin run() { final String singleThreadProp; { diff --git a/src/jogl/classes/jogamp/opengl/awt/AWTThreadingPlugin.java b/src/jogl/classes/jogamp/opengl/awt/AWTThreadingPlugin.java index cd1bb45c9..72c9ac54b 100644 --- a/src/jogl/classes/jogamp/opengl/awt/AWTThreadingPlugin.java +++ b/src/jogl/classes/jogamp/opengl/awt/AWTThreadingPlugin.java @@ -54,10 +54,12 @@ public class AWTThreadingPlugin implements ToolkitThreadingPlugin { public AWTThreadingPlugin() {} + @Override public final boolean isToolkitThread() throws GLException { return EventQueue.isDispatchThread(); } + @Override public final boolean isOpenGLThread() throws GLException { switch (ThreadingImpl.getMode()) { case ST_AWT: @@ -83,6 +85,7 @@ public class AWTThreadingPlugin implements ToolkitThreadingPlugin { } } + @Override public final void invokeOnOpenGLThread(boolean wait, Runnable r) throws GLException { switch (ThreadingImpl.getMode()) { case ST_AWT: diff --git a/src/jogl/classes/jogamp/opengl/awt/AWTTilePainter.java b/src/jogl/classes/jogamp/opengl/awt/AWTTilePainter.java index 5faee1307..ff07b04d0 100644 --- a/src/jogl/classes/jogamp/opengl/awt/AWTTilePainter.java +++ b/src/jogl/classes/jogamp/opengl/awt/AWTTilePainter.java @@ -147,6 +147,7 @@ public class AWTTilePainter { this.flipVertical = true; } + @Override public String toString() { return renderer.toString(); } public void setIsGLOriented(boolean v) { diff --git a/src/jogl/classes/jogamp/opengl/awt/Java2D.java b/src/jogl/classes/jogamp/opengl/awt/Java2D.java index 7a8ddf0b4..886cd9368 100644 --- a/src/jogl/classes/jogamp/opengl/awt/Java2D.java +++ b/src/jogl/classes/jogamp/opengl/awt/Java2D.java @@ -116,6 +116,7 @@ public class Java2D { static { AccessController.doPrivileged(new PrivilegedAction() { + @Override public Object run() { if (DEBUG) { System.err.println("Checking for Java2D/OpenGL support"); @@ -565,6 +566,7 @@ public class Java2D { private static int getOGLUtilitiesIntField(final String name) { Integer i = AccessController.doPrivileged(new PrivilegedAction() { + @Override public Integer run() { try { Class utils = Class.forName("sun.java2d.opengl.OGLUtilities"); @@ -608,6 +610,7 @@ public class Java2D { System.err.println("Starting initialization of J2D FBO share context"); } invokeWithOGLSharedContextCurrent(device.getDefaultConfiguration(), new Runnable() { + @Override public void run() { j2dFBOShareContext = GLDrawableFactory.getFactory(GLProfile.getDefault(GLProfile.getDefaultDevice())).createExternalGLContext(); } diff --git a/src/jogl/classes/jogamp/opengl/awt/VersionApplet.java b/src/jogl/classes/jogamp/opengl/awt/VersionApplet.java index a29d1e6aa..9173a38cb 100644 --- a/src/jogl/classes/jogamp/opengl/awt/VersionApplet.java +++ b/src/jogl/classes/jogamp/opengl/awt/VersionApplet.java @@ -54,6 +54,7 @@ public class VersionApplet extends Applet { this.f = f; this.va = va; } + @Override public void windowClosing(WindowEvent ev) { f.setVisible(false); va.stop(); @@ -129,24 +130,28 @@ public class VersionApplet extends Applet { } } + @Override public void init() { System.err.println("VersionApplet: init() - begin"); my_init(); System.err.println("VersionApplet: init() - end"); } + @Override public void start() { System.err.println("VersionApplet: start() - begin"); canvas.setVisible(true); System.err.println("VersionApplet: start() - end"); } + @Override public void stop() { System.err.println("VersionApplet: stop() - begin"); canvas.setVisible(false); System.err.println("VersionApplet: stop() - end"); } + @Override public void destroy() { System.err.println("VersionApplet: destroy() - start"); my_release(); @@ -154,6 +159,7 @@ public class VersionApplet extends Applet { } class GLInfo implements GLEventListener { + @Override public void init(GLAutoDrawable drawable) { GL gl = drawable.getGL(); String s = JoglVersion.getGLInfo(gl, null).toString(); @@ -161,12 +167,15 @@ public class VersionApplet extends Applet { tareaVersion.append(s); } + @Override public void reshape(GLAutoDrawable drawable, int x, int y, int width, int height) { } + @Override public void display(GLAutoDrawable drawable) { } + @Override public void dispose(GLAutoDrawable drawable) { } } diff --git a/src/jogl/classes/jogamp/opengl/egl/DesktopES2DynamicLibraryBundleInfo.java b/src/jogl/classes/jogamp/opengl/egl/DesktopES2DynamicLibraryBundleInfo.java index 1179e2b7f..7b85c3e75 100644 --- a/src/jogl/classes/jogamp/opengl/egl/DesktopES2DynamicLibraryBundleInfo.java +++ b/src/jogl/classes/jogamp/opengl/egl/DesktopES2DynamicLibraryBundleInfo.java @@ -47,20 +47,24 @@ public final class DesktopES2DynamicLibraryBundleInfo extends GLDynamicLibraryBu super(); } + @Override public final List getToolGetProcAddressFuncNameList() { List res = new ArrayList(); res.add("eglGetProcAddress"); return res; } + @Override public final long toolGetProcAddress(long toolGetProcAddressHandle, String funcName) { return EGL.eglGetProcAddress(toolGetProcAddressHandle, funcName); } + @Override public final boolean useToolGetProcAdressFirst(String funcName) { return true; } + @Override public final List> getToolLibNames() { final List> libsList = new ArrayList>(); final List libsGL = new ArrayList(); @@ -90,6 +94,7 @@ public final class DesktopES2DynamicLibraryBundleInfo extends GLDynamicLibraryBu return libsList; } + @Override public final List getGlueLibNames() { return glueLibNames; } diff --git a/src/jogl/classes/jogamp/opengl/egl/EGLDisplayUtil.java b/src/jogl/classes/jogamp/opengl/egl/EGLDisplayUtil.java index 89f34432d..3d864ad76 100644 --- a/src/jogl/classes/jogamp/opengl/egl/EGLDisplayUtil.java +++ b/src/jogl/classes/jogamp/opengl/egl/EGLDisplayUtil.java @@ -65,6 +65,7 @@ public class EGLDisplayUtil { this.createdStack = DEBUG ? new Throwable() : null; } + @Override public String toString() { return "EGLDisplay[0x"+Long.toHexString(eglDisplay)+": refCnt "+refCount+"]"; } @@ -248,9 +249,11 @@ public class EGLDisplayUtil { } public static final EGLGraphicsDevice.EGLDisplayLifecycleCallback eglLifecycleCallback = new EGLGraphicsDevice.EGLDisplayLifecycleCallback() { + @Override public long eglGetAndInitDisplay(long[] nativeDisplayID) { return eglGetDisplayAndInitialize(nativeDisplayID); } + @Override public void eglTerminate(long eglDisplayHandle) { EGLDisplayUtil.eglTerminate(eglDisplayHandle); } diff --git a/src/jogl/classes/jogamp/opengl/egl/EGLDrawable.java b/src/jogl/classes/jogamp/opengl/egl/EGLDrawable.java index bf269c548..ab28fb3fb 100644 --- a/src/jogl/classes/jogamp/opengl/egl/EGLDrawable.java +++ b/src/jogl/classes/jogamp/opengl/egl/EGLDrawable.java @@ -115,6 +115,7 @@ public abstract class EGLDrawable extends GLDrawableImpl { } } + @Override protected void destroyHandle() { final EGLWrappedSurface eglws = (EGLWrappedSurface) surface; if(DEBUG) { diff --git a/src/jogl/classes/jogamp/opengl/egl/EGLES1DynamicLibraryBundleInfo.java b/src/jogl/classes/jogamp/opengl/egl/EGLES1DynamicLibraryBundleInfo.java index 9ffcea864..361ec26ff 100644 --- a/src/jogl/classes/jogamp/opengl/egl/EGLES1DynamicLibraryBundleInfo.java +++ b/src/jogl/classes/jogamp/opengl/egl/EGLES1DynamicLibraryBundleInfo.java @@ -35,6 +35,7 @@ public final class EGLES1DynamicLibraryBundleInfo extends EGLDynamicLibraryBundl super(); } + @Override public final List> getToolLibNames() { final List> libsList = new ArrayList>(); { diff --git a/src/jogl/classes/jogamp/opengl/egl/EGLES2DynamicLibraryBundleInfo.java b/src/jogl/classes/jogamp/opengl/egl/EGLES2DynamicLibraryBundleInfo.java index de1f0a42e..74738463f 100644 --- a/src/jogl/classes/jogamp/opengl/egl/EGLES2DynamicLibraryBundleInfo.java +++ b/src/jogl/classes/jogamp/opengl/egl/EGLES2DynamicLibraryBundleInfo.java @@ -40,6 +40,7 @@ public final class EGLES2DynamicLibraryBundleInfo extends EGLDynamicLibraryBundl super(); } + @Override public final List> getToolLibNames() { final List> libsList = new ArrayList>(); { diff --git a/src/jogl/classes/jogamp/opengl/egl/EGLGraphicsConfigurationFactory.java b/src/jogl/classes/jogamp/opengl/egl/EGLGraphicsConfigurationFactory.java index 5764a6178..31fa14fbb 100644 --- a/src/jogl/classes/jogamp/opengl/egl/EGLGraphicsConfigurationFactory.java +++ b/src/jogl/classes/jogamp/opengl/egl/EGLGraphicsConfigurationFactory.java @@ -115,6 +115,7 @@ public class EGLGraphicsConfigurationFactory extends GLGraphicsConfigurationFact private EGLGraphicsConfigurationFactory() { } + @Override protected AbstractGraphicsConfiguration chooseGraphicsConfigurationImpl ( CapabilitiesImmutable capsChosen, CapabilitiesImmutable capsRequested, CapabilitiesChooser chooser, AbstractGraphicsScreen absScreen, int nativeVisualID) { diff --git a/src/jogl/classes/jogamp/opengl/egl/EGLUpstreamSurfaceHook.java b/src/jogl/classes/jogamp/opengl/egl/EGLUpstreamSurfaceHook.java index 5083c854f..dac058dc7 100644 --- a/src/jogl/classes/jogamp/opengl/egl/EGLUpstreamSurfaceHook.java +++ b/src/jogl/classes/jogamp/opengl/egl/EGLUpstreamSurfaceHook.java @@ -44,6 +44,7 @@ public class EGLUpstreamSurfaceHook implements UpstreamSurfaceHook.MutableSize { static String getThreadName() { return Thread.currentThread().getName(); } + @Override public final void setSize(int width, int height) { if(null != upstreamSurfaceHookMutableSize) { upstreamSurfaceHookMutableSize.setSize(width, height); diff --git a/src/jogl/classes/jogamp/opengl/glu/GLUquadricImpl.java b/src/jogl/classes/jogamp/opengl/glu/GLUquadricImpl.java index b4383c2e6..717b1255c 100644 --- a/src/jogl/classes/jogamp/opengl/glu/GLUquadricImpl.java +++ b/src/jogl/classes/jogamp/opengl/glu/GLUquadricImpl.java @@ -164,6 +164,7 @@ public class GLUquadricImpl implements GLUquadric { replaceImmModeSink(); } + @Override public void enableImmModeSink(boolean val) { if(gl.isGL2()) { immModeSinkEnabled=val; @@ -175,10 +176,12 @@ public class GLUquadricImpl implements GLUquadric { } } + @Override public boolean isImmModeSinkEnabled() { return immModeSinkEnabled; } + @Override public void setImmMode(boolean val) { if(immModeSinkEnabled) { immModeSinkImmediate=val; @@ -187,10 +190,12 @@ public class GLUquadricImpl implements GLUquadric { } } + @Override public boolean getImmMode() { return immModeSinkImmediate; } + @Override public ImmModeSink replaceImmModeSink() { if(!immModeSinkEnabled) return null; @@ -222,6 +227,7 @@ public class GLUquadricImpl implements GLUquadric { return res; } + @Override public void resetImmModeSink(GL gl) { if(immModeSinkEnabled) { immModeSink.reset(gl); diff --git a/src/jogl/classes/jogamp/opengl/glu/gl2/nurbs/GL2CurveEvaluator.java b/src/jogl/classes/jogamp/opengl/glu/gl2/nurbs/GL2CurveEvaluator.java index f57c2310f..4213dfd46 100644 --- a/src/jogl/classes/jogamp/opengl/glu/gl2/nurbs/GL2CurveEvaluator.java +++ b/src/jogl/classes/jogamp/opengl/glu/gl2/nurbs/GL2CurveEvaluator.java @@ -92,6 +92,7 @@ class GL2CurveEvaluator implements CurveEvaluator { /** * Pushes eval bit */ + @Override public void bgnmap1f() { // DONE if (output_triangles) { @@ -108,6 +109,7 @@ class GL2CurveEvaluator implements CurveEvaluator { /** * Pops all OpenGL attributes */ + @Override public void endmap1f() { // DONE if (output_triangles) { @@ -127,6 +129,7 @@ class GL2CurveEvaluator implements CurveEvaluator { * @param order curve order * @param ps control points */ + @Override public void map1f(int type, float ulo, float uhi, int stride, int order, CArrayOfFloats ps) { if (output_triangles) { @@ -153,6 +156,7 @@ class GL2CurveEvaluator implements CurveEvaluator { * Calls opengl enable * @param type what to enable */ + @Override public void enable(int type) { // DONE gl.glEnable(type); @@ -164,6 +168,7 @@ class GL2CurveEvaluator implements CurveEvaluator { * @param u1 low u * @param u2 high u */ + @Override public void mapgrid1f(int nu, float u1, float u2) { if (output_triangles) { // System.out.println("TODO curveevaluator.mapgrid1f"); @@ -179,6 +184,7 @@ class GL2CurveEvaluator implements CurveEvaluator { * @param from lowest param * @param to highest param */ + @Override public void mapmesh1f(int style, int from, int to) { /* //DEBUG drawing control points this.poradi++; diff --git a/src/jogl/classes/jogamp/opengl/glu/gl2/nurbs/GL2SurfaceEvaluator.java b/src/jogl/classes/jogamp/opengl/glu/gl2/nurbs/GL2SurfaceEvaluator.java index 155c4f9a9..e9c9fca3f 100644 --- a/src/jogl/classes/jogamp/opengl/glu/gl2/nurbs/GL2SurfaceEvaluator.java +++ b/src/jogl/classes/jogamp/opengl/glu/gl2/nurbs/GL2SurfaceEvaluator.java @@ -72,6 +72,7 @@ class GL2SurfaceEvaluator implements SurfaceEvaluator { /** * Pushes eval bit */ + @Override public void bgnmap2f() { if (output_triangles) { @@ -88,6 +89,7 @@ class GL2SurfaceEvaluator implements SurfaceEvaluator { * Sets glPolygonMode * @param style polygon mode (N_MESHFILL/N_MESHLINE/N_MESHPOINT) */ + @Override public void polymode(int style) { if (!output_triangles) { switch (style) { @@ -109,6 +111,7 @@ class GL2SurfaceEvaluator implements SurfaceEvaluator { /** * Pops all attributes */ + @Override public void endmap2f() { // TODO Auto-generated method stub if (output_triangles) { @@ -126,6 +129,7 @@ class GL2SurfaceEvaluator implements SurfaceEvaluator { * @param vlo * @param vhi */ + @Override public void domain2f(float ulo, float uhi, float vlo, float vhi) { // DONE } @@ -139,6 +143,7 @@ class GL2SurfaceEvaluator implements SurfaceEvaluator { * @param v0 lowest v * @param v1 highest v */ + @Override public void mapgrid2f(int nu, float u0, float u1, int nv, float v0, float v1) { if (output_triangles) { @@ -157,6 +162,7 @@ class GL2SurfaceEvaluator implements SurfaceEvaluator { * @param vmin minimum V * @param vmax maximum V */ + @Override public void mapmesh2f(int style, int umin, int umax, int vmin, int vmax) { if (output_triangles) { // System.out.println("TODO openglsurfaceavaluator.mapmesh2f output_triangles"); @@ -195,6 +201,7 @@ class GL2SurfaceEvaluator implements SurfaceEvaluator { * @param vorder surface order in v direction * @param pts control points */ + @Override public void map2f(int type, float ulo, float uhi, int ustride, int uorder, float vlo, float vhi, int vstride, int vorder, CArrayOfFloats pts) { // TODO Auto-generated method stub @@ -210,6 +217,7 @@ class GL2SurfaceEvaluator implements SurfaceEvaluator { * Calls opengl enable * @param type what to enable */ + @Override public void enable(int type) { //DONE gl.glEnable(type); diff --git a/src/jogl/classes/jogamp/opengl/glu/mipmap/Extract1010102.java b/src/jogl/classes/jogamp/opengl/glu/mipmap/Extract1010102.java index 5269024b4..0c155ff96 100644 --- a/src/jogl/classes/jogamp/opengl/glu/mipmap/Extract1010102.java +++ b/src/jogl/classes/jogamp/opengl/glu/mipmap/Extract1010102.java @@ -56,6 +56,7 @@ public class Extract1010102 implements Extract { public Extract1010102() { } + @Override public void extract( boolean isSwap, ByteBuffer packedPixel, float[] extractComponents ) { long uint = 0; @@ -76,6 +77,7 @@ public class Extract1010102 implements Extract { extractComponents[3] = (float)( ( uint & 0x00000003 ) ) / 3.0f; } + @Override public void shove( float[] shoveComponents, int index, ByteBuffer packedPixel ) { // 11110000,00000000 == 0xF000 // 00001111,00000000 == 0x0F00 diff --git a/src/jogl/classes/jogamp/opengl/glu/mipmap/Extract1555rev.java b/src/jogl/classes/jogamp/opengl/glu/mipmap/Extract1555rev.java index 6982931d3..5208ea537 100644 --- a/src/jogl/classes/jogamp/opengl/glu/mipmap/Extract1555rev.java +++ b/src/jogl/classes/jogamp/opengl/glu/mipmap/Extract1555rev.java @@ -56,6 +56,7 @@ public class Extract1555rev implements Extract { public Extract1555rev() { } + @Override public void extract( boolean isSwap, ByteBuffer packedPixel, float[] extractComponents ) { int ushort = 0; @@ -76,6 +77,7 @@ public class Extract1555rev implements Extract { extractComponents[3] = (float)( ( ushort & 0x8000 ) >> 15); } + @Override public void shove( float[] shoveComponents, int index, ByteBuffer packedPixel ) { // 00000000,00011111 == 0x001F // 00000011,11100000 == 0x03E0 diff --git a/src/jogl/classes/jogamp/opengl/glu/mipmap/Extract2101010rev.java b/src/jogl/classes/jogamp/opengl/glu/mipmap/Extract2101010rev.java index 1c7db6218..1bf8abcc3 100644 --- a/src/jogl/classes/jogamp/opengl/glu/mipmap/Extract2101010rev.java +++ b/src/jogl/classes/jogamp/opengl/glu/mipmap/Extract2101010rev.java @@ -56,6 +56,7 @@ public class Extract2101010rev implements Extract { public Extract2101010rev() { } + @Override public void extract( boolean isSwap, ByteBuffer packedPixel, float[] extractComponents ) { long uint = 0; @@ -76,6 +77,7 @@ public class Extract2101010rev implements Extract { extractComponents[3] = (float)( ( uint & 0xC0000000 ) >> 30 ) / 3.0f; } + @Override public void shove( float[] shoveComponents, int index, ByteBuffer packedPixel ) { // 11110000,00000000 == 0xF000 // 00001111,00000000 == 0x0F00 diff --git a/src/jogl/classes/jogamp/opengl/glu/mipmap/Extract233rev.java b/src/jogl/classes/jogamp/opengl/glu/mipmap/Extract233rev.java index 672c86c32..c86b39e63 100644 --- a/src/jogl/classes/jogamp/opengl/glu/mipmap/Extract233rev.java +++ b/src/jogl/classes/jogamp/opengl/glu/mipmap/Extract233rev.java @@ -56,6 +56,7 @@ public class Extract233rev implements Extract { public Extract233rev() { } + @Override public void extract( boolean isSwap, ByteBuffer packedPixel, float[] extractComponents ) { // 11100000 == 0xe0 // 00011100 == 0x1c @@ -66,6 +67,7 @@ public class Extract233rev implements Extract { extractComponents[2] = (float)((ubyte & 0xC0) >> 6) / 3.0f; } + @Override public void shove( float[] shoveComponents, int index, ByteBuffer packedPixel ) { // 11100000 == 0xE0 // 00011100 == 0x1C diff --git a/src/jogl/classes/jogamp/opengl/glu/mipmap/Extract332.java b/src/jogl/classes/jogamp/opengl/glu/mipmap/Extract332.java index 6cdbc5cb0..706f0c3f2 100644 --- a/src/jogl/classes/jogamp/opengl/glu/mipmap/Extract332.java +++ b/src/jogl/classes/jogamp/opengl/glu/mipmap/Extract332.java @@ -56,6 +56,7 @@ public class Extract332 implements Extract { public Extract332() { } + @Override public void extract( boolean isSwap, ByteBuffer packedPixel, float[] extractComponents ) { // 11100000 == 0xe0 // 00011100 == 0x1c @@ -66,6 +67,7 @@ public class Extract332 implements Extract { extractComponents[2] = (float)((ubyte & 0x03)) / 3.0f; } + @Override public void shove( float[] shoveComponents, int index, ByteBuffer packedPixel ) { // 11100000 == 0xE0 // 00011100 == 0x1C diff --git a/src/jogl/classes/jogamp/opengl/glu/mipmap/Extract4444.java b/src/jogl/classes/jogamp/opengl/glu/mipmap/Extract4444.java index b36b9fb82..182d66ce2 100644 --- a/src/jogl/classes/jogamp/opengl/glu/mipmap/Extract4444.java +++ b/src/jogl/classes/jogamp/opengl/glu/mipmap/Extract4444.java @@ -56,6 +56,7 @@ public class Extract4444 implements Extract { public Extract4444() { } + @Override public void extract( boolean isSwap, ByteBuffer packedPixel, float[] extractComponents ) { int ushort = 0; @@ -76,6 +77,7 @@ public class Extract4444 implements Extract { extractComponents[3] = (float)( ( ushort & 0x000F ) ) / 15.0f; } + @Override public void shove( float[] shoveComponents, int index, ByteBuffer packedPixel ) { // 11110000,00000000 == 0xF000 // 00001111,00000000 == 0x0F00 diff --git a/src/jogl/classes/jogamp/opengl/glu/mipmap/Extract4444rev.java b/src/jogl/classes/jogamp/opengl/glu/mipmap/Extract4444rev.java index b7a3ed55f..52ecdc17c 100644 --- a/src/jogl/classes/jogamp/opengl/glu/mipmap/Extract4444rev.java +++ b/src/jogl/classes/jogamp/opengl/glu/mipmap/Extract4444rev.java @@ -56,6 +56,7 @@ public class Extract4444rev implements Extract { public Extract4444rev() { } + @Override public void extract( boolean isSwap, ByteBuffer packedPixel, float[] extractComponents ) { int ushort = 0; @@ -76,6 +77,7 @@ public class Extract4444rev implements Extract { extractComponents[3] = (float)( ( ushort & 0xF000 ) >> 12 ) / 15.0f; } + @Override public void shove( float[] shoveComponents, int index, ByteBuffer packedPixel ) { // 11110000,00000000 == 0xF000 // 00001111,00000000 == 0x0F00 diff --git a/src/jogl/classes/jogamp/opengl/glu/mipmap/Extract5551.java b/src/jogl/classes/jogamp/opengl/glu/mipmap/Extract5551.java index 4dc566b25..21f53aa1d 100644 --- a/src/jogl/classes/jogamp/opengl/glu/mipmap/Extract5551.java +++ b/src/jogl/classes/jogamp/opengl/glu/mipmap/Extract5551.java @@ -56,6 +56,7 @@ public class Extract5551 implements Extract { public Extract5551() { } + @Override public void extract( boolean isSwap, ByteBuffer packedPixel, float[] extractComponents ) { int ushort = 0; @@ -76,6 +77,7 @@ public class Extract5551 implements Extract { extractComponents[3] = (float)( ( ushort & 0xF000 ) ); } + @Override public void shove( float[] shoveComponents, int index, ByteBuffer packedPixel ) { // 11110000,00000000 == 0xF000 // 00001111,00000000 == 0x0F00 diff --git a/src/jogl/classes/jogamp/opengl/glu/mipmap/Extract565.java b/src/jogl/classes/jogamp/opengl/glu/mipmap/Extract565.java index e198e46d4..7408c45b2 100644 --- a/src/jogl/classes/jogamp/opengl/glu/mipmap/Extract565.java +++ b/src/jogl/classes/jogamp/opengl/glu/mipmap/Extract565.java @@ -56,6 +56,7 @@ public class Extract565 implements Extract { public Extract565() { } + @Override public void extract( boolean isSwap, ByteBuffer packedPixel, float[] extractComponents ) { int ushort = 0; @@ -74,6 +75,7 @@ public class Extract565 implements Extract { extractComponents[2] = (float)( ( ushort & 0x001F ) ) / 31.0f; } + @Override public void shove( float[] shoveComponents, int index, ByteBuffer packedPixel ) { // 11111000,00000000 == 0xF800 // 00000111,11100000 == 0x07E0 diff --git a/src/jogl/classes/jogamp/opengl/glu/mipmap/Extract565rev.java b/src/jogl/classes/jogamp/opengl/glu/mipmap/Extract565rev.java index fe19540ee..adaafa7ea 100644 --- a/src/jogl/classes/jogamp/opengl/glu/mipmap/Extract565rev.java +++ b/src/jogl/classes/jogamp/opengl/glu/mipmap/Extract565rev.java @@ -56,6 +56,7 @@ public class Extract565rev implements Extract { public Extract565rev() { } + @Override public void extract( boolean isSwap, ByteBuffer packedPixel, float[] extractComponents ) { int ushort = 0; @@ -74,6 +75,7 @@ public class Extract565rev implements Extract { extractComponents[2] = (float)( ( ushort & 0xF800 ) >> 11 ) / 31.0f; } + @Override public void shove( float[] shoveComponents, int index, ByteBuffer packedPixel ) { // 00000000,00111111 == 0x001F // 00000111,11100000 == 0x07E0 diff --git a/src/jogl/classes/jogamp/opengl/glu/mipmap/Extract8888.java b/src/jogl/classes/jogamp/opengl/glu/mipmap/Extract8888.java index 4602f2af9..be155d578 100644 --- a/src/jogl/classes/jogamp/opengl/glu/mipmap/Extract8888.java +++ b/src/jogl/classes/jogamp/opengl/glu/mipmap/Extract8888.java @@ -56,6 +56,7 @@ public class Extract8888 implements Extract { public Extract8888() { } + @Override public void extract( boolean isSwap, ByteBuffer packedPixel, float[] extractComponents ) { long uint = 0; @@ -76,6 +77,7 @@ public class Extract8888 implements Extract { extractComponents[3] = (float)( ( uint & 0x000000FF ) ) / 255.0f; } + @Override public void shove( float[] shoveComponents, int index, ByteBuffer packedPixel ) { // 11110000,00000000 == 0xF000 // 00001111,00000000 == 0x0F00 diff --git a/src/jogl/classes/jogamp/opengl/glu/mipmap/Extract8888rev.java b/src/jogl/classes/jogamp/opengl/glu/mipmap/Extract8888rev.java index 373cb102a..294e60e12 100644 --- a/src/jogl/classes/jogamp/opengl/glu/mipmap/Extract8888rev.java +++ b/src/jogl/classes/jogamp/opengl/glu/mipmap/Extract8888rev.java @@ -56,6 +56,7 @@ public class Extract8888rev implements Extract { public Extract8888rev() { } + @Override public void extract( boolean isSwap, ByteBuffer packedPixel, float[] extractComponents ) { long uint = 0; @@ -76,6 +77,7 @@ public class Extract8888rev implements Extract { extractComponents[3] = (float)( ( uint & 0xFF000000 ) >> 24 ) / 255.0f; } + @Override public void shove( float[] shoveComponents, int index, ByteBuffer packedPixel ) { // 11110000,00000000 == 0xF000 // 00001111,00000000 == 0x0F00 diff --git a/src/jogl/classes/jogamp/opengl/glu/mipmap/ExtractFloat.java b/src/jogl/classes/jogamp/opengl/glu/mipmap/ExtractFloat.java index ac0f2f290..1dd8bff8a 100644 --- a/src/jogl/classes/jogamp/opengl/glu/mipmap/ExtractFloat.java +++ b/src/jogl/classes/jogamp/opengl/glu/mipmap/ExtractFloat.java @@ -56,6 +56,7 @@ public class ExtractFloat implements ExtractPrimitive { public ExtractFloat() { } + @Override public double extract( boolean isSwap, ByteBuffer data ) { float f = 0; if( isSwap ) { @@ -67,6 +68,7 @@ public class ExtractFloat implements ExtractPrimitive { return( f ); } + @Override public void shove( double value, int index, ByteBuffer data ) { assert(0.0 <= value && value < 1.0); data.asFloatBuffer().put( index, (float)value ); diff --git a/src/jogl/classes/jogamp/opengl/glu/mipmap/ExtractSByte.java b/src/jogl/classes/jogamp/opengl/glu/mipmap/ExtractSByte.java index 399386e30..dcbe52a40 100644 --- a/src/jogl/classes/jogamp/opengl/glu/mipmap/ExtractSByte.java +++ b/src/jogl/classes/jogamp/opengl/glu/mipmap/ExtractSByte.java @@ -56,12 +56,14 @@ public class ExtractSByte implements ExtractPrimitive { public ExtractSByte() { } + @Override public double extract( boolean isSwap, ByteBuffer sbyte ) { byte b = sbyte.get(); assert( b <= 127 ); return( b ); } + @Override public void shove( double value, int index, ByteBuffer data ) { data.position( index ); data.put( (byte)value ); diff --git a/src/jogl/classes/jogamp/opengl/glu/mipmap/ExtractSInt.java b/src/jogl/classes/jogamp/opengl/glu/mipmap/ExtractSInt.java index be3fb3092..547bd944a 100644 --- a/src/jogl/classes/jogamp/opengl/glu/mipmap/ExtractSInt.java +++ b/src/jogl/classes/jogamp/opengl/glu/mipmap/ExtractSInt.java @@ -56,6 +56,7 @@ public class ExtractSInt implements ExtractPrimitive { public ExtractSInt() { } + @Override public double extract( boolean isSwap, ByteBuffer uint ) { int i = 0; if( isSwap ) { @@ -67,6 +68,7 @@ public class ExtractSInt implements ExtractPrimitive { return( i ); } + @Override public void shove( double value, int index, ByteBuffer data ) { assert(0.0 <= value && value < Integer.MAX_VALUE); IntBuffer ib = data.asIntBuffer(); diff --git a/src/jogl/classes/jogamp/opengl/glu/mipmap/ExtractSShort.java b/src/jogl/classes/jogamp/opengl/glu/mipmap/ExtractSShort.java index 1e123c9b4..7dc172976 100644 --- a/src/jogl/classes/jogamp/opengl/glu/mipmap/ExtractSShort.java +++ b/src/jogl/classes/jogamp/opengl/glu/mipmap/ExtractSShort.java @@ -56,6 +56,7 @@ public class ExtractSShort implements ExtractPrimitive { public ExtractSShort() { } + @Override public double extract( boolean isSwap, ByteBuffer ushort ) { short s = 0; if( isSwap ) { @@ -67,6 +68,7 @@ public class ExtractSShort implements ExtractPrimitive { return( s ); } + @Override public void shove( double value, int index, ByteBuffer data ) { assert(0.0 <= value && value < 32768.0); ShortBuffer sb = data.asShortBuffer(); diff --git a/src/jogl/classes/jogamp/opengl/glu/mipmap/ExtractUByte.java b/src/jogl/classes/jogamp/opengl/glu/mipmap/ExtractUByte.java index 26ca5cd40..3e933811c 100644 --- a/src/jogl/classes/jogamp/opengl/glu/mipmap/ExtractUByte.java +++ b/src/jogl/classes/jogamp/opengl/glu/mipmap/ExtractUByte.java @@ -56,12 +56,14 @@ public class ExtractUByte implements ExtractPrimitive { public ExtractUByte() { } + @Override public double extract( boolean isSwap, ByteBuffer ubyte ) { int i = 0x000000FF & ubyte.get(); assert( i <= 255 ); return( i ); } + @Override public void shove( double value, int index, ByteBuffer data ) { assert(0.0 <= value && value < 256.0); data.position( index ); diff --git a/src/jogl/classes/jogamp/opengl/glu/mipmap/ExtractUInt.java b/src/jogl/classes/jogamp/opengl/glu/mipmap/ExtractUInt.java index 8c94c89fc..1c34828b3 100644 --- a/src/jogl/classes/jogamp/opengl/glu/mipmap/ExtractUInt.java +++ b/src/jogl/classes/jogamp/opengl/glu/mipmap/ExtractUInt.java @@ -56,6 +56,7 @@ public class ExtractUInt implements ExtractPrimitive { public ExtractUInt() { } + @Override public double extract( boolean isSwap, ByteBuffer uint ) { long i = 0; if( isSwap ) { @@ -67,6 +68,7 @@ public class ExtractUInt implements ExtractPrimitive { return( i ); } + @Override public void shove( double value, int index, ByteBuffer data ) { assert(0.0 <= value && value < 0xFFFFFFFF); IntBuffer ib = data.asIntBuffer(); diff --git a/src/jogl/classes/jogamp/opengl/glu/mipmap/ExtractUShort.java b/src/jogl/classes/jogamp/opengl/glu/mipmap/ExtractUShort.java index 55115c6f7..8e0d25c42 100644 --- a/src/jogl/classes/jogamp/opengl/glu/mipmap/ExtractUShort.java +++ b/src/jogl/classes/jogamp/opengl/glu/mipmap/ExtractUShort.java @@ -56,6 +56,7 @@ public class ExtractUShort implements ExtractPrimitive { public ExtractUShort() { } + @Override public double extract( boolean isSwap, ByteBuffer ushort ) { int i = 0; if( isSwap ) { @@ -67,6 +68,7 @@ public class ExtractUShort implements ExtractPrimitive { return( i ); } + @Override public void shove( double value, int index, ByteBuffer data ) { assert(0.0 <= value && value < 65536.0); ShortBuffer sb = data.asShortBuffer(); diff --git a/src/jogl/classes/jogamp/opengl/glu/tessellator/PriorityQHeap.java b/src/jogl/classes/jogamp/opengl/glu/tessellator/PriorityQHeap.java index 474056cc3..1ac0fd438 100644 --- a/src/jogl/classes/jogamp/opengl/glu/tessellator/PriorityQHeap.java +++ b/src/jogl/classes/jogamp/opengl/glu/tessellator/PriorityQHeap.java @@ -81,6 +81,7 @@ class PriorityQHeap extends jogamp.opengl.glu.tessellator.PriorityQ { } /* really __gl_pqHeapDeletePriorityQ */ + @Override void pqDeletePriorityQ() { handles = null; nodes = null; @@ -137,6 +138,7 @@ class PriorityQHeap extends jogamp.opengl.glu.tessellator.PriorityQ { } /* really __gl_pqHeapInit */ + @Override boolean pqInit() { int i; @@ -152,6 +154,7 @@ class PriorityQHeap extends jogamp.opengl.glu.tessellator.PriorityQ { /* really __gl_pqHeapInsert */ /* returns LONG_MAX iff out of memory */ + @Override int pqInsert(Object keyNew) { int curr; int free; @@ -207,6 +210,7 @@ class PriorityQHeap extends jogamp.opengl.glu.tessellator.PriorityQ { } /* really __gl_pqHeapExtractMin */ + @Override Object pqExtractMin() { jogamp.opengl.glu.tessellator.PriorityQ.PQnode[] n = nodes; jogamp.opengl.glu.tessellator.PriorityQ.PQhandleElem[] h = handles; @@ -229,6 +233,7 @@ class PriorityQHeap extends jogamp.opengl.glu.tessellator.PriorityQ { } /* really __gl_pqHeapDelete */ + @Override void pqDelete(int hCurr) { jogamp.opengl.glu.tessellator.PriorityQ.PQnode[] n = nodes; jogamp.opengl.glu.tessellator.PriorityQ.PQhandleElem[] h = handles; @@ -252,10 +257,12 @@ class PriorityQHeap extends jogamp.opengl.glu.tessellator.PriorityQ { freeList = hCurr; } + @Override Object pqMinimum() { return handles[nodes[1].handle].key; } + @Override boolean pqIsEmpty() { return size == 0; } diff --git a/src/jogl/classes/jogamp/opengl/glu/tessellator/PriorityQSort.java b/src/jogl/classes/jogamp/opengl/glu/tessellator/PriorityQSort.java index f9e0225e3..cf54b15c3 100644 --- a/src/jogl/classes/jogamp/opengl/glu/tessellator/PriorityQSort.java +++ b/src/jogl/classes/jogamp/opengl/glu/tessellator/PriorityQSort.java @@ -71,6 +71,7 @@ class PriorityQSort extends jogamp.opengl.glu.tessellator.PriorityQ { } /* really __gl_pqSortDeletePriorityQ */ + @Override void pqDeletePriorityQ() { if (heap != null) heap.pqDeletePriorityQ(); order = null; @@ -100,6 +101,7 @@ class PriorityQSort extends jogamp.opengl.glu.tessellator.PriorityQ { } /* really __gl_pqSortInit */ + @Override boolean pqInit() { int p, r, i, j; int piv; @@ -191,6 +193,7 @@ class PriorityQSort extends jogamp.opengl.glu.tessellator.PriorityQ { /* really __gl_pqSortInsert */ /* returns LONG_MAX iff out of memory */ + @Override int pqInsert(Object keyNew) { int curr; @@ -220,6 +223,7 @@ class PriorityQSort extends jogamp.opengl.glu.tessellator.PriorityQ { } /* really __gl_pqSortExtractMin */ + @Override Object pqExtractMin() { Object sortMin, heapMin; @@ -240,6 +244,7 @@ class PriorityQSort extends jogamp.opengl.glu.tessellator.PriorityQ { } /* really __gl_pqSortMinimum */ + @Override Object pqMinimum() { Object sortMin, heapMin; @@ -257,11 +262,13 @@ class PriorityQSort extends jogamp.opengl.glu.tessellator.PriorityQ { } /* really __gl_pqSortIsEmpty */ + @Override boolean pqIsEmpty() { return (size == 0) && heap.pqIsEmpty(); } /* really __gl_pqSortDelete */ + @Override void pqDelete(int curr) { if (curr >= 0) { heap.pqDelete(curr); diff --git a/src/jogl/classes/jogamp/opengl/glu/tessellator/Render.java b/src/jogl/classes/jogamp/opengl/glu/tessellator/Render.java index 1801e1c59..a2e973508 100644 --- a/src/jogl/classes/jogamp/opengl/glu/tessellator/Render.java +++ b/src/jogl/classes/jogamp/opengl/glu/tessellator/Render.java @@ -279,6 +279,7 @@ class Render { } private static class RenderTriangle implements renderCallBack { + @Override public void render(GLUtessellatorImpl tess, jogamp.opengl.glu.tessellator.GLUhalfEdge e, long size) { /* Just add the triangle to a triangle list, so we can render all * the separate triangles at once. @@ -323,6 +324,7 @@ class Render { } private static class RenderFan implements renderCallBack { + @Override public void render(GLUtessellatorImpl tess, jogamp.opengl.glu.tessellator.GLUhalfEdge e, long size) { /* Render as many CCW triangles as possible in a fan starting from * edge "e". The fan *should* contain exactly "size" triangles @@ -345,6 +347,7 @@ class Render { } private static class RenderStrip implements renderCallBack { + @Override public void render(GLUtessellatorImpl tess, jogamp.opengl.glu.tessellator.GLUhalfEdge e, long size) { /* Render as many CCW triangles as possible in a strip starting from * edge "e". The strip *should* contain exactly "size" triangles diff --git a/src/jogl/classes/jogamp/opengl/glu/tessellator/Sweep.java b/src/jogl/classes/jogamp/opengl/glu/tessellator/Sweep.java index b4a400c1c..364a7f198 100644 --- a/src/jogl/classes/jogamp/opengl/glu/tessellator/Sweep.java +++ b/src/jogl/classes/jogamp/opengl/glu/tessellator/Sweep.java @@ -1150,6 +1150,7 @@ class Sweep { */ { /* __gl_dictListNewDict */ tess.dict = Dict.dictNewDict(tess, new Dict.DictLeq() { + @Override public boolean leq(Object frame, Object key1, Object key2) { return EdgeLeq(tess, (ActiveRegion) key1, (ActiveRegion) key2); } @@ -1231,6 +1232,7 @@ class Sweep { /* __gl_pqSortNewPriorityQ */ pq = tess.pq = PriorityQ.pqNewPriorityQ(new PriorityQ.Leq() { + @Override public boolean leq(Object key1, Object key2) { return Geom.VertLeq(((GLUvertex) key1), (GLUvertex) key2); } diff --git a/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLContext.java b/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLContext.java index 5cc4003fe..03aae3f78 100644 --- a/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLContext.java +++ b/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLContext.java @@ -822,6 +822,7 @@ public class MacOSXCGLContext extends GLContextImpl texID = fbod.getTextureBuffer(GL.GL_FRONT).getName(); pbufferHandle = 0; fbod.setSwapBufferContext(new GLFBODrawableImpl.SwapBufferContext() { + @Override public void swapBuffers(boolean doubleBuffered) { MacOSXCGLContext.NSOpenGLImpl.this.swapBuffers(); } } ) ; diff --git a/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLDrawableFactory.java b/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLDrawableFactory.java index 6f86e840b..994eee8d7 100644 --- a/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLDrawableFactory.java +++ b/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLDrawableFactory.java @@ -229,6 +229,7 @@ public class MacOSXCGLDrawableFactory extends GLDrawableFactoryImpl { } } + @Override protected final SharedResource getOrCreateSharedResourceImpl(AbstractGraphicsDevice adevice) { final String connection = adevice.getConnection(); SharedResource sr; diff --git a/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLGraphicsConfiguration.java b/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLGraphicsConfiguration.java index 535c4d2d3..13e249a58 100644 --- a/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLGraphicsConfiguration.java +++ b/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLGraphicsConfiguration.java @@ -59,6 +59,7 @@ public class MacOSXCGLGraphicsConfiguration extends MutableGraphicsConfiguration super(screen, capsChosen, capsRequested); } + @Override public Object clone() { return super.clone(); } diff --git a/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLGraphicsConfigurationFactory.java b/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLGraphicsConfigurationFactory.java index e761be7b7..db2a1df68 100644 --- a/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLGraphicsConfigurationFactory.java +++ b/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLGraphicsConfigurationFactory.java @@ -59,6 +59,7 @@ public class MacOSXCGLGraphicsConfigurationFactory extends GLGraphicsConfigurati private MacOSXCGLGraphicsConfigurationFactory() { } + @Override protected AbstractGraphicsConfiguration chooseGraphicsConfigurationImpl( CapabilitiesImmutable capsChosen, CapabilitiesImmutable capsRequested, CapabilitiesChooser chooser, AbstractGraphicsScreen absScreen, int nativeVisualID) { diff --git a/src/jogl/classes/jogamp/opengl/macosx/cgl/awt/MacOSXAWTCGLGraphicsConfigurationFactory.java b/src/jogl/classes/jogamp/opengl/macosx/cgl/awt/MacOSXAWTCGLGraphicsConfigurationFactory.java index c08259665..21923531f 100644 --- a/src/jogl/classes/jogamp/opengl/macosx/cgl/awt/MacOSXAWTCGLGraphicsConfigurationFactory.java +++ b/src/jogl/classes/jogamp/opengl/macosx/cgl/awt/MacOSXAWTCGLGraphicsConfigurationFactory.java @@ -63,6 +63,7 @@ public class MacOSXAWTCGLGraphicsConfigurationFactory extends GLGraphicsConfigur private MacOSXAWTCGLGraphicsConfigurationFactory() { } + @Override protected AbstractGraphicsConfiguration chooseGraphicsConfigurationImpl( CapabilitiesImmutable capsChosen, CapabilitiesImmutable capsRequested, CapabilitiesChooser chooser, AbstractGraphicsScreen absScreen, int nativeVisualID) { diff --git a/src/jogl/classes/jogamp/opengl/util/GLArrayHandlerInterleaved.java b/src/jogl/classes/jogamp/opengl/util/GLArrayHandlerInterleaved.java index 5f9b25530..0d4452864 100644 --- a/src/jogl/classes/jogamp/opengl/util/GLArrayHandlerInterleaved.java +++ b/src/jogl/classes/jogamp/opengl/util/GLArrayHandlerInterleaved.java @@ -46,12 +46,14 @@ public class GLArrayHandlerInterleaved extends GLVBOArrayHandler implements GLAr super(ad); } + @Override public final void setSubArrayVBOName(int vboName) { for(int i=0; i() { + @Override public DynamicLibraryBundle run() { return new DynamicLibraryBundle(new FFMPEGDynamicLibraryBundleInfo()); } } ); @@ -272,6 +273,7 @@ class FFMPEGDynamicLibraryBundleInfo implements DynamicLibraryBundleInfo { // lookup AccessController.doPrivileged(new PrivilegedAction() { + @Override public Object run() { for(int i = 0; i() { + @Override public Object run() { final ProcAddressTable pt = ctx.getGLProcAddressTable(); final long procAddrGLTexSubImage2D = pt.getAddressFor("glTexSubImage2D"); diff --git a/src/jogl/classes/jogamp/opengl/util/glsl/GLSLArrayHandler.java b/src/jogl/classes/jogamp/opengl/util/glsl/GLSLArrayHandler.java index 2d74fa532..3b443fdd0 100644 --- a/src/jogl/classes/jogamp/opengl/util/glsl/GLSLArrayHandler.java +++ b/src/jogl/classes/jogamp/opengl/util/glsl/GLSLArrayHandler.java @@ -50,14 +50,17 @@ public class GLSLArrayHandler extends GLVBOArrayHandler implements GLArrayHandle super(ad); } + @Override public final void setSubArrayVBOName(int vboName) { throw new UnsupportedOperationException(); } + @Override public final void addSubHandler(GLArrayHandlerFlat handler) { throw new UnsupportedOperationException(); } + @Override public final void enableState(GL gl, boolean enable, Object ext) { final GL2ES2 glsl = gl.getGL2ES2(); if( null != ext ) { diff --git a/src/jogl/classes/jogamp/opengl/util/glsl/GLSLArrayHandlerFlat.java b/src/jogl/classes/jogamp/opengl/util/glsl/GLSLArrayHandlerFlat.java index a5f78b5d6..34a381d7d 100644 --- a/src/jogl/classes/jogamp/opengl/util/glsl/GLSLArrayHandlerFlat.java +++ b/src/jogl/classes/jogamp/opengl/util/glsl/GLSLArrayHandlerFlat.java @@ -47,10 +47,12 @@ public class GLSLArrayHandlerFlat implements GLArrayHandlerFlat { this.ad = ad; } + @Override public GLArrayDataWrapper getData() { return ad; } + @Override public final void syncData(GL gl, Object ext) { final GL2ES2 glsl = gl.getGL2ES2(); if( null != ext ) { @@ -77,6 +79,7 @@ public class GLSLArrayHandlerFlat implements GLArrayHandlerFlat { }*/ } + @Override public final void enableState(GL gl, boolean enable, Object ext) { final GL2ES2 glsl = gl.getGL2ES2(); if( null != ext ) { diff --git a/src/jogl/classes/jogamp/opengl/util/glsl/GLSLArrayHandlerInterleaved.java b/src/jogl/classes/jogamp/opengl/util/glsl/GLSLArrayHandlerInterleaved.java index bcc146d78..b175bb5dc 100644 --- a/src/jogl/classes/jogamp/opengl/util/glsl/GLSLArrayHandlerInterleaved.java +++ b/src/jogl/classes/jogamp/opengl/util/glsl/GLSLArrayHandlerInterleaved.java @@ -50,12 +50,14 @@ public class GLSLArrayHandlerInterleaved extends GLVBOArrayHandler implements GL super(ad); } + @Override public final void setSubArrayVBOName(int vboName) { for(int i=0; i 0) { eobrun--; @@ -1288,6 +1299,7 @@ public class JPEGDecoder { } } class ACSuccessiveDecoder implements DecoderFunction { + @Override public void decode(ComponentIn component, int[] zz) throws IOException { int k = spectralStart, e = spectralEnd, r = 0; while (k <= e) { diff --git a/src/jogl/classes/jogamp/opengl/util/pngj/ImageLine.java b/src/jogl/classes/jogamp/opengl/util/pngj/ImageLine.java index 906ce6373..e6afd8694 100644 --- a/src/jogl/classes/jogamp/opengl/util/pngj/ImageLine.java +++ b/src/jogl/classes/jogamp/opengl/util/pngj/ImageLine.java @@ -315,6 +315,7 @@ public class ImageLine { /** * Basic info */ + @Override public String toString() { return "row=" + rown + " cols=" + imgInfo.cols + " bpc=" + imgInfo.bitDepth + " size=" + scanline.length; } diff --git a/src/jogl/classes/jogamp/opengl/util/pngj/ImageLineHelper.java b/src/jogl/classes/jogamp/opengl/util/pngj/ImageLineHelper.java index 438a69984..4636c3955 100644 --- a/src/jogl/classes/jogamp/opengl/util/pngj/ImageLineHelper.java +++ b/src/jogl/classes/jogamp/opengl/util/pngj/ImageLineHelper.java @@ -92,6 +92,7 @@ public class ImageLineHelper { public double[] maxdif = { BIG_VALUE_NEG, BIG_VALUE_NEG, BIG_VALUE_NEG, BIG_VALUE }; // maxima public final int channels; // diferencia + @Override public String toString() { return channels == 3 ? String.format( "prom=%.1f (%.1f %.1f %.1f) max=%.1f (%.1f %.1f %.1f) min=%.1f (%.1f %.1f %.1f)", promlum, prom[0], diff --git a/src/jogl/classes/jogamp/opengl/util/pngj/PngHelperInternal.java b/src/jogl/classes/jogamp/opengl/util/pngj/PngHelperInternal.java index 1f598a5de..9e64c3eb1 100644 --- a/src/jogl/classes/jogamp/opengl/util/pngj/PngHelperInternal.java +++ b/src/jogl/classes/jogamp/opengl/util/pngj/PngHelperInternal.java @@ -186,6 +186,7 @@ public class PngHelperInternal { } private static final ThreadLocal crcProvider = new ThreadLocal() { + @Override protected CRC32 initialValue() { return new CRC32(); } diff --git a/src/jogl/classes/jogamp/opengl/util/pngj/PngReader.java b/src/jogl/classes/jogamp/opengl/util/pngj/PngReader.java index 73442e0bb..0412beb8c 100644 --- a/src/jogl/classes/jogamp/opengl/util/pngj/PngReader.java +++ b/src/jogl/classes/jogamp/opengl/util/pngj/PngReader.java @@ -994,6 +994,7 @@ public class PngReader { /** * Basic info, for debugging. */ + @Override public String toString() { // basic info return "filename=" + filename + " " + imgInfo.toString(); } diff --git a/src/jogl/classes/jogamp/opengl/util/pngj/chunks/ChunkHelper.java b/src/jogl/classes/jogamp/opengl/util/pngj/chunks/ChunkHelper.java index 82abb902d..4e8bf5635 100644 --- a/src/jogl/classes/jogamp/opengl/util/pngj/chunks/ChunkHelper.java +++ b/src/jogl/classes/jogamp/opengl/util/pngj/chunks/ChunkHelper.java @@ -47,12 +47,14 @@ public class ChunkHelper { public static final String zTXt = "zTXt"; private static final ThreadLocal inflaterProvider = new ThreadLocal() { + @Override protected Inflater initialValue() { return new Inflater(); } }; private static final ThreadLocal deflaterProvider = new ThreadLocal() { + @Override protected Deflater initialValue() { return new Deflater(); } diff --git a/src/jogl/classes/jogamp/opengl/util/pngj/chunks/ChunkRaw.java b/src/jogl/classes/jogamp/opengl/util/pngj/chunks/ChunkRaw.java index 3aba26cca..dcb1958df 100644 --- a/src/jogl/classes/jogamp/opengl/util/pngj/chunks/ChunkRaw.java +++ b/src/jogl/classes/jogamp/opengl/util/pngj/chunks/ChunkRaw.java @@ -108,6 +108,7 @@ public class ChunkRaw { return new ByteArrayInputStream(data); } + @Override public String toString() { return "chunkid=" + ChunkHelper.toString(idbytes) + " len=" + len; } diff --git a/src/jogl/classes/jogamp/opengl/util/pngj/chunks/ChunksList.java b/src/jogl/classes/jogamp/opengl/util/pngj/chunks/ChunksList.java index 3e0d03051..75107d761 100644 --- a/src/jogl/classes/jogamp/opengl/util/pngj/chunks/ChunksList.java +++ b/src/jogl/classes/jogamp/opengl/util/pngj/chunks/ChunksList.java @@ -59,12 +59,14 @@ public class ChunksList { protected static List getXById(final List list, final String id, final String innerid) { if (innerid == null) return ChunkHelper.filterList(list, new ChunkPredicate() { + @Override public boolean match(PngChunk c) { return c.id.equals(id); } }); else return ChunkHelper.filterList(list, new ChunkPredicate() { + @Override public boolean match(PngChunk c) { if (!c.id.equals(id)) return false; @@ -152,12 +154,14 @@ public class ChunksList { */ public List getEquivalent(final PngChunk c2) { return ChunkHelper.filterList(chunks, new ChunkPredicate() { + @Override public boolean match(PngChunk c) { return ChunkHelper.equivalent(c, c2); } }); } + @Override public String toString() { return "ChunkList: read: " + chunks.size(); } diff --git a/src/jogl/classes/jogamp/opengl/util/pngj/chunks/ChunksListForWrite.java b/src/jogl/classes/jogamp/opengl/util/pngj/chunks/ChunksListForWrite.java index 3b84ab800..c502e9071 100644 --- a/src/jogl/classes/jogamp/opengl/util/pngj/chunks/ChunksListForWrite.java +++ b/src/jogl/classes/jogamp/opengl/util/pngj/chunks/ChunksListForWrite.java @@ -149,6 +149,7 @@ public class ChunksListForWrite extends ChunksList { return queuedChunks; } + @Override public String toString() { return "ChunkList: written: " + chunks.size() + " queue: " + queuedChunks.size(); } @@ -156,6 +157,7 @@ public class ChunksListForWrite extends ChunksList { /** * for debugging */ + @Override public String toStringFull() { StringBuilder sb = new StringBuilder(toString()); sb.append("\n Written:\n"); diff --git a/src/jogl/classes/jogamp/opengl/util/pngj/chunks/PngChunkSingle.java b/src/jogl/classes/jogamp/opengl/util/pngj/chunks/PngChunkSingle.java index 5247169e0..7df5ba021 100644 --- a/src/jogl/classes/jogamp/opengl/util/pngj/chunks/PngChunkSingle.java +++ b/src/jogl/classes/jogamp/opengl/util/pngj/chunks/PngChunkSingle.java @@ -12,6 +12,7 @@ public abstract class PngChunkSingle extends PngChunk { super(id, imgInfo); } + @Override public final boolean allowsMultiple() { return false; } diff --git a/src/jogl/classes/jogamp/opengl/util/pngj/chunks/PngMetadata.java b/src/jogl/classes/jogamp/opengl/util/pngj/chunks/PngMetadata.java index fa3649613..139603448 100644 --- a/src/jogl/classes/jogamp/opengl/util/pngj/chunks/PngMetadata.java +++ b/src/jogl/classes/jogamp/opengl/util/pngj/chunks/PngMetadata.java @@ -41,6 +41,7 @@ public class PngMetadata { throw new PngjException("cannot set chunk : readonly metadata"); if (lazyOverwrite) { ChunkHelper.trimList(cl.getQueuedChunks(), new ChunkPredicate() { + @Override public boolean match(PngChunk c2) { return ChunkHelper.equivalent(c, c2); } diff --git a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLDrawableFactory.java b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLDrawableFactory.java index 203af110c..95485b033 100644 --- a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLDrawableFactory.java +++ b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLDrawableFactory.java @@ -92,6 +92,7 @@ public class WindowsWGLDrawableFactory extends GLDrawableFactoryImpl { synchronized(WindowsWGLDrawableFactory.class) { if( null == windowsWGLDynamicLookupHelper ) { windowsWGLDynamicLookupHelper = AccessController.doPrivileged(new PrivilegedAction() { + @Override public DesktopGLDynamicLookupHelper run() { DesktopGLDynamicLookupHelper tmp; try { diff --git a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLGraphicsConfiguration.java b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLGraphicsConfiguration.java index cb445f005..5f2b0c227 100644 --- a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLGraphicsConfiguration.java +++ b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLGraphicsConfiguration.java @@ -119,6 +119,7 @@ public class WindowsWGLGraphicsConfiguration extends MutableGraphicsConfiguratio return cfg; } + @Override public Object clone() { return super.clone(); } @@ -715,6 +716,7 @@ public class WindowsWGLGraphicsConfiguration extends MutableGraphicsConfiguratio return createPixelFormatDescriptor(0, 0); } + @Override public String toString() { return "WindowsWGLGraphicsConfiguration["+getScreen()+", pfdID " + getPixelFormatID() + ", ARB-Choosen " + isChoosenByARB() + ",\n\trequested " + getRequestedCapabilities() + diff --git a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLGraphicsConfigurationFactory.java b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLGraphicsConfigurationFactory.java index 9e917a0eb..961295208 100644 --- a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLGraphicsConfigurationFactory.java +++ b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLGraphicsConfigurationFactory.java @@ -79,6 +79,7 @@ public class WindowsWGLGraphicsConfigurationFactory extends GLGraphicsConfigurat private WindowsWGLGraphicsConfigurationFactory() { } + @Override protected AbstractGraphicsConfiguration chooseGraphicsConfigurationImpl( CapabilitiesImmutable capsChosen, CapabilitiesImmutable capsRequested, CapabilitiesChooser chooser, AbstractGraphicsScreen absScreen, int nativeVisualID) { diff --git a/src/jogl/classes/jogamp/opengl/windows/wgl/awt/WindowsAWTWGLGraphicsConfigurationFactory.java b/src/jogl/classes/jogamp/opengl/windows/wgl/awt/WindowsAWTWGLGraphicsConfigurationFactory.java index ddfcbb55b..96bd0bdd0 100644 --- a/src/jogl/classes/jogamp/opengl/windows/wgl/awt/WindowsAWTWGLGraphicsConfigurationFactory.java +++ b/src/jogl/classes/jogamp/opengl/windows/wgl/awt/WindowsAWTWGLGraphicsConfigurationFactory.java @@ -68,6 +68,7 @@ public class WindowsAWTWGLGraphicsConfigurationFactory extends GLGraphicsConfigu private WindowsAWTWGLGraphicsConfigurationFactory() { } + @Override protected AbstractGraphicsConfiguration chooseGraphicsConfigurationImpl( CapabilitiesImmutable capsChosen, CapabilitiesImmutable capsRequested, CapabilitiesChooser chooser, AbstractGraphicsScreen absScreen, int nativeVisualID) { diff --git a/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXDrawableFactory.java b/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXDrawableFactory.java index 3f0841b6c..78e549508 100644 --- a/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXDrawableFactory.java +++ b/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXDrawableFactory.java @@ -95,6 +95,7 @@ public class X11GLXDrawableFactory extends GLDrawableFactoryImpl { synchronized(X11GLXDrawableFactory.class) { if( null == x11GLXDynamicLookupHelper ) { x11GLXDynamicLookupHelper = AccessController.doPrivileged(new PrivilegedAction() { + @Override public DesktopGLDynamicLookupHelper run() { DesktopGLDynamicLookupHelper tmp; try { diff --git a/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXGraphicsConfiguration.java b/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXGraphicsConfiguration.java index 5aea33f21..4d1ed3985 100644 --- a/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXGraphicsConfiguration.java +++ b/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXGraphicsConfiguration.java @@ -69,6 +69,7 @@ public class X11GLXGraphicsConfiguration extends X11GraphicsConfiguration implem this.chooser=chooser; } + @Override public Object clone() { return super.clone(); } @@ -478,6 +479,7 @@ public class X11GLXGraphicsConfiguration extends X11GraphicsConfiguration implem return tmp.get(tmp.position()); } + @Override public String toString() { return "X11GLXGraphicsConfiguration["+getScreen()+", visualID " + toHexString(getXVisualID()) + ", fbConfigID " + toHexString(getFBConfigID()) + ",\n\trequested " + getRequestedCapabilities()+ diff --git a/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXGraphicsConfigurationFactory.java b/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXGraphicsConfigurationFactory.java index abe310a3f..6050dabbb 100644 --- a/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXGraphicsConfigurationFactory.java +++ b/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXGraphicsConfigurationFactory.java @@ -92,6 +92,7 @@ public class X11GLXGraphicsConfigurationFactory extends GLGraphicsConfigurationF private X11GLXGraphicsConfigurationFactory() { } + @Override protected AbstractGraphicsConfiguration chooseGraphicsConfigurationImpl( CapabilitiesImmutable capsChosen, CapabilitiesImmutable capsRequested, CapabilitiesChooser chooser, AbstractGraphicsScreen absScreen, int nativeVisualID) { if (!(absScreen instanceof X11GraphicsScreen)) { diff --git a/src/nativewindow/classes/com/jogamp/nativewindow/awt/AWTGraphicsConfiguration.java b/src/nativewindow/classes/com/jogamp/nativewindow/awt/AWTGraphicsConfiguration.java index 15f3355d0..aa9b876dd 100644 --- a/src/nativewindow/classes/com/jogamp/nativewindow/awt/AWTGraphicsConfiguration.java +++ b/src/nativewindow/classes/com/jogamp/nativewindow/awt/AWTGraphicsConfiguration.java @@ -109,6 +109,7 @@ public class AWTGraphicsConfiguration extends DefaultGraphicsConfiguration imple } // open access to superclass method + @Override public void setChosenCapabilities(CapabilitiesImmutable capsChosen) { super.setChosenCapabilities(capsChosen); } diff --git a/src/nativewindow/classes/com/jogamp/nativewindow/awt/AWTGraphicsScreen.java b/src/nativewindow/classes/com/jogamp/nativewindow/awt/AWTGraphicsScreen.java index d3cf5bff6..83d6efa75 100644 --- a/src/nativewindow/classes/com/jogamp/nativewindow/awt/AWTGraphicsScreen.java +++ b/src/nativewindow/classes/com/jogamp/nativewindow/awt/AWTGraphicsScreen.java @@ -87,6 +87,7 @@ public class AWTGraphicsScreen extends DefaultGraphicsScreen implements Cloneabl return new AWTGraphicsScreen(AWTGraphicsDevice.createDefault()); } + @Override public Object clone() { return super.clone(); } diff --git a/src/nativewindow/classes/com/jogamp/nativewindow/awt/AWTWindowClosingProtocol.java b/src/nativewindow/classes/com/jogamp/nativewindow/awt/AWTWindowClosingProtocol.java index e350aaff4..27275c6e0 100644 --- a/src/nativewindow/classes/com/jogamp/nativewindow/awt/AWTWindowClosingProtocol.java +++ b/src/nativewindow/classes/com/jogamp/nativewindow/awt/AWTWindowClosingProtocol.java @@ -119,6 +119,7 @@ public class AWTWindowClosingProtocol implements WindowClosingProtocol { * otherwise return the AWT/Swing close operation value translated to * a {@link WindowClosingProtocol} value . */ + @Override public final WindowClosingMode getDefaultCloseOperation() { synchronized(closingListenerLock) { if(defaultCloseOperationSetByUser) { @@ -129,6 +130,7 @@ public class AWTWindowClosingProtocol implements WindowClosingProtocol { return AWTMisc.getNWClosingOperation(comp); } + @Override public final WindowClosingMode setDefaultCloseOperation(WindowClosingMode op) { synchronized(closingListenerLock) { final WindowClosingMode _op = defaultCloseOperation; diff --git a/src/nativewindow/classes/com/jogamp/nativewindow/awt/DirectDataBufferInt.java b/src/nativewindow/classes/com/jogamp/nativewindow/awt/DirectDataBufferInt.java index e4d3884a7..c02fc0a04 100644 --- a/src/nativewindow/classes/com/jogamp/nativewindow/awt/DirectDataBufferInt.java +++ b/src/nativewindow/classes/com/jogamp/nativewindow/awt/DirectDataBufferInt.java @@ -247,6 +247,7 @@ public final class DirectDataBufferInt extends DataBuffer { * @see #setElem(int, int) * @see #setElem(int, int, int) */ + @Override public int getElem(int i) { return data.get(i+offset); } @@ -260,6 +261,7 @@ public final class DirectDataBufferInt extends DataBuffer { * @see #setElem(int, int) * @see #setElem(int, int, int) */ + @Override public int getElem(int bank, int i) { return bankdata[bank].get(i+offsets[bank]); } @@ -273,6 +275,7 @@ public final class DirectDataBufferInt extends DataBuffer { * @see #getElem(int) * @see #getElem(int, int) */ + @Override public void setElem(int i, int val) { data.put(i+offset, val); } @@ -286,6 +289,7 @@ public final class DirectDataBufferInt extends DataBuffer { * @see #getElem(int) * @see #getElem(int, int) */ + @Override public void setElem(int bank, int i, int val) { bankdata[bank].put(i+offsets[bank], val); } diff --git a/src/nativewindow/classes/com/jogamp/nativewindow/macosx/MacOSXGraphicsDevice.java b/src/nativewindow/classes/com/jogamp/nativewindow/macosx/MacOSXGraphicsDevice.java index 89df7f853..99ca006fa 100644 --- a/src/nativewindow/classes/com/jogamp/nativewindow/macosx/MacOSXGraphicsDevice.java +++ b/src/nativewindow/classes/com/jogamp/nativewindow/macosx/MacOSXGraphicsDevice.java @@ -43,6 +43,7 @@ public class MacOSXGraphicsDevice extends DefaultGraphicsDevice implements Clone super(NativeWindowFactory.TYPE_MACOSX, AbstractGraphicsDevice.DEFAULT_CONNECTION, unitID); } + @Override public Object clone() { return super.clone(); } diff --git a/src/nativewindow/classes/com/jogamp/nativewindow/swt/SWTAccessor.java b/src/nativewindow/classes/com/jogamp/nativewindow/swt/SWTAccessor.java index 6057f6700..361d61c65 100644 --- a/src/nativewindow/classes/com/jogamp/nativewindow/swt/SWTAccessor.java +++ b/src/nativewindow/classes/com/jogamp/nativewindow/swt/SWTAccessor.java @@ -122,6 +122,7 @@ public class SWTAccessor { static { AccessController.doPrivileged(new PrivilegedAction() { + @Override public Object run() { NativeWindowFactory.initSingleton(); // last resort .. return null; @@ -360,6 +361,7 @@ public class SWTAccessor { if(null != OS_gtk_class) { invoke(true, new Runnable() { + @Override public void run() { if(realize) { callStaticMethodL2V(OS_gtk_widget_realize, handle); @@ -434,6 +436,7 @@ public class SWTAccessor { public static long newGC(final Control swtControl, final GCData gcData) { final Object[] o = new Object[1]; invoke(true, new Runnable() { + @Override public void run() { o[0] = ReflectionUtil.callMethod(swtControl, swt_control_internal_new_GC, new Object[] { gcData }); } @@ -447,6 +450,7 @@ public class SWTAccessor { public static void disposeGC(final Control swtControl, final long gc, final GCData gcData) { invoke(true, new Runnable() { + @Override public void run() { if(swt_uses_long_handles) { ReflectionUtil.callMethod(swtControl, swt_control_internal_dispose_GC, new Object[] { new Long(gc), gcData }); diff --git a/src/nativewindow/classes/com/jogamp/nativewindow/windows/WindowsGraphicsDevice.java b/src/nativewindow/classes/com/jogamp/nativewindow/windows/WindowsGraphicsDevice.java index 7468d254b..643982715 100644 --- a/src/nativewindow/classes/com/jogamp/nativewindow/windows/WindowsGraphicsDevice.java +++ b/src/nativewindow/classes/com/jogamp/nativewindow/windows/WindowsGraphicsDevice.java @@ -47,6 +47,7 @@ public class WindowsGraphicsDevice extends DefaultGraphicsDevice implements Clon super(NativeWindowFactory.TYPE_WINDOWS, connection, unitID); } + @Override public Object clone() { return super.clone(); } diff --git a/src/nativewindow/classes/com/jogamp/nativewindow/x11/X11GraphicsScreen.java b/src/nativewindow/classes/com/jogamp/nativewindow/x11/X11GraphicsScreen.java index 8aac7095a..700937829 100644 --- a/src/nativewindow/classes/com/jogamp/nativewindow/x11/X11GraphicsScreen.java +++ b/src/nativewindow/classes/com/jogamp/nativewindow/x11/X11GraphicsScreen.java @@ -63,6 +63,7 @@ public class X11GraphicsScreen extends DefaultGraphicsScreen implements Cloneabl return X11Lib.DefaultVisualID(getDevice().getHandle(), getIndex()); } + @Override public Object clone() { return super.clone(); } diff --git a/src/nativewindow/classes/javax/media/nativewindow/DefaultCapabilitiesChooser.java b/src/nativewindow/classes/javax/media/nativewindow/DefaultCapabilitiesChooser.java index 6095db052..77cbe2995 100644 --- a/src/nativewindow/classes/javax/media/nativewindow/DefaultCapabilitiesChooser.java +++ b/src/nativewindow/classes/javax/media/nativewindow/DefaultCapabilitiesChooser.java @@ -76,6 +76,7 @@ public class DefaultCapabilitiesChooser implements CapabilitiesChooser { private final static int NO_SCORE = -9999999; private final static int COLOR_MISMATCH_PENALTY_SCALE = 36; + @Override public int chooseCapabilities(final CapabilitiesImmutable desired, final List available, final int windowSystemRecommendedChoice) { diff --git a/src/nativewindow/classes/javax/media/nativewindow/DefaultGraphicsConfiguration.java b/src/nativewindow/classes/javax/media/nativewindow/DefaultGraphicsConfiguration.java index 3e32f30df..42d7f3a23 100644 --- a/src/nativewindow/classes/javax/media/nativewindow/DefaultGraphicsConfiguration.java +++ b/src/nativewindow/classes/javax/media/nativewindow/DefaultGraphicsConfiguration.java @@ -69,18 +69,22 @@ public class DefaultGraphicsConfiguration implements Cloneable, AbstractGraphics } } + @Override final public AbstractGraphicsScreen getScreen() { return screen; } + @Override final public CapabilitiesImmutable getChosenCapabilities() { return capabilitiesChosen; } + @Override final public CapabilitiesImmutable getRequestedCapabilities() { return capabilitiesRequested; } + @Override public AbstractGraphicsConfiguration getNativeGraphicsConfiguration() { return this; } diff --git a/src/nativewindow/classes/javax/media/nativewindow/DefaultGraphicsScreen.java b/src/nativewindow/classes/javax/media/nativewindow/DefaultGraphicsScreen.java index ffcad235c..4bd548916 100644 --- a/src/nativewindow/classes/javax/media/nativewindow/DefaultGraphicsScreen.java +++ b/src/nativewindow/classes/javax/media/nativewindow/DefaultGraphicsScreen.java @@ -54,10 +54,12 @@ public class DefaultGraphicsScreen implements Cloneable, AbstractGraphicsScreen } } + @Override public AbstractGraphicsDevice getDevice() { return device; } + @Override public int getIndex() { return idx; } diff --git a/src/nativewindow/classes/javax/media/nativewindow/GraphicsConfigurationFactory.java b/src/nativewindow/classes/javax/media/nativewindow/GraphicsConfigurationFactory.java index e1aa91959..c09e6eaa4 100644 --- a/src/nativewindow/classes/javax/media/nativewindow/GraphicsConfigurationFactory.java +++ b/src/nativewindow/classes/javax/media/nativewindow/GraphicsConfigurationFactory.java @@ -80,10 +80,12 @@ public abstract class GraphicsConfigurationFactory { this.hash32 = hash32; } + @Override public final int hashCode() { return hash32; } + @Override public final boolean equals(Object obj) { if(this == obj) { return true; } if (obj instanceof DeviceCapsType) { diff --git a/src/nativewindow/classes/javax/media/nativewindow/NativeWindowFactory.java b/src/nativewindow/classes/javax/media/nativewindow/NativeWindowFactory.java index bad72f355..6962ce505 100644 --- a/src/nativewindow/classes/javax/media/nativewindow/NativeWindowFactory.java +++ b/src/nativewindow/classes/javax/media/nativewindow/NativeWindowFactory.java @@ -123,6 +123,7 @@ public abstract class NativeWindowFactory { return AccessController.doPrivileged(new PrivilegedAction() { private final File vcliblocation = new File( "/opt/vc/lib/libbcm_host.so"); + @Override public Boolean run() { if ( vcliblocation.isFile() ) { return Boolean.TRUE; @@ -160,12 +161,14 @@ public abstract class NativeWindowFactory { final String[] _tmp = new String[] { null }; AccessController.doPrivileged(new PrivilegedAction() { + @Override public Object run() { Platform.initSingleton(); // last resort .. _DEBUG[0] = Debug.debug("NativeWindow"); _tmp[0] = Debug.getProperty("nativewindow.ws.name", true); Runtime.getRuntime().addShutdownHook( new Thread(new Runnable() { + @Override public void run() { NativeWindowFactory.shutdown(true); } }, "NativeWindowFactory_ShutdownHook" ) ) ; @@ -318,6 +321,7 @@ public abstract class NativeWindowFactory { ReflectionUtil.isClassAvailable("com.jogamp.nativewindow.awt.AWTGraphicsDevice", cl) ) { Method[] jawtUtilMethods = AccessController.doPrivileged(new PrivilegedAction() { + @Override public Method[] run() { try { Class _jawtUtilClass = Class.forName(JAWTUtilClassName, true, NativeWindowFactory.class.getClassLoader()); diff --git a/src/nativewindow/classes/javax/media/nativewindow/ProxySurface.java b/src/nativewindow/classes/javax/media/nativewindow/ProxySurface.java index eb0a6cf04..0af2bdaf9 100644 --- a/src/nativewindow/classes/javax/media/nativewindow/ProxySurface.java +++ b/src/nativewindow/classes/javax/media/nativewindow/ProxySurface.java @@ -122,5 +122,6 @@ public interface ProxySurface extends MutableSurface { public void clearUpstreamOptionBits(int v); public StringBuilder toString(StringBuilder sink); + @Override public String toString(); } diff --git a/src/nativewindow/classes/javax/media/nativewindow/VisualIDHolder.java b/src/nativewindow/classes/javax/media/nativewindow/VisualIDHolder.java index 4ee71ee79..4ed79b1dc 100644 --- a/src/nativewindow/classes/javax/media/nativewindow/VisualIDHolder.java +++ b/src/nativewindow/classes/javax/media/nativewindow/VisualIDHolder.java @@ -120,6 +120,7 @@ public interface VisualIDHolder { this.type = type; } + @Override public int compare(VisualIDHolder vid1, VisualIDHolder vid2) { final int id1 = vid1.getVisualID(type); final int id2 = vid2.getVisualID(type); diff --git a/src/nativewindow/classes/javax/media/nativewindow/util/Dimension.java b/src/nativewindow/classes/javax/media/nativewindow/util/Dimension.java index b8b48a46c..b8dc53c83 100644 --- a/src/nativewindow/classes/javax/media/nativewindow/util/Dimension.java +++ b/src/nativewindow/classes/javax/media/nativewindow/util/Dimension.java @@ -45,10 +45,12 @@ public class Dimension implements Cloneable, DimensionImmutable { this.height=height; } + @Override public Object cloneMutable() { return clone(); } + @Override 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 9caa433a6..e6cacf4ff 100644 --- a/src/nativewindow/classes/javax/media/nativewindow/util/DimensionImmutable.java +++ b/src/nativewindow/classes/javax/media/nativewindow/util/DimensionImmutable.java @@ -59,8 +59,10 @@ public interface DimensionImmutable extends WriteCloneable, Comparabletrue if the two dimensions are equal; * otherwise false. */ + @Override boolean equals(Object obj); + @Override int hashCode(); } diff --git a/src/nativewindow/classes/javax/media/nativewindow/util/Insets.java b/src/nativewindow/classes/javax/media/nativewindow/util/Insets.java index dbd997c60..c84359dcd 100644 --- a/src/nativewindow/classes/javax/media/nativewindow/util/Insets.java +++ b/src/nativewindow/classes/javax/media/nativewindow/util/Insets.java @@ -45,10 +45,12 @@ public class Insets implements Cloneable, InsetsImmutable { this.b=bottom; } + @Override public Object cloneMutable() { return clone(); } + @Override protected Object clone() { try { return super.clone(); @@ -99,6 +101,7 @@ public class Insets implements Cloneable, InsetsImmutable { return sum3 * (sum3 + 1)/2 + val2; } + @Override public String toString() { return new String("[ l "+l+", r "+r+" - t "+t+", b "+b+" - "+getTotalWidth()+"x"+getTotalHeight()+"]"); } diff --git a/src/nativewindow/classes/javax/media/nativewindow/util/InsetsImmutable.java b/src/nativewindow/classes/javax/media/nativewindow/util/InsetsImmutable.java index 0f99a7861..8256068cd 100644 --- a/src/nativewindow/classes/javax/media/nativewindow/util/InsetsImmutable.java +++ b/src/nativewindow/classes/javax/media/nativewindow/util/InsetsImmutable.java @@ -59,8 +59,10 @@ public interface InsetsImmutable extends WriteCloneable { * @return true if the two Insets are equal; * otherwise false. */ + @Override boolean equals(Object obj); + @Override int hashCode(); } diff --git a/src/nativewindow/classes/javax/media/nativewindow/util/Point.java b/src/nativewindow/classes/javax/media/nativewindow/util/Point.java index aba515d52..57c6fb716 100644 --- a/src/nativewindow/classes/javax/media/nativewindow/util/Point.java +++ b/src/nativewindow/classes/javax/media/nativewindow/util/Point.java @@ -42,10 +42,12 @@ public class Point implements Cloneable, PointImmutable { this(0, 0); } + @Override public Object cloneMutable() { return clone(); } + @Override public Object clone() { try { return super.clone(); @@ -95,6 +97,7 @@ public class Point implements Cloneable, PointImmutable { return hash; } + @Override public String toString() { return new String( x + " / " + y ); } diff --git a/src/nativewindow/classes/javax/media/nativewindow/util/PointImmutable.java b/src/nativewindow/classes/javax/media/nativewindow/util/PointImmutable.java index f5377e059..08c628cc1 100644 --- a/src/nativewindow/classes/javax/media/nativewindow/util/PointImmutable.java +++ b/src/nativewindow/classes/javax/media/nativewindow/util/PointImmutable.java @@ -54,8 +54,10 @@ public interface PointImmutable extends WriteCloneable, Comparabletrue if the two points are equal; * otherwise false. */ + @Override public boolean equals(Object obj); + @Override public int hashCode(); } diff --git a/src/nativewindow/classes/javax/media/nativewindow/util/Rectangle.java b/src/nativewindow/classes/javax/media/nativewindow/util/Rectangle.java index 3a51fb67d..8dc8f4562 100644 --- a/src/nativewindow/classes/javax/media/nativewindow/util/Rectangle.java +++ b/src/nativewindow/classes/javax/media/nativewindow/util/Rectangle.java @@ -47,10 +47,12 @@ public class Rectangle implements Cloneable, RectangleImmutable { this.height=height; } + @Override public Object cloneMutable() { return clone(); } + @Override protected Object clone() { try { return super.clone(); @@ -191,6 +193,7 @@ public class Rectangle implements Cloneable, RectangleImmutable { return sum3 * (sum3 + 1)/2 + val2; } + @Override public String toString() { return new String("[ "+x+" / "+y+" "+width+" x "+height+" ]"); } diff --git a/src/nativewindow/classes/javax/media/nativewindow/util/RectangleImmutable.java b/src/nativewindow/classes/javax/media/nativewindow/util/RectangleImmutable.java index ce735f53f..7ca92ff53 100644 --- a/src/nativewindow/classes/javax/media/nativewindow/util/RectangleImmutable.java +++ b/src/nativewindow/classes/javax/media/nativewindow/util/RectangleImmutable.java @@ -78,8 +78,10 @@ public interface RectangleImmutable extends WriteCloneable, Comparabletrue if the two rectangles are equal; * otherwise false. */ + @Override boolean equals(Object obj); + @Override int hashCode(); } diff --git a/src/nativewindow/classes/javax/media/nativewindow/util/SurfaceSize.java b/src/nativewindow/classes/javax/media/nativewindow/util/SurfaceSize.java index 917f7e230..f1749dfa6 100644 --- a/src/nativewindow/classes/javax/media/nativewindow/util/SurfaceSize.java +++ b/src/nativewindow/classes/javax/media/nativewindow/util/SurfaceSize.java @@ -56,6 +56,7 @@ public class SurfaceSize implements Comparable { return bitsPerPixel; } + @Override public final String toString() { return new String("[ "+resolution+" x "+bitsPerPixel+" bpp ]"); } @@ -89,6 +90,7 @@ public class SurfaceSize implements Comparable { * @return true if the two dimensions are equal; * otherwise false. */ + @Override public final boolean equals(Object obj) { if(this == obj) { return true; } if (obj instanceof SurfaceSize) { @@ -99,6 +101,7 @@ public class SurfaceSize implements Comparable { return false; } + @Override public final int hashCode() { // 31 * x == (x << 5) - x int hash = 31 + getResolution().hashCode(); diff --git a/src/nativewindow/classes/jogamp/nativewindow/Debug.java b/src/nativewindow/classes/jogamp/nativewindow/Debug.java index a7bf536ec..b7197dbca 100644 --- a/src/nativewindow/classes/jogamp/nativewindow/Debug.java +++ b/src/nativewindow/classes/jogamp/nativewindow/Debug.java @@ -54,6 +54,7 @@ public class Debug extends PropertyAccess { static { AccessController.doPrivileged(new PrivilegedAction() { + @Override public Object run() { PropertyAccess.addTrustedPrefix("nativewindow."); return null; diff --git a/src/nativewindow/classes/jogamp/nativewindow/DefaultGraphicsConfigurationFactoryImpl.java b/src/nativewindow/classes/jogamp/nativewindow/DefaultGraphicsConfigurationFactoryImpl.java index b3b5d2131..8fb819251 100644 --- a/src/nativewindow/classes/jogamp/nativewindow/DefaultGraphicsConfigurationFactoryImpl.java +++ b/src/nativewindow/classes/jogamp/nativewindow/DefaultGraphicsConfigurationFactoryImpl.java @@ -36,6 +36,7 @@ package jogamp.nativewindow; import javax.media.nativewindow.*; public class DefaultGraphicsConfigurationFactoryImpl extends GraphicsConfigurationFactory { + @Override protected AbstractGraphicsConfiguration chooseGraphicsConfigurationImpl( CapabilitiesImmutable capsChosen, CapabilitiesImmutable capsRequested, CapabilitiesChooser chooser, AbstractGraphicsScreen screen, int nativeVisualID) { return new DefaultGraphicsConfiguration(screen, capsChosen, capsRequested); diff --git a/src/nativewindow/classes/jogamp/nativewindow/GlobalToolkitLock.java b/src/nativewindow/classes/jogamp/nativewindow/GlobalToolkitLock.java index 5fdbbf697..cadef9bf1 100644 --- a/src/nativewindow/classes/jogamp/nativewindow/GlobalToolkitLock.java +++ b/src/nativewindow/classes/jogamp/nativewindow/GlobalToolkitLock.java @@ -72,6 +72,7 @@ public class GlobalToolkitLock implements ToolkitLock { // nop } + @Override public String toString() { return "GlobalToolkitLock[obj 0x"+Integer.toHexString(hashCode())+", isOwner "+globalLock.isOwner(Thread.currentThread())+", "+globalLock.toString()+"]"; } diff --git a/src/nativewindow/classes/jogamp/nativewindow/NWJNILibLoader.java b/src/nativewindow/classes/jogamp/nativewindow/NWJNILibLoader.java index 36a25acfb..e7eb13756 100644 --- a/src/nativewindow/classes/jogamp/nativewindow/NWJNILibLoader.java +++ b/src/nativewindow/classes/jogamp/nativewindow/NWJNILibLoader.java @@ -39,6 +39,7 @@ import com.jogamp.common.util.cache.TempJarCache; public class NWJNILibLoader extends JNILibLoaderBase { public static boolean loadNativeWindow(final String ossuffix) { return AccessController.doPrivileged(new PrivilegedAction() { + @Override public Boolean run() { Platform.initSingleton(); final String libName = "nativewindow_"+ossuffix ; diff --git a/src/nativewindow/classes/jogamp/nativewindow/NativeWindowFactoryImpl.java b/src/nativewindow/classes/jogamp/nativewindow/NativeWindowFactoryImpl.java index e3f6ab5ca..22ac3bd94 100644 --- a/src/nativewindow/classes/jogamp/nativewindow/NativeWindowFactoryImpl.java +++ b/src/nativewindow/classes/jogamp/nativewindow/NativeWindowFactoryImpl.java @@ -51,6 +51,7 @@ public class NativeWindowFactoryImpl extends NativeWindowFactory { // This subclass of NativeWindowFactory handles the case of // NativeWindows being passed in + @Override protected NativeWindow getNativeWindowImpl(Object winObj, AbstractGraphicsConfiguration config) throws IllegalArgumentException { if (winObj instanceof NativeWindow) { // Use the NativeWindow directly diff --git a/src/nativewindow/classes/jogamp/nativewindow/NullToolkitLock.java b/src/nativewindow/classes/jogamp/nativewindow/NullToolkitLock.java index d8ce98acb..bda20522c 100644 --- a/src/nativewindow/classes/jogamp/nativewindow/NullToolkitLock.java +++ b/src/nativewindow/classes/jogamp/nativewindow/NullToolkitLock.java @@ -64,6 +64,7 @@ public class NullToolkitLock implements ToolkitLock { // nop } + @Override public String toString() { return "NullToolkitLock[]"; } diff --git a/src/nativewindow/classes/jogamp/nativewindow/ProxySurfaceImpl.java b/src/nativewindow/classes/jogamp/nativewindow/ProxySurfaceImpl.java index 8a1048c6f..097fffead 100644 --- a/src/nativewindow/classes/jogamp/nativewindow/ProxySurfaceImpl.java +++ b/src/nativewindow/classes/jogamp/nativewindow/ProxySurfaceImpl.java @@ -253,6 +253,7 @@ public abstract class ProxySurfaceImpl implements ProxySurface { return surfaceLock.getOwner(); } + @Override public final StringBuilder getUpstreamOptionBits(StringBuilder sink) { if(null == sink) { sink = new StringBuilder(); diff --git a/src/nativewindow/classes/jogamp/nativewindow/ResourceToolkitLock.java b/src/nativewindow/classes/jogamp/nativewindow/ResourceToolkitLock.java index 51dd58543..f1efb8133 100644 --- a/src/nativewindow/classes/jogamp/nativewindow/ResourceToolkitLock.java +++ b/src/nativewindow/classes/jogamp/nativewindow/ResourceToolkitLock.java @@ -73,6 +73,7 @@ public class ResourceToolkitLock implements ToolkitLock { // nop } + @Override public String toString() { return "ResourceToolkitLock[obj 0x"+Integer.toHexString(hashCode())+", isOwner "+lock.isOwner(Thread.currentThread())+", "+lock.toString()+"]"; } diff --git a/src/nativewindow/classes/jogamp/nativewindow/SharedResourceToolkitLock.java b/src/nativewindow/classes/jogamp/nativewindow/SharedResourceToolkitLock.java index e20d3d138..7b74e1f1f 100644 --- a/src/nativewindow/classes/jogamp/nativewindow/SharedResourceToolkitLock.java +++ b/src/nativewindow/classes/jogamp/nativewindow/SharedResourceToolkitLock.java @@ -142,6 +142,7 @@ public class SharedResourceToolkitLock implements ToolkitLock { } } + @Override public String toString() { return "SharedResourceToolkitLock[refCount "+refCount+", handle 0x"+Long.toHexString(handle)+", obj 0x"+Integer.toHexString(hashCode())+", isOwner "+lock.isOwner(Thread.currentThread())+", "+lock.toString()+"]"; } diff --git a/src/nativewindow/classes/jogamp/nativewindow/SurfaceUpdatedHelper.java b/src/nativewindow/classes/jogamp/nativewindow/SurfaceUpdatedHelper.java index d11e240fa..1e83232bb 100644 --- a/src/nativewindow/classes/jogamp/nativewindow/SurfaceUpdatedHelper.java +++ b/src/nativewindow/classes/jogamp/nativewindow/SurfaceUpdatedHelper.java @@ -74,6 +74,7 @@ public class SurfaceUpdatedHelper implements SurfaceUpdatedListener { } } + @Override public void surfaceUpdated(Object updater, NativeSurface ns, long when) { synchronized(surfaceUpdatedListenersLock) { for(int i = 0; i < surfaceUpdatedListeners.size(); i++ ) { diff --git a/src/nativewindow/classes/jogamp/nativewindow/jawt/JAWTJNILibLoader.java b/src/nativewindow/classes/jogamp/nativewindow/jawt/JAWTJNILibLoader.java index 815facbee..a5da41424 100644 --- a/src/nativewindow/classes/jogamp/nativewindow/jawt/JAWTJNILibLoader.java +++ b/src/nativewindow/classes/jogamp/nativewindow/jawt/JAWTJNILibLoader.java @@ -50,6 +50,7 @@ import java.security.PrivilegedAction; public class JAWTJNILibLoader extends NWJNILibLoader { static { AccessController.doPrivileged(new PrivilegedAction() { + @Override public Object run() { // Make sure that awt.dll is loaded before loading jawt.dll. Otherwise // a Dialog with "awt.dll not found" might pop up. diff --git a/src/nativewindow/classes/jogamp/nativewindow/jawt/JAWTUtil.java b/src/nativewindow/classes/jogamp/nativewindow/jawt/JAWTUtil.java index 32946fe2d..5a1d915ce 100644 --- a/src/nativewindow/classes/jogamp/nativewindow/jawt/JAWTUtil.java +++ b/src/nativewindow/classes/jogamp/nativewindow/jawt/JAWTUtil.java @@ -320,6 +320,7 @@ public class JAWTUtil { j2dExist = ok; PrivilegedDataBlob1 pdb1 = (PrivilegedDataBlob1) AccessController.doPrivileged(new PrivilegedAction() { + @Override public Object run() { PrivilegedDataBlob1 d = new PrivilegedDataBlob1(); try { @@ -352,9 +353,11 @@ public class JAWTUtil { jawtLock = LockFactory.createRecursiveLock(); jawtToolkitLock = new ToolkitLock() { + @Override public final void lock() { JAWTUtil.lockToolkit(); } + @Override public final void unlock() { JAWTUtil.unlockToolkit(); } @@ -380,6 +383,7 @@ public class JAWTUtil { } else { final ArrayList> desktophintsBucket = new ArrayList>(1); EventQueue.invokeAndWait(new Runnable() { + @Override public void run() { Map _desktophints = (Map)(Toolkit.getDefaultToolkit().getDesktopProperty("awt.font.desktophints")); if(null!=_desktophints) { diff --git a/src/nativewindow/classes/jogamp/nativewindow/jawt/macosx/MacOSXJAWTWindow.java b/src/nativewindow/classes/jogamp/nativewindow/jawt/macosx/MacOSXJAWTWindow.java index 87e3d3dd8..600aa6cb2 100644 --- a/src/nativewindow/classes/jogamp/nativewindow/jawt/macosx/MacOSXJAWTWindow.java +++ b/src/nativewindow/classes/jogamp/nativewindow/jawt/macosx/MacOSXJAWTWindow.java @@ -88,6 +88,7 @@ public class MacOSXJAWTWindow extends JAWTWindow implements MutableSurface { OSXUtil.DestroyNSWindow(windowHandle); } OSXUtil.RunOnMainThread(false, new Runnable() { + @Override public void run() { if( 0 != rootSurfaceLayer ) { if( 0 != jawtSurfaceLayersHandle) { @@ -106,6 +107,7 @@ public class MacOSXJAWTWindow extends JAWTWindow implements MutableSurface { @Override protected void attachSurfaceLayerImpl(final long layerHandle) { OSXUtil.RunOnMainThread(false, new Runnable() { + @Override public void run() { // AWT position is top-left w/ insets, where CALayer position is bottom/left from root CALayer w/o insets. // Determine p0: components location on screen w/o insets. @@ -167,6 +169,7 @@ public class MacOSXJAWTWindow extends JAWTWindow implements MutableSurface { @Override protected void detachSurfaceLayerImpl(final long layerHandle, final Runnable detachNotify) { OSXUtil.RunOnMainThread(false, new Runnable() { + @Override public void run() { detachNotify.run(); OSXUtil.RemoveCASublayer(rootSurfaceLayer, layerHandle); @@ -183,6 +186,7 @@ public class MacOSXJAWTWindow extends JAWTWindow implements MutableSurface { return offscreenSurfaceDrawableSet ? offscreenSurfaceDrawable : drawable /* super.getSurfaceHandle() */ ; } + @Override public void setSurfaceHandle(long surfaceHandle) { if( !isOffscreenLayerSurfaceEnabled() ) { throw new java.lang.UnsupportedOperationException("Not using CALAYER"); @@ -194,11 +198,13 @@ public class MacOSXJAWTWindow extends JAWTWindow implements MutableSurface { this.offscreenSurfaceDrawableSet = true; } + @Override protected JAWT fetchJAWTImpl() throws NativeWindowException { // use offscreen if supported and [ applet or requested ] return JAWTUtil.getJAWT(getShallUseOffscreenLayer() || isApplet()); } + @Override protected int lockSurfaceImpl() throws NativeWindowException { int ret = NativeWindow.LOCK_SURFACE_NOT_READY; ds = getJAWT().GetDrawingSurface(component); @@ -223,6 +229,7 @@ public class MacOSXJAWTWindow extends JAWTWindow implements MutableSurface { } if (firstLock) { AccessController.doPrivileged(new PrivilegedAction() { + @Override public Object run() { dsi = ds.GetDrawingSurfaceInfo(); return null; @@ -284,6 +291,7 @@ public class MacOSXJAWTWindow extends JAWTWindow implements MutableSurface { if(null == errMsg) { jawtSurfaceLayersHandle = GetJAWTSurfaceLayersHandle0(dsi.getBuffer()); OSXUtil.RunOnMainThread(false, new Runnable() { + @Override public void run() { String errMsg = null; if(0 == rootSurfaceLayer && 0 != jawtSurfaceLayersHandle) { @@ -322,6 +330,7 @@ public class MacOSXJAWTWindow extends JAWTWindow implements MutableSurface { return ret; } + @Override protected void unlockSurfaceImpl() throws NativeWindowException { if(null!=ds) { if (null!=dsi) { @@ -362,6 +371,7 @@ public class MacOSXJAWTWindow extends JAWTWindow implements MutableSurface { getLocationOnScreenNonBlocking(storage, component); return storage; } + @Override protected Point getLocationOnScreenNativeImpl(final int x0, final int y0) { return null; } diff --git a/src/nativewindow/classes/jogamp/nativewindow/jawt/windows/Win32SunJDKReflection.java b/src/nativewindow/classes/jogamp/nativewindow/jawt/windows/Win32SunJDKReflection.java index 876531151..8b9dfabfd 100644 --- a/src/nativewindow/classes/jogamp/nativewindow/jawt/windows/Win32SunJDKReflection.java +++ b/src/nativewindow/classes/jogamp/nativewindow/jawt/windows/Win32SunJDKReflection.java @@ -65,6 +65,7 @@ public class Win32SunJDKReflection { static { AccessController.doPrivileged(new PrivilegedAction() { + @Override public Object run() { try { win32GraphicsDeviceClass = Class.forName("sun.awt.Win32GraphicsDevice"); diff --git a/src/nativewindow/classes/jogamp/nativewindow/jawt/windows/WindowsJAWTWindow.java b/src/nativewindow/classes/jogamp/nativewindow/jawt/windows/WindowsJAWTWindow.java index 64e177155..54bdb34f6 100644 --- a/src/nativewindow/classes/jogamp/nativewindow/jawt/windows/WindowsJAWTWindow.java +++ b/src/nativewindow/classes/jogamp/nativewindow/jawt/windows/WindowsJAWTWindow.java @@ -60,14 +60,17 @@ public class WindowsJAWTWindow extends JAWTWindow { super(comp, config); } + @Override protected void invalidateNative() { windowHandle = 0; } + @Override protected JAWT fetchJAWTImpl() throws NativeWindowException { return JAWTUtil.getJAWT(false); // no offscreen } + @Override protected int lockSurfaceImpl() throws NativeWindowException { int ret = NativeWindow.LOCK_SUCCESS; ds = getJAWT().GetDrawingSurface(component); @@ -110,6 +113,7 @@ public class WindowsJAWTWindow extends JAWTWindow { return ret; } + @Override protected void unlockSurfaceImpl() throws NativeWindowException { drawable = 0; // invalid HDC if(null!=ds) { @@ -131,6 +135,7 @@ public class WindowsJAWTWindow extends JAWTWindow { return windowHandle; } + @Override protected Point getLocationOnScreenNativeImpl(int x, int y) { return GDIUtil.GetRelativeLocation( getWindowHandle(), 0 /*root win*/, x, y); } diff --git a/src/nativewindow/classes/jogamp/nativewindow/jawt/x11/X11JAWTWindow.java b/src/nativewindow/classes/jogamp/nativewindow/jawt/x11/X11JAWTWindow.java index b08a7d83a..4599b9021 100644 --- a/src/nativewindow/classes/jogamp/nativewindow/jawt/x11/X11JAWTWindow.java +++ b/src/nativewindow/classes/jogamp/nativewindow/jawt/x11/X11JAWTWindow.java @@ -57,12 +57,15 @@ public class X11JAWTWindow extends JAWTWindow { super(comp, config); } + @Override protected void invalidateNative() { } + @Override protected JAWT fetchJAWTImpl() throws NativeWindowException { return JAWTUtil.getJAWT(false); // no offscreen } + @Override protected int lockSurfaceImpl() throws NativeWindowException { int ret = NativeWindow.LOCK_SUCCESS; ds = getJAWT().GetDrawingSurface(component); @@ -104,6 +107,7 @@ public class X11JAWTWindow extends JAWTWindow { return ret; } + @Override protected void unlockSurfaceImpl() throws NativeWindowException { if(null!=ds) { if (null!=dsi) { @@ -119,6 +123,7 @@ public class X11JAWTWindow extends JAWTWindow { x11dsi = null; } + @Override protected Point getLocationOnScreenNativeImpl(int x, int y) { // surface is locked and hence the device return X11Lib.GetRelativeLocation(getDisplayHandle(), getScreenIndex(), getWindowHandle(), 0 /*root win*/, x, y); diff --git a/src/nativewindow/classes/jogamp/nativewindow/jawt/x11/X11SunJDKReflection.java b/src/nativewindow/classes/jogamp/nativewindow/jawt/x11/X11SunJDKReflection.java index f1104d02f..b2c3a931b 100644 --- a/src/nativewindow/classes/jogamp/nativewindow/jawt/x11/X11SunJDKReflection.java +++ b/src/nativewindow/classes/jogamp/nativewindow/jawt/x11/X11SunJDKReflection.java @@ -65,6 +65,7 @@ public class X11SunJDKReflection { static { AccessController.doPrivileged(new PrivilegedAction() { + @Override public Object run() { try { x11GraphicsDeviceClass = Class.forName("sun.awt.X11GraphicsDevice"); diff --git a/src/nativewindow/classes/jogamp/nativewindow/macosx/OSXUtil.java b/src/nativewindow/classes/jogamp/nativewindow/macosx/OSXUtil.java index 004a91a42..bac07b85a 100644 --- a/src/nativewindow/classes/jogamp/nativewindow/macosx/OSXUtil.java +++ b/src/nativewindow/classes/jogamp/nativewindow/macosx/OSXUtil.java @@ -271,7 +271,7 @@ public class OSXUtil implements ToolkitProperties { RunLater0(onMain, new RunnableTask( runnable, null, true, System.err ), delay); } - private static Runnable _nop = new Runnable() { public void run() {}; }; + private static Runnable _nop = new Runnable() { @Override public void run() {}; }; /** Issues a {@link #RunOnMainThread(boolean, Runnable)} w/ an NOP runnable, while waiting until done. */ public static void WaitUntilFinish() { diff --git a/src/nativewindow/classes/jogamp/nativewindow/x11/X11GraphicsConfigurationFactory.java b/src/nativewindow/classes/jogamp/nativewindow/x11/X11GraphicsConfigurationFactory.java index d6e7b5970..6258632cd 100644 --- a/src/nativewindow/classes/jogamp/nativewindow/x11/X11GraphicsConfigurationFactory.java +++ b/src/nativewindow/classes/jogamp/nativewindow/x11/X11GraphicsConfigurationFactory.java @@ -51,6 +51,7 @@ public class X11GraphicsConfigurationFactory extends GraphicsConfigurationFactor private X11GraphicsConfigurationFactory() { } + @Override protected AbstractGraphicsConfiguration chooseGraphicsConfigurationImpl( CapabilitiesImmutable capsChosen, CapabilitiesImmutable capsRequested, CapabilitiesChooser chooser, AbstractGraphicsScreen screen, int nativeVisualID) throws IllegalArgumentException, NativeWindowException { diff --git a/src/nativewindow/classes/jogamp/nativewindow/x11/X11Util.java b/src/nativewindow/classes/jogamp/nativewindow/x11/X11Util.java index 6431fb3f5..2576c7db1 100644 --- a/src/nativewindow/classes/jogamp/nativewindow/x11/X11Util.java +++ b/src/nativewindow/classes/jogamp/nativewindow/x11/X11Util.java @@ -300,10 +300,12 @@ public class X11Util implements ToolkitProperties { } } + @Override public final int hashCode() { return hash32; } + @Override public final boolean equals(Object obj) { if(this == obj) { return true; } if(obj instanceof NamedDisplay) { diff --git a/src/nativewindow/classes/jogamp/nativewindow/x11/awt/X11AWTGraphicsConfigurationFactory.java b/src/nativewindow/classes/jogamp/nativewindow/x11/awt/X11AWTGraphicsConfigurationFactory.java index 7b37d3cca..062040232 100644 --- a/src/nativewindow/classes/jogamp/nativewindow/x11/awt/X11AWTGraphicsConfigurationFactory.java +++ b/src/nativewindow/classes/jogamp/nativewindow/x11/awt/X11AWTGraphicsConfigurationFactory.java @@ -66,6 +66,7 @@ public class X11AWTGraphicsConfigurationFactory extends GraphicsConfigurationFac private X11AWTGraphicsConfigurationFactory() { } + @Override protected AbstractGraphicsConfiguration chooseGraphicsConfigurationImpl( CapabilitiesImmutable capsChosen, CapabilitiesImmutable capsRequested, CapabilitiesChooser chooser, AbstractGraphicsScreen absScreen, int nativeVisualID) { diff --git a/src/newt/classes/com/jogamp/newt/Display.java b/src/newt/classes/com/jogamp/newt/Display.java index 83383d23c..a0a098481 100644 --- a/src/newt/classes/com/jogamp/newt/Display.java +++ b/src/newt/classes/com/jogamp/newt/Display.java @@ -41,9 +41,11 @@ public abstract class Display { public static final boolean DEBUG = Debug.debug("Display"); /** return precomputed hashCode from FQN {@link #getFQName()} */ + @Override public abstract int hashCode(); /** return true if obj is of type Display and both FQN {@link #getFQName()} equals */ + @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj instanceof Display) { diff --git a/src/newt/classes/com/jogamp/newt/MonitorDevice.java b/src/newt/classes/com/jogamp/newt/MonitorDevice.java index 625a7b39f..28d9f53a1 100644 --- a/src/newt/classes/com/jogamp/newt/MonitorDevice.java +++ b/src/newt/classes/com/jogamp/newt/MonitorDevice.java @@ -87,6 +87,7 @@ public abstract class MonitorDevice { * *
*/ + @Override public final boolean equals(Object obj) { if (this == obj) { return true; } if (obj instanceof MonitorDevice) { @@ -102,6 +103,7 @@ public abstract class MonitorDevice { *
  • nativeID
  • * */ + @Override public final int hashCode() { return nativeId; } @@ -228,6 +230,7 @@ public abstract class MonitorDevice { */ public abstract boolean setCurrentMode(MonitorMode mode); + @Override public String toString() { return "Monitor[Id "+Display.toHexString(nativeId)+", "+sizeMM+" mm, viewport "+viewport+ ", orig "+originalMode+", curr "+currentMode+ ", modeChanged "+modeChanged+", modeCount "+supportedModes.size()+"]"; diff --git a/src/newt/classes/com/jogamp/newt/MonitorMode.java b/src/newt/classes/com/jogamp/newt/MonitorMode.java index 175d6e5f2..59f28e791 100644 --- a/src/newt/classes/com/jogamp/newt/MonitorMode.java +++ b/src/newt/classes/com/jogamp/newt/MonitorMode.java @@ -114,12 +114,14 @@ public class MonitorMode implements Comparable { /** Comparator for 2 {@link MonitorMode}s, following comparison order as described in {@link MonitorMode#compareTo(MonitorMode)}, returning the ascending order. */ public static final Comparator monitorModeComparator = new Comparator() { + @Override public int compare(MonitorMode mm1, MonitorMode mm2) { return mm1.compareTo(mm2); } }; /** Comparator for 2 {@link MonitorMode}s, following comparison order as described in {@link MonitorMode#compareTo(MonitorMode)}, returning the descending order. */ public static final Comparator monitorModeComparatorInv = new Comparator() { + @Override public int compare(MonitorMode mm1, MonitorMode mm2) { return mm2.compareTo(mm1); } }; @@ -172,6 +174,7 @@ public class MonitorMode implements Comparable { } return sb; } + @Override public final String toString() { return new String(surfaceSize+" @ "+refreshRate+" Hz, flags ["+flags2String(flags).toString()+"]"); } @@ -228,6 +231,7 @@ public class MonitorMode implements Comparable { *
  • flags
  • * */ + @Override public final boolean equals(Object obj) { if (this == obj) { return true; } if (obj instanceof SizeAndRRate) { @@ -247,6 +251,7 @@ public class MonitorMode implements Comparable { *
  • refreshRate
  • * */ + @Override public final int hashCode() { return hashCode; } @@ -360,6 +365,7 @@ public class MonitorMode implements Comparable { return getRotatedWH(false); } + @Override public final String toString() { return "[Id "+Display.toHexString(nativeId)+", " + sizeAndRRate + ", " + rotation + " degr]"; } @@ -409,6 +415,7 @@ public class MonitorMode implements Comparable { *
  • rotation
  • * */ + @Override public final boolean equals(Object obj) { if (this == obj) { return true; } if (obj instanceof MonitorMode) { @@ -428,6 +435,7 @@ public class MonitorMode implements Comparable { *
  • rotation
  • * */ + @Override public final int hashCode() { return hashCode; } diff --git a/src/newt/classes/com/jogamp/newt/NewtFactory.java b/src/newt/classes/com/jogamp/newt/NewtFactory.java index 7116877a3..5ae3f3692 100644 --- a/src/newt/classes/com/jogamp/newt/NewtFactory.java +++ b/src/newt/classes/com/jogamp/newt/NewtFactory.java @@ -56,6 +56,7 @@ public class NewtFactory { static { AccessController.doPrivileged(new PrivilegedAction() { + @Override public Object run() { NativeWindowFactory.initSingleton(); // last resort .. diff --git a/src/newt/classes/com/jogamp/newt/Screen.java b/src/newt/classes/com/jogamp/newt/Screen.java index 1274b3459..ef62ec95d 100644 --- a/src/newt/classes/com/jogamp/newt/Screen.java +++ b/src/newt/classes/com/jogamp/newt/Screen.java @@ -53,9 +53,11 @@ public abstract class Screen { public static final boolean DEBUG = Debug.debug("Screen"); /** return precomputed hashCode from FQN {@link #getFQName()} */ + @Override public abstract int hashCode(); /** return true if obj is of type Display and both FQN {@link #getFQName()} equals */ + @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj instanceof Screen) { diff --git a/src/newt/classes/com/jogamp/newt/awt/NewtCanvasAWT.java b/src/newt/classes/com/jogamp/newt/awt/NewtCanvasAWT.java index de1b7224f..1f5c26f27 100644 --- a/src/newt/classes/com/jogamp/newt/awt/NewtCanvasAWT.java +++ b/src/newt/classes/com/jogamp/newt/awt/NewtCanvasAWT.java @@ -107,10 +107,12 @@ public class NewtCanvasAWT extends java.awt.Canvas implements WindowClosingProto private AWTWindowClosingProtocol awtWindowClosingProtocol = new AWTWindowClosingProtocol(this, new Runnable() { + @Override public void run() { NewtCanvasAWT.this.destroyImpl(false /* removeNotify */, true /* windowClosing */); } }, new Runnable() { + @Override public void run() { if( newtChild != null ) { newtChild.sendWindowEvent(WindowEvent.EVENT_WINDOW_DESTROY_NOTIFY); @@ -148,14 +150,17 @@ public class NewtCanvasAWT extends java.awt.Canvas implements WindowClosingProto setNEWTChild(child); } + @Override public void setShallUseOffscreenLayer(boolean v) { shallUseOffscreenLayer = v; } + @Override public final boolean getShallUseOffscreenLayer() { return shallUseOffscreenLayer; } + @Override public final boolean isOffscreenLayerSurfaceEnabled() { return jawtWindow.isOffscreenLayerSurfaceEnabled(); } @@ -178,6 +183,7 @@ public class NewtCanvasAWT extends java.awt.Canvas implements WindowClosingProto } class FocusAction implements Window.FocusRunnable { + @Override public boolean run() { final boolean isParent = isParent(); final boolean isFullscreen = isFullscreen(); @@ -214,11 +220,13 @@ public class NewtCanvasAWT extends java.awt.Canvas implements WindowClosingProto }; class FocusTraversalKeyListener implements KeyListener { + @Override public void keyPressed(KeyEvent e) { if( isParent() && !isFullscreen() ) { handleKey(e, false); } } + @Override public void keyReleased(KeyEvent e) { if( isParent() && !isFullscreen() ) { handleKey(e, true); @@ -263,6 +271,7 @@ public class NewtCanvasAWT extends java.awt.Canvas implements WindowClosingProto private final FocusTraversalKeyListener newtFocusTraversalKeyListener = new FocusTraversalKeyListener(); class FocusPropertyChangeListener implements PropertyChangeListener { + @Override public void propertyChange(PropertyChangeEvent evt) { final Object oldF = evt.getOldValue(); final Object newF = evt.getNewValue(); @@ -358,10 +367,12 @@ public class NewtCanvasAWT extends java.awt.Canvas implements WindowClosingProto * or {@link #addNotify()} hasn't been called yet.*/ public NativeWindow getNativeWindow() { return jawtWindow; } + @Override public WindowClosingMode getDefaultCloseOperation() { return awtWindowClosingProtocol.getDefaultCloseOperation(); } + @Override public WindowClosingMode setDefaultCloseOperation(WindowClosingMode op) { return awtWindowClosingProtocol.setDefaultCloseOperation(op); } @@ -745,6 +756,7 @@ public class NewtCanvasAWT extends java.awt.Canvas implements WindowClosingProto } } private final Runnable forceRelayout = new Runnable() { + @Override public void run() { if(DEBUG) { System.err.println("NewtCanvasAWT.forceRelayout.0"); @@ -797,6 +809,7 @@ public class NewtCanvasAWT extends java.awt.Canvas implements WindowClosingProto if (!disableBackgroundEraseInitialized) { try { AccessController.doPrivileged(new PrivilegedAction() { + @Override public Object run() { try { Class clazz = getToolkit().getClass(); diff --git a/src/newt/classes/com/jogamp/newt/awt/applet/JOGLNewtApplet1Run.java b/src/newt/classes/com/jogamp/newt/awt/applet/JOGLNewtApplet1Run.java index 9b1b82297..409f78307 100644 --- a/src/newt/classes/com/jogamp/newt/awt/applet/JOGLNewtApplet1Run.java +++ b/src/newt/classes/com/jogamp/newt/awt/applet/JOGLNewtApplet1Run.java @@ -102,6 +102,7 @@ public class JOGLNewtApplet1Run extends Applet { /** if valid glStandalone:=true (own window) ! */ int glXd=Integer.MAX_VALUE, glYd=Integer.MAX_VALUE, glWidth=Integer.MAX_VALUE, glHeight=Integer.MAX_VALUE; + @Override public void init() { if(DEBUG) { System.err.println("JOGLNewtApplet1Run.init() START"); @@ -223,6 +224,7 @@ public class JOGLNewtApplet1Run extends Applet { } } + @Override public void start() { if(DEBUG) { System.err.println("JOGLNewtApplet1Run.start() START (isVisible "+isVisible()+", isDisplayable "+isDisplayable()+")"); @@ -266,6 +268,7 @@ public class JOGLNewtApplet1Run extends Applet { } } + @Override public void stop() { if(DEBUG) { System.err.println("JOGLNewtApplet1Run.stop() START"); @@ -276,6 +279,7 @@ public class JOGLNewtApplet1Run extends Applet { } } + @Override public void destroy() { if(DEBUG) { System.err.println("JOGLNewtApplet1Run.destroy() START"); diff --git a/src/newt/classes/com/jogamp/newt/awt/applet/JOGLNewtAppletBase.java b/src/newt/classes/com/jogamp/newt/awt/applet/JOGLNewtAppletBase.java index a6a30a8bf..d17d2e77c 100644 --- a/src/newt/classes/com/jogamp/newt/awt/applet/JOGLNewtAppletBase.java +++ b/src/newt/classes/com/jogamp/newt/awt/applet/JOGLNewtAppletBase.java @@ -112,6 +112,7 @@ public class JOGLNewtAppletBase implements KeyListener, GLEventListener { try { final Class clazz = AccessController.doPrivileged(new PrivilegedAction>() { + @Override public Class run() { final ClassLoader cl = Thread.currentThread().getContextClassLoader(); Class clazz = null; @@ -169,6 +170,7 @@ public class JOGLNewtAppletBase implements KeyListener, GLEventListener { if(null == glWindow.getParent()) { // we may be called directly by the native EDT new Thread(new Runnable() { + @Override public void run() { if( glWindow.isNativeValid() ) { glWindow.reparentWindow(awtParent); @@ -256,6 +258,7 @@ public class JOGLNewtAppletBase implements KeyListener, GLEventListener { // *********************************************************************************** // *********************************************************************************** + @Override public void init(GLAutoDrawable drawable) { GL _gl = drawable.getGL(); @@ -276,10 +279,13 @@ public class JOGLNewtAppletBase implements KeyListener, GLEventListener { _gl.setSwapInterval(glSwapInterval); } } + @Override public void reshape(GLAutoDrawable drawable, int x, int y, int width, int height) { } + @Override public void display(GLAutoDrawable drawable) { } + @Override public void dispose(GLAutoDrawable drawable) { } diff --git a/src/newt/classes/com/jogamp/newt/event/DoubleTapScrollGesture.java b/src/newt/classes/com/jogamp/newt/event/DoubleTapScrollGesture.java index 7dda47534..edb2429bb 100644 --- a/src/newt/classes/com/jogamp/newt/event/DoubleTapScrollGesture.java +++ b/src/newt/classes/com/jogamp/newt/event/DoubleTapScrollGesture.java @@ -142,6 +142,7 @@ public class DoubleTapScrollGesture implements GestureHandler { } } + @Override public String toString() { return "DoubleTapScroll[state "+gestureState+", in "+isWithinGesture()+", has "+(null!=hitGestureEvent)+", pc "+pointerDownCount+"]"; } diff --git a/src/newt/classes/com/jogamp/newt/event/InputEvent.java b/src/newt/classes/com/jogamp/newt/event/InputEvent.java index 6520dafcf..f29b632e8 100644 --- a/src/newt/classes/com/jogamp/newt/event/InputEvent.java +++ b/src/newt/classes/com/jogamp/newt/event/InputEvent.java @@ -210,10 +210,12 @@ public abstract class InputEvent extends NEWTEvent return 0 != ( modifiers & BUTTONALL_MASK ); } + @Override public String toString() { return toString(null).toString(); } + @Override public StringBuilder toString(StringBuilder sb) { if(null == sb) { sb = new StringBuilder(); diff --git a/src/newt/classes/com/jogamp/newt/event/KeyAdapter.java b/src/newt/classes/com/jogamp/newt/event/KeyAdapter.java index a89148574..5cef734bb 100644 --- a/src/newt/classes/com/jogamp/newt/event/KeyAdapter.java +++ b/src/newt/classes/com/jogamp/newt/event/KeyAdapter.java @@ -31,8 +31,10 @@ package com.jogamp.newt.event; public abstract class KeyAdapter implements KeyListener { + @Override public void keyPressed(KeyEvent e) { } + @Override public void keyReleased(KeyEvent e) { } } diff --git a/src/newt/classes/com/jogamp/newt/event/KeyEvent.java b/src/newt/classes/com/jogamp/newt/event/KeyEvent.java index 81680bf32..49aa4e054 100644 --- a/src/newt/classes/com/jogamp/newt/event/KeyEvent.java +++ b/src/newt/classes/com/jogamp/newt/event/KeyEvent.java @@ -196,10 +196,12 @@ public class KeyEvent extends InputEvent return keyCode; } + @Override public final String toString() { return toString(null).toString(); } + @Override public final StringBuilder toString(StringBuilder sb) { if(null == sb) { sb = new StringBuilder(); diff --git a/src/newt/classes/com/jogamp/newt/event/MonitorEvent.java b/src/newt/classes/com/jogamp/newt/event/MonitorEvent.java index 77c66a2da..03242e147 100644 --- a/src/newt/classes/com/jogamp/newt/event/MonitorEvent.java +++ b/src/newt/classes/com/jogamp/newt/event/MonitorEvent.java @@ -56,10 +56,12 @@ public class MonitorEvent extends OutputEvent { } } + @Override public final String toString() { return toString(null).toString(); } + @Override public final StringBuilder toString(StringBuilder sb) { if(null == sb) { sb = new StringBuilder(); diff --git a/src/newt/classes/com/jogamp/newt/event/MouseAdapter.java b/src/newt/classes/com/jogamp/newt/event/MouseAdapter.java index 652f87d5b..98252fe14 100644 --- a/src/newt/classes/com/jogamp/newt/event/MouseAdapter.java +++ b/src/newt/classes/com/jogamp/newt/event/MouseAdapter.java @@ -30,20 +30,28 @@ package com.jogamp.newt.event; public abstract class MouseAdapter implements MouseListener { + @Override public void mouseClicked(MouseEvent e) { } + @Override public void mouseEntered(MouseEvent e) { } + @Override public void mouseExited(MouseEvent e) { } + @Override public void mousePressed(MouseEvent e) { } + @Override public void mouseReleased(MouseEvent e) { } + @Override public void mouseMoved(MouseEvent e) { } + @Override public void mouseDragged(MouseEvent e) { } + @Override public void mouseWheelMoved(MouseEvent e) { } } diff --git a/src/newt/classes/com/jogamp/newt/event/MouseEvent.java b/src/newt/classes/com/jogamp/newt/event/MouseEvent.java index 4d7cc3b36..635bdba52 100644 --- a/src/newt/classes/com/jogamp/newt/event/MouseEvent.java +++ b/src/newt/classes/com/jogamp/newt/event/MouseEvent.java @@ -510,10 +510,12 @@ public class MouseEvent extends InputEvent return rotationScale; } + @Override public final String toString() { return toString(null).toString(); } + @Override public final StringBuilder toString(StringBuilder sb) { if(null == sb) { sb = new StringBuilder(); diff --git a/src/newt/classes/com/jogamp/newt/event/NEWTEvent.java b/src/newt/classes/com/jogamp/newt/event/NEWTEvent.java index 022e2d0e1..af800e61e 100644 --- a/src/newt/classes/com/jogamp/newt/event/NEWTEvent.java +++ b/src/newt/classes/com/jogamp/newt/event/NEWTEvent.java @@ -131,6 +131,7 @@ public class NEWTEvent extends java.util.EventObject { } } + @Override public String toString() { return toString(null).toString(); } diff --git a/src/newt/classes/com/jogamp/newt/event/PinchToZoomGesture.java b/src/newt/classes/com/jogamp/newt/event/PinchToZoomGesture.java index d275eab46..b4e1341da 100644 --- a/src/newt/classes/com/jogamp/newt/event/PinchToZoomGesture.java +++ b/src/newt/classes/com/jogamp/newt/event/PinchToZoomGesture.java @@ -75,6 +75,7 @@ public class PinchToZoomGesture implements GestureHandler { this.zoom = 1f; } + @Override public String toString() { return "PinchZoom[1stTouch "+zoomFirstTouch+", in "+isWithinGesture()+", has "+(null!=zoomEvent)+", zoom "+zoom+"]"; } diff --git a/src/newt/classes/com/jogamp/newt/event/TraceKeyAdapter.java b/src/newt/classes/com/jogamp/newt/event/TraceKeyAdapter.java index e826f4a6a..bbc170958 100644 --- a/src/newt/classes/com/jogamp/newt/event/TraceKeyAdapter.java +++ b/src/newt/classes/com/jogamp/newt/event/TraceKeyAdapter.java @@ -40,10 +40,12 @@ public class TraceKeyAdapter implements KeyListener { this.downstream = downstream; } + @Override public void keyPressed(KeyEvent e) { System.err.println(e); if(null!=downstream) { downstream.keyPressed(e); } } + @Override public void keyReleased(KeyEvent e) { System.err.println(e); if(null!=downstream) { downstream.keyReleased(e); } diff --git a/src/newt/classes/com/jogamp/newt/event/TraceMouseAdapter.java b/src/newt/classes/com/jogamp/newt/event/TraceMouseAdapter.java index d035091c4..db8376034 100644 --- a/src/newt/classes/com/jogamp/newt/event/TraceMouseAdapter.java +++ b/src/newt/classes/com/jogamp/newt/event/TraceMouseAdapter.java @@ -40,34 +40,42 @@ public class TraceMouseAdapter implements MouseListener { this.downstream = downstream; } + @Override public void mouseClicked(MouseEvent e) { System.err.println(e); if(null!=downstream) { downstream.mouseClicked(e); } } + @Override public void mouseEntered(MouseEvent e) { System.err.println(e); if(null!=downstream) { downstream.mouseEntered(e); } } + @Override public void mouseExited(MouseEvent e) { System.err.println(e); if(null!=downstream) { downstream.mouseExited(e); } } + @Override public void mousePressed(MouseEvent e) { System.err.println(e); if(null!=downstream) { downstream.mousePressed(e); } } + @Override public void mouseReleased(MouseEvent e) { System.err.println(e); if(null!=downstream) { downstream.mouseReleased(e); } } + @Override public void mouseMoved(MouseEvent e) { System.err.println(e); if(null!=downstream) { downstream.mouseMoved(e); } } + @Override public void mouseDragged(MouseEvent e) { System.err.println(e); if(null!=downstream) { downstream.mouseDragged(e); } } + @Override public void mouseWheelMoved(MouseEvent e) { System.err.println(e); if(null!=downstream) { downstream.mouseWheelMoved(e); } diff --git a/src/newt/classes/com/jogamp/newt/event/TraceWindowAdapter.java b/src/newt/classes/com/jogamp/newt/event/TraceWindowAdapter.java index 630e85303..7b844f059 100644 --- a/src/newt/classes/com/jogamp/newt/event/TraceWindowAdapter.java +++ b/src/newt/classes/com/jogamp/newt/event/TraceWindowAdapter.java @@ -40,30 +40,37 @@ public class TraceWindowAdapter implements WindowListener { this.downstream = downstream; } + @Override public void windowResized(WindowEvent e) { System.err.println(e); if(null!=downstream) { downstream.windowResized(e); } } + @Override public void windowMoved(WindowEvent e) { System.err.println(e); if(null!=downstream) { downstream.windowMoved(e); } } + @Override public void windowDestroyNotify(WindowEvent e) { System.err.println(e); if(null!=downstream) { downstream.windowDestroyNotify(e); } } + @Override public void windowDestroyed(WindowEvent e) { System.err.println(e); if(null!=downstream) { downstream.windowDestroyed(e); } } + @Override public void windowGainedFocus(WindowEvent e) { System.err.println(e); if(null!=downstream) { downstream.windowGainedFocus(e); } } + @Override public void windowLostFocus(WindowEvent e) { System.err.println(e); if(null!=downstream) { downstream.windowLostFocus(e); } } + @Override public void windowRepaint(WindowUpdateEvent e) { System.err.println(e); if(null!=downstream) { downstream.windowRepaint(e); } diff --git a/src/newt/classes/com/jogamp/newt/event/WindowAdapter.java b/src/newt/classes/com/jogamp/newt/event/WindowAdapter.java index e237c0d80..ccc627444 100644 --- a/src/newt/classes/com/jogamp/newt/event/WindowAdapter.java +++ b/src/newt/classes/com/jogamp/newt/event/WindowAdapter.java @@ -30,18 +30,25 @@ package com.jogamp.newt.event; public abstract class WindowAdapter implements WindowListener { + @Override public void windowResized(WindowEvent e) { } + @Override public void windowMoved(WindowEvent e) { } + @Override public void windowDestroyNotify(WindowEvent e) { } + @Override public void windowDestroyed(WindowEvent e) { } + @Override public void windowGainedFocus(WindowEvent e) { } + @Override public void windowLostFocus(WindowEvent e) { } + @Override public void windowRepaint(WindowUpdateEvent e) { } } diff --git a/src/newt/classes/com/jogamp/newt/event/WindowEvent.java b/src/newt/classes/com/jogamp/newt/event/WindowEvent.java index 8c7abfe99..2841fd0f6 100644 --- a/src/newt/classes/com/jogamp/newt/event/WindowEvent.java +++ b/src/newt/classes/com/jogamp/newt/event/WindowEvent.java @@ -66,10 +66,12 @@ public class WindowEvent extends NEWTEvent { } } + @Override public String toString() { return toString(null).toString(); } + @Override public StringBuilder toString(StringBuilder sb) { if(null == sb) { sb = new StringBuilder(); diff --git a/src/newt/classes/com/jogamp/newt/event/WindowUpdateEvent.java b/src/newt/classes/com/jogamp/newt/event/WindowUpdateEvent.java index 8a204d234..9044517b5 100644 --- a/src/newt/classes/com/jogamp/newt/event/WindowUpdateEvent.java +++ b/src/newt/classes/com/jogamp/newt/event/WindowUpdateEvent.java @@ -44,10 +44,12 @@ public class WindowUpdateEvent extends WindowEvent { return bounds; } + @Override public String toString() { return toString(null).toString(); } + @Override public StringBuilder toString(StringBuilder sb) { if(null == sb) { sb = new StringBuilder(); diff --git a/src/newt/classes/com/jogamp/newt/event/awt/AWTKeyAdapter.java b/src/newt/classes/com/jogamp/newt/event/awt/AWTKeyAdapter.java index 1b53671ba..f6f11b81f 100644 --- a/src/newt/classes/com/jogamp/newt/event/awt/AWTKeyAdapter.java +++ b/src/newt/classes/com/jogamp/newt/event/awt/AWTKeyAdapter.java @@ -49,11 +49,13 @@ public class AWTKeyAdapter extends AWTAdapter implements java.awt.event.KeyListe super(downstream); } + @Override public AWTAdapter addTo(java.awt.Component awtComponent) { awtComponent.addKeyListener(this); return this; } + @Override public AWTAdapter removeFrom(java.awt.Component awtComponent) { awtComponent.removeKeyListener(this); return this; diff --git a/src/newt/classes/com/jogamp/newt/event/awt/AWTMouseAdapter.java b/src/newt/classes/com/jogamp/newt/event/awt/AWTMouseAdapter.java index ab4bf7a3f..73a02c9fc 100644 --- a/src/newt/classes/com/jogamp/newt/event/awt/AWTMouseAdapter.java +++ b/src/newt/classes/com/jogamp/newt/event/awt/AWTMouseAdapter.java @@ -46,6 +46,7 @@ public class AWTMouseAdapter extends AWTAdapter implements java.awt.event.MouseL super(downstream); } + @Override public AWTAdapter addTo(java.awt.Component awtComponent) { awtComponent.addMouseListener(this); awtComponent.addMouseMotionListener(this); @@ -53,6 +54,7 @@ public class AWTMouseAdapter extends AWTAdapter implements java.awt.event.MouseL return this; } + @Override public AWTAdapter removeFrom(java.awt.Component awtComponent) { awtComponent.removeMouseListener(this); awtComponent.removeMouseMotionListener(this); @@ -60,6 +62,7 @@ public class AWTMouseAdapter extends AWTAdapter implements java.awt.event.MouseL return this; } + @Override public void mouseClicked(java.awt.event.MouseEvent e) { com.jogamp.newt.event.MouseEvent event = AWTNewtEventFactory.createMouseEvent(e, newtWindow); if(null!=newtListener) { @@ -69,6 +72,7 @@ public class AWTMouseAdapter extends AWTAdapter implements java.awt.event.MouseL } } + @Override public void mouseEntered(java.awt.event.MouseEvent e) { com.jogamp.newt.event.MouseEvent event = AWTNewtEventFactory.createMouseEvent(e, newtWindow); if(null!=newtListener) { @@ -78,6 +82,7 @@ public class AWTMouseAdapter extends AWTAdapter implements java.awt.event.MouseL } } + @Override public void mouseExited(java.awt.event.MouseEvent e) { com.jogamp.newt.event.MouseEvent event = AWTNewtEventFactory.createMouseEvent(e, newtWindow); if(null!=newtListener) { @@ -87,6 +92,7 @@ public class AWTMouseAdapter extends AWTAdapter implements java.awt.event.MouseL } } + @Override public void mousePressed(java.awt.event.MouseEvent e) { com.jogamp.newt.event.MouseEvent event = AWTNewtEventFactory.createMouseEvent(e, newtWindow); if(null!=newtListener) { @@ -96,6 +102,7 @@ public class AWTMouseAdapter extends AWTAdapter implements java.awt.event.MouseL } } + @Override public void mouseReleased(java.awt.event.MouseEvent e) { com.jogamp.newt.event.MouseEvent event = AWTNewtEventFactory.createMouseEvent(e, newtWindow); if(null!=newtListener) { @@ -105,6 +112,7 @@ public class AWTMouseAdapter extends AWTAdapter implements java.awt.event.MouseL } } + @Override public void mouseDragged(java.awt.event.MouseEvent e) { com.jogamp.newt.event.MouseEvent event = AWTNewtEventFactory.createMouseEvent(e, newtWindow); if(null!=newtListener) { @@ -114,6 +122,7 @@ public class AWTMouseAdapter extends AWTAdapter implements java.awt.event.MouseL } } + @Override public void mouseMoved(java.awt.event.MouseEvent e) { com.jogamp.newt.event.MouseEvent event = AWTNewtEventFactory.createMouseEvent(e, newtWindow); if(null!=newtListener) { @@ -123,6 +132,7 @@ public class AWTMouseAdapter extends AWTAdapter implements java.awt.event.MouseL } } + @Override public void mouseWheelMoved(java.awt.event.MouseWheelEvent e) { com.jogamp.newt.event.MouseEvent event = AWTNewtEventFactory.createMouseEvent(e, newtWindow); if(null!=newtListener) { diff --git a/src/newt/classes/com/jogamp/newt/event/awt/AWTWindowAdapter.java b/src/newt/classes/com/jogamp/newt/event/awt/AWTWindowAdapter.java index 8c9781b77..8a9a2a49f 100644 --- a/src/newt/classes/com/jogamp/newt/event/awt/AWTWindowAdapter.java +++ b/src/newt/classes/com/jogamp/newt/event/awt/AWTWindowAdapter.java @@ -50,6 +50,7 @@ public class AWTWindowAdapter super(downstream); } + @Override public AWTAdapter addTo(java.awt.Component awtComponent) { java.awt.Window win = getWindow(awtComponent); awtComponent.addComponentListener(this); @@ -74,6 +75,7 @@ public class AWTWindowAdapter return this; } + @Override public AWTAdapter removeFrom(java.awt.Component awtComponent) { awtComponent.removeFocusListener(this); awtComponent.removeComponentListener(this); @@ -94,6 +96,7 @@ public class AWTWindowAdapter return null; } + @Override public void focusGained(java.awt.event.FocusEvent e) { com.jogamp.newt.event.WindowEvent event = AWTNewtEventFactory.createWindowEvent(e, newtWindow); if(DEBUG_IMPLEMENTATION) { @@ -106,6 +109,7 @@ public class AWTWindowAdapter } } + @Override public void focusLost(java.awt.event.FocusEvent e) { com.jogamp.newt.event.WindowEvent event = AWTNewtEventFactory.createWindowEvent(e, newtWindow); if(DEBUG_IMPLEMENTATION) { @@ -118,6 +122,7 @@ public class AWTWindowAdapter } } + @Override public void componentResized(java.awt.event.ComponentEvent e) { com.jogamp.newt.event.WindowEvent event = AWTNewtEventFactory.createWindowEvent(e, newtWindow); if(DEBUG_IMPLEMENTATION) { @@ -142,6 +147,7 @@ public class AWTWindowAdapter } } + @Override public void componentMoved(java.awt.event.ComponentEvent e) { com.jogamp.newt.event.WindowEvent event = AWTNewtEventFactory.createWindowEvent(e, newtWindow); if(DEBUG_IMPLEMENTATION) { @@ -154,6 +160,7 @@ public class AWTWindowAdapter } } + @Override public void componentShown(java.awt.event.ComponentEvent e) { final java.awt.Component comp = e.getComponent(); if(DEBUG_IMPLEMENTATION) { @@ -171,6 +178,7 @@ public class AWTWindowAdapter }*/ } + @Override public void componentHidden(java.awt.event.ComponentEvent e) { final java.awt.Component comp = e.getComponent(); if(DEBUG_IMPLEMENTATION) { @@ -188,6 +196,7 @@ public class AWTWindowAdapter }*/ } + @Override public void windowActivated(java.awt.event.WindowEvent e) { com.jogamp.newt.event.WindowEvent event = AWTNewtEventFactory.createWindowEvent(e, newtWindow); if(null!=newtListener) { @@ -197,10 +206,13 @@ public class AWTWindowAdapter } } + @Override public void windowClosed(java.awt.event.WindowEvent e) { } + @Override public void windowClosing(java.awt.event.WindowEvent e) { } + @Override public void windowDeactivated(java.awt.event.WindowEvent e) { com.jogamp.newt.event.WindowEvent event = AWTNewtEventFactory.createWindowEvent(e, newtWindow); if(null!=newtListener) { @@ -210,13 +222,17 @@ public class AWTWindowAdapter } } + @Override public void windowDeiconified(java.awt.event.WindowEvent e) { } + @Override public void windowIconified(java.awt.event.WindowEvent e) { } + @Override public void windowOpened(java.awt.event.WindowEvent e) { } class WindowClosingListener implements java.awt.event.WindowListener { + @Override public void windowClosing(java.awt.event.WindowEvent e) { com.jogamp.newt.event.WindowEvent event = AWTNewtEventFactory.createWindowEvent(e, newtWindow); if(null!=newtListener) { @@ -225,6 +241,7 @@ public class AWTWindowAdapter enqueueEvent(true, event); } } + @Override public void windowClosed(java.awt.event.WindowEvent e) { com.jogamp.newt.event.WindowEvent event = AWTNewtEventFactory.createWindowEvent(e, newtWindow); if(null!=newtListener) { @@ -234,10 +251,15 @@ public class AWTWindowAdapter } } + @Override public void windowActivated(java.awt.event.WindowEvent e) { } + @Override public void windowDeactivated(java.awt.event.WindowEvent e) { } + @Override public void windowDeiconified(java.awt.event.WindowEvent e) { } + @Override public void windowIconified(java.awt.event.WindowEvent e) { } + @Override public void windowOpened(java.awt.event.WindowEvent e) { } } } diff --git a/src/newt/classes/com/jogamp/newt/opengl/GLWindow.java b/src/newt/classes/com/jogamp/newt/opengl/GLWindow.java index ac81e8469..8c1110ed3 100644 --- a/src/newt/classes/com/jogamp/newt/opengl/GLWindow.java +++ b/src/newt/classes/com/jogamp/newt/opengl/GLWindow.java @@ -117,6 +117,7 @@ public class GLWindow extends GLAutoDrawableBase implements GLAutoDrawable, Wind super(null, null, false /* always handle device lifecycle ourselves */); this.window = (WindowImpl) window; this.window.setWindowDestroyNotifyAction( new Runnable() { + @Override public void run() { defaultWindowDestroyNotifyOp(); } } ); @@ -549,6 +550,7 @@ public class GLWindow extends GLAutoDrawableBase implements GLAutoDrawable, Wind anim.stop(); // on anim thread, non-blocking } else { AccessController.doPrivileged(new PrivilegedAction() { + @Override public Object run() { if( anim.isAnimating() && null != animThread ) { try { diff --git a/src/newt/classes/com/jogamp/newt/swt/NewtCanvasSWT.java b/src/newt/classes/com/jogamp/newt/swt/NewtCanvasSWT.java index a25b43777..e63a53524 100644 --- a/src/newt/classes/com/jogamp/newt/swt/NewtCanvasSWT.java +++ b/src/newt/classes/com/jogamp/newt/swt/NewtCanvasSWT.java @@ -99,6 +99,7 @@ public class NewtCanvasSWT extends Canvas implements WindowClosingProtocol { public static NewtCanvasSWT create(final Composite parent, final int style, final Window child) { final NewtCanvasSWT[] res = new NewtCanvasSWT[] { null }; parent.getDisplay().syncExec( new Runnable() { + @Override public void run() { res[0] = new NewtCanvasSWT( parent, style, child); } @@ -254,10 +255,12 @@ public class NewtCanvasSWT extends Canvas implements WindowClosingProtocol { /** @return this SWT Canvas NativeWindow representation, may be null in case it has not been realized. */ public NativeWindow getNativeWindow() { return nativeWindow; } + @Override public WindowClosingMode getDefaultCloseOperation() { return newtChildCloseOp; // TODO: implement ?! } + @Override public WindowClosingMode setDefaultCloseOperation(WindowClosingMode op) { return newtChildCloseOp = op; // TODO: implement ?! } diff --git a/src/newt/classes/jogamp/newt/Debug.java b/src/newt/classes/jogamp/newt/Debug.java index 46a354d4a..7ef2d7ffc 100644 --- a/src/newt/classes/jogamp/newt/Debug.java +++ b/src/newt/classes/jogamp/newt/Debug.java @@ -54,6 +54,7 @@ public class Debug extends PropertyAccess { static { AccessController.doPrivileged(new PrivilegedAction() { + @Override public Object run() { PropertyAccess.addTrustedPrefix("newt."); return null; diff --git a/src/newt/classes/jogamp/newt/DisplayImpl.java b/src/newt/classes/jogamp/newt/DisplayImpl.java index c6cb706a4..0c29d772a 100644 --- a/src/newt/classes/jogamp/newt/DisplayImpl.java +++ b/src/newt/classes/jogamp/newt/DisplayImpl.java @@ -53,6 +53,7 @@ public abstract class DisplayImpl extends Display { static { NativeWindowFactory.addCustomShutdownHook(true /* head */, new Runnable() { + @Override public void run() { WindowImpl.shutdownAll(); ScreenImpl.shutdownAll(); @@ -147,6 +148,7 @@ public abstract class DisplayImpl extends Display { final DisplayImpl f_dpy = this; try { runOnEDTIfAvail(true, new Runnable() { + @Override public void run() { f_dpy.createNativeImpl(); }}); @@ -244,6 +246,7 @@ public abstract class DisplayImpl extends Display { task.run(); } + @Override public boolean validateEDTStopped() { if( 0==refCount && null == aDevice ) { final EDTUtil _edtUtil = edtUtil; @@ -277,6 +280,7 @@ public abstract class DisplayImpl extends Display { aDevice = null; refCount=0; stopEDT( edtUtil, new Runnable() { // blocks! + @Override public void run() { if ( null != f_aDevice ) { f_dpy.closeNativeImpl(f_aDevice); @@ -308,6 +312,7 @@ public abstract class DisplayImpl extends Display { d.aDevice = null; d.refCount=0; final Runnable closeNativeTask = new Runnable() { + @Override public void run() { if ( null != d.getGraphicsDevice() ) { d.closeNativeImpl(f_aDevice); @@ -329,6 +334,7 @@ public abstract class DisplayImpl extends Display { } } + @Override public synchronized final int addReference() { if(DEBUG) { System.err.println("Display.addReference() ("+DisplayImpl.getThreadName()+"): "+refCount+" -> "+(refCount+1)); @@ -343,6 +349,7 @@ public abstract class DisplayImpl extends Display { } + @Override public synchronized final int removeReference() { if(DEBUG) { System.err.println("Display.removeReference() ("+DisplayImpl.getThreadName()+"): "+refCount+" -> "+(refCount-1)); @@ -355,6 +362,7 @@ public abstract class DisplayImpl extends Display { return refCount; } + @Override public synchronized final int getReferenceCount() { return refCount; } @@ -450,6 +458,7 @@ public abstract class DisplayImpl extends Display { private volatile boolean haveEvents = false; final protected Runnable dispatchMessagesRunnable = new Runnable() { + @Override public void run() { DisplayImpl.this.dispatchMessages(); } }; diff --git a/src/newt/classes/jogamp/newt/NEWTJNILibLoader.java b/src/newt/classes/jogamp/newt/NEWTJNILibLoader.java index f1e212394..9364ada30 100644 --- a/src/newt/classes/jogamp/newt/NEWTJNILibLoader.java +++ b/src/newt/classes/jogamp/newt/NEWTJNILibLoader.java @@ -51,6 +51,7 @@ import com.jogamp.common.util.cache.TempJarCache; public class NEWTJNILibLoader extends JNILibLoaderBase { public static boolean loadNEWT() { return AccessController.doPrivileged(new PrivilegedAction() { + @Override public Boolean run() { Platform.initSingleton(); final String libName = "newt"; diff --git a/src/newt/classes/jogamp/newt/OffscreenWindow.java b/src/newt/classes/jogamp/newt/OffscreenWindow.java index eba844230..2478b1e5d 100644 --- a/src/newt/classes/jogamp/newt/OffscreenWindow.java +++ b/src/newt/classes/jogamp/newt/OffscreenWindow.java @@ -57,6 +57,7 @@ public class OffscreenWindow extends WindowImpl implements MutableSurface { static long nextWindowHandle = 0x100; // start here - a marker + @Override protected void createNativeImpl() { if(capsRequested.isOnscreen()) { throw new NativeWindowException("Capabilities is onscreen"); @@ -75,6 +76,7 @@ public class OffscreenWindow extends WindowImpl implements MutableSurface { visibleChanged(false, true); } + @Override protected void closeNativeImpl() { // nop } @@ -85,6 +87,7 @@ public class OffscreenWindow extends WindowImpl implements MutableSurface { surfaceHandle = 0; } + @Override public void setSurfaceHandle(long handle) { surfaceHandle = handle ; } @@ -94,6 +97,7 @@ public class OffscreenWindow extends WindowImpl implements MutableSurface { return surfaceHandle; } + @Override protected void requestFocusImpl(boolean reparented) { } @@ -113,6 +117,7 @@ public class OffscreenWindow extends WindowImpl implements MutableSurface { } + @Override protected boolean reconfigureWindowImpl(int x, int y, int width, int height, int flags) { sizeChanged(false, width, height, false); if( 0 != ( FLAG_CHANGE_VISIBILITY & flags) ) { @@ -138,10 +143,12 @@ public class OffscreenWindow extends WindowImpl implements MutableSurface { return new Point(0,0); } + @Override protected Point getLocationOnScreenImpl(int x, int y) { return new Point(x,y); } + @Override protected void updateInsetsImpl(Insets insets) { // nop .. } diff --git a/src/newt/classes/jogamp/newt/WindowImpl.java b/src/newt/classes/jogamp/newt/WindowImpl.java index a0ef8816b..5102fd26d 100644 --- a/src/newt/classes/jogamp/newt/WindowImpl.java +++ b/src/newt/classes/jogamp/newt/WindowImpl.java @@ -207,6 +207,7 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer /** last mouse button click count */ short lastButtonClickCount = (short)0; + @Override final void clearButton() { super.clearButton(); lastButtonPressTime = 0; @@ -536,12 +537,14 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer private Object closingListenerLock = new Object(); private WindowClosingMode defaultCloseOperation = WindowClosingMode.DISPOSE_ON_CLOSE; + @Override public WindowClosingMode getDefaultCloseOperation() { synchronized (closingListenerLock) { return defaultCloseOperation; } } + @Override public WindowClosingMode setDefaultCloseOperation(WindowClosingMode op) { synchronized (closingListenerLock) { WindowClosingMode _op = defaultCloseOperation; @@ -956,6 +959,7 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer this.visible = visible; } + @Override public final void run() { setVisibleActionImpl(visible); } @@ -983,6 +987,7 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer this.disregardFS = disregardFS; } + @Override public final void run() { final RecursiveLock _lock = windowLock; _lock.lock(); @@ -1035,6 +1040,7 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer } private class DestroyAction implements Runnable { + @Override public final void run() { boolean animatorPaused = false; if(null!=lifecycleHook) { @@ -1188,6 +1194,7 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer screen = newScreen; } + @Override public final void run() { boolean animatorPaused = false; if(null!=lifecycleHook) { @@ -1462,6 +1469,7 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer } private class ReparentActionRecreate implements Runnable { + @Override public final void run() { final RecursiveLock _lock = windowLock; _lock.lock(); @@ -1514,6 +1522,7 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer this.undecorated = undecorated; } + @Override public final void run() { final RecursiveLock _lock = windowLock; _lock.lock(); @@ -1559,6 +1568,7 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer this.alwaysOnTop = alwaysOnTop; } + @Override public final void run() { final RecursiveLock _lock = windowLock; _lock.lock(); @@ -1834,6 +1844,7 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer } private final Runnable requestFocusAction = new Runnable() { + @Override public final void run() { if(DEBUG_IMPLEMENTATION) { System.err.println("Window.RequestFocusAction: force 0 - ("+getThreadName()+"): "+hasFocus+" -> true - windowHandle "+toHexString(windowHandle)+" parentWindowHandle "+toHexString(parentWindowHandle)); @@ -1842,6 +1853,7 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer } }; private final Runnable requestFocusActionForced = new Runnable() { + @Override public final void run() { if(DEBUG_IMPLEMENTATION) { System.err.println("Window.RequestFocusAction: force 1 - ("+getThreadName()+"): "+hasFocus+" -> true - windowHandle "+toHexString(windowHandle)+" parentWindowHandle "+toHexString(parentWindowHandle)); @@ -1921,6 +1933,7 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer this.y = y; } + @Override public final void run() { final RecursiveLock _lock = windowLock; _lock.lock(); @@ -1970,6 +1983,7 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer } public boolean fsOn() { return fullscreen; } + @Override public final void run() { final RecursiveLock _lock = windowLock; _lock.lock(); @@ -2144,6 +2158,7 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer List _fullscreenMonitors = null; boolean _fullscreenUseMainMonitor = true; + @Override public void monitorModeChangeNotify(MonitorEvent me) { hadFocus = hasFocus(); if(DEBUG_IMPLEMENTATION) { @@ -2164,6 +2179,7 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer } } + @Override public void monitorModeChanged(MonitorEvent me, boolean success) { if(DEBUG_IMPLEMENTATION) { System.err.println("Window.monitorModeChanged: hadFocus "+hadFocus+", "+me+", success: "+success+" @ "+Thread.currentThread().getName()); diff --git a/src/newt/classes/jogamp/newt/awt/event/AWTParentWindowAdapter.java b/src/newt/classes/jogamp/newt/awt/event/AWTParentWindowAdapter.java index 325f17278..4bcb0fc82 100644 --- a/src/newt/classes/jogamp/newt/awt/event/AWTParentWindowAdapter.java +++ b/src/newt/classes/jogamp/newt/awt/event/AWTParentWindowAdapter.java @@ -51,16 +51,19 @@ public class AWTParentWindowAdapter extends AWTWindowAdapter implements java.awt this.downstreamParent = downstreamParent; } + @Override public AWTAdapter addTo(java.awt.Component awtComponent) { awtComponent.addHierarchyListener(this); return super.addTo(awtComponent); } + @Override public AWTAdapter removeFrom(java.awt.Component awtComponent) { awtComponent.removeHierarchyListener(this); return super.removeFrom(awtComponent); } + @Override public void focusGained(java.awt.event.FocusEvent e) { // forward focus to NEWT child final com.jogamp.newt.Window newtChild = getNewtWindow(); @@ -78,12 +81,14 @@ public class AWTParentWindowAdapter extends AWTWindowAdapter implements java.awt } } + @Override public void focusLost(java.awt.event.FocusEvent e) { if(DEBUG_IMPLEMENTATION) { System.err.println("AWT: focusLost: "+ e); } } + @Override public void componentResized(java.awt.event.ComponentEvent e) { // Need to resize the NEWT child window // the resized event will be send via the native window feedback. @@ -93,6 +98,7 @@ public class AWTParentWindowAdapter extends AWTWindowAdapter implements java.awt } final Window newtWindow = getNewtWindow(); newtWindow.runOnEDTIfAvail(false, new Runnable() { + @Override public void run() { int cw = comp.getWidth(); int ch = comp.getHeight(); @@ -109,6 +115,7 @@ public class AWTParentWindowAdapter extends AWTWindowAdapter implements java.awt }}); } + @Override public void componentMoved(java.awt.event.ComponentEvent e) { if(DEBUG_IMPLEMENTATION) { System.err.println("AWT: componentMoved: "+e); @@ -119,14 +126,17 @@ public class AWTParentWindowAdapter extends AWTWindowAdapter implements java.awt } } + @Override public void windowActivated(java.awt.event.WindowEvent e) { // no propagation to NEWT child window } + @Override public void windowDeactivated(java.awt.event.WindowEvent e) { // no propagation to NEWT child window } + @Override public void hierarchyChanged(java.awt.event.HierarchyEvent e) { if( null == getNewtEventListener() ) { long bits = e.getChangeFlags(); @@ -137,6 +147,7 @@ public class AWTParentWindowAdapter extends AWTWindowAdapter implements java.awt System.err.println("AWT: hierarchyChanged SHOWING_CHANGED: showing "+showing+", "+changed+", source "+e.getComponent()); } getNewtWindow().runOnEDTIfAvail(false, new Runnable() { + @Override public void run() { if(getNewtWindow().isVisible() != showing) { getNewtWindow().setVisible(showing); diff --git a/src/newt/classes/jogamp/newt/driver/awt/AWTCanvas.java b/src/newt/classes/jogamp/newt/driver/awt/AWTCanvas.java index 14cc9c69d..f7722c91c 100644 --- a/src/newt/classes/jogamp/newt/driver/awt/AWTCanvas.java +++ b/src/newt/classes/jogamp/newt/driver/awt/AWTCanvas.java @@ -107,6 +107,7 @@ public class AWTCanvas extends Canvas { return res; } + @Override public void addNotify() { /** @@ -160,6 +161,7 @@ public class AWTCanvas extends Canvas { return null != jawtWindow ? jawtWindow.isOffscreenLayerSurfaceEnabled() : false; } + @Override public void removeNotify() { try { dispose(); @@ -195,6 +197,7 @@ public class AWTCanvas extends Canvas { * Overridden to choose a GraphicsConfiguration on a parent container's * GraphicsDevice because both devices */ + @Override public GraphicsConfiguration getGraphicsConfiguration() { /* * Workaround for problems with Xinerama and java.awt.Component.checkGD @@ -324,6 +327,7 @@ public class AWTCanvas extends Canvas { if (!disableBackgroundEraseInitialized) { try { AccessController.doPrivileged(new PrivilegedAction() { + @Override public Object run() { try { Class clazz = getToolkit().getClass(); diff --git a/src/newt/classes/jogamp/newt/driver/awt/AWTEDTUtil.java b/src/newt/classes/jogamp/newt/driver/awt/AWTEDTUtil.java index bddb43b30..4a7193306 100644 --- a/src/newt/classes/jogamp/newt/driver/awt/AWTEDTUtil.java +++ b/src/newt/classes/jogamp/newt/driver/awt/AWTEDTUtil.java @@ -218,6 +218,7 @@ public class AWTEDTUtil implements EDTUtil { } try { AWTEDTExecutor.singleton.invoke(true, new Runnable() { + @Override public void run() { } }); } catch (Exception e) { } diff --git a/src/newt/classes/jogamp/newt/driver/awt/DisplayDriver.java b/src/newt/classes/jogamp/newt/driver/awt/DisplayDriver.java index 9e716d544..d9a4a48e5 100644 --- a/src/newt/classes/jogamp/newt/driver/awt/DisplayDriver.java +++ b/src/newt/classes/jogamp/newt/driver/awt/DisplayDriver.java @@ -46,6 +46,7 @@ public class DisplayDriver extends DisplayImpl { public DisplayDriver() { } + @Override protected void createNativeImpl() { aDevice = AWTGraphicsDevice.createDefault(); } @@ -54,6 +55,7 @@ public class DisplayDriver extends DisplayImpl { aDevice = d; } + @Override protected EDTUtil createEDTUtil() { final EDTUtil def; if(NewtFactory.useEDT()) { @@ -67,10 +69,12 @@ public class DisplayDriver extends DisplayImpl { return def; } + @Override protected void closeNativeImpl(AbstractGraphicsDevice aDevice) { aDevice.close(); } + @Override protected void dispatchMessagesNative() { /* nop */ } } diff --git a/src/newt/classes/jogamp/newt/driver/awt/ScreenDriver.java b/src/newt/classes/jogamp/newt/driver/awt/ScreenDriver.java index a2430e2bb..a4356707e 100644 --- a/src/newt/classes/jogamp/newt/driver/awt/ScreenDriver.java +++ b/src/newt/classes/jogamp/newt/driver/awt/ScreenDriver.java @@ -49,6 +49,7 @@ public class ScreenDriver extends ScreenImpl { public ScreenDriver() { } + @Override protected void createNativeImpl() { aScreen = new AWTGraphicsScreen((AWTGraphicsDevice)display.getGraphicsDevice()); } @@ -65,8 +66,10 @@ public class ScreenDriver extends ScreenImpl { super.updateVirtualScreenOriginAndSize(); } + @Override protected void closeNativeImpl() { } + @Override protected int validateScreenIndex(int idx) { return idx; // pass through ... } diff --git a/src/newt/classes/jogamp/newt/driver/awt/WindowDriver.java b/src/newt/classes/jogamp/newt/driver/awt/WindowDriver.java index db71695b7..9854524d9 100644 --- a/src/newt/classes/jogamp/newt/driver/awt/WindowDriver.java +++ b/src/newt/classes/jogamp/newt/driver/awt/WindowDriver.java @@ -86,6 +86,7 @@ public class WindowDriver extends WindowImpl { private Frame awtFrame = null; private AWTCanvas awtCanvas; + @Override protected void requestFocusImpl(boolean reparented) { awtContainer.requestFocus(); } @@ -97,6 +98,7 @@ public class WindowDriver extends WindowImpl { } } + @Override protected void createNativeImpl() { if(0!=getParentWindowHandle()) { throw new RuntimeException("Window parenting not supported in AWT, use AWTWindow(Frame) cstr for wrapping instead"); @@ -140,6 +142,7 @@ public class WindowDriver extends WindowImpl { } } + @Override protected void closeNativeImpl() { setWindowHandle(0); if(null!=awtContainer) { @@ -176,6 +179,7 @@ public class WindowDriver extends WindowImpl { return res; } + @Override protected void updateInsetsImpl(javax.media.nativewindow.util.Insets insets) { final Insets contInsets = awtContainer.getInsets(); insets.set(contInsets.left, contInsets.right, contInsets.top, contInsets.bottom); @@ -214,6 +218,7 @@ public class WindowDriver extends WindowImpl { awtContainer.validate(); } + @Override protected boolean reconfigureWindowImpl(int x, int y, int width, int height, int flags) { if(DEBUG_IMPLEMENTATION) { System.err.println("AWTWindow reconfig: "+x+"/"+y+" "+width+"x"+height+", "+ @@ -266,6 +271,7 @@ public class WindowDriver extends WindowImpl { return true; } + @Override protected Point getLocationOnScreenImpl(int x, int y) { java.awt.Point ap = awtCanvas.getLocationOnScreen(); ap.translate(x, y); diff --git a/src/newt/classes/jogamp/newt/driver/bcm/egl/DisplayDriver.java b/src/newt/classes/jogamp/newt/driver/bcm/egl/DisplayDriver.java index 1b73cb381..9da671d37 100644 --- a/src/newt/classes/jogamp/newt/driver/bcm/egl/DisplayDriver.java +++ b/src/newt/classes/jogamp/newt/driver/bcm/egl/DisplayDriver.java @@ -61,6 +61,7 @@ public class DisplayDriver extends jogamp.newt.DisplayImpl { public DisplayDriver() { } + @Override protected void createNativeImpl() { final long handle = CreateDisplay(ScreenDriver.fixedWidth, ScreenDriver.fixedHeight); if (handle == EGL.EGL_NO_DISPLAY) { @@ -69,6 +70,7 @@ public class DisplayDriver extends jogamp.newt.DisplayImpl { aDevice = new EGLGraphicsDevice(EGL.EGL_DEFAULT_DISPLAY, handle, AbstractGraphicsDevice.DEFAULT_CONNECTION, AbstractGraphicsDevice.DEFAULT_UNIT, null); } + @Override protected void closeNativeImpl(AbstractGraphicsDevice aDevice) { if (aDevice.getHandle() != EGL.EGL_NO_DISPLAY) { DestroyDisplay(aDevice.getHandle()); @@ -76,6 +78,7 @@ public class DisplayDriver extends jogamp.newt.DisplayImpl { aDevice.close(); } + @Override protected void dispatchMessagesNative() { // n/a .. DispatchMessages(); } diff --git a/src/newt/classes/jogamp/newt/driver/bcm/egl/ScreenDriver.java b/src/newt/classes/jogamp/newt/driver/bcm/egl/ScreenDriver.java index 269574adc..d3231557f 100644 --- a/src/newt/classes/jogamp/newt/driver/bcm/egl/ScreenDriver.java +++ b/src/newt/classes/jogamp/newt/driver/bcm/egl/ScreenDriver.java @@ -53,12 +53,15 @@ public class ScreenDriver extends jogamp.newt.ScreenImpl { public ScreenDriver() { } + @Override protected void createNativeImpl() { aScreen = new DefaultGraphicsScreen(getDisplay().getGraphicsDevice(), screen_idx); } + @Override protected void closeNativeImpl() { } + @Override protected int validateScreenIndex(int idx) { return 0; // only one screen available } @@ -100,6 +103,7 @@ public class ScreenDriver extends jogamp.newt.ScreenImpl { return false; } + @Override protected void calcVirtualScreenOriginAndSize(Rectangle vOriginSize) { vOriginSize.set(0, 0, fixedWidth, fixedHeight); // FIXME } diff --git a/src/newt/classes/jogamp/newt/driver/bcm/egl/WindowDriver.java b/src/newt/classes/jogamp/newt/driver/bcm/egl/WindowDriver.java index bed0520ff..39f168e0f 100644 --- a/src/newt/classes/jogamp/newt/driver/bcm/egl/WindowDriver.java +++ b/src/newt/classes/jogamp/newt/driver/bcm/egl/WindowDriver.java @@ -52,6 +52,7 @@ public class WindowDriver extends jogamp.newt.WindowImpl { public WindowDriver() { } + @Override protected void createNativeImpl() { if(0!=getParentWindowHandle()) { throw new RuntimeException("Window parenting not supported (yet)"); @@ -72,12 +73,14 @@ public class WindowDriver extends jogamp.newt.WindowImpl { } } + @Override protected void closeNativeImpl() { if(0!=windowHandleClose) { CloseWindow(getDisplayHandle(), windowHandleClose); } } + @Override protected void requestFocusImpl(boolean reparented) { } protected void setSizeImpl(int width, int height) { @@ -89,6 +92,7 @@ public class WindowDriver extends jogamp.newt.WindowImpl { } } + @Override protected boolean reconfigureWindowImpl(int x, int y, int width, int height, int flags) { if(0!=getWindowHandle()) { if(0 != ( FLAG_CHANGE_FULLSCREEN & flags)) { @@ -117,10 +121,12 @@ public class WindowDriver extends jogamp.newt.WindowImpl { return true; } + @Override protected Point getLocationOnScreenImpl(int x, int y) { return new Point(x,y); } + @Override protected void updateInsetsImpl(Insets insets) { // nop .. } diff --git a/src/newt/classes/jogamp/newt/driver/bcm/vc/iv/DisplayDriver.java b/src/newt/classes/jogamp/newt/driver/bcm/vc/iv/DisplayDriver.java index 52c92a5da..d8d93f123 100644 --- a/src/newt/classes/jogamp/newt/driver/bcm/vc/iv/DisplayDriver.java +++ b/src/newt/classes/jogamp/newt/driver/bcm/vc/iv/DisplayDriver.java @@ -59,15 +59,18 @@ public class DisplayDriver extends DisplayImpl { public DisplayDriver() { } + @Override protected void createNativeImpl() { // FIXME: map name to EGL_*_DISPLAY aDevice = EGLDisplayUtil.eglCreateEGLGraphicsDevice(EGL.EGL_DEFAULT_DISPLAY, AbstractGraphicsDevice.DEFAULT_CONNECTION, AbstractGraphicsDevice.DEFAULT_UNIT); } + @Override protected void closeNativeImpl(AbstractGraphicsDevice aDevice) { aDevice.close(); } + @Override protected void dispatchMessagesNative() { DispatchMessages(); } diff --git a/src/newt/classes/jogamp/newt/driver/bcm/vc/iv/ScreenDriver.java b/src/newt/classes/jogamp/newt/driver/bcm/vc/iv/ScreenDriver.java index 5a1917419..dc2a8459a 100644 --- a/src/newt/classes/jogamp/newt/driver/bcm/vc/iv/ScreenDriver.java +++ b/src/newt/classes/jogamp/newt/driver/bcm/vc/iv/ScreenDriver.java @@ -45,13 +45,16 @@ public class ScreenDriver extends ScreenImpl { public ScreenDriver() { } + @Override protected void createNativeImpl() { aScreen = new DefaultGraphicsScreen(getDisplay().getGraphicsDevice(), screen_idx); initNative(); } + @Override protected void closeNativeImpl() { } + @Override protected int validateScreenIndex(int idx) { return 0; // only one screen available } diff --git a/src/newt/classes/jogamp/newt/driver/bcm/vc/iv/WindowDriver.java b/src/newt/classes/jogamp/newt/driver/bcm/vc/iv/WindowDriver.java index 560e49e96..4d4977776 100644 --- a/src/newt/classes/jogamp/newt/driver/bcm/vc/iv/WindowDriver.java +++ b/src/newt/classes/jogamp/newt/driver/bcm/vc/iv/WindowDriver.java @@ -55,6 +55,7 @@ public class WindowDriver extends WindowImpl { public WindowDriver() { } + @Override protected void createNativeImpl() { if(0!=getParentWindowHandle()) { throw new RuntimeException("Window parenting not supported (yet)"); @@ -92,6 +93,7 @@ public class WindowDriver extends WindowImpl { focusChanged(false, true); } + @Override protected void closeNativeImpl() { final EGLGraphicsDevice eglDevice = (EGLGraphicsDevice) getGraphicsConfiguration().getScreen().getDevice(); @@ -106,10 +108,12 @@ public class WindowDriver extends WindowImpl { eglDevice.close(); } + @Override protected void requestFocusImpl(boolean reparented) { focusChanged(false, true); } + @Override protected boolean reconfigureWindowImpl(int x, int y, int width, int height, int flags) { if( 0 != ( FLAG_CHANGE_VISIBILITY & flags) ) { setVisible0(nativeWindowHandle, 0 != ( FLAG_IS_VISIBLE & flags)); @@ -143,10 +147,12 @@ public class WindowDriver extends WindowImpl { return true; } + @Override protected Point getLocationOnScreenImpl(int x, int y) { return new Point(x,y); } + @Override protected void updateInsetsImpl(Insets insets) { // nop .. } diff --git a/src/newt/classes/jogamp/newt/driver/intel/gdl/DisplayDriver.java b/src/newt/classes/jogamp/newt/driver/intel/gdl/DisplayDriver.java index 4cb566bc2..cc435540f 100644 --- a/src/newt/classes/jogamp/newt/driver/intel/gdl/DisplayDriver.java +++ b/src/newt/classes/jogamp/newt/driver/intel/gdl/DisplayDriver.java @@ -59,6 +59,7 @@ public class DisplayDriver extends jogamp.newt.DisplayImpl { public DisplayDriver() { } + @Override protected void createNativeImpl() { synchronized(DisplayDriver.class) { if(0==initCounter) { @@ -72,6 +73,7 @@ public class DisplayDriver extends jogamp.newt.DisplayImpl { aDevice = new DefaultGraphicsDevice(NativeWindowFactory.TYPE_DEFAULT, AbstractGraphicsDevice.DEFAULT_CONNECTION, AbstractGraphicsDevice.DEFAULT_UNIT, displayHandle); } + @Override protected void closeNativeImpl(AbstractGraphicsDevice aDevice) { if(0==displayHandle) { throw new NativeWindowException("displayHandle null; initCnt "+initCounter); @@ -87,6 +89,7 @@ public class DisplayDriver extends jogamp.newt.DisplayImpl { aDevice.close(); } + @Override protected void dispatchMessagesNative() { if(0!=displayHandle) { DispatchMessages(displayHandle, focusedWindow); diff --git a/src/newt/classes/jogamp/newt/driver/intel/gdl/ScreenDriver.java b/src/newt/classes/jogamp/newt/driver/intel/gdl/ScreenDriver.java index b5202aaf9..44802e348 100644 --- a/src/newt/classes/jogamp/newt/driver/intel/gdl/ScreenDriver.java +++ b/src/newt/classes/jogamp/newt/driver/intel/gdl/ScreenDriver.java @@ -53,14 +53,17 @@ public class ScreenDriver extends jogamp.newt.ScreenImpl { public ScreenDriver() { } + @Override protected void createNativeImpl() { AbstractGraphicsDevice adevice = getDisplay().getGraphicsDevice(); GetScreenInfo(adevice.getHandle(), screen_idx); aScreen = new DefaultGraphicsScreen(adevice, screen_idx); } + @Override protected void closeNativeImpl() { } + @Override protected int validateScreenIndex(int idx) { return 0; // only one screen available } @@ -102,6 +105,7 @@ public class ScreenDriver extends jogamp.newt.ScreenImpl { return false; } + @Override protected void calcVirtualScreenOriginAndSize(Rectangle vOriginSize) { vOriginSize.set(0, 0, cachedWidth, cachedHeight); } diff --git a/src/newt/classes/jogamp/newt/driver/intel/gdl/WindowDriver.java b/src/newt/classes/jogamp/newt/driver/intel/gdl/WindowDriver.java index 80821d4da..0e96c65d0 100644 --- a/src/newt/classes/jogamp/newt/driver/intel/gdl/WindowDriver.java +++ b/src/newt/classes/jogamp/newt/driver/intel/gdl/WindowDriver.java @@ -48,6 +48,7 @@ public class WindowDriver extends jogamp.newt.WindowImpl { static long nextWindowHandle = 1; + @Override protected void createNativeImpl() { if(0!=getParentWindowHandle()) { throw new NativeWindowException("GDL Window does not support window parenting"); @@ -72,6 +73,7 @@ public class WindowDriver extends jogamp.newt.WindowImpl { } } + @Override protected void closeNativeImpl() { if(0!=surfaceHandle) { synchronized(WindowDriver.class) { @@ -82,6 +84,7 @@ public class WindowDriver extends jogamp.newt.WindowImpl { } } + @Override protected boolean reconfigureWindowImpl(int x, int y, int width, int height, int flags) { ScreenDriver screen = (ScreenDriver) getScreen(); @@ -112,6 +115,7 @@ public class WindowDriver extends jogamp.newt.WindowImpl { return true; } + @Override protected void requestFocusImpl(boolean reparented) { ((DisplayDriver)getScreen().getDisplay()).setFocus(this); } @@ -121,10 +125,12 @@ public class WindowDriver extends jogamp.newt.WindowImpl { return surfaceHandle; } + @Override protected Point getLocationOnScreenImpl(int x, int y) { return new Point(x,y); } + @Override protected void updateInsetsImpl(Insets insets) { // nop .. } diff --git a/src/newt/classes/jogamp/newt/driver/kd/DisplayDriver.java b/src/newt/classes/jogamp/newt/driver/kd/DisplayDriver.java index 1b92ca586..929688b11 100644 --- a/src/newt/classes/jogamp/newt/driver/kd/DisplayDriver.java +++ b/src/newt/classes/jogamp/newt/driver/kd/DisplayDriver.java @@ -59,15 +59,18 @@ public class DisplayDriver extends DisplayImpl { public DisplayDriver() { } + @Override protected void createNativeImpl() { // FIXME: map name to EGL_*_DISPLAY aDevice = EGLDisplayUtil.eglCreateEGLGraphicsDevice(EGL.EGL_DEFAULT_DISPLAY, AbstractGraphicsDevice.DEFAULT_CONNECTION, AbstractGraphicsDevice.DEFAULT_UNIT); } + @Override protected void closeNativeImpl(AbstractGraphicsDevice aDevice) { aDevice.close(); } + @Override protected void dispatchMessagesNative() { DispatchMessages(); } diff --git a/src/newt/classes/jogamp/newt/driver/kd/ScreenDriver.java b/src/newt/classes/jogamp/newt/driver/kd/ScreenDriver.java index 17cc5dd2f..9ebe2629a 100644 --- a/src/newt/classes/jogamp/newt/driver/kd/ScreenDriver.java +++ b/src/newt/classes/jogamp/newt/driver/kd/ScreenDriver.java @@ -51,12 +51,15 @@ public class ScreenDriver extends ScreenImpl { public ScreenDriver() { } + @Override protected void createNativeImpl() { aScreen = new DefaultGraphicsScreen(getDisplay().getGraphicsDevice(), screen_idx); } + @Override protected void closeNativeImpl() { } + @Override protected int validateScreenIndex(int idx) { return 0; // only one screen available } @@ -98,6 +101,7 @@ public class ScreenDriver extends ScreenImpl { return false; } + @Override protected void calcVirtualScreenOriginAndSize(Rectangle vOriginSize) { vOriginSize.set(0, 0, cachedWidth, cachedHeight); } diff --git a/src/newt/classes/jogamp/newt/driver/kd/WindowDriver.java b/src/newt/classes/jogamp/newt/driver/kd/WindowDriver.java index d30d4f025..158e6ab2f 100644 --- a/src/newt/classes/jogamp/newt/driver/kd/WindowDriver.java +++ b/src/newt/classes/jogamp/newt/driver/kd/WindowDriver.java @@ -56,6 +56,7 @@ public class WindowDriver extends WindowImpl { public WindowDriver() { } + @Override protected void createNativeImpl() { if(0!=getParentWindowHandle()) { throw new RuntimeException("Window parenting not supported (yet)"); @@ -83,6 +84,7 @@ public class WindowDriver extends WindowImpl { windowHandleClose = eglWindowHandle; } + @Override protected void closeNativeImpl() { if(0!=windowHandleClose) { CloseWindow(windowHandleClose, windowUserData); @@ -90,8 +92,10 @@ public class WindowDriver extends WindowImpl { } } + @Override protected void requestFocusImpl(boolean reparented) { } + @Override protected boolean reconfigureWindowImpl(int x, int y, int width, int height, int flags) { if( 0 != ( FLAG_CHANGE_VISIBILITY & flags) ) { setVisible0(eglWindowHandle, 0 != ( FLAG_IS_VISIBLE & flags)); @@ -125,10 +129,12 @@ public class WindowDriver extends WindowImpl { return true; } + @Override protected Point getLocationOnScreenImpl(int x, int y) { return new Point(x,y); } + @Override protected void updateInsetsImpl(Insets insets) { // nop .. } diff --git a/src/newt/classes/jogamp/newt/driver/macosx/DisplayDriver.java b/src/newt/classes/jogamp/newt/driver/macosx/DisplayDriver.java index 2dbdfdce7..c44685dc8 100644 --- a/src/newt/classes/jogamp/newt/driver/macosx/DisplayDriver.java +++ b/src/newt/classes/jogamp/newt/driver/macosx/DisplayDriver.java @@ -64,14 +64,17 @@ public class DisplayDriver extends DisplayImpl { public DisplayDriver() { } + @Override protected void dispatchMessagesNative() { // nop } + @Override protected void createNativeImpl() { aDevice = new MacOSXGraphicsDevice(AbstractGraphicsDevice.DEFAULT_UNIT); } + @Override protected void closeNativeImpl(AbstractGraphicsDevice aDevice) { aDevice.close(); } diff --git a/src/newt/classes/jogamp/newt/driver/macosx/ScreenDriver.java b/src/newt/classes/jogamp/newt/driver/macosx/ScreenDriver.java index 5d3b7287b..4f3cc691b 100644 --- a/src/newt/classes/jogamp/newt/driver/macosx/ScreenDriver.java +++ b/src/newt/classes/jogamp/newt/driver/macosx/ScreenDriver.java @@ -52,10 +52,12 @@ public class ScreenDriver extends ScreenImpl { public ScreenDriver() { } + @Override protected void createNativeImpl() { aScreen = new DefaultGraphicsScreen(getDisplay().getGraphicsDevice(), screen_idx); } + @Override protected void closeNativeImpl() { } private MonitorMode getMonitorModeImpl(MonitorModeProps.Cache cache, int crt_idx, int mode_idx) { @@ -114,6 +116,7 @@ public class ScreenDriver extends ScreenImpl { return setMonitorMode0(monitor.getId(), mode.getId(), mode.getRotation()); } + @Override protected int validateScreenIndex(int idx) { return 0; // big-desktop w/ multiple monitor attached, only one screen available } diff --git a/src/newt/classes/jogamp/newt/driver/macosx/WindowDriver.java b/src/newt/classes/jogamp/newt/driver/macosx/WindowDriver.java index f36d32772..7db3e2aab 100644 --- a/src/newt/classes/jogamp/newt/driver/macosx/WindowDriver.java +++ b/src/newt/classes/jogamp/newt/driver/macosx/WindowDriver.java @@ -87,6 +87,7 @@ public class WindowDriver extends WindowImpl implements MutableSurface, DriverCl isOffscreenInstance = false; if (0 != handle) { OSXUtil.RunOnMainThread(false, new Runnable() { + @Override public void run() { close0( handle ); } } ); @@ -144,6 +145,7 @@ public class WindowDriver extends WindowImpl implements MutableSurface, DriverCl if (isNativeValid()) { if (0 != sscSurfaceHandle) { OSXUtil.RunOnMainThread(false, new Runnable() { + @Override public void run() { orderOut0( 0 != getParentWindowHandle() ? getParentWindowHandle() : getWindowHandle() ); } } ); @@ -160,6 +162,7 @@ public class WindowDriver extends WindowImpl implements MutableSurface, DriverCl @Override protected void setTitleImpl(final String title) { OSXUtil.RunOnMainThread(false, new Runnable() { + @Override public void run() { setTitle0(getWindowHandle(), title); } } ); @@ -172,6 +175,7 @@ public class WindowDriver extends WindowImpl implements MutableSurface, DriverCl } if(!isOffscreenInstance) { OSXUtil.RunOnMainThread(false, new Runnable() { + @Override public void run() { requestFocus0(getWindowHandle(), force); } } ); @@ -187,6 +191,7 @@ public class WindowDriver extends WindowImpl implements MutableSurface, DriverCl } if(!isOffscreenInstance) { OSXUtil.RunOnMainThread(false, new Runnable() { + @Override public void run() { resignFocus0(getWindowHandle()); } } ); @@ -209,6 +214,7 @@ public class WindowDriver extends WindowImpl implements MutableSurface, DriverCl System.err.println("MacWindow: updatePosition() parent["+useParent+" "+pX+"/"+pY+"] "+x+"/"+y+" -> "+x+"/"+y+" rel-client-pos, "+p0S+" screen-client-pos"); } OSXUtil.RunOnMainThread(false, new Runnable() { + @Override public void run() { setWindowClientTopLeftPoint0(handle, p0S.getX(), p0S.getY(), isVisible()); } } ); @@ -230,6 +236,7 @@ public class WindowDriver extends WindowImpl implements MutableSurface, DriverCl System.err.println("MacWindow: sizeChanged() parent["+useParent+" "+x+"/"+y+"] "+getX()+"/"+getY()+" "+newWidth+"x"+newHeight+" -> "+p0S+" screen-client-pos"); } OSXUtil.RunOnMainThread(false, new Runnable() { + @Override public void run() { setWindowClientTopLeftPoint0(getWindowHandle(), p0S.getX(), p0S.getY(), isVisible()); } } ); @@ -275,6 +282,7 @@ public class WindowDriver extends WindowImpl implements MutableSurface, DriverCl if( 0 != ( FLAG_CHANGE_VISIBILITY & flags) && !setVisible ) { if ( !isOffscreenInstance ) { OSXUtil.RunOnMainThread(false, new Runnable() { + @Override public void run() { orderOut0(getWindowHandle()); visibleChanged(true, false); @@ -297,6 +305,7 @@ public class WindowDriver extends WindowImpl implements MutableSurface, DriverCl if( width>0 && height>0 ) { if( !isOffscreenInstance ) { OSXUtil.RunOnMainThread(false, new Runnable() { + @Override public void run() { setWindowClientTopLeftPointAndSize0(getWindowHandle(), pClientLevelOnSreen.getX(), pClientLevelOnSreen.getY(), width, height, setVisible); } } ); @@ -308,6 +317,7 @@ public class WindowDriver extends WindowImpl implements MutableSurface, DriverCl if( 0 != ( FLAG_CHANGE_VISIBILITY & flags) && setVisible ) { if( !isOffscreenInstance ) { OSXUtil.RunOnMainThread(false, new Runnable() { + @Override public void run() { orderFront0(getWindowHandle()); visibleChanged(true, true); @@ -476,6 +486,7 @@ public class WindowDriver extends WindowImpl implements MutableSurface, DriverCl throw new NativeWindowException("Internal Error - create w/ window, but no Newt NSView"); } OSXUtil.RunOnMainThread(false, new Runnable() { + @Override public void run() { changeContentView0(parentWinHandle, preWinHandle, 0); close0( preWinHandle ); @@ -502,6 +513,7 @@ public class WindowDriver extends WindowImpl implements MutableSurface, DriverCl final boolean isOpaque = getGraphicsConfiguration().getChosenCapabilities().isBackgroundOpaque() && !offscreenInstance; // Blocking initialization on main-thread! OSXUtil.RunOnMainThread(true, new Runnable() { + @Override public void run() { initWindow0( parentWinHandle, newWin, pS.getX(), pS.getY(), width, height, isOpaque, fullscreen, visible && !offscreenInstance, surfaceHandle); diff --git a/src/newt/classes/jogamp/newt/driver/windows/DisplayDriver.java b/src/newt/classes/jogamp/newt/driver/windows/DisplayDriver.java index d3c7416cc..d8ff7ecb5 100644 --- a/src/newt/classes/jogamp/newt/driver/windows/DisplayDriver.java +++ b/src/newt/classes/jogamp/newt/driver/windows/DisplayDriver.java @@ -71,16 +71,19 @@ public class DisplayDriver extends DisplayImpl { public DisplayDriver() { } + @Override protected void createNativeImpl() { sharedClass = sharedClassFactory.getSharedClass(); aDevice = new WindowsGraphicsDevice(AbstractGraphicsDevice.DEFAULT_UNIT); } + @Override protected void closeNativeImpl(AbstractGraphicsDevice aDevice) { sharedClassFactory.releaseSharedClass(); aDevice.close(); } + @Override protected void dispatchMessagesNative() { DispatchMessages0(); } diff --git a/src/newt/classes/jogamp/newt/driver/windows/WindowDriver.java b/src/newt/classes/jogamp/newt/driver/windows/WindowDriver.java index 30405aa05..6e8ac3efa 100644 --- a/src/newt/classes/jogamp/newt/driver/windows/WindowDriver.java +++ b/src/newt/classes/jogamp/newt/driver/windows/WindowDriver.java @@ -127,6 +127,7 @@ public class WindowDriver extends WindowImpl { return false; } + @Override protected void createNativeImpl() { final ScreenDriver screen = (ScreenDriver) getScreen(); final DisplayDriver display = (DisplayDriver) screen.getDisplay(); @@ -156,6 +157,7 @@ public class WindowDriver extends WindowImpl { } } + @Override protected void closeNativeImpl() { if(windowHandleClose != 0) { if (hdc != 0) { @@ -183,6 +185,7 @@ public class WindowDriver extends WindowImpl { hdc_old = 0; } + @Override protected boolean reconfigureWindowImpl(int x, int y, int width, int height, int flags) { if(DEBUG_IMPLEMENTATION) { System.err.println("WindowsWindow reconfig: "+x+"/"+y+" "+width+"x"+height+", "+ @@ -210,6 +213,7 @@ public class WindowDriver extends WindowImpl { return true; } + @Override protected void requestFocusImpl(boolean force) { requestFocus0(getWindowHandle(), force); } @@ -224,6 +228,7 @@ public class WindowDriver extends WindowImpl { final boolean[] res = new boolean[] { false }; this.runOnEDTIfAvail(true, new Runnable() { + @Override public void run() { res[0] = setPointerVisible0(getWindowHandle(), pointerVisible); } @@ -236,6 +241,7 @@ public class WindowDriver extends WindowImpl { final Boolean[] res = new Boolean[] { Boolean.FALSE }; this.runOnEDTIfAvail(true, new Runnable() { + @Override public void run() { final Point p0 = getLocationOnScreenImpl(0, 0); res[0] = Boolean.valueOf(confinePointer0(getWindowHandle(), confine, @@ -248,6 +254,7 @@ public class WindowDriver extends WindowImpl { @Override protected void warpPointerImpl(final int x, final int y) { this.runOnEDTIfAvail(true, new Runnable() { + @Override public void run() { final Point sPos = getLocationOnScreenImpl(x, y); warpPointer0(getWindowHandle(), sPos.getX(), sPos.getY()); @@ -256,10 +263,12 @@ public class WindowDriver extends WindowImpl { return; } + @Override protected Point getLocationOnScreenImpl(int x, int y) { return GDIUtil.GetRelativeLocation( getWindowHandle(), 0 /*root win*/, x, y); } + @Override protected void updateInsetsImpl(Insets insets) { // nop - using event driven insetsChange(..) } diff --git a/src/newt/classes/jogamp/newt/driver/x11/DisplayDriver.java b/src/newt/classes/jogamp/newt/driver/x11/DisplayDriver.java index aa8067520..504839797 100644 --- a/src/newt/classes/jogamp/newt/driver/x11/DisplayDriver.java +++ b/src/newt/classes/jogamp/newt/driver/x11/DisplayDriver.java @@ -63,6 +63,7 @@ public class DisplayDriver extends DisplayImpl { public DisplayDriver() { } + @Override public String validateDisplayName(String name, long handle) { return X11Util.validateDisplayName(name, handle); } @@ -72,6 +73,7 @@ public class DisplayDriver extends DisplayImpl { * * We use a private non-shared X11 Display instance for EDT window operations and one for exposed animation, eg. OpenGL. */ + @Override protected void createNativeImpl() { X11Util.setX11ErrorHandler(true, DEBUG ? false : true); // make sure X11 error handler is set long handle = X11Util.openDisplay(name); diff --git a/src/newt/classes/jogamp/newt/driver/x11/ScreenDriver.java b/src/newt/classes/jogamp/newt/driver/x11/ScreenDriver.java index 7f75e03f0..bef7f60ec 100644 --- a/src/newt/classes/jogamp/newt/driver/x11/ScreenDriver.java +++ b/src/newt/classes/jogamp/newt/driver/x11/ScreenDriver.java @@ -74,6 +74,7 @@ public class ScreenDriver extends ScreenImpl { protected void createNativeImpl() { // validate screen index Long handle = runWithLockedDisplayDevice( new DisplayImpl.DisplayRunnable() { + @Override public Long run(long dpy) { return new Long(GetScreen0(dpy, screen_idx)); } } ); @@ -180,6 +181,7 @@ public class ScreenDriver extends ScreenImpl { if( null == rAndR ) { return null; } return runWithLockedDisplayDevice( new DisplayImpl.DisplayRunnable() { + @Override public MonitorMode run(long dpy) { final int[] currentModeProps = rAndR.getCurrentMonitorModeProps(dpy, ScreenDriver.this, monitor.getId()); return MonitorModeProps.streamInMonitorMode(null, null, currentModeProps, 0); @@ -192,6 +194,7 @@ public class ScreenDriver extends ScreenImpl { final long t0 = System.currentTimeMillis(); boolean done = runWithOptTempDisplayHandle( new DisplayImpl.DisplayRunnable() { + @Override public Boolean run(long dpy) { return Boolean.valueOf( rAndR.setCurrentMonitorMode(dpy, ScreenDriver.this, monitor, mode) ); } @@ -205,6 +208,7 @@ public class ScreenDriver extends ScreenImpl { } private DisplayImpl.DisplayRunnable xineramaEnabledQueryWithTemp = new DisplayImpl.DisplayRunnable() { + @Override public Boolean run(long dpy) { return new Boolean(X11Util.XineramaIsEnabled(dpy)); } }; @@ -236,6 +240,7 @@ public class ScreenDriver extends ScreenImpl { } } ); } else */ { runWithLockedDisplayDevice( new DisplayImpl.DisplayRunnable() { + @Override public Object run(long dpy) { vOriginSize.set(0, 0, getWidth0(dpy, screen_idx), getHeight0(dpy, screen_idx)); return null; diff --git a/src/newt/classes/jogamp/newt/driver/x11/WindowDriver.java b/src/newt/classes/jogamp/newt/driver/x11/WindowDriver.java index 02f80c0c3..5e1f7a6ed 100644 --- a/src/newt/classes/jogamp/newt/driver/x11/WindowDriver.java +++ b/src/newt/classes/jogamp/newt/driver/x11/WindowDriver.java @@ -176,6 +176,7 @@ public class WindowDriver extends WindowImpl { final int fflags = flags; final DisplayDriver display = (DisplayDriver) getScreen().getDisplay(); runWithLockedDisplayDevice( new DisplayImpl.DisplayRunnable() { + @Override public Object run(long dpy) { reconfigureWindow0( dpy, getScreenIndex(), getParentWindowHandle(), getWindowHandle(), display.getWindowDeleteAtom(), @@ -202,6 +203,7 @@ public class WindowDriver extends WindowImpl { } final DisplayDriver display = (DisplayDriver) getScreen().getDisplay(); runWithLockedDisplayDevice( new DisplayImpl.DisplayRunnable() { + @Override public Object run(long dpy) { reconfigureWindow0( dpy, getScreenIndex(), getParentWindowHandle(), getWindowHandle(), display.getWindowDeleteAtom(), @@ -223,6 +225,7 @@ public class WindowDriver extends WindowImpl { @Override protected void requestFocusImpl(final boolean force) { runWithLockedDisplayDevice( new DisplayImpl.DisplayRunnable() { + @Override public Object run(long dpy) { requestFocus0(dpy, getWindowHandle(), force); return null; @@ -233,6 +236,7 @@ public class WindowDriver extends WindowImpl { @Override protected void setTitleImpl(final String title) { runWithLockedDisplayDevice( new DisplayImpl.DisplayRunnable() { + @Override public Object run(long dpy) { setTitle0(dpy, getWindowHandle(), title); return null; @@ -243,6 +247,7 @@ public class WindowDriver extends WindowImpl { @Override protected boolean setPointerVisibleImpl(final boolean pointerVisible) { return runWithLockedDisplayDevice( new DisplayImpl.DisplayRunnable() { + @Override public Boolean run(long dpy) { return Boolean.valueOf(setPointerVisible0(dpy, getWindowHandle(), pointerVisible)); } @@ -252,6 +257,7 @@ public class WindowDriver extends WindowImpl { @Override protected boolean confinePointerImpl(final boolean confine) { return runWithLockedDisplayDevice( new DisplayImpl.DisplayRunnable() { + @Override public Boolean run(long dpy) { return Boolean.valueOf(confinePointer0(dpy, getWindowHandle(), confine)); } @@ -261,6 +267,7 @@ public class WindowDriver extends WindowImpl { @Override protected void warpPointerImpl(final int x, final int y) { runWithLockedDisplayDevice( new DisplayImpl.DisplayRunnable() { + @Override public Object run(long dpy) { warpPointer0(dpy, getWindowHandle(), x, y); return null; @@ -271,6 +278,7 @@ public class WindowDriver extends WindowImpl { @Override protected Point getLocationOnScreenImpl(final int x, final int y) { return runWithLockedDisplayDevice( new DisplayImpl.DisplayRunnable() { + @Override public Point run(long dpy) { return X11Lib.GetRelativeLocation(dpy, getScreenIndex(), getWindowHandle(), 0 /*root win*/, x, y); } diff --git a/src/newt/classes/jogamp/newt/swt/SWTEDTUtil.java b/src/newt/classes/jogamp/newt/swt/SWTEDTUtil.java index 08eacdee5..db89690f4 100644 --- a/src/newt/classes/jogamp/newt/swt/SWTEDTUtil.java +++ b/src/newt/classes/jogamp/newt/swt/SWTEDTUtil.java @@ -54,6 +54,7 @@ public class SWTEDTUtil implements EDTUtil { this.threadGroup = Thread.currentThread().getThreadGroup(); this.name=Thread.currentThread().getName()+"-SWTDisplay-"+newtDisplay.getFQName()+"-EDT-"; this.dispatchMessages = new Runnable() { + @Override public void run() { ((jogamp.newt.DisplayImpl) newtDisplay).dispatchMessages(); } }; @@ -252,6 +253,7 @@ public class SWTEDTUtil implements EDTUtil { } try { swtDisplay.syncExec(new Runnable() { + @Override public void run() { } }); } catch (Exception e) { } -- cgit v1.2.3