mirror of
https://github.com/processing/processing4.git
synced 2026-02-11 17:40:48 +01:00
Add missing generic type parameters
This commit is contained in:
@@ -60,8 +60,8 @@ public class PreferencesFrame {
|
||||
JCheckBox memoryOverrideBox;
|
||||
JTextField memoryField;
|
||||
JCheckBox checkUpdatesBox;
|
||||
JComboBox fontSizeField;
|
||||
JComboBox consoleSizeField;
|
||||
JComboBox<Integer> fontSizeField;
|
||||
JComboBox<Integer> consoleSizeField;
|
||||
JCheckBox inputMethodBox;
|
||||
JCheckBox autoAssociateBox;
|
||||
|
||||
@@ -73,13 +73,13 @@ public class PreferencesFrame {
|
||||
JCheckBox importSuggestionsBox;
|
||||
JCheckBox codeCompletionTriggerBox;
|
||||
|
||||
JComboBox displaySelectionBox;
|
||||
JComboBox languageSelectionBox;
|
||||
JComboBox<String> displaySelectionBox;
|
||||
JComboBox<String> languageSelectionBox;
|
||||
|
||||
int displayCount;
|
||||
|
||||
String[] monoFontFamilies;
|
||||
JComboBox fontSelectionBox;
|
||||
JComboBox<String> fontSelectionBox;
|
||||
|
||||
/** Base object so that updates can be applied to the list of editors. */
|
||||
Base base;
|
||||
@@ -152,7 +152,7 @@ public class PreferencesFrame {
|
||||
Container languageBox = Box.createHorizontalBox();
|
||||
JLabel languageLabel = new JLabel(Language.text("preferences.language")+": ");
|
||||
languageBox.add(languageLabel);
|
||||
languageSelectionBox = new JComboBox();
|
||||
languageSelectionBox = new JComboBox<String>();
|
||||
|
||||
Map<String, String> languages = Language.getLanguages();
|
||||
String[] languageSelection = new String[languages.size()];
|
||||
@@ -163,7 +163,7 @@ public class PreferencesFrame {
|
||||
languageSelection[i++] = lang.getValue();
|
||||
}
|
||||
}
|
||||
languageSelectionBox.setModel(new DefaultComboBoxModel(languageSelection));
|
||||
languageSelectionBox.setModel(new DefaultComboBoxModel<String>(languageSelection));
|
||||
languageBox.add(languageSelectionBox);
|
||||
label = new JLabel(" ("+Language.text("preferences.requires_restart")+")");
|
||||
languageBox.add(label);
|
||||
@@ -189,7 +189,7 @@ public class PreferencesFrame {
|
||||
fontLabel.setToolTipText(fontTip);
|
||||
fontBox.add(fontLabel);
|
||||
// get a wide name in there before getPreferredSize() is called
|
||||
fontSelectionBox = new JComboBox(new Object[] { Toolkit.getMonoFontName() });
|
||||
fontSelectionBox = new JComboBox<String>(new String[] { Toolkit.getMonoFontName() });
|
||||
fontSelectionBox.setToolTipText(fontTip);
|
||||
// fontSelectionBox.addItem(Toolkit.getMonoFont(size, style));
|
||||
//updateDisplayList();
|
||||
@@ -492,7 +492,7 @@ public class PreferencesFrame {
|
||||
final String tip = "<html>" + Language.text("preferences.run_sketches_on_display.tip");
|
||||
displayLabel.setToolTipText(tip);
|
||||
displayBox.add(displayLabel);
|
||||
displaySelectionBox = new JComboBox();
|
||||
displaySelectionBox = new JComboBox<String>();
|
||||
updateDisplayList(); // needs to happen here for getPreferredSize()
|
||||
displayBox.add(displaySelectionBox);
|
||||
pain.add(displayBox);
|
||||
@@ -845,7 +845,7 @@ public class PreferencesFrame {
|
||||
void initFontList() {
|
||||
if (monoFontFamilies == null) {
|
||||
monoFontFamilies = Toolkit.getMonoFontFamilies();
|
||||
fontSelectionBox.setModel(new DefaultComboBoxModel(monoFontFamilies));
|
||||
fontSelectionBox.setModel(new DefaultComboBoxModel<String>(monoFontFamilies));
|
||||
String family = Preferences.get("editor.font.family");
|
||||
|
||||
// Set a reasonable default, in case selecting the family fails
|
||||
@@ -866,7 +866,7 @@ public class PreferencesFrame {
|
||||
// displaySelectionBox.add(String.valueOf(i + 1));
|
||||
}
|
||||
// PApplet.println(items);
|
||||
displaySelectionBox.setModel(new DefaultComboBoxModel(items));
|
||||
displaySelectionBox.setModel(new DefaultComboBoxModel<String>(items));
|
||||
// displaySelectionBox = new JComboBox(items);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -179,7 +179,7 @@ public class ContributionListPanel extends JPanel implements Scrollable, Contrib
|
||||
|
||||
public void filterLibraries(List<Contribution> filteredContributions) {
|
||||
synchronized (panelByContribution) {
|
||||
Set<Contribution> hiddenPanels = new TreeSet(contribListing.getComparator());
|
||||
Set<Contribution> hiddenPanels = new TreeSet<Contribution>(contribListing.getComparator());
|
||||
hiddenPanels.addAll(panelByContribution.keySet());
|
||||
|
||||
for (Contribution info : filteredContributions) {
|
||||
|
||||
@@ -46,7 +46,7 @@ public class ContributionManagerDialog {
|
||||
JFrame dialog;
|
||||
String title;
|
||||
ContributionFilter filter;
|
||||
JComboBox categoryChooser;
|
||||
JComboBox<String> categoryChooser;
|
||||
JScrollPane scrollPane;
|
||||
ContributionListPanel contributionListPanel;
|
||||
StatusPanel status;
|
||||
@@ -219,7 +219,7 @@ public class ContributionManagerDialog {
|
||||
|
||||
filterPanel.add(Box.createHorizontalStrut(5));
|
||||
|
||||
categoryChooser = new JComboBox();
|
||||
categoryChooser = new JComboBox<String>();
|
||||
categoryChooser.setMaximumRowCount(20);
|
||||
updateCategoryChooser();
|
||||
// filterPanel.add(categoryChooser, c);
|
||||
|
||||
@@ -54,7 +54,7 @@ public class CreateFont extends JFrame implements Tool {
|
||||
|
||||
// Dimension windowSize;
|
||||
|
||||
JList fontSelector;
|
||||
JList<String> fontSelector;
|
||||
JTextField sizeSelector;
|
||||
JButton charsetButton;
|
||||
JCheckBox smoothBox;
|
||||
@@ -175,7 +175,7 @@ public class CreateFont extends JFrame implements Tool {
|
||||
list = new String[index];
|
||||
System.arraycopy(flist, 0, list, 0, index);
|
||||
|
||||
fontSelector = new JList(list);
|
||||
fontSelector = new JList<String>(list);
|
||||
fontSelector.addListSelectionListener(new ListSelectionListener() {
|
||||
public void valueChanged(ListSelectionEvent e) {
|
||||
if (e.getValueIsAdjusting() == false) {
|
||||
@@ -499,14 +499,14 @@ class CharacterSelector extends JFrame {
|
||||
JRadioButton allCharsButton;
|
||||
JRadioButton unicodeCharsButton;
|
||||
JScrollPane unicodeBlockScroller;
|
||||
JList charsetList;
|
||||
JList<JCheckBox> charsetList;
|
||||
|
||||
|
||||
public CharacterSelector() {
|
||||
super("Character Selector");
|
||||
|
||||
charsetList = new CheckBoxList();
|
||||
DefaultListModel model = new DefaultListModel();
|
||||
DefaultListModel<JCheckBox> model = new DefaultListModel<JCheckBox>();
|
||||
charsetList.setModel(model);
|
||||
for (String item : blockNames) {
|
||||
model.addElement(new JCheckBox(item));
|
||||
@@ -824,7 +824,7 @@ class CharacterSelector extends JFrame {
|
||||
// collection, but it seems to have been picked up so many places with others
|
||||
// placing their copyright on it, that I haven't been able to determine the
|
||||
// original author. [fry 20100216]
|
||||
class CheckBoxList extends JList {
|
||||
class CheckBoxList extends JList<JCheckBox> {
|
||||
protected static Border noFocusBorder = new EmptyBorder(1, 1, 1, 1);
|
||||
|
||||
public CheckBoxList() {
|
||||
@@ -864,4 +864,4 @@ class CheckBoxList extends JList {
|
||||
return checkbox;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -131,12 +131,12 @@ public class Compiler {
|
||||
// so that it can grab the compiler JAR files from it.
|
||||
ClassLoader loader = build.mode.getClassLoader();
|
||||
try {
|
||||
Class batchClass =
|
||||
Class<?> batchClass =
|
||||
Class.forName("org.eclipse.jdt.core.compiler.batch.BatchCompiler", false, loader);
|
||||
Class progressClass =
|
||||
Class<?> progressClass =
|
||||
Class.forName("org.eclipse.jdt.core.compiler.CompilationProgress", false, loader);
|
||||
Class[] compileArgs =
|
||||
new Class[] { String[].class, PrintWriter.class, PrintWriter.class, progressClass };
|
||||
Class<?>[] compileArgs =
|
||||
new Class<?>[] { String[].class, PrintWriter.class, PrintWriter.class, progressClass };
|
||||
Method compileMethod = batchClass.getMethod("compile", compileArgs);
|
||||
success = (Boolean)
|
||||
compileMethod.invoke(null, new Object[] { command, outWriter, writer, null });
|
||||
|
||||
Reference in New Issue
Block a user