diff --git a/src/com/generationjava/io/xml/EmptyElementXmlWriter.java b/src/com/generationjava/io/xml/EmptyElementXmlWriter.java index cab46a5..d4a400f 100644 --- a/src/com/generationjava/io/xml/EmptyElementXmlWriter.java +++ b/src/com/generationjava/io/xml/EmptyElementXmlWriter.java @@ -57,9 +57,9 @@ public class EmptyElementXmlWriter extends DelegatingXmlWriter { */ public static final Object EMPTY_MODE = new Object(); - private StringBuffer attrs; // current attribute string - private boolean empty; // is the current node empty - private boolean closed; // is the current node closed... +// private StringBuffer attrs; // current attribute string +// private boolean empty; // is the current node empty +// private boolean closed; // is the current node closed... private Object emptyMode; // the strategy to use for emptiness diff --git a/src/com/generationjava/io/xml/SimpleXmlWriter.java b/src/com/generationjava/io/xml/SimpleXmlWriter.java index 4b99cae..9e2c495 100644 --- a/src/com/generationjava/io/xml/SimpleXmlWriter.java +++ b/src/com/generationjava/io/xml/SimpleXmlWriter.java @@ -48,7 +48,7 @@ public class SimpleXmlWriter extends AbstractXmlWriter { private Writer writer; // underlying writer - private Stack stack; // of xml entity names + private Stack stack; // of xml entity names private StringBuffer attrs; // current attribute string private boolean empty; // is the current node empty private boolean closed; // is the current node closed... @@ -61,7 +61,7 @@ public class SimpleXmlWriter extends AbstractXmlWriter { public SimpleXmlWriter(Writer writer) { this.writer = writer; this.closed = true; - this.stack = new Stack(); + this.stack = new Stack(); } /** @@ -121,7 +121,7 @@ public XmlWriter writeEntity(String name) throws IOException { * @param String name of entity. */ private SimpleXmlWriter openEntity(String name) throws IOException { - boolean wasClosed = this.closed; +// boolean wasClosed = this.closed; closeOpeningTag(); this.closed = false; this.writer.write("<"); @@ -161,7 +161,7 @@ private void writeAttributes() throws IOException { public XmlWriter writeAttribute(String attr, Object value) throws IOException { // maintain api - if (false) throw new IOException(); +// if (false) throw new IOException(); if (this.attrs == null) { this.attrs = new StringBuffer(); diff --git a/src/com/generationjava/io/xml/XmlEncXmlWriter.java b/src/com/generationjava/io/xml/XmlEncXmlWriter.java index 3c70940..982f39d 100644 --- a/src/com/generationjava/io/xml/XmlEncXmlWriter.java +++ b/src/com/generationjava/io/xml/XmlEncXmlWriter.java @@ -109,7 +109,7 @@ public XmlWriter writeEntity(String name) throws IOException { * @param String name of entity. */ private XmlWriter openEntity(String name) throws IOException { - boolean wasClosed = this.closed; +// boolean wasClosed = this.closed; closeOpeningTag(); this.closed = false; this.xmlenc.startTag(name); @@ -137,7 +137,7 @@ private void closeOpeningTag() throws IOException { public XmlWriter writeAttribute(String attr, Object value) throws IOException { // maintain api - if (false) throw new IOException(); +// if (false) throw new IOException(); this.xmlenc.attribute(attr, ""+value); return this; diff --git a/src/com/generationjava/io/xml/XmlUtils.java b/src/com/generationjava/io/xml/XmlUtils.java index 9ddb3f0..731e602 100644 --- a/src/com/generationjava/io/xml/XmlUtils.java +++ b/src/com/generationjava/io/xml/XmlUtils.java @@ -64,7 +64,7 @@ public static String unescapeXml(String str) { public static String removeXml(String str) { int sz = str.length(); StringBuffer buffer = new StringBuffer(sz); - boolean inString = false; +// boolean inString = false; boolean inTag = false; for(int i=0; i extends DefaultCellEditor implements ListCellEditor { + private static final long serialVersionUID = -1814870371135163156L; + public DefaultListCellEditor(final JCheckBox checkBox){ super(checkBox); } - public DefaultListCellEditor(final JComboBox comboBox){ + public DefaultListCellEditor(final JComboBox comboBox){ super(comboBox); } @@ -17,7 +19,7 @@ public DefaultListCellEditor(final JTextField textField){ super(textField); } - public Component getListCellEditorComponent(JList list, Object value, boolean isSelected, int index){ + public Component getListCellEditorComponent(JList list, Object value, boolean isSelected, int index){ delegate.setValue(value); return editorComponent; } diff --git a/src/dfEditor/CustomComponents/DefaultMutableListModel.java b/src/dfEditor/CustomComponents/DefaultMutableListModel.java index 35f0e31..3a09d50 100644 --- a/src/dfEditor/CustomComponents/DefaultMutableListModel.java +++ b/src/dfEditor/CustomComponents/DefaultMutableListModel.java @@ -4,12 +4,14 @@ // @author Santhosh Kumar T - santhosh@in.fiorano.com -public class DefaultMutableListModel extends DefaultListModel implements MutableListModel{ - public boolean isCellEditable(int index){ - return true; - } - - public void setValueAt(Object value, int index){ - super.setElementAt(value, index); - } -} \ No newline at end of file +public class DefaultMutableListModel extends DefaultListModel implements MutableListModel { + private static final long serialVersionUID = 461469498415839069L; + + public boolean isCellEditable(int index){ + return true; + } + +// public void setValueAt(Object value, int index){ +// super.setElementAt(value, index); +// } +} diff --git a/src/dfEditor/CustomComponents/JListMutable.java b/src/dfEditor/CustomComponents/JListMutable.java index 228d201..630a545 100644 --- a/src/dfEditor/CustomComponents/JListMutable.java +++ b/src/dfEditor/CustomComponents/JListMutable.java @@ -9,13 +9,15 @@ import java.applet.Applet; // @author Santhosh Kumar T - santhosh@in.fiorano.com -public class JListMutable extends JList implements CellEditorListener { +public class JListMutable extends JList implements CellEditorListener { + private static final long serialVersionUID = -8376374319089296337L; + protected Component editorComp = null; protected int editingIndex = -1; - protected ListCellEditor editor = null; + protected ListCellEditor editor = null; private PropertyChangeListener editorRemover = null; - public JListMutable(ListModel dataModel){ + public JListMutable(ListModel dataModel){ super(dataModel); init(); } @@ -29,13 +31,13 @@ private void init(){ putClientProperty("terminateEditOnFocusLost", Boolean.TRUE); //NOI18N } - public void setListCellEditor(ListCellEditor editor){ - this.editor = editor; + public void setListCellEditor(ListCellEditor editor){ + this.editor = editor; } - public ListCellEditor getListCellEditor(){ - return editor; - } + public ListCellEditor getListCellEditor(){ + return editor; + } public boolean isEditing() { return (editorComp == null)? false : true; @@ -161,12 +163,12 @@ public void propertyChange(PropertyChangeEvent ev) { public boolean isCellEditable(int index){ if(getModel() instanceof MutableListModel) - return ((MutableListModel)getModel()).isCellEditable(index); + return ((MutableListModel)getModel()).isCellEditable(index); return false; } public void setValueAt(Object value, int index){ - ((NamedElement)((MutableListModel)getModel()).getElementAt(index)).setName((String)value); + ((NamedElement)((MutableListModel)getModel()).getElementAt(index)).setName((String)value); } /*-------------------------------------------------[ CellEditorListener ]---------------------------------------------------*/ @@ -186,8 +188,10 @@ public void editingCanceled(ChangeEvent e) { /*-------------------------------------------------[ Editing Actions]---------------------------------------------------*/ private static class StartEditingAction extends AbstractAction { - public void actionPerformed(ActionEvent e) { - JListMutable list = (JListMutable)e.getSource(); + private static final long serialVersionUID = 2378126151125982434L; + + public void actionPerformed(ActionEvent e) { + JListMutable list = (JListMutable)e.getSource(); if (!list.hasFocus()) { CellEditor cellEditor = list.getListCellEditor(); if(cellEditor!=null && !cellEditor.stopCellEditing()) { @@ -207,8 +211,11 @@ public void actionPerformed(ActionEvent e) { } private class CancelEditingAction extends AbstractAction { - public void actionPerformed(ActionEvent e) { - JListMutable list = (JListMutable)e.getSource(); + private static final long serialVersionUID = 3414959167369764270L; + + public void actionPerformed(ActionEvent e) { + @SuppressWarnings("unchecked") + JListMutable list = (JListMutable)e.getSource(); list.removeEditor(); } diff --git a/src/dfEditor/CustomComponents/ListCellEditor.java b/src/dfEditor/CustomComponents/ListCellEditor.java index a1f5596..e4aebe5 100644 --- a/src/dfEditor/CustomComponents/ListCellEditor.java +++ b/src/dfEditor/CustomComponents/ListCellEditor.java @@ -4,8 +4,8 @@ import java.awt.*; // @author Santhosh Kumar T - santhosh@in.fiorano.com -public interface ListCellEditor extends CellEditor{ - Component getListCellEditorComponent(JList list, Object value, +public interface ListCellEditor extends CellEditor{ + Component getListCellEditorComponent(JList list, Object value, boolean isSelected, int index); } \ No newline at end of file diff --git a/src/dfEditor/CustomComponents/MutableListModel.java b/src/dfEditor/CustomComponents/MutableListModel.java index 03e82d9..b5f8488 100644 --- a/src/dfEditor/CustomComponents/MutableListModel.java +++ b/src/dfEditor/CustomComponents/MutableListModel.java @@ -3,7 +3,7 @@ import javax.swing.*; // @author Santhosh Kumar T - santhosh@in.fiorano.com -public interface MutableListModel extends ListModel { +public interface MutableListModel extends ListModel { public boolean isCellEditable(int index); - public void setValueAt(Object value, int index); +// public void setValueAt(Object value, int index); } \ No newline at end of file diff --git a/src/dfEditor/CustomNode.java b/src/dfEditor/CustomNode.java index 922d1a9..e2f1970 100644 --- a/src/dfEditor/CustomNode.java +++ b/src/dfEditor/CustomNode.java @@ -24,6 +24,8 @@ public class CustomNode extends DefaultMutableTreeNode { + private static final long serialVersionUID = 4107423710895404131L; + private Color colour = Color.BLUE; private int childDirUniqueID; private int childLeafUniqueID; diff --git a/src/dfEditor/CustomNodeTree.java b/src/dfEditor/CustomNodeTree.java index 585b86e..c96a432 100644 --- a/src/dfEditor/CustomNodeTree.java +++ b/src/dfEditor/CustomNodeTree.java @@ -26,154 +26,152 @@ * @author s4m20 */ -import javax.swing.tree.*; -import javax.swing.*; -import java.awt.event.*; - public class CustomNodeTree extends dfEditor.SpriteTree { - private JPopupMenu spritePopupMenu; - private JMenuItem removeNodeItem; - private JPopupMenu dirPopupMenu; - private JMenu newMenu; - private JMenuItem addNodeItem; - private JMenuItem addDirItem; - private JMenuItem removeDirItem; - - private void initComponents() - { - spritePopupMenu = new javax.swing.JPopupMenu(); - spritePopupMenu.setName("spritePopupMenu"); - - removeNodeItem = new javax.swing.JMenuItem(); - removeNodeItem.setText("Remove"); - removeNodeItem.setName("removeNodeItem"); - removeNodeItem.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(java.awt.event.ActionEvent evt) { - removeNodeItemActionPerformed(evt); - } - }); - spritePopupMenu.add(removeNodeItem); - - dirPopupMenu = new javax.swing.JPopupMenu(); - dirPopupMenu.setName("dirPopupMenu"); - - newMenu = new javax.swing.JMenu(); - newMenu.setText("New"); - newMenu.setName("newMenu"); - dirPopupMenu.add(newMenu); - - addNodeItem = new javax.swing.JMenuItem(); - addNodeItem.setText("Sprite"); - addNodeItem.setName("addNodeItem"); - addNodeItem.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(java.awt.event.ActionEvent evt) { - addNodeItemActionPerformed(evt); - } - }); - newMenu.add(addNodeItem); - - - addDirItem = new javax.swing.JMenuItem(); - addDirItem.setText("Category"); - addDirItem.setName("addDirItem"); - addDirItem.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(java.awt.event.ActionEvent evt) { - addDirItemActionPerformed(evt); - } - }); - newMenu.add(addDirItem); - - removeDirItem = new javax.swing.JMenuItem(); - removeDirItem.setText("Remove"); - removeDirItem.setName("removeDirItem"); - removeDirItem.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(java.awt.event.ActionEvent evt) { - removeDirItemActionPerformed(evt); - } - }); - dirPopupMenu.add(removeDirItem); - } - - private void removeNodeItemActionPerformed(ActionEvent e) - { - - } - - private void addNodeItemActionPerformed(ActionEvent e) - { - - } - - private void addDirItemActionPerformed(ActionEvent e) - { - - } - - private void removeDirItemActionPerformed(ActionEvent e) - { - - } - - private void nameTreeMousePressed(java.awt.event.MouseEvent evt) - { - if (!this.isEnabled()) - return; - - TreePath clickPath = this.getPathForLocation(evt.getX(), evt.getY()); - this.setSelectionPath(clickPath); - - if (evt.isPopupTrigger()) - nameTreePopup(evt.getPoint()); - } - - private void nameTreeMouseReleased(java.awt.event.MouseEvent evt) { - if (!this.isEnabled()) - return; - - if (evt.isPopupTrigger()) - nameTreePopup(evt.getPoint()); - } - - private void nameTreeValueChanged(javax.swing.event.TreeSelectionEvent evt) { - - TreePath lastPath = evt.getOldLeadSelectionPath(); - if (lastPath != null) - { - CustomNode lastSelectedNode = (CustomNode)lastPath.getLastPathComponent(); - GraphicObject graphic = (GraphicObject)lastSelectedNode.getCustomObject(); - if (graphic != null) - graphic.setSelected(false); - } - - TreePath parentPath = this.getSelectionPath(); - CustomNode selectedNode = null; - if (parentPath != null) - { - selectedNode = (CustomNode) (parentPath.getLastPathComponent()); - } - } - - private void nameTreePopup(java.awt.Point aPos) - { - TreePath selectionPath = this.getSelectionPath(); - if (selectionPath != null) - { - CustomNode selectedNode = (CustomNode)(selectionPath.getLastPathComponent()); - if (selectedNode != null) - { - if (selectedNode.isLeaf()) - spritePopupMenu.show(this, aPos.x, aPos.y); - else - dirPopupMenu.show(this, aPos.x, aPos.y); - - if (selectedNode.isRoot()) - removeDirItem.setEnabled(false); - else - removeDirItem.setEnabled(true); - } - } - } + private static final long serialVersionUID = 5060701949124035290L; + +// private JPopupMenu spritePopupMenu; +// private JMenuItem removeNodeItem; +// private JPopupMenu dirPopupMenu; +// private JMenu newMenu; +// private JMenuItem addNodeItem; +// private JMenuItem addDirItem; +// private JMenuItem removeDirItem; + +// private void initComponents() +// { +// spritePopupMenu = new javax.swing.JPopupMenu(); +// spritePopupMenu.setName("spritePopupMenu"); +// +// removeNodeItem = new javax.swing.JMenuItem(); +// removeNodeItem.setText("Remove"); +// removeNodeItem.setName("removeNodeItem"); +// removeNodeItem.addActionListener(new java.awt.event.ActionListener() { +// public void actionPerformed(java.awt.event.ActionEvent evt) { +// removeNodeItemActionPerformed(evt); +// } +// }); +// spritePopupMenu.add(removeNodeItem); +// +// dirPopupMenu = new javax.swing.JPopupMenu(); +// dirPopupMenu.setName("dirPopupMenu"); +// +// newMenu = new javax.swing.JMenu(); +// newMenu.setText("New"); +// newMenu.setName("newMenu"); +// dirPopupMenu.add(newMenu); +// +// addNodeItem = new javax.swing.JMenuItem(); +// addNodeItem.setText("Sprite"); +// addNodeItem.setName("addNodeItem"); +// addNodeItem.addActionListener(new java.awt.event.ActionListener() { +// public void actionPerformed(java.awt.event.ActionEvent evt) { +// addNodeItemActionPerformed(evt); +// } +// }); +// newMenu.add(addNodeItem); +// +// +// addDirItem = new javax.swing.JMenuItem(); +// addDirItem.setText("Category"); +// addDirItem.setName("addDirItem"); +// addDirItem.addActionListener(new java.awt.event.ActionListener() { +// public void actionPerformed(java.awt.event.ActionEvent evt) { +// addDirItemActionPerformed(evt); +// } +// }); +// newMenu.add(addDirItem); +// +// removeDirItem = new javax.swing.JMenuItem(); +// removeDirItem.setText("Remove"); +// removeDirItem.setName("removeDirItem"); +// removeDirItem.addActionListener(new java.awt.event.ActionListener() { +// public void actionPerformed(java.awt.event.ActionEvent evt) { +// removeDirItemActionPerformed(evt); +// } +// }); +// dirPopupMenu.add(removeDirItem); +// } + +// private void removeNodeItemActionPerformed(ActionEvent e) +// { +// +// } +// +// private void addNodeItemActionPerformed(ActionEvent e) +// { +// +// } +// +// private void addDirItemActionPerformed(ActionEvent e) +// { +// +// } +// +// private void removeDirItemActionPerformed(ActionEvent e) +// { +// +// } + +// private void nameTreeMousePressed(java.awt.event.MouseEvent evt) +// { +// if (!this.isEnabled()) +// return; +// +// TreePath clickPath = this.getPathForLocation(evt.getX(), evt.getY()); +// this.setSelectionPath(clickPath); +// +// if (evt.isPopupTrigger()) +// nameTreePopup(evt.getPoint()); +// } +// +// private void nameTreeMouseReleased(java.awt.event.MouseEvent evt) { +// if (!this.isEnabled()) +// return; +// +// if (evt.isPopupTrigger()) +// nameTreePopup(evt.getPoint()); +// } +// +// private void nameTreeValueChanged(javax.swing.event.TreeSelectionEvent evt) { +// +// TreePath lastPath = evt.getOldLeadSelectionPath(); +// if (lastPath != null) +// { +// CustomNode lastSelectedNode = (CustomNode)lastPath.getLastPathComponent(); +// GraphicObject graphic = (GraphicObject)lastSelectedNode.getCustomObject(); +// if (graphic != null) +// graphic.setSelected(false); +// } +// +// TreePath parentPath = this.getSelectionPath(); +// CustomNode selectedNode = null; +// if (parentPath != null) +// { +// selectedNode = (CustomNode) (parentPath.getLastPathComponent()); +// } +// } + +// private void nameTreePopup(java.awt.Point aPos) +// { +// TreePath selectionPath = this.getSelectionPath(); +// if (selectionPath != null) +// { +// CustomNode selectedNode = (CustomNode)(selectionPath.getLastPathComponent()); +// if (selectedNode != null) +// { +// if (selectedNode.isLeaf()) +// spritePopupMenu.show(this, aPos.x, aPos.y); +// else +// dirPopupMenu.show(this, aPos.x, aPos.y); +// +// if (selectedNode.isRoot()) +// removeDirItem.setEnabled(false); +// else +// removeDirItem.setEnabled(true); +// } +// } +// } } diff --git a/src/dfEditor/GraphicPanel.java b/src/dfEditor/GraphicPanel.java index af63a8b..b70f694 100644 --- a/src/dfEditor/GraphicPanel.java +++ b/src/dfEditor/GraphicPanel.java @@ -33,7 +33,6 @@ import dfEditor.command.*; import dfEditor.commands.*; import java.awt.geom.AffineTransform; -import java.awt.KeyboardFocusManager; import java.awt.Polygon; /** @@ -42,6 +41,8 @@ */ public class GraphicPanel extends javax.swing.JDesktopPane implements MouseMotionListener, MouseWheelListener, MouseListener, KeyListener { + private static final long serialVersionUID = -4899540286578963025L; + private static final int SELECT_BUTTON = MouseEvent.BUTTON1; private static final int DRAG_BUTTON = MouseEvent.BUTTON3; private static final int DRAG_BUTTON_2 = MouseEvent.BUTTON2; diff --git a/src/dfEditor/GridGraphicPanel.java b/src/dfEditor/GridGraphicPanel.java index 21c1609..df1c78f 100644 --- a/src/dfEditor/GridGraphicPanel.java +++ b/src/dfEditor/GridGraphicPanel.java @@ -32,6 +32,8 @@ */ public class GridGraphicPanel extends GraphicPanel { + private static final long serialVersionUID = -4080529562213762191L; + protected Dimension tileSize = null; protected Dimension padding = null; diff --git a/src/dfEditor/ImageUtil.java b/src/dfEditor/ImageUtil.java index b558445..3f3ccf7 100644 --- a/src/dfEditor/ImageUtil.java +++ b/src/dfEditor/ImageUtil.java @@ -56,8 +56,8 @@ public static VolatileImage createVolatileImage(int width, int height, int trans public static VolatileImage createVolatileImage(BufferedImage bi) { - GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment(); - GraphicsConfiguration gc = ge.getDefaultScreenDevice().getDefaultConfiguration(); +// GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment(); +// GraphicsConfiguration gc = ge.getDefaultScreenDevice().getDefaultConfiguration(); VolatileImage vimage = createVolatileImage(bi.getWidth(), bi.getHeight(), java.awt.Transparency.TRANSLUCENT); diff --git a/src/dfEditor/IntegerTextField.java b/src/dfEditor/IntegerTextField.java index 0dfaf63..e5a0b4d 100644 --- a/src/dfEditor/IntegerTextField.java +++ b/src/dfEditor/IntegerTextField.java @@ -30,6 +30,8 @@ public class IntegerTextField extends JTextField { + private static final long serialVersionUID = 8460196509077061513L; + final static String badchars = "`~!@#$%^&*()_+=\\|\"':;?/>.<, "; diff --git a/src/dfEditor/MathUtil.java b/src/dfEditor/MathUtil.java index 67972a3..80763ac 100644 --- a/src/dfEditor/MathUtil.java +++ b/src/dfEditor/MathUtil.java @@ -21,7 +21,6 @@ import java.awt.Rectangle; import java.awt.Point; -import java.awt.geom.*; /** * diff --git a/src/dfEditor/PixelBuffer.java b/src/dfEditor/PixelBuffer.java index 313f040..5150718 100644 --- a/src/dfEditor/PixelBuffer.java +++ b/src/dfEditor/PixelBuffer.java @@ -271,10 +271,10 @@ public Rectangle getRectAroundSpriteAtPoint(final Point aPoint) public void makeColourTransparent(int aCol32) { int c = aCol32; - int a = (c & 0xff000000) >> 24; - int r = (c & 0x00ff0000) >> 16; - int g = (c & 0x0000ff00) >> 8; - int b = (c & 0x000000ff); +// int a = (c & 0xff000000) >> 24; +// int r = (c & 0x00ff0000) >> 16; +// int g = (c & 0x0000ff00) >> 8; +// int b = (c & 0x000000ff); c = aCol32 & 0x00ffffff; for (int y=0; y<_imgH; ++y) diff --git a/src/dfEditor/PixelPacker.java b/src/dfEditor/PixelPacker.java index 3e34a5c..c6c9720 100644 --- a/src/dfEditor/PixelPacker.java +++ b/src/dfEditor/PixelPacker.java @@ -20,7 +20,6 @@ package dfEditor; import java.awt.Rectangle; //import java.util.ArrayList; -import java.util.Enumeration; import java.awt.image.BufferedImage; /** diff --git a/src/dfEditor/SelectionBox.java b/src/dfEditor/SelectionBox.java index 1d3e404..7516df2 100644 --- a/src/dfEditor/SelectionBox.java +++ b/src/dfEditor/SelectionBox.java @@ -19,7 +19,6 @@ package dfEditor; -import dfEditor.*; import java.awt.Rectangle; import java.awt.Graphics; import java.awt.Color; diff --git a/src/dfEditor/SimpleGraphicPanel.java b/src/dfEditor/SimpleGraphicPanel.java index 5a5d2dd..59cff28 100644 --- a/src/dfEditor/SimpleGraphicPanel.java +++ b/src/dfEditor/SimpleGraphicPanel.java @@ -19,7 +19,6 @@ package dfEditor; -import java.awt.Color; import java.awt.Graphics; import java.awt.Point; @@ -29,6 +28,8 @@ */ public class SimpleGraphicPanel extends javax.swing.JPanel { + private static final long serialVersionUID = 8476099771120754394L; + private GraphicObject graphic = null; public SimpleGraphicPanel() diff --git a/src/dfEditor/SingleOrMultiDialog.java b/src/dfEditor/SingleOrMultiDialog.java index 0f48c8f..7949d02 100644 --- a/src/dfEditor/SingleOrMultiDialog.java +++ b/src/dfEditor/SingleOrMultiDialog.java @@ -32,6 +32,7 @@ * @author s4m20 */ public class SingleOrMultiDialog extends javax.swing.JDialog { + private static final long serialVersionUID = -50351122231827164L; private int selectedButton = -1; @@ -46,7 +47,7 @@ public SingleOrMultiDialog(java.awt.Frame parent, boolean modal) { * WARNING: Do NOT modify this code. The content of this method is * always regenerated by the Form Editor. */ - @SuppressWarnings("unchecked") +// @SuppressWarnings("unchecked") // //GEN-BEGIN:initComponents private void initComponents() { diff --git a/src/dfEditor/SpriteGraphic.java b/src/dfEditor/SpriteGraphic.java index da58713..704a10c 100644 --- a/src/dfEditor/SpriteGraphic.java +++ b/src/dfEditor/SpriteGraphic.java @@ -32,7 +32,7 @@ public class SpriteGraphic extends GraphicObject { private static final Color SELECTION_COLOUR = new Color(100, 255, 100, 150); - private static final int SELECTION_BORDER = 0; +// private static final int SELECTION_BORDER = 0; private VolatileImage vImage; private VolatileImage selectedVImage; diff --git a/src/dfEditor/SpriteImageController.java b/src/dfEditor/SpriteImageController.java index bb00c53..f68ccac 100644 --- a/src/dfEditor/SpriteImageController.java +++ b/src/dfEditor/SpriteImageController.java @@ -38,7 +38,6 @@ import javax.imageio.ImageIO; import javax.swing.tree.TreePath; import javax.swing.*; -import java.awt.event.ActionEvent; import java.util.ArrayList; import java.awt.Rectangle; import javax.swing.tree.TreeSelectionModel; @@ -48,6 +47,8 @@ */ public class SpriteImageController extends dfEditorPanel implements GraphicPanelChangeListener { + private static final long serialVersionUID = -3064366728022386199L; + protected CustomNode _lastSelectedDirNode; private File savedImageFile = null; private String savedImageFormat = null; @@ -517,7 +518,7 @@ private void addNodeToPanel(CustomNode aNode, BufferedImage aImage) // } // } - private void addNodeToRectList(final CustomNode aNode, final ArrayList aList) + private void addNodeToRectList(final CustomNode aNode, final ArrayList aList) { if (aNode.isLeaf()) { @@ -610,7 +611,7 @@ private File[] showSetImageChooser() * WARNING: Do NOT modify this code. The content of this method is * always regenerated by the Form Editor. */ - @SuppressWarnings("unchecked") +// @SuppressWarnings("unchecked") // //GEN-BEGIN:initComponents private void initComponents() { @@ -1004,7 +1005,7 @@ private void addSpriteButtonActionPerformed(java.awt.event.ActionEvent evt) {//G if (parentNode == null) parentNode = (CustomNode)nameTree.getModel().getRoot(); - ArrayList graphicList = new ArrayList(); + ArrayList graphicList = new ArrayList(); for (int i=0; i//GEN-BEGIN:initComponents private void initComponents() { diff --git a/src/dfEditor/SpriteList.java b/src/dfEditor/SpriteList.java index b907128..7628e97 100644 --- a/src/dfEditor/SpriteList.java +++ b/src/dfEditor/SpriteList.java @@ -28,11 +28,12 @@ import java.awt.dnd.*; import java.awt.datatransfer.*; import java.awt.Component; -import dfEditor.*; import java.util.ArrayList; -public class SpriteList extends JList implements DropTargetListener +public class SpriteList extends JList implements DropTargetListener { + private static final long serialVersionUID = 5474951744601103787L; + Component dragOrigin = null; private ArrayList nodeDroppedListeners = new ArrayList(); @@ -45,7 +46,7 @@ public void setDragSource(Component aDragSource) { dragOrigin = aDragSource; - DropTarget dropTarget = new DropTarget(this, this); +// DropTarget dropTarget = new DropTarget(this, this); } @@ -78,7 +79,7 @@ public void drop(DropTargetDropEvent dtde) } } - public void dragEnter(DropTargetDragEvent dtde) + public void dragEnter(DropTargetDragEvent dtde) { } diff --git a/src/dfEditor/SpriteTree.java b/src/dfEditor/SpriteTree.java index cfc775f..8dcf1df 100644 --- a/src/dfEditor/SpriteTree.java +++ b/src/dfEditor/SpriteTree.java @@ -19,7 +19,6 @@ package dfEditor; -import dfEditor.*; import javax.swing.JTree; import javax.swing.tree.*; import java.util.Observer; @@ -29,7 +28,6 @@ import java.awt.event.*; import java.util.ArrayList; import java.awt.dnd.*; -import java.awt.datatransfer.*; import java.awt.Cursor; import java.awt.datatransfer.StringSelection; /** @@ -38,6 +36,8 @@ */ public class SpriteTree extends JTree implements Observer, DragGestureListener, DragSourceListener { + private static final long serialVersionUID = 6639226174395866378L; + private ArrayList treeListeners = new ArrayList(); private DragSource dragSource = null; @@ -159,6 +159,8 @@ public void setupCellRenderer() setCellRenderer(new DefaultTreeCellRenderer() { + private static final long serialVersionUID = 2859544854853678378L; + public Component getTreeCellRendererComponent(javax.swing.JTree pTree, Object pValue, boolean pIsSelected, boolean pIsExpanded, boolean pIsLeaf, int pRow, boolean pHasFocus) @@ -252,7 +254,7 @@ public CustomNode[] getSelectedNodes() if (selectedNodes != null) for (int i=0; i aList) { if (aNode.isLeaf()) { @@ -338,7 +340,7 @@ private void addNodeToPanel(CustomNode aNode) * WARNING: Do NOT modify this code. The content of this method is * always regenerated by the Form Editor. */ - @SuppressWarnings("unchecked") +// @SuppressWarnings("unchecked") // //GEN-BEGIN:initComponents private void initComponents() { diff --git a/src/dfEditor/SpritesheetPanel.java b/src/dfEditor/SpritesheetPanel.java index 9202c55..b0f3d7a 100644 --- a/src/dfEditor/SpritesheetPanel.java +++ b/src/dfEditor/SpritesheetPanel.java @@ -32,6 +32,8 @@ */ public class SpritesheetPanel extends GraphicPanel { + private static final long serialVersionUID = 5655250269255383916L; + private PixelBuffer _pix; private SpritesheetController _controller; private ImageModifiedListener _imgModifiedListener; diff --git a/src/dfEditor/TabComponent.java b/src/dfEditor/TabComponent.java index 3137781..c3c2770 100644 --- a/src/dfEditor/TabComponent.java +++ b/src/dfEditor/TabComponent.java @@ -38,6 +38,8 @@ */ public class TabComponent extends JPanel { + private static final long serialVersionUID = 497302787512471532L; + private JTabbedPane tabbedPane; public TabComponent(JTabbedPane aPane) @@ -48,6 +50,8 @@ public TabComponent(JTabbedPane aPane) JLabel title = new JLabel() { + private static final long serialVersionUID = -5960294279327934898L; + public String getText() { int index = tabbedPane.indexOfTabComponent(TabComponent.this); @@ -69,6 +73,8 @@ public String getText() private class CloseButton extends JButton implements ActionListener { + private static final long serialVersionUID = 7329789728650956272L; + public CloseButton() { super(); diff --git a/src/dfEditor/animation/AnimationCell.java b/src/dfEditor/animation/AnimationCell.java index 5887f96..e9bb5f7 100644 --- a/src/dfEditor/animation/AnimationCell.java +++ b/src/dfEditor/animation/AnimationCell.java @@ -23,7 +23,6 @@ import java.util.ArrayList; import java.awt.Graphics; import java.awt.Graphics2D; -import java.awt.Color; import java.awt.image.VolatileImage; import java.awt.GraphicsEnvironment; import java.awt.GraphicsConfiguration; diff --git a/src/dfEditor/animation/AnimationController.java b/src/dfEditor/animation/AnimationController.java index 85b999f..07b2fbd 100644 --- a/src/dfEditor/animation/AnimationController.java +++ b/src/dfEditor/animation/AnimationController.java @@ -44,11 +44,7 @@ import java.awt.event.ActionEvent; import dfEditor.CustomComponents.*; import javax.swing.JTextField; -import javax.swing.plaf.basic.*; -import java.awt.Dimension; -import java.beans.PropertyVetoException; import java.awt.*; -import java.awt.event.FocusListener; /** * * @author Owner @@ -63,6 +59,8 @@ public class AnimationController extends dfEditorPanel implements ActionListener, InternalFrameListener { + private static final long serialVersionUID = 4007698055412556291L; + private BufferedImage bufferedImage = null; private AnimationCell workingCell = null; private File loadedSpritesheetFile = null; @@ -79,7 +77,7 @@ public AnimationController(CommandManager aCmdManager, boolean aNew, JLabel aHel viewPanel.addGraphicChangeListener(this); animationStripPanel.setController(this); - animationStripPanel.setCommandManager(aCmdManager); +// animationStripPanel.setCommandManager(aCmdManager); viewPanel.setCommandManager(aCmdManager); animationList.addListSelectionListener(this); @@ -314,13 +312,13 @@ public AnimationCell getWorkingCell() * WARNING: Do NOT modify this code. The content of this method is * always regenerated by the Form Editor. */ - @SuppressWarnings("unchecked") +// @SuppressWarnings("unchecked") // //GEN-BEGIN:initComponents private void initComponents() { jPanel1 = new javax.swing.JPanel(); jScrollPane2 = new javax.swing.JScrollPane(); - animationList = new JListMutable(new DefaultMutableListModel()); + animationList = new JListMutable(new DefaultMutableListModel()); addAnimationButton = new javax.swing.JButton(); removeAnimationButton = new javax.swing.JButton(); duplicateAnimationButton = new javax.swing.JButton(); @@ -382,8 +380,8 @@ private void initComponents() { animationList.setName("animationList"); // NOI18N animationList.setPreferredSize(null); jScrollPane2.setViewportView(animationList); - animationList.setModel(new DefaultMutableListModel()); - ((JListMutable)animationList).setListCellEditor(new DefaultListCellEditor(new JTextField())); + animationList.setModel(new DefaultMutableListModel()); + ((JListMutable)animationList).setListCellEditor(new DefaultListCellEditor(new JTextField())); addAnimationButton.setIcon(resourceMap.getIcon("addAnimationButton.icon")); // NOI18N addAnimationButton.setText(resourceMap.getString("addAnimationButton.text")); // NOI18N @@ -984,7 +982,7 @@ public void stateChanged(javax.swing.event.ChangeEvent evt) { spriteList.setName("spriteList"); // NOI18N jScrollPane3.setViewportView(spriteList); - spriteList.setModel(new DefaultListModel()); + spriteList.setModel(new DefaultListModel()); spriteListControlPanel.getContentPane().add(jScrollPane3, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 110, 110)); @@ -1132,7 +1130,7 @@ private ArrayList addNodeToCell(CustomNode aNode, AnimationCell a graphic.setAnchor(GraphicObject.Anchor.CENTRE); aCell.addSprite(aNode, graphic); graphic.setDescription(aNode.getFullPathName()); - ((DefaultListModel)spriteList.getModel()).addElement(graphic); + ((DefaultListModel)spriteList.getModel()).addElement(graphic); if (aCell == workingCell) { @@ -1228,7 +1226,7 @@ private void removeAnimationButtonActionPerformed(java.awt.event.ActionEvent evt private Animation getWorkingAnimation() { - DefaultMutableListModel model = (DefaultMutableListModel)animationList.getModel(); + DefaultMutableListModel model = (DefaultMutableListModel)animationList.getModel(); int index = animationList.getSelectedIndex(); if (index >= 0) { @@ -1272,7 +1270,7 @@ private void delaySpinnerStateChanged(javax.swing.event.ChangeEvent evt) {//GEN- }//GEN-LAST:event_delaySpinnerStateChanged private void playButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_playButtonActionPerformed - Animation animation = getWorkingAnimation(); +// Animation animation = getWorkingAnimation(); animationStripPanel.addAnimationStripListener(this); @@ -1438,7 +1436,7 @@ private void populateSpriteListFromCell(AnimationCell aCell) if (aCell == getWorkingCell()) selected = viewPanel.selectedGraphics(); - DefaultListModel model = (DefaultListModel)spriteList.getModel(); + DefaultListModel model = (DefaultListModel)spriteList.getModel(); model.clear(); if (aCell != null) @@ -1448,12 +1446,12 @@ private void populateSpriteListFromCell(AnimationCell aCell) { array.get(i).setDescription(aCell.nodeForGraphic(array.get(i)).getFullPathName()); model.addElement(array.get(i)); - array.get(i).setDescription(aCell.nodeForGraphic(array.get(i)).getFullPathName()); + array.get(i).setDescription(aCell.nodeForGraphic(array.get(i)).getFullPathName()); } if (selected != null) { - int[] indices = new int[selected.size()]; + int[] indices = new int[selected.size()]; for (int i=0; i model = (DefaultMutableListModel)animationList.getModel(); ArrayList list = new ArrayList(); for (int i=0; i)spriteList.getModel()).elementAt(i) == aGraphic) bFound = true; } if (!bFound) - ((DefaultListModel)spriteList.getModel()).addElement(aGraphic); + ((DefaultListModel)spriteList.getModel()).addElement(aGraphic); workingCell.rebuild(); animationStripPanel.repaint(); @@ -1940,7 +1938,7 @@ public void graphicErased(GraphicPanel aPanel, GraphicObject aGraphic) workingCell.removeGraphic(aGraphic); workingCell.rebuild(); - ((DefaultListModel)spriteList.getModel()).removeElement(aGraphic); + ((DefaultListModel)spriteList.getModel()).removeElement(aGraphic); animationStripPanel.repaint(); } @@ -1970,13 +1968,15 @@ public void valueChanged(ListSelectionEvent e) { if (! e.getValueIsAdjusting()) //finished adjusting { - JList list = (JList)e.getSource(); +// JList list = (JList)e.getSource(); + Object source = e.getSource(); - int selectedIndices[] = list.getSelectedIndices(); +// int selectedIndices[] = list.getSelectedIndices(); - if (list == animationList) + if (source == animationList) { - DefaultMutableListModel model = (DefaultMutableListModel)list.getModel(); + int selectedIndices[] = animationList.getSelectedIndices(); + DefaultMutableListModel model = (DefaultMutableListModel)animationList.getModel(); if(selectedIndices.length > 0) { @@ -2001,15 +2001,17 @@ public void valueChanged(ListSelectionEvent e) loopSpinner.setEnabled(false); } - boolean bEnabled = (! ((DefaultMutableListModel)list.getModel()).isEmpty()) && (list.getSelectedIndex() >= 0); + boolean bEnabled = (! ((DefaultMutableListModel)animationList.getModel()).isEmpty()) && (animationList.getSelectedIndex() >= 0); removeAnimationButton.setEnabled(bEnabled); duplicateAnimationButton.setEnabled(bEnabled); exportGifButton.setEnabled(bEnabled); } - else if (list == spriteList) + else if (source == spriteList) { - DefaultListModel model = (DefaultListModel)spriteList.getModel(); - for (int i=0; i model = (DefaultListModel)spriteList.getModel(); + for (int i=0; i animationList; private dfEditor.animation.AnimationPanel animationPanel1; private dfEditor.animation.AnimationStripPanel animationStripPanel; private javax.swing.JScrollPane animationStripScrollPane; diff --git a/src/dfEditor/animation/AnimationPanel.java b/src/dfEditor/animation/AnimationPanel.java index 608cbad..3ddfe68 100644 --- a/src/dfEditor/animation/AnimationPanel.java +++ b/src/dfEditor/animation/AnimationPanel.java @@ -30,6 +30,8 @@ */ public class AnimationPanel extends GraphicPanel implements DropTargetListener { + private static final long serialVersionUID = -7780118853307151731L; + private boolean bFirstDraw = true; private ArrayList nodeDroppedListeners = new ArrayList(); private AnimationCell[] onionSkins = null; @@ -210,7 +212,7 @@ public void addNodeDroppedListener(NodeDroppedListener aListener) public void setDragSource(Component aDragSource) { - DropTarget dropTarget = new DropTarget(this, this); +// DropTarget dropTarget = new DropTarget(this, this); } diff --git a/src/dfEditor/animation/AnimationStripPanel.java b/src/dfEditor/animation/AnimationStripPanel.java index 420d5ba..70fd1e5 100644 --- a/src/dfEditor/animation/AnimationStripPanel.java +++ b/src/dfEditor/animation/AnimationStripPanel.java @@ -36,7 +36,6 @@ import javax.swing.Timer; import java.awt.event.ActionListener; import java.awt.event.ActionEvent; -import dfEditor.command.*; import dfEditor.MathUtil; @@ -47,6 +46,8 @@ */ public class AnimationStripPanel extends javax.swing.JPanel implements AnimationDataListener, MouseMotionListener, MouseListener, ActionListener { + private static final long serialVersionUID = -9050639784626405443L; + private Animation animation = null; private ArrayList slotList = null; private AnimationController controller = null; @@ -56,7 +57,7 @@ public class AnimationStripPanel extends javax.swing.JPanel implements Animation private int currentSlotInAnimation = -1; private int currentSlotInAnimationFramesLeft = -1; private ArrayList stripListeners = null; - private CommandManager commandManager = null; +// private CommandManager commandManager = null; int currentLoop = 0; public AnimationStripPanel() @@ -100,10 +101,10 @@ public void setAnimation(Animation aAnimation) repaint(); } - public void setCommandManager(CommandManager aManager) - { - this.commandManager = aManager; - } +// public void setCommandManager(CommandManager aManager) +// { +// this.commandManager = aManager; +// } public void cellAdded(Animation aAnimation, AnimationCell aCell) { @@ -174,29 +175,29 @@ private void addCell(AnimationCell aCell) repaint(); } - private void removeCell(AnimationCell aCell) - { - for (int i=0; i undoStack; + private Stack redoStack; private Component undoComponent; private Component redoComponent; @@ -56,8 +56,8 @@ public void setListener(CommandManagerListener aListener) private void init() { - undoStack = new Stack(); - redoStack = new Stack(); + undoStack = new Stack(); + redoStack = new Stack(); } public void setUndoComponent(Component aUndoComponent) diff --git a/src/dfEditor/commands/AddAnimationCommand.java b/src/dfEditor/commands/AddAnimationCommand.java index 62a5d78..867b912 100644 --- a/src/dfEditor/commands/AddAnimationCommand.java +++ b/src/dfEditor/commands/AddAnimationCommand.java @@ -21,6 +21,8 @@ import dfEditor.command.UndoableCommand; import dfEditor.animation.*; + +import javax.swing.DefaultListModel; import javax.swing.JList; import dfEditor.CustomComponents.DefaultMutableListModel; @@ -31,17 +33,17 @@ public class AddAnimationCommand extends UndoableCommand { Animation _animation; - JList _animationList; + JList _animationList; - public AddAnimationCommand(JList aAnimationList, Animation aAnimation) + public AddAnimationCommand(JList aAnimationList, Animation aAnimation) { _animation = aAnimation; - _animationList = aAnimationList; + _animationList = aAnimationList; } public boolean execute() { - ((DefaultMutableListModel)_animationList.getModel()).addElement(_animation); + ((DefaultListModel)_animationList.getModel()).addElement(_animation); _animationList.setSelectedValue(_animation, true); return true; @@ -49,7 +51,7 @@ public boolean execute() public void undo() { - DefaultMutableListModel model = (DefaultMutableListModel)_animationList.getModel(); + DefaultMutableListModel model = (DefaultMutableListModel)_animationList.getModel(); model.removeElement(_animation); } } diff --git a/src/dfEditor/commands/AddCellCommand.java b/src/dfEditor/commands/AddCellCommand.java index b6bfcdc..2b50279 100644 --- a/src/dfEditor/commands/AddCellCommand.java +++ b/src/dfEditor/commands/AddCellCommand.java @@ -21,10 +21,6 @@ import dfEditor.command.UndoableCommand; import dfEditor.animation.*; -import java.util.ArrayList; -import dfEditor.GraphicObject; -import dfEditor.SpriteGraphic; -import dfEditor.CustomNode; /** * diff --git a/src/dfEditor/commands/AddDirNodeCommand.java b/src/dfEditor/commands/AddDirNodeCommand.java index e420bf3..d81426d 100644 --- a/src/dfEditor/commands/AddDirNodeCommand.java +++ b/src/dfEditor/commands/AddDirNodeCommand.java @@ -20,8 +20,6 @@ package dfEditor.commands; import dfEditor.CustomNode; -import dfEditor.commands.*; -import dfEditor.*; import javax.swing.tree.TreePath; import javax.swing.tree.DefaultTreeModel; import javax.swing.tree.DefaultMutableTreeNode; diff --git a/src/dfEditor/commands/AddGraphicListToSheetCommand.java b/src/dfEditor/commands/AddGraphicListToSheetCommand.java index b24e156..8651d18 100644 --- a/src/dfEditor/commands/AddGraphicListToSheetCommand.java +++ b/src/dfEditor/commands/AddGraphicListToSheetCommand.java @@ -21,7 +21,6 @@ import java.util.ArrayList; import dfEditor.command.*; -import dfEditor.commands.*; import dfEditor.*; /** diff --git a/src/dfEditor/commands/AddGraphicToSheetCommand.java b/src/dfEditor/commands/AddGraphicToSheetCommand.java index ce6649d..eb88f6d 100644 --- a/src/dfEditor/commands/AddGraphicToSheetCommand.java +++ b/src/dfEditor/commands/AddGraphicToSheetCommand.java @@ -19,10 +19,8 @@ package dfEditor.commands; -import dfEditor.commands.*; import dfEditor.*; import dfEditor.command.UndoableCommand; -import java.awt.Color; /** * diff --git a/src/dfEditor/commands/AddLeafNodeCommand.java b/src/dfEditor/commands/AddLeafNodeCommand.java index 5a22880..882b411 100644 --- a/src/dfEditor/commands/AddLeafNodeCommand.java +++ b/src/dfEditor/commands/AddLeafNodeCommand.java @@ -20,8 +20,6 @@ package dfEditor.commands; import dfEditor.CustomNode; -import dfEditor.commands.*; -import dfEditor.*; import javax.swing.tree.TreePath; import javax.swing.tree.DefaultTreeModel; import javax.swing.tree.DefaultMutableTreeNode; diff --git a/src/dfEditor/commands/AddNodeCommand.java b/src/dfEditor/commands/AddNodeCommand.java index 479d537..1dc3aa1 100644 --- a/src/dfEditor/commands/AddNodeCommand.java +++ b/src/dfEditor/commands/AddNodeCommand.java @@ -20,8 +20,6 @@ package dfEditor.commands; import dfEditor.CustomNode; -import dfEditor.commands.*; -import dfEditor.*; import javax.swing.JTree; import javax.swing.tree.DefaultMutableTreeNode; import javax.swing.tree.TreePath; diff --git a/src/dfEditor/commands/AddSpriteToCellCommand.java b/src/dfEditor/commands/AddSpriteToCellCommand.java index 5ebafa7..55854db 100644 --- a/src/dfEditor/commands/AddSpriteToCellCommand.java +++ b/src/dfEditor/commands/AddSpriteToCellCommand.java @@ -19,7 +19,6 @@ package dfEditor.commands; -import dfEditor.commands.*; import dfEditor.animation.*; import dfEditor.*; import dfEditor.command.UndoableCommand; diff --git a/src/dfEditor/commands/FlipSpriteListCommand.java b/src/dfEditor/commands/FlipSpriteListCommand.java index e4f3f07..c5775bc 100644 --- a/src/dfEditor/commands/FlipSpriteListCommand.java +++ b/src/dfEditor/commands/FlipSpriteListCommand.java @@ -21,7 +21,6 @@ import java.util.ArrayList; import dfEditor.command.*; -import dfEditor.commands.*; import dfEditor.*; public class FlipSpriteListCommand extends UndoableCommand diff --git a/src/dfEditor/commands/MoveGraphicCommand.java b/src/dfEditor/commands/MoveGraphicCommand.java index d899088..d4740a6 100644 --- a/src/dfEditor/commands/MoveGraphicCommand.java +++ b/src/dfEditor/commands/MoveGraphicCommand.java @@ -23,7 +23,6 @@ import java.awt.Rectangle; import dfEditor.GraphicObject; import dfEditor.GraphicPanel; -import java.util.ArrayList; /** * diff --git a/src/dfEditor/commands/RemoveAnimGraphicCommand.java b/src/dfEditor/commands/RemoveAnimGraphicCommand.java index d516042..06b0082 100644 --- a/src/dfEditor/commands/RemoveAnimGraphicCommand.java +++ b/src/dfEditor/commands/RemoveAnimGraphicCommand.java @@ -21,7 +21,6 @@ import dfEditor.command.UndoableCommand; import dfEditor.animation.*; -import java.util.ArrayList; import dfEditor.*; /** * diff --git a/src/dfEditor/commands/RemoveAnimationCommand.java b/src/dfEditor/commands/RemoveAnimationCommand.java index 4084fcc..f2ac656 100644 --- a/src/dfEditor/commands/RemoveAnimationCommand.java +++ b/src/dfEditor/commands/RemoveAnimationCommand.java @@ -21,8 +21,8 @@ import dfEditor.command.UndoableCommand; import dfEditor.animation.*; -import java.util.ArrayList; -import dfEditor.*; + +import javax.swing.DefaultListModel; import javax.swing.JList; import dfEditor.CustomComponents.DefaultMutableListModel; @@ -34,10 +34,10 @@ public class RemoveAnimationCommand extends UndoableCommand { private Animation _animation; - JList _animationList; + JList _animationList; int index = -1; - public RemoveAnimationCommand(JList aAnimationList, Animation aAnimation) + public RemoveAnimationCommand(JList aAnimationList, Animation aAnimation) { _animation = aAnimation; _animationList = aAnimationList; @@ -51,7 +51,7 @@ public boolean execute() index = getIndexOfObjectInList(_animation, _animationList); if (index >= 0 && index < _animationList.getModel().getSize()) { - ((DefaultMutableListModel)_animationList.getModel()).removeElement(_animation); + ((DefaultMutableListModel)_animationList.getModel()).removeElement(_animation); return true; } @@ -63,10 +63,10 @@ public void undo() if (_animation == null) return; - ((DefaultMutableListModel)_animationList.getModel()).add(index, _animation); + ((DefaultListModel)_animationList.getModel()).add(index, _animation); } - private int getIndexOfObjectInList(Object aObj, JList aList) + private int getIndexOfObjectInList(Object aObj, JList aList) { for (int i=0; i//GEN-BEGIN:initComponents private void initComponents() { diff --git a/src/dfEditor/io/AnimatedGifEncoder.java b/src/dfEditor/io/AnimatedGifEncoder.java index b6bfecc..85b9490 100644 --- a/src/dfEditor/io/AnimatedGifEncoder.java +++ b/src/dfEditor/io/AnimatedGifEncoder.java @@ -882,7 +882,7 @@ public byte[] process() { */ public void unbiasnet() { - int i, j; + int i; for (i = 0; i < netsize; i++) { network[i][0] >>= netbiasshift; diff --git a/src/dfEditor/io/AnimationSetReader.java b/src/dfEditor/io/AnimationSetReader.java index f464618..9f43433 100644 --- a/src/dfEditor/io/AnimationSetReader.java +++ b/src/dfEditor/io/AnimationSetReader.java @@ -22,7 +22,6 @@ import java.io.File; import javax.xml.parsers.*; import org.w3c.dom.*; -import javax.swing.tree.DefaultTreeModel; import dfEditor.CustomNode; import dfEditor.SpriteTree; import java.awt.Rectangle; @@ -73,7 +72,7 @@ public String getSpriteSheetPath() public ArrayList getAnimations(SpriteTree aSpriteTree, BufferedImage aImage) throws Exception { - ArrayList animations = new ArrayList(); + ArrayList animations = new ArrayList(); NodeList animNodeList = doc.getElementsByTagName("anim"); for (int i=0; i