summaryrefslogtreecommitdiff
path: root/javax/swing/undo
diff options
context:
space:
mode:
authorAndrew John Hughes <gnu_andrew@member.fsf.org>2006-12-10 20:25:39 +0000
committerAndrew John Hughes <gnu_andrew@member.fsf.org>2006-12-10 20:25:39 +0000
commitda66af5951b18b6f5e8752cbbe11f5f842332a33 (patch)
treea28e126d1415e3689be6c7b2c2d061ae51194195 /javax/swing/undo
parentab90923ee693a17e2e0e37b6ba5a84794c9236de (diff)
downloadclasspath-da66af5951b18b6f5e8752cbbe11f5f842332a33.tar.gz
2006-12-10 Andrew John Hughes <gnu_andrew@member.fsf.org>
* Merge of generics-branch to HEAD (woohoo!)
Diffstat (limited to 'javax/swing/undo')
-rw-r--r--javax/swing/undo/CompoundEdit.java16
-rw-r--r--javax/swing/undo/StateEdit.java4
-rw-r--r--javax/swing/undo/StateEditable.java4
-rw-r--r--javax/swing/undo/UndoableEditSupport.java5
4 files changed, 15 insertions, 14 deletions
diff --git a/javax/swing/undo/CompoundEdit.java b/javax/swing/undo/CompoundEdit.java
index e1cfbb619..fbff2a264 100644
--- a/javax/swing/undo/CompoundEdit.java
+++ b/javax/swing/undo/CompoundEdit.java
@@ -1,5 +1,5 @@
/* CompoundEdit.java -- Combines multiple UndoableEdits.
- Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -75,7 +75,7 @@ public class CompoundEdit
* The <code>UndoableEdit</code>s being combined into a compound
* editing action.
*/
- protected Vector edits;
+ protected Vector<UndoableEdit> edits;
/**
@@ -92,7 +92,7 @@ public class CompoundEdit
*/
public CompoundEdit()
{
- edits = new Vector();
+ edits = new Vector<UndoableEdit>();
inProgress = true;
}
@@ -118,7 +118,7 @@ public class CompoundEdit
super.undo();
for (int i = edits.size() - 1; i >= 0; i--)
- ((UndoableEdit) edits.elementAt(i)).undo();
+ edits.elementAt(i).undo();
}
@@ -143,7 +143,7 @@ public class CompoundEdit
super.redo();
for (int i = 0; i < edits.size(); i++)
- ((UndoableEdit) edits.elementAt(i)).redo();
+ edits.elementAt(i).redo();
}
@@ -156,7 +156,7 @@ public class CompoundEdit
if (edits.size() == 0)
return null;
else
- return (UndoableEdit) edits.elementAt(edits.size() - 1);
+ return edits.elementAt(edits.size() - 1);
}
@@ -172,7 +172,7 @@ public class CompoundEdit
public void die()
{
for (int i = edits.size() - 1; i >= 0; i--)
- ((UndoableEdit) edits.elementAt(i)).die();
+ edits.elementAt(i).die();
super.die();
}
@@ -316,7 +316,7 @@ public class CompoundEdit
public boolean isSignificant()
{
for (int i = edits.size() - 1; i >= 0; i--)
- if (((UndoableEdit) edits.elementAt(i)).isSignificant())
+ if (edits.elementAt(i).isSignificant())
return true;
return false;
diff --git a/javax/swing/undo/StateEdit.java b/javax/swing/undo/StateEdit.java
index 326abea1f..91fc88faa 100644
--- a/javax/swing/undo/StateEdit.java
+++ b/javax/swing/undo/StateEdit.java
@@ -121,14 +121,14 @@ public class StateEdit
* The state of <code>object</code> at the time of constructing
* this <code>StateEdit</code>.
*/
- protected Hashtable preState;
+ protected Hashtable<Object, Object> preState;
/**
* The state of <code>object</code> at the time when {@link #end()}
* was called.
*/
- protected Hashtable postState;
+ protected Hashtable<Object, Object> postState;
/**
diff --git a/javax/swing/undo/StateEditable.java b/javax/swing/undo/StateEditable.java
index 459025be7..7e6cc9785 100644
--- a/javax/swing/undo/StateEditable.java
+++ b/javax/swing/undo/StateEditable.java
@@ -100,7 +100,7 @@ public interface StateEditable
* @param state a hash table containing the relevant state
* information.
*/
- void restoreState(Hashtable state);
+ void restoreState(Hashtable<?, ?> state);
/**
@@ -110,5 +110,5 @@ public interface StateEditable
* @param state a hash table for storing relevant state
* information.
*/
- void storeState(Hashtable state);
+ void storeState(Hashtable<Object, Object> state);
}
diff --git a/javax/swing/undo/UndoableEditSupport.java b/javax/swing/undo/UndoableEditSupport.java
index 6d7bbea07..b5a933419 100644
--- a/javax/swing/undo/UndoableEditSupport.java
+++ b/javax/swing/undo/UndoableEditSupport.java
@@ -69,7 +69,8 @@ public class UndoableEditSupport
/**
* The currently registered listeners.
*/
- protected Vector listeners = new Vector();
+ protected Vector<UndoableEditListener> listeners =
+ new Vector<UndoableEditListener>();
/**
@@ -148,7 +149,7 @@ public class UndoableEditSupport
public synchronized UndoableEditListener[] getUndoableEditListeners()
{
UndoableEditListener[] result = new UndoableEditListener[listeners.size()];
- return (UndoableEditListener[]) listeners.toArray(result);
+ return listeners.toArray(result);
}