diff options
Diffstat (limited to 'scripting/java/org/openoffice/idesupport/ui')
3 files changed, 16 insertions, 15 deletions
diff --git a/scripting/java/org/openoffice/idesupport/ui/ConfigurePanel.java b/scripting/java/org/openoffice/idesupport/ui/ConfigurePanel.java index 4030d683db40..b78f439a4a8d 100644 --- a/scripting/java/org/openoffice/idesupport/ui/ConfigurePanel.java +++ b/scripting/java/org/openoffice/idesupport/ui/ConfigurePanel.java @@ -38,13 +38,14 @@ import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import com.sun.star.script.framework.container.ParcelDescriptor; +import com.sun.star.script.framework.container.ScriptEntry; import org.openoffice.idesupport.zip.ParcelZipper; public class ConfigurePanel extends JPanel { private File basedir; - private Vector classpath; + private Vector<String> classpath; private ParcelDescriptor descriptor; private MethodPanel methodPanel; @@ -53,7 +54,7 @@ public class ConfigurePanel extends JPanel { public static final String DIALOG_TITLE = "Choose What to Export as Scripts"; - public ConfigurePanel(String basedir, Vector classpath, + public ConfigurePanel(String basedir, Vector<String> classpath, ParcelDescriptor descriptor) { this.basedir = new File(basedir); @@ -62,7 +63,7 @@ public class ConfigurePanel extends JPanel { initUI(); } - public ConfigurePanel(String basedir, Vector classpath) + public ConfigurePanel(String basedir, Vector<String> classpath) throws IOException { this.basedir = new File(basedir); @@ -72,7 +73,7 @@ public class ConfigurePanel extends JPanel { initUI(); } - public void reload(String basedir, Vector classpath, + public void reload(String basedir, Vector<String> classpath, ParcelDescriptor descriptor) { if (basedir != null) @@ -90,7 +91,7 @@ public class ConfigurePanel extends JPanel { scriptPanel.reload(descriptor.getScriptEntries()); } - public void reload(String basedir, Vector classpath) + public void reload(String basedir, Vector<String> classpath) throws IOException { if (basedir != null) @@ -108,7 +109,7 @@ public class ConfigurePanel extends JPanel { } public ParcelDescriptor getConfiguration() throws Exception { - Enumeration scripts = scriptPanel.getScriptEntries(); + Enumeration<ScriptEntry> scripts = scriptPanel.getScriptEntries(); descriptor.setScriptEntries(scripts); return descriptor; } diff --git a/scripting/java/org/openoffice/idesupport/ui/MethodPanel.java b/scripting/java/org/openoffice/idesupport/ui/MethodPanel.java index 3e85f2048316..9bc31edc30e2 100644 --- a/scripting/java/org/openoffice/idesupport/ui/MethodPanel.java +++ b/scripting/java/org/openoffice/idesupport/ui/MethodPanel.java @@ -33,7 +33,7 @@ import org.openoffice.idesupport.JavaFinder; public class MethodPanel extends JPanel { private File basedir; - private Vector classpath; + private Vector<String> classpath; private final static String FIRST_PARAM = "drafts.com.sun.star.script.framework.runtime.XScriptContext"; @@ -42,7 +42,7 @@ public class MethodPanel extends JPanel { private JList list; private ScriptEntry[] values; - public MethodPanel(File basedir, Vector classpath, String language) { + public MethodPanel(File basedir, Vector<String> classpath, String language) { this.basedir = basedir; this.classpath = classpath; @@ -50,7 +50,7 @@ public class MethodPanel extends JPanel { initUI(); } - public void reload(File basedir, Vector classpath, String language) { + public void reload(File basedir, Vector<String> classpath, String language) { this.basedir = basedir; this.classpath = classpath; diff --git a/scripting/java/org/openoffice/idesupport/ui/ScriptPanel.java b/scripting/java/org/openoffice/idesupport/ui/ScriptPanel.java index b30e1a9949f0..f34dd4806bdf 100644 --- a/scripting/java/org/openoffice/idesupport/ui/ScriptPanel.java +++ b/scripting/java/org/openoffice/idesupport/ui/ScriptPanel.java @@ -81,7 +81,7 @@ public class ScriptPanel extends JPanel { model.removeAll(); } - public Enumeration getScriptEntries() { + public Enumeration<ScriptEntry> getScriptEntries() { return model.getScriptEntries(); } @@ -121,11 +121,11 @@ public class ScriptPanel extends JPanel { final String[] columnNames = {"Exported Method", "Script Name"}; - private Vector scripts; + private Vector<ScriptEntry> scripts; private int nextRow; public ScriptTableModel(ScriptEntry[] entries) { - scripts = new Vector(entries.length + 11); + scripts = new Vector<ScriptEntry>(entries.length + 11); for (int i = 0; i < entries.length; i++) { scripts.addElement(entries[i]); } @@ -162,7 +162,7 @@ public class ScriptPanel extends JPanel { nextRow = 0; } - public Enumeration getScriptEntries() { + public Enumeration<ScriptEntry> getScriptEntries() { return scripts.elements(); } @@ -170,7 +170,7 @@ public class ScriptPanel extends JPanel { String result = ""; ScriptEntry entry; - entry = (ScriptEntry)scripts.elementAt(row); + entry = scripts.elementAt(row); if (col == 0) result = entry.getLanguageName(); @@ -188,7 +188,7 @@ public class ScriptPanel extends JPanel { } public void setValueAt(Object value, int row, int col) { - ScriptEntry entry = (ScriptEntry)scripts.elementAt(row); + ScriptEntry entry = scripts.elementAt(row); entry.setLogicalName((String)value); fireTableCellUpdated(row, col); } |