fixed button bug

git-svn-id: http://svn.3splooges.com/romraider-arch/trunk@581 d2e2e1cd-ba16-0410-be16-b7c4453c7c2d
This commit is contained in:
Tgui 2007-03-20 20:36:13 +00:00
parent 773f2d44bd
commit 0bc4f2c224
1 changed files with 20 additions and 8 deletions

View File

@ -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);
}