diff options
author | Sven Gothel <[email protected]> | 2014-07-08 23:15:33 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2014-07-08 23:15:33 +0200 |
commit | 27115b5f050e881f959a33c04e7d3988bfe676bf (patch) | |
tree | 94668f339d3de88be355a20bd541c1aa4bb7403d /src/jogl/classes/jogamp/graph/font | |
parent | a2b75f52db38be223261cd378a4bc330cc2d3ede (diff) |
Findbugs: Use inner static class where possible
Diffstat (limited to 'src/jogl/classes/jogamp/graph/font')
7 files changed, 56 insertions, 55 deletions
diff --git a/src/jogl/classes/jogamp/graph/font/typecast/TypecastGlyph.java b/src/jogl/classes/jogamp/graph/font/typecast/TypecastGlyph.java index 7a3962f7c..5bd49dce9 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/TypecastGlyph.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/TypecastGlyph.java @@ -33,7 +33,7 @@ import com.jogamp.graph.font.Font; import com.jogamp.opengl.math.geom.AABBox; public class TypecastGlyph implements Font.Glyph { - public class Advance + public static class Advance { private final Font font; private final float advance; @@ -87,7 +87,7 @@ public class TypecastGlyph implements Font.Glyph { } } - public class Metrics + public static class Metrics { private final AABBox bbox; private final Advance advance; 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 49ab1d474..002f83e9b 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 @@ -32,14 +32,14 @@ import java.io.IOException; */ public class BaseTable implements Table { - private abstract class BaseCoord { + abstract class BaseCoord { - public abstract int getBaseCoordFormat(); + abstract int getBaseCoordFormat(); - public abstract short getCoordinate(); + abstract short getCoordinate(); } - private class BaseCoordFormat1 extends BaseCoord { + class BaseCoordFormat1 extends BaseCoord { private final short _coordinate; @@ -48,87 +48,87 @@ public class BaseTable implements Table { } @Override - public int getBaseCoordFormat() { + int getBaseCoordFormat() { return 1; } @Override - public short getCoordinate() { + short getCoordinate() { return _coordinate; } } - private class BaseCoordFormat2 extends BaseCoord { + class BaseCoordFormat2 extends BaseCoord { private final short _coordinate; - private final int _referenceGlyph; - private final int _baseCoordPoint; + // private final int _referenceGlyph; + // private final int _baseCoordPoint; protected BaseCoordFormat2(final DataInput di) throws IOException { _coordinate = di.readShort(); - _referenceGlyph = di.readUnsignedShort(); - _baseCoordPoint = di.readUnsignedShort(); + /* _referenceGlyph = */ di.readUnsignedShort(); + /* _baseCoordPoint = */ di.readUnsignedShort(); } @Override - public int getBaseCoordFormat() { + int getBaseCoordFormat() { return 2; } @Override - public short getCoordinate() { + short getCoordinate() { return _coordinate; } } - private class BaseCoordFormat3 extends BaseCoord { + class BaseCoordFormat3 extends BaseCoord { private final short _coordinate; - private final int _deviceTableOffset; + // private final int _deviceTableOffset; protected BaseCoordFormat3(final DataInput di) throws IOException { _coordinate = di.readShort(); - _deviceTableOffset = di.readUnsignedShort(); + /* _deviceTableOffset = */ di.readUnsignedShort(); } @Override - public int getBaseCoordFormat() { + int getBaseCoordFormat() { return 2; } @Override - public short getCoordinate() { + short getCoordinate() { return _coordinate; } } - private class FeatMinMaxRecord { + static class FeatMinMaxRecord { - private final int _tag; - private final int _minCoordOffset; - private final int _maxCoordOffset; + // private final int _tag; + // private final int _minCoordOffset; + // private final int _maxCoordOffset; protected FeatMinMaxRecord(final DataInput di) throws IOException { - _tag = di.readInt(); - _minCoordOffset = di.readUnsignedShort(); - _maxCoordOffset = di.readUnsignedShort(); + /* _tag = */ di.readInt(); + /* _minCoordOffset = */ di.readUnsignedShort(); + /* _maxCoordOffset = */ di.readUnsignedShort(); } } - private class MinMax { + class MinMax { - private final int _minCoordOffset; - private final int _maxCoordOffset; + // private final int _minCoordOffset; + // private final int _maxCoordOffset; private final int _featMinMaxCount; private final FeatMinMaxRecord[] _featMinMaxRecord; protected MinMax(final int minMaxOffset) throws IOException { final DataInput di = getDataInputForOffset(minMaxOffset); - _minCoordOffset = di.readUnsignedShort(); - _maxCoordOffset = di.readUnsignedShort(); + /* _minCoordOffset = */ di.readUnsignedShort(); + /* _maxCoordOffset = */ di.readUnsignedShort(); _featMinMaxCount = di.readUnsignedShort(); _featMinMaxRecord = new FeatMinMaxRecord[_featMinMaxCount]; for (int i = 0; i < _featMinMaxCount; ++i) { @@ -137,16 +137,16 @@ public class BaseTable implements Table { } } - private class BaseValues { + class BaseValues { - private final int _defaultIndex; + // private final int _defaultIndex; private final int _baseCoordCount; private final int[] _baseCoordOffset; private final BaseCoord[] _baseCoords; protected BaseValues(final int baseValuesOffset) throws IOException { final DataInput di = getDataInputForOffset(baseValuesOffset); - _defaultIndex = di.readUnsignedShort(); + /* _defaultIndex = */ di.readUnsignedShort(); _baseCoordCount = di.readUnsignedShort(); _baseCoordOffset = new int[_baseCoordCount]; for (int i = 0; i < _baseCoordCount; ++i) { @@ -170,26 +170,27 @@ public class BaseTable implements Table { } } - private class BaseLangSysRecord { + static class BaseLangSysRecord { - private final int _baseLangSysTag; + // private final int _baseLangSysTag; private final int _minMaxOffset; protected BaseLangSysRecord(final DataInput di) throws IOException { - _baseLangSysTag = di.readInt(); + /* _baseLangSysTag = */ di.readInt(); _minMaxOffset = di.readUnsignedShort(); } - public int getBaseLangSysTag() { + /** + int getBaseLangSysTag() { return _baseLangSysTag; - } + } */ - public int getMinMaxOffset() { + int getMinMaxOffset() { return _minMaxOffset; } } - private class BaseScript { + class BaseScript { private final int _thisOffset; private final int _baseValuesOffset; @@ -239,7 +240,7 @@ public class BaseTable implements Table { } } - private class BaseScriptRecord { + static class BaseScriptRecord { private final int _baseScriptTag; private final int _baseScriptOffset; @@ -249,16 +250,16 @@ public class BaseTable implements Table { _baseScriptOffset = di.readUnsignedShort(); } - public int getBaseScriptTag() { + int getBaseScriptTag() { return _baseScriptTag; } - public int getBaseScriptOffset() { + int getBaseScriptOffset() { return _baseScriptOffset; } } - private class BaseScriptList { + class BaseScriptList { private final int _thisOffset; private final int _baseScriptCount; @@ -297,7 +298,7 @@ public class BaseTable implements Table { } } - private class BaseTagList { + class BaseTagList { private final int _thisOffset; private final int _baseTagCount; @@ -325,7 +326,7 @@ public class BaseTable implements Table { } } - private class Axis { + class Axis { private final int _thisOffset; private final int _baseTagListOffset; 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 541c280bc..d6643f26d 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 @@ -37,7 +37,7 @@ import java.util.Hashtable; */ public class CffTable implements Table { - public class Dict { + public static class Dict { private final Dictionary<Integer, Object> _entries = new Hashtable<Integer, Object>(); private final int[] _data; 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 f29583ec4..602897382 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 @@ -59,7 +59,7 @@ import java.io.IOException; */ public abstract class CmapFormat { - public class Range { + public static class Range { private final int _startCode; private final int _endCode; 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 e57e509b4..743fc93c1 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 @@ -60,7 +60,7 @@ import java.io.IOException; */ public class CmapFormat2 extends CmapFormat { - private class SubHeader { + static class SubHeader { int _firstCode; int _entryCount; short _idDelta; 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 c3b875a2c..2bd51c124 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 @@ -31,7 +31,7 @@ import java.io.IOException; */ public class HdmxTable implements Table { - public class DeviceRecord { + public static class DeviceRecord { private final short _pixelSize; private final short _maxWidth; 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 1a390f86d..679502e84 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 @@ -30,7 +30,7 @@ import java.io.IOException; */ public class VdmxTable implements Table { - private class Ratio { + static class Ratio { private final byte _bCharSet; private final byte _xRatio; @@ -61,7 +61,7 @@ public class VdmxTable implements Table { } } - private class VTableRecord { + static class VTableRecord { private final int _yPelHeight; private final short _yMax; @@ -86,7 +86,7 @@ public class VdmxTable implements Table { } } - private class Group { + static class Group { private final int _recs; private final int _startsz; |