From 0bc4f2c2248af055be716e2e129e89f3dca96d06 Mon Sep 17 00:00:00 2001 From: Tgui Date: Tue, 20 Mar 2007 20:36:13 +0000 Subject: [PATCH] fixed button bug git-svn-id: http://svn.3splooges.com/romraider-arch/trunk@581 d2e2e1cd-ba16-0410-be16-b7c4453c7c2d --- src/enginuity/NewGUI/etable/ETable.java | 28 ++++++++++++++++++------- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/src/enginuity/NewGUI/etable/ETable.java b/src/enginuity/NewGUI/etable/ETable.java index b4ea30d8..dbf60cde 100644 --- a/src/enginuity/NewGUI/etable/ETable.java +++ b/src/enginuity/NewGUI/etable/ETable.java @@ -89,22 +89,18 @@ public class ETable extends JTable{ double temp = 0.0; if(type == ETable.INCREMENT){ temp = (Double)value + amount; - System.out.println("INC"); } - if(type == ETable.DECREMENT){ + else if(type == ETable.DECREMENT){ temp = (Double)value - amount; - System.out.println("DEC"); } - if(type == ETable.MULTIPLY){ + else if(type == ETable.MULTIPLY){ temp = (Double)value * amount; - System.out.println("MULT"); } - if(type == ETable.SET){ + else if(type == ETable.SET){ temp = amount; - System.out.println("SET"); } //theModel.setValueAt(temp, i, j); @@ -122,7 +118,23 @@ public class ETable extends JTable{ Object value = theModel.getValueAt(tempCoord.getX(), tempCoord.getY()); if(value instanceof Double){ - Double temp = (Double)value + amount; + double temp = 0.0; + if(type == ETable.INCREMENT){ + temp = (Double)value + amount; + } + + else if(type == ETable.DECREMENT){ + temp = (Double)value - amount; + } + + else if(type == ETable.MULTIPLY){ + temp = (Double)value * amount; + } + + else if(type == ETable.SET){ + temp = amount; + } + //theModel.setValueAt(temp, i, j); theModel.setDoubleData(tempCoord.getX(),tempCoord.getY(),temp); }