Changeset 30532 in osm for applications/editors/josm/plugins/mapdust
- Timestamp:
- 2014-07-14T04:18:06+02:00 (11 years ago)
- Location:
- applications/editors/josm/plugins/mapdust
- Files:
-
- 19 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/mapdust/.classpath
r30416 r30532 4 4 <classpathentry including="conf/|images/" kind="src" path=""/> 5 5 <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/> 6 <classpathentry kind="lib" path="lib/gson-1.5.jar"/>7 6 <classpathentry combineaccessrules="false" kind="src" path="/JOSM"/> 7 <classpathentry kind="lib" path="lib/gson-2.2.4.jar"/> 8 8 <classpathentry kind="output" path="build/classes"/> 9 9 </classpath> -
applications/editors/josm/plugins/mapdust/.settings/org.eclipse.jdt.core.prefs
r30416 r30532 1 1 eclipse.preferences.version=1 2 org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=disabled 3 org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore 4 org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull 5 org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault 6 org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable 7 org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled 2 8 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled 3 9 org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 … … 7 13 org.eclipse.jdt.core.compiler.debug.localVariable=generate 8 14 org.eclipse.jdt.core.compiler.debug.sourceFile=generate 15 org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning 9 16 org.eclipse.jdt.core.compiler.problem.assertIdentifier=error 17 org.eclipse.jdt.core.compiler.problem.autoboxing=ignore 18 org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning 19 org.eclipse.jdt.core.compiler.problem.deadCode=warning 20 org.eclipse.jdt.core.compiler.problem.deprecation=warning 21 org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled 22 org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled 23 org.eclipse.jdt.core.compiler.problem.discouragedReference=warning 24 org.eclipse.jdt.core.compiler.problem.emptyStatement=warning 10 25 org.eclipse.jdt.core.compiler.problem.enumIdentifier=error 26 org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore 27 org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore 28 org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled 29 org.eclipse.jdt.core.compiler.problem.fieldHiding=warning 30 org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning 31 org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning 32 org.eclipse.jdt.core.compiler.problem.forbiddenReference=error 33 org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning 34 org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled 35 org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning 36 org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=warning 37 org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore 38 org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore 39 org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning 40 org.eclipse.jdt.core.compiler.problem.missingDefaultCase=ignore 41 org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore 42 org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled 43 org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore 44 org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore 45 org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled 46 org.eclipse.jdt.core.compiler.problem.missingSerialVersion=ignore 47 org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore 48 org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning 49 org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning 50 org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore 51 org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning 52 org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error 53 org.eclipse.jdt.core.compiler.problem.nullReference=warning 54 org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error 55 org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning 56 org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning 57 org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore 58 org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore 59 org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore 60 org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=ignore 61 org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning 62 org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning 63 org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore 64 org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=ignore 65 org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore 66 org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore 67 org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore 68 org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled 69 org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning 70 org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled 71 org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled 72 org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=disabled 73 org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore 74 org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning 75 org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled 76 org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning 77 org.eclipse.jdt.core.compiler.problem.unclosedCloseable=warning 78 org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore 79 org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning 80 org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore 81 org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=ignore 82 org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore 83 org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore 84 org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled 85 org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled 86 org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled 87 org.eclipse.jdt.core.compiler.problem.unusedImport=warning 88 org.eclipse.jdt.core.compiler.problem.unusedLabel=warning 89 org.eclipse.jdt.core.compiler.problem.unusedLocal=warning 90 org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=warning 91 org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore 92 org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled 93 org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled 94 org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled 95 org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning 96 org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore 97 org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning 98 org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning 11 99 org.eclipse.jdt.core.compiler.source=1.7 -
applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/MapdustActionUploaderException.java
r25591 r30532 36 36 */ 37 37 public class MapdustActionUploaderException extends Exception { 38 39 /** Serial version UID */40 private static final long serialVersionUID = -6128820229665805478L;41 38 42 39 /** -
applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/action/adapter/DisplayMenu.java
r25591 r30532 31 31 import java.awt.event.MouseAdapter; 32 32 import java.awt.event.MouseEvent; 33 33 34 import javax.swing.JList; 34 35 import javax.swing.JPopupMenu; 36 37 import org.openstreetmap.josm.plugins.mapdust.service.value.MapdustBug; 35 38 36 39 … … 48 51 49 52 /** The list of bugs */ 50 private JList listBugs; 53 private JList<MapdustBug> listBugs; 51 54 52 55 /** … … 61 64 * @param menu The <code>JPopupMenu</code> object 62 65 */ 63 public DisplayMenu(JList listBugs, JPopupMenu menu) { 66 public DisplayMenu(JList<MapdustBug> listBugs, JPopupMenu menu) { 64 67 this.listBugs = listBugs; 65 68 this.menu = menu; -
applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/action/adapter/WindowClose.java
r25591 r30532 45 45 */ 46 46 public class WindowClose extends WindowAdapter { 47 48 /** Serial version UID */49 47 50 48 /** A <code>AbstractDialog</code> object */ -
applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/action/execute/ExecuteActionList.java
r25591 r30532 55 55 public class ExecuteActionList extends MapdustExecuteAction implements 56 56 MapdustUpdateObservable { 57 58 /** Serial version UID */59 private static final long serialVersionUID = -7487830542214611774L;60 57 61 58 /** List of MapdustRefreshObserver objects */ -
applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/action/execute/ExecuteCloseBug.java
r25828 r30532 64 64 public class ExecuteCloseBug extends MapdustExecuteAction implements 65 65 MapdustBugObservable, MapdustActionObservable { 66 67 /** Serial version UID */68 private static final long serialVersionUID = 3468827127588061014L;69 66 70 67 /** The list of Mapdust bug observers */ -
applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/action/execute/MapdustExecuteAction.java
r25828 r30532 44 44 */ 45 45 public abstract class MapdustExecuteAction extends AbstractAction { 46 47 /** Serial version UID */48 private static final long serialVersionUID = 4318259806647818543L;49 46 50 47 /** The abstract dialog object */ -
applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/component/dialog/CreateBugDialog.java
r25828 r30532 28 28 package org.openstreetmap.josm.plugins.mapdust.gui.component.dialog; 29 29 30 31 30 import java.awt.Color; 32 31 import java.awt.Font; … … 34 33 import java.awt.Point; 35 34 import java.awt.Rectangle; 35 36 36 import javax.swing.JButton; 37 37 import javax.swing.JComboBox; … … 41 41 import javax.swing.JTextField; 42 42 import javax.swing.WindowConstants; 43 43 44 import org.openstreetmap.josm.Main; 44 45 import org.openstreetmap.josm.plugins.mapdust.MapdustPlugin; … … 49 50 import org.openstreetmap.josm.plugins.mapdust.gui.component.renderer.ComboBoxRenderer; 50 51 import org.openstreetmap.josm.plugins.mapdust.gui.component.util.ComponentUtil; 52 import org.openstreetmap.josm.plugins.mapdust.service.value.BugType; 51 53 import org.openstreetmap.josm.tools.ImageProvider; 52 53 54 54 55 /** … … 71 72 72 73 /** The combo-box for the bug types */ 73 private JComboBox cbbType; 74 private JComboBox<BugType> cbbType; 74 75 75 76 /** The nickname label */ … … 248 249 * @return the cbbType 249 250 */ 250 public JComboBox getCbbType() { 251 public JComboBox<BugType> getCbbType() { 251 252 return cbbType; 252 253 } -
applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/component/model/ActionListModel.java
r25591 r30532 40 40 * @version $Revision$ 41 41 */ 42 public class ActionListModel extends AbstractListModel { 42 public class ActionListModel extends AbstractListModel<MapdustAction> { 43 43 44 44 /** The serial version UID */ … … 73 73 */ 74 74 @Override 75 public ObjectgetElementAt(int index) {75 public MapdustAction getElementAt(int index) { 76 76 if (index >= 0 && index < list.size()) { 77 77 return list.get(index); … … 89 89 return (list != null ? list.size() : 0); 90 90 } 91 92 91 } -
applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/component/model/BugsListModel.java
r25591 r30532 28 28 package org.openstreetmap.josm.plugins.mapdust.gui.component.model; 29 29 30 31 30 import java.util.List; 32 31 import javax.swing.AbstractListModel; 33 32 import org.openstreetmap.josm.plugins.mapdust.service.value.MapdustBug; 34 35 33 36 34 /** … … 40 38 * 41 39 */ 42 public class BugsListModel extends AbstractListModel { 40 public class BugsListModel extends AbstractListModel<MapdustBug> { 43 41 44 42 /** The serial version UID */ … … 71 69 */ 72 70 @Override 73 public ObjectgetElementAt(int index) {71 public MapdustBug getElementAt(int index) { 74 72 if (index >= 0 && index < bugs.size()) { 75 73 return bugs.get(index); … … 94 92 this.fireContentsChanged(this, 0, bugs.size() - 1); 95 93 } 96 97 94 } -
applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/component/model/CommentListModel.java
r25591 r30532 40 40 * 41 41 */ 42 public class CommentListModel implements ListModel { 42 public class CommentListModel implements ListModel<MapdustComment> { 43 43 44 44 /** The list of <code>MapdustBug</code> objects */ … … 68 68 */ 69 69 @Override 70 public Object getElementAt(int index) {70 public MapdustComment getElementAt(int index) { 71 71 if (index > 0 && index < comments.length) { 72 72 return comments[index]; -
applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/component/model/TypesListModel.java
r27874 r30532 28 28 package org.openstreetmap.josm.plugins.mapdust.gui.component.model; 29 29 30 31 30 import javax.swing.AbstractListModel; 32 31 import javax.swing.ComboBoxModel; 33 32 import org.openstreetmap.josm.plugins.mapdust.service.value.BugType; 34 35 33 36 34 /** … … 40 38 * @version $Revision$ 41 39 */ 42 public class TypesListModel extends AbstractListModel implements ComboBoxModel { 40 public class TypesListModel extends AbstractListModel<BugType> implements ComboBoxModel<BugType> { 43 41 44 42 /** The serial version UID */ … … 65 63 */ 66 64 @Override 67 public ObjectgetElementAt(int index) {65 public BugType getElementAt(int index) { 68 66 return types[index]; 69 67 } -
applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/component/panel/MapdustActionPanel.java
r25591 r30532 28 28 package org.openstreetmap.josm.plugins.mapdust.gui.component.panel; 29 29 30 import static org.openstreetmap.josm.tools.I18n.tr; 30 31 31 import static org.openstreetmap.josm.tools.I18n.tr;32 32 import java.awt.BorderLayout; 33 33 import java.util.List; 34 34 35 import javax.swing.AbstractAction; 35 36 import javax.swing.JList; … … 37 38 import javax.swing.JScrollPane; 38 39 import javax.swing.JToggleButton; 40 39 41 import org.openstreetmap.josm.plugins.mapdust.MapdustPlugin; 40 42 import org.openstreetmap.josm.plugins.mapdust.gui.action.execute.ExecuteActionList; … … 42 44 import org.openstreetmap.josm.plugins.mapdust.gui.component.util.ComponentUtil; 43 45 import org.openstreetmap.josm.plugins.mapdust.gui.value.MapdustAction; 44 45 46 46 47 /** … … 52 53 public class MapdustActionPanel extends JPanel { 53 54 54 /** The serial version UID */55 private static final long serialVersionUID = -6648507056357610823L;56 57 55 /** The scroll pane */ 58 56 private JScrollPane cmpActionList; 59 57 60 58 /** The JList containing the MapDust action objects */ 61 private JList actionJList; 59 private JList<MapdustAction> actionJList; 62 60 63 61 /** The list of <code>MapdustAction</code> objects */ … … 113 111 cmpActionList.getViewport().setView(actionJList); 114 112 cmpActionList.invalidate(); 115 116 113 } 117 114 … … 133 130 this.actionList = actionList; 134 131 } 135 136 132 } -
applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/component/panel/MapdustBugListPanel.java
r25839 r30532 79 79 80 80 /** The list of bugs */ 81 private JList mapdustBugsJList; 81 private JList<MapdustBug> mapdustBugsJList; 82 82 83 83 /** The scroll pane for the <code>MapdustBug</code>s */ … … 163 163 String text = " No bugs in the current view for the selected"; 164 164 text += " filters!"; 165 JList textJList = new JList(new String[] { text }); 165 JList<String> textJList = new JList<>(new String[] { text }); 166 166 textJList.setBorder(new LineBorder(Color.black, 1, false)); 167 167 textJList.setCellRenderer(new BugListCellRenderer()); … … 192 192 String text = " No bugs in the current view for the selected"; 193 193 text += " filters!"; 194 JList textJList = new JList(new String[] { text }); 194 JList<String> textJList = new JList<>(new String[] { text }); 195 195 textJList.setBorder(new LineBorder(Color.black, 1, false)); 196 196 textJList.setCellRenderer(new BugListCellRenderer()); … … 198 198 } else { 199 199 if (mapdustBugsJList == null) { 200 mapdustBugsJList = ComponentUtil.createJList(mapdustBugsList, 201 menu); 200 mapdustBugsJList = ComponentUtil.createJList(mapdustBugsList, menu); 202 201 mapdustBugsJList.addListSelectionListener(this); 203 202 DisplayMenu adapter = new DisplayMenu(mapdustBugsJList, menu); … … 349 348 * @return the listBugs 350 349 */ 351 public JList getMapdustBugsJList() { 350 public JList<MapdustBug> getMapdustBugsJList() { 352 351 return mapdustBugsJList; 353 352 } -
applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/component/renderer/ActionListCellRenderer.java
r25591 r30532 28 28 package org.openstreetmap.josm.plugins.mapdust.gui.component.renderer; 29 29 30 31 30 import java.awt.Component; 32 31 import java.awt.Font; … … 39 38 import org.openstreetmap.josm.tools.ImageProvider; 40 39 41 42 40 /** 43 41 * Cell renderer for the <code>MapdustAction</code> objects. … … 47 45 */ 48 46 public class ActionListCellRenderer extends DefaultListCellRenderer { 49 50 /** The serial version UID */51 private static final long serialVersionUID = 7552949107018269769L;52 47 53 48 /** … … 61 56 */ 62 57 @Override 63 public Component getListCellRendererComponent(JList list, Object value, 58 public Component getListCellRendererComponent(JList<?> list, Object value, 64 59 int index, boolean isSelected, boolean hasFocus) { 65 60 JLabel label = (JLabel) super.getListCellRendererComponent(list, value, -
applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/component/renderer/BugListCellRenderer.java
r25591 r30532 61 61 */ 62 62 @Override 63 public Component getListCellRendererComponent(JList list, Object value, 63 public Component getListCellRendererComponent(JList<?> list, Object value, 64 64 int index, boolean isSelected, boolean hasFocus) { 65 65 JLabel label =(JLabel) super.getListCellRendererComponent(list, value, -
applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/component/renderer/ComboBoxRenderer.java
r27874 r30532 28 28 package org.openstreetmap.josm.plugins.mapdust.gui.component.renderer; 29 29 30 31 30 import java.awt.Component; 32 31 import java.awt.Font; … … 39 38 import org.openstreetmap.josm.tools.ImageProvider; 40 39 41 42 40 /** 43 41 * Cell renderer for the <code>MapdustBug</code> types. … … 45 43 * @author Bea 46 44 */ 47 public class ComboBoxRenderer implements ListCellRenderer { 45 public class ComboBoxRenderer implements ListCellRenderer<BugType> { 48 46 49 47 /** The default renderer */ … … 61 59 */ 62 60 @Override 63 public Component getListCellRendererComponent(JList list, Object value,61 public Component getListCellRendererComponent(JList<? extends BugType> list, BugType type, 64 62 int index, boolean isSelected, boolean cellHasFocus) { 65 63 JLabel label = (JLabel) defaultRenderer.getListCellRendererComponent( 66 list, value, index, isSelected, cellHasFocus); 67 if (value instanceof BugType) { 68 BugType type = (BugType) value; 69 String iconPath = "bugs/normal/open_" + type.getKey() + ".png"; 70 String text = type.getValue(); 71 ImageIcon icon = ImageProvider.get(iconPath); 72 label.setIcon(icon); 73 label.setText(text); 74 label.setFont( new Font("Times New Roman", Font.BOLD, 12)); 75 } 64 list, type, index, isSelected, cellHasFocus); 65 String iconPath = "bugs/normal/open_" + type.getKey() + ".png"; 66 String text = type.getValue(); 67 ImageIcon icon = ImageProvider.get(iconPath); 68 label.setIcon(icon); 69 label.setText(text); 70 label.setFont( new Font("Times New Roman", Font.BOLD, 12)); 76 71 return label; 77 72 } 78 79 73 } -
applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/component/util/ComponentUtil.java
r25828 r30532 30 30 31 31 import static org.openstreetmap.josm.tools.I18n.tr; 32 32 33 import java.awt.Color; 33 34 import java.awt.Component; … … 35 36 import java.awt.Rectangle; 36 37 import java.util.List; 38 37 39 import javax.swing.AbstractAction; 38 40 import javax.swing.Action; … … 52 54 import javax.swing.SwingConstants; 53 55 import javax.swing.border.LineBorder; 56 54 57 import org.openstreetmap.josm.plugins.mapdust.gui.component.model.ActionListModel; 55 58 import org.openstreetmap.josm.plugins.mapdust.gui.component.model.BugsListModel; … … 58 61 import org.openstreetmap.josm.plugins.mapdust.gui.component.renderer.BugListCellRenderer; 59 62 import org.openstreetmap.josm.plugins.mapdust.gui.value.MapdustAction; 63 import org.openstreetmap.josm.plugins.mapdust.service.value.BugType; 60 64 import org.openstreetmap.josm.plugins.mapdust.service.value.MapdustBug; 61 65 import org.openstreetmap.josm.tools.ImageProvider; … … 211 215 * @return A <code>JScrollPane</code> object 212 216 */ 213 public static JScrollPane createJScrollPane(JList list) { 217 public static JScrollPane createJScrollPane(JList<?> list) { 214 218 JScrollPane jScrollPane = new JScrollPane(); 215 219 jScrollPane.setViewportView(list); … … 224 228 * @return A <code>JList</code> object 225 229 */ 226 public static JList createJList(List<MapdustAction> list) { 227 final JList jList = new JList(new ActionListModel(list)); 230 public static JList<MapdustAction> createJList(List<MapdustAction> list) { 231 final JList<MapdustAction> jList = new JList<>(new ActionListModel(list)); 228 232 jList.setBorder(new LineBorder(Color.black, 1, false)); 229 233 jList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); … … 240 244 * @return A <code>JList</code> 241 245 */ 242 public static JList createJList(List<MapdustBug> bugsList, 243 final JPopupMenu menu) { 244 final JList jList = new JList(new BugsListModel(bugsList)); 246 public static JList<MapdustBug> createJList(List<MapdustBug> bugsList, final JPopupMenu menu) { 247 final JList<MapdustBug> jList = new JList<>(new BugsListModel(bugsList)); 245 248 jList.setBorder(new LineBorder(Color.black, 1, false)); 246 249 jList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); … … 296 299 * @return A <code>JComboBox</code> object 297 300 */ 298 public static JComboBox createJComboBox(Rectangle bounds, 299 ListCellRenderer renderer, Color backgroundColor) { 300 JComboBox jComboBox = new JComboBox(new TypesListModel()); 301 public static JComboBox<BugType> createJComboBox(Rectangle bounds, 302 ListCellRenderer<BugType> renderer, Color backgroundColor) { 303 JComboBox<BugType> jComboBox = new JComboBox<>(new TypesListModel()); 301 304 jComboBox.setSelectedIndex(0); 302 305 jComboBox.setBackground(backgroundColor);
Note:
See TracChangeset
for help on using the changeset viewer.