aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/net/java/dev/typecast/app/editor/EditorMenu.java4
-rw-r--r--src/net/java/dev/typecast/ot/table/CmapIndexEntry.java7
2 files changed, 6 insertions, 5 deletions
diff --git a/src/net/java/dev/typecast/app/editor/EditorMenu.java b/src/net/java/dev/typecast/app/editor/EditorMenu.java
index e3aa013..68f5a40 100644
--- a/src/net/java/dev/typecast/app/editor/EditorMenu.java
+++ b/src/net/java/dev/typecast/app/editor/EditorMenu.java
@@ -122,7 +122,7 @@ public class EditorMenu {
}
private static JMenuItem createMenuItem(
- Class menuClass,
+ Class<? extends JMenuItem> menuClass,
String name,
String mnemonic,
String description,
@@ -131,7 +131,7 @@ public class EditorMenu {
ActionListener al) {
JMenuItem menuItem = null;
try {
- menuItem = (JMenuItem) menuClass.newInstance();
+ menuItem = menuClass.newInstance();
menuItem.setText(name);
menuItem.setToolTipText(description);
menuItem.setMnemonic(mnemonic.length() > 0 ? mnemonic.charAt(0) : 0);
diff --git a/src/net/java/dev/typecast/ot/table/CmapIndexEntry.java b/src/net/java/dev/typecast/ot/table/CmapIndexEntry.java
index 35246ed..7982568 100644
--- a/src/net/java/dev/typecast/ot/table/CmapIndexEntry.java
+++ b/src/net/java/dev/typecast/ot/table/CmapIndexEntry.java
@@ -56,7 +56,7 @@ import java.io.IOException;
/**
* @author <a href="mailto:[email protected]">David Schweinsberg</a>
*/
-public class CmapIndexEntry implements Comparable {
+public class CmapIndexEntry implements Comparable<CmapIndexEntry> {
private int _platformId;
private int _encodingId;
@@ -89,6 +89,7 @@ public class CmapIndexEntry implements Comparable {
_format = format;
}
+ @Override
public String toString() {
return new StringBuffer()
.append("platform id: ")
@@ -103,8 +104,8 @@ public class CmapIndexEntry implements Comparable {
.append(_offset).toString();
}
- public int compareTo(java.lang.Object obj) {
- CmapIndexEntry entry = (CmapIndexEntry) obj;
+ @Override
+ public int compareTo(CmapIndexEntry entry) {
if (getOffset() < entry.getOffset()) {
return -1;
} else if (getOffset() > entry.getOffset()) {