[Patchanim-commit] SF.net SVN: patchanim:[303] trunk/patchanim/src/com/mebigfatguy/patchanim
Brought to you by:
dbrosius
From: <dbr...@us...> - 2010-06-10 03:22:50
|
Revision: 303 http://patchanim.svn.sourceforge.net/patchanim/?rev=303&view=rev Author: dbrosius Date: 2010-06-10 03:22:41 +0000 (Thu, 10 Jun 2010) Log Message: ----------- warnings Modified Paths: -------------- trunk/patchanim/src/com/mebigfatguy/patchanim/gui/ExportFrame.java trunk/patchanim/src/com/mebigfatguy/patchanim/gui/JPatchControlPanel.java trunk/patchanim/src/com/mebigfatguy/patchanim/gui/JPatchListPanel.java trunk/patchanim/src/com/mebigfatguy/patchanim/gui/Utils.java trunk/patchanim/src/com/mebigfatguy/patchanim/io/PatchAnimExtension.java trunk/patchanim/src/com/mebigfatguy/patchanim/io/PatchAnimIO.java trunk/patchanim/src/com/mebigfatguy/patchanim/io/PatchExporter.java Modified: trunk/patchanim/src/com/mebigfatguy/patchanim/gui/ExportFrame.java =================================================================== --- trunk/patchanim/src/com/mebigfatguy/patchanim/gui/ExportFrame.java 2010-06-09 06:05:26 UTC (rev 302) +++ trunk/patchanim/src/com/mebigfatguy/patchanim/gui/ExportFrame.java 2010-06-10 03:22:41 UTC (rev 303) @@ -25,6 +25,7 @@ import javax.swing.BorderFactory; import javax.swing.JDialog; import javax.swing.JProgressBar; +import javax.swing.SwingConstants; import javax.swing.SwingUtilities; import com.mebigfatguy.patchanim.gui.events.ExportEvent; @@ -52,7 +53,7 @@ ResourceBundle rb = PatchAnimBundle.getBundle(); Container cp = getContentPane(); cp.setLayout(new BorderLayout(4, 4)); - bar = new JProgressBar(JProgressBar.HORIZONTAL, 0, 100); + bar = new JProgressBar(SwingConstants.HORIZONTAL, 0, 100); bar.setBorder(BorderFactory.createEmptyBorder(10, 50, 10, 50)); cp.add(bar, BorderLayout.CENTER); pack(); Modified: trunk/patchanim/src/com/mebigfatguy/patchanim/gui/JPatchControlPanel.java =================================================================== --- trunk/patchanim/src/com/mebigfatguy/patchanim/gui/JPatchControlPanel.java 2010-06-09 06:05:26 UTC (rev 302) +++ trunk/patchanim/src/com/mebigfatguy/patchanim/gui/JPatchControlPanel.java 2010-06-10 03:22:41 UTC (rev 303) @@ -189,13 +189,13 @@ int newWidth = Integer.parseInt(widthField.getText()); if (oldWidth != newWidth) { document.setWidth(newWidth); - PatchPanelMediator mediator = PatchPanelMediator.getMediator(); - mediator.fireSettingsChanged(); + PatchPanelMediator ppMediator = PatchPanelMediator.getMediator(); + ppMediator.fireSettingsChanged(); } } catch (NumberFormatException nfe) { document.setWidth(100); - PatchPanelMediator mediator = PatchPanelMediator.getMediator(); - mediator.fireSettingsChanged(); + PatchPanelMediator ppMediator = PatchPanelMediator.getMediator(); + ppMediator.fireSettingsChanged(); } } @@ -213,13 +213,13 @@ int newHeight = Integer.parseInt(heightField.getText()); if (oldHeight != newHeight) { document.setHeight(newHeight); - PatchPanelMediator mediator = PatchPanelMediator.getMediator(); - mediator.fireSettingsChanged(); + PatchPanelMediator ppMediator = PatchPanelMediator.getMediator(); + ppMediator.fireSettingsChanged(); } } catch (NumberFormatException nfe) { document.setHeight(100); - PatchPanelMediator mediator = PatchPanelMediator.getMediator(); - mediator.fireSettingsChanged(); + PatchPanelMediator ppMediator = PatchPanelMediator.getMediator(); + ppMediator.fireSettingsChanged(); } } @@ -238,13 +238,13 @@ int newTween = Integer.parseInt(tweenFramesField.getText()); if (oldTween != newTween) { document.setTweenCount(newTween); - PatchPanelMediator mediator = PatchPanelMediator.getMediator(); - mediator.fireSettingsChanged(); + PatchPanelMediator ppMediator = PatchPanelMediator.getMediator(); + ppMediator.fireSettingsChanged(); } } catch (NumberFormatException nfe) { document.setTweenCount(10); - PatchPanelMediator mediator = PatchPanelMediator.getMediator(); - mediator.fireSettingsChanged(); + PatchPanelMediator ppMediator = PatchPanelMediator.getMediator(); + ppMediator.fireSettingsChanged(); } } }); @@ -254,8 +254,8 @@ public void itemStateChanged(ItemEvent ie) { if (ie.getStateChange() == ItemEvent.SELECTED) { document.setAnimationType((AnimationType)ie.getItem()); - PatchPanelMediator mediator = PatchPanelMediator.getMediator(); - mediator.fireSettingsChanged(); + PatchPanelMediator ppMediator = PatchPanelMediator.getMediator(); + ppMediator.fireSettingsChanged(); } } }); @@ -265,8 +265,8 @@ public void itemStateChanged(ItemEvent ie) { if (ie.getStateChange() == ItemEvent.SELECTED) { document.setOutOfBoundsColor((OutOfBoundsColor)ie.getItem()); - PatchPanelMediator mediator = PatchPanelMediator.getMediator(); - mediator.fireSettingsChanged(); + PatchPanelMediator ppMediator = PatchPanelMediator.getMediator(); + ppMediator.fireSettingsChanged(); } } }); @@ -284,8 +284,8 @@ public void itemStateChanged(ItemEvent ie) { if (ie.getStateChange() == ItemEvent.SELECTED) { document.setTweenStyle((TweenStyle)ie.getItem()); - PatchPanelMediator mediator = PatchPanelMediator.getMediator(); - mediator.fireSettingsChanged(); + PatchPanelMediator ppMediator = PatchPanelMediator.getMediator(); + ppMediator.fireSettingsChanged(); } } }); Modified: trunk/patchanim/src/com/mebigfatguy/patchanim/gui/JPatchListPanel.java =================================================================== --- trunk/patchanim/src/com/mebigfatguy/patchanim/gui/JPatchListPanel.java 2010-06-09 06:05:26 UTC (rev 302) +++ trunk/patchanim/src/com/mebigfatguy/patchanim/gui/JPatchListPanel.java 2010-06-10 03:22:41 UTC (rev 303) @@ -133,8 +133,8 @@ else selIndex++; - PatchPanelMediator mediator = PatchPanelMediator.getMediator(); - CombinedPatch newPatch = new CombinedPatch(mediator.getDocument().getOrder(), true); + PatchPanelMediator ppMediator = PatchPanelMediator.getMediator(); + CombinedPatch newPatch = new CombinedPatch(ppMediator.getDocument().getOrder(), true); patchListModel.add(selIndex, newPatch); patchList.setSelectedIndex(selIndex); removeButton.setEnabled(patchListModel.getSize() > 1); @@ -151,8 +151,8 @@ selIndex--; } patchList.setSelectedIndex(selIndex); - PatchPanelMediator mediator = PatchPanelMediator.getMediator(); - mediator.setNewActivePatch((CombinedPatch)patchListModel.getElementAt(selIndex)); + PatchPanelMediator ppMediator = PatchPanelMediator.getMediator(); + ppMediator.setNewActivePatch((CombinedPatch)patchListModel.getElementAt(selIndex)); removeButton.setEnabled(patchListModel.getSize() > 1); enabledMovementCtrls(); } @@ -194,8 +194,8 @@ int selIndex = patchList.getSelectedIndex(); if (selIndex >= 0) { CombinedPatch newPatch = (CombinedPatch)patchListModel.getElementAt(selIndex); - PatchPanelMediator mediator = PatchPanelMediator.getMediator(); - mediator.setNewActivePatch(newPatch); + PatchPanelMediator ppMediator = PatchPanelMediator.getMediator(); + ppMediator.setNewActivePatch(newPatch); enabledMovementCtrls(); } } Modified: trunk/patchanim/src/com/mebigfatguy/patchanim/gui/Utils.java =================================================================== --- trunk/patchanim/src/com/mebigfatguy/patchanim/gui/Utils.java 2010-06-09 06:05:26 UTC (rev 302) +++ trunk/patchanim/src/com/mebigfatguy/patchanim/gui/Utils.java 2010-06-10 03:22:41 UTC (rev 303) @@ -26,7 +26,7 @@ import javax.swing.JPanel; public class Utils { - public enum Sizing {Width, Height, Both}; + public enum Sizing {Width, Height, Both} private Utils() {} Modified: trunk/patchanim/src/com/mebigfatguy/patchanim/io/PatchAnimExtension.java =================================================================== --- trunk/patchanim/src/com/mebigfatguy/patchanim/io/PatchAnimExtension.java 2010-06-09 06:05:26 UTC (rev 302) +++ trunk/patchanim/src/com/mebigfatguy/patchanim/io/PatchAnimExtension.java 2010-06-10 03:22:41 UTC (rev 303) @@ -47,7 +47,7 @@ d = db.newDocument(); } - public String getVersion(ExpressionContext context) { + public String getVersion(@SuppressWarnings("unused") ExpressionContext context) { BufferedReader br = null; try { br = new BufferedReader(new InputStreamReader(PatchAnimExtension.class.getResourceAsStream(VERSION_URL))); @@ -59,39 +59,39 @@ } } - public String getOrder(ExpressionContext context) { + public String getOrder(@SuppressWarnings("unused") ExpressionContext context) { return String.valueOf(paDoc.getOrder()); } - public String getWidth(ExpressionContext context) { + public String getWidth(@SuppressWarnings("unused") ExpressionContext context) { return String.valueOf(paDoc.getWidth()); } - public String getHeight(ExpressionContext context) { + public String getHeight(@SuppressWarnings("unused") ExpressionContext context) { return String.valueOf(paDoc.getHeight()); } - public String getAnimationType(ExpressionContext context) { + public String getAnimationType(@SuppressWarnings("unused") ExpressionContext context) { return paDoc.getAnimationType().name(); } - public String getOutOfBoundsColor(ExpressionContext context) { + public String getOutOfBoundsColor(@SuppressWarnings("unused") ExpressionContext context) { return paDoc.getOutOfBoundsColor().name(); } - public String getTweenCount(ExpressionContext context) { + public String getTweenCount(@SuppressWarnings("unused") ExpressionContext context) { return String.valueOf(paDoc.getTweenCount()); } - public String getTweenStyle(ExpressionContext context) { + public String getTweenStyle(@SuppressWarnings("unused") ExpressionContext context) { return String.valueOf(paDoc.getTweenStyle()); } - public String useAlpha(ExpressionContext context) { + public String useAlpha(@SuppressWarnings("unused") ExpressionContext context) { return String.valueOf(paDoc.useAlpha()); } - public NodeList getPatches(ExpressionContext context) { + public NodeList getPatches(@SuppressWarnings("unused") ExpressionContext context) { return new NodeList() { public int getLength() { @@ -104,12 +104,12 @@ }; } - public String getPatchName(ExpressionContext context, Node patchIndexNode) { + public String getPatchName(@SuppressWarnings("unused") ExpressionContext context, Node patchIndexNode) { int patchIndex = Integer.parseInt(patchIndexNode.getNodeValue()); return paDoc.getPatches().get(patchIndex).getName(); } - public NodeList getCoordinates(ExpressionContext context) { + public NodeList getCoordinates(@SuppressWarnings("unused") ExpressionContext context) { return new NodeList() { public int getLength() { @@ -123,20 +123,20 @@ }; } - public String getX(ExpressionContext context, String color, Node patchIndexNode, Node coordIndexNode) { + public String getX(@SuppressWarnings("unused") ExpressionContext context, String color, Node patchIndexNode, Node coordIndexNode) { return String.valueOf(getCoordinate(color, patchIndexNode, coordIndexNode).getX()); } - public String getY(ExpressionContext context, String color, Node patchIndexNode, Node coordIndexNode) { + public String getY(@SuppressWarnings("unused") ExpressionContext context, String color, Node patchIndexNode, Node coordIndexNode) { return String.valueOf(getCoordinate(color, patchIndexNode, coordIndexNode).getY()); } - public String getColor(ExpressionContext context, String color, Node patchIndexNode, Node coordIndexNode) { + public String getColor(@SuppressWarnings("unused") ExpressionContext context, String color, Node patchIndexNode, Node coordIndexNode) { return String.valueOf(getCoordinate(color, patchIndexNode, coordIndexNode).getColor()); } private Coordinate getCoordinate(String color, Node patchIndexNode, Node coordIndexNode) { - PatchColor patchColor = PatchColor.valueOf(PatchColor.class, color); + PatchColor patchColor = Enum.<PatchColor>valueOf(PatchColor.class, color); int patchIndex = Integer.parseInt(patchIndexNode.getNodeValue()); int coordIndex = Integer.parseInt(coordIndexNode.getNodeValue()); int order = paDoc.getOrder(); Modified: trunk/patchanim/src/com/mebigfatguy/patchanim/io/PatchAnimIO.java =================================================================== --- trunk/patchanim/src/com/mebigfatguy/patchanim/io/PatchAnimIO.java 2010-06-09 06:05:26 UTC (rev 302) +++ trunk/patchanim/src/com/mebigfatguy/patchanim/io/PatchAnimIO.java 2010-06-10 03:22:41 UTC (rev 303) @@ -146,15 +146,15 @@ doc.getPatches().clear(); doc.setWidth(Integer.parseInt(atts.getValue(WIDTH))); doc.setHeight(Integer.parseInt(atts.getValue(HEIGHT))); - doc.setAnimationType(AnimationType.valueOf(AnimationType.class, atts.getValue(ANIMATIONTYPE))); - doc.setOutOfBoundsColor(OutOfBoundsColor.valueOf(OutOfBoundsColor.class, atts.getValue(OUTOFBOUNDSCOLOR))); + doc.setAnimationType(Enum.<AnimationType>valueOf(AnimationType.class, atts.getValue(ANIMATIONTYPE))); + doc.setOutOfBoundsColor(Enum.<OutOfBoundsColor>valueOf(OutOfBoundsColor.class, atts.getValue(OUTOFBOUNDSCOLOR))); doc.setTweenCount(Integer.parseInt(atts.getValue(TWEENCOUNT))); - doc.setTweenStyle(TweenStyle.valueOf(TweenStyle.class, atts.getValue(TWEENSTYLE))); + doc.setTweenStyle(Enum.<TweenStyle>valueOf(TweenStyle.class, atts.getValue(TWEENSTYLE))); } else if (COMBINEDPATCH.equals(localName)) { cPatch = new CombinedPatch(doc.getOrder(), false); } else if (PATCH.equals(localName)) { patchCoords = new PatchCoords(doc.getOrder()); - patchColor = PatchColor.valueOf(PatchColor.class, atts.getValue(COLOR)); + patchColor = Enum.<PatchColor>valueOf(PatchColor.class, atts.getValue(COLOR)); } else if (COORDINATE.equals(localName)) { Coordinate c = new Coordinate(Double.parseDouble(atts.getValue(X)), Double.parseDouble(atts.getValue(Y)), Modified: trunk/patchanim/src/com/mebigfatguy/patchanim/io/PatchExporter.java =================================================================== --- trunk/patchanim/src/com/mebigfatguy/patchanim/io/PatchExporter.java 2010-06-09 06:05:26 UTC (rev 302) +++ trunk/patchanim/src/com/mebigfatguy/patchanim/io/PatchExporter.java 2010-06-10 03:22:41 UTC (rev 303) @@ -137,31 +137,31 @@ } } - private void writeSingleFile(BufferedImage image, int index, File dir, String baseName, ExportType type) throws IOException { + private void writeSingleFile(BufferedImage image, int index, File dir, String bsName, ExportType exportType) throws IOException { NumberFormat nf = NumberFormat.getIntegerInstance(); nf.setMinimumIntegerDigits(5); nf.setGroupingUsed(false); - String name = baseName + "_" + nf.format(index) + "." + type.getExtension(); + String name = bsName + "_" + nf.format(index) + "." + exportType.getExtension(); File imageFile = new File(dir, name); - if (type == ExportType.Gifs) { + if (exportType == ExportType.Gifs) { AnimatedGifEncoder encoder = new AnimatedGifEncoder(); encoder.start(imageFile.getPath()); encoder.addFrame(image); encoder.finish(); - } else if (type == ExportType.AnimatedGif) { + } else if (exportType == ExportType.AnimatedGif) { agEncoder.addFrame(image); agEncoder.setDelay(100); - } else if (type == ExportType.AnimatedPng) { + } else if (exportType == ExportType.AnimatedPng) { apngEncoder.setDelay(100); apngEncoder.addFrame(image); - } else if (type == ExportType.AnimatedMng) { + } else if (exportType == ExportType.AnimatedMng) { mngEncoder.setDelay(100); mngEncoder.addFrame(image); } else - ImageIO.write(image, type.getExtension(), imageFile); + ImageIO.write(image, exportType.getExtension(), imageFile); fireExportEvent(index); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |