fixed cell increment performance issue

git-svn-id: http://svn.3splooges.com/romraider-arch/trunk@670 d2e2e1cd-ba16-0410-be16-b7c4453c7c2d
This commit is contained in:
kascade 2007-05-06 09:53:10 +00:00
parent 009c473c22
commit 6033a3c1dc
3 changed files with 13 additions and 7 deletions

View File

@ -24,12 +24,14 @@ package enginuity.maps;
import enginuity.util.JEPUtil; import enginuity.util.JEPUtil;
import static javax.swing.BorderFactory.createLineBorder; import static javax.swing.BorderFactory.createLineBorder;
import javax.swing.*; import javax.swing.JLabel;
import javax.swing.border.Border; import javax.swing.border.Border;
import java.awt.*; import java.awt.Color;
import static java.awt.Color.BLACK; import static java.awt.Color.BLACK;
import static java.awt.Color.BLUE; import static java.awt.Color.BLUE;
import static java.awt.Color.RED; import static java.awt.Color.RED;
import java.awt.Dimension;
import java.awt.Font;
import java.awt.event.MouseEvent; import java.awt.event.MouseEvent;
import java.awt.event.MouseListener; import java.awt.event.MouseListener;
import java.io.Serializable; import java.io.Serializable;
@ -220,11 +222,8 @@ public class DataCell extends JLabel implements MouseListener, Serializable {
binValue < maxValue) { binValue < maxValue) {
System.out.println(maxValue + " " + binValue); System.out.println(maxValue + " " + binValue);
increment(increment * 2); increment(increment * 2);
} }
table.colorize();
} }
public void setTable(Table table) { public void setTable(Table table) {

View File

@ -682,6 +682,7 @@ public abstract class Table extends JPanel implements Serializable {
cell.increment(increment); cell.increment(increment);
} }
} }
colorize();
} else if (userLevel > settings.getUserLevel()) { } else if (userLevel > settings.getUserLevel()) {
JOptionPane.showMessageDialog(this, "This table can only be modified by users with a userlevel of \n" + JOptionPane.showMessageDialog(this, "This table can only be modified by users with a userlevel of \n" +
userLevel + " or greater. Click View->User Level to change your userlevel.", userLevel + " or greater. Click View->User Level to change your userlevel.",

View File

@ -31,8 +31,13 @@ import static enginuity.util.TableAxisUtil.getLiveDataRangeForAxis;
import enginuity.xml.RomAttributeParser; import enginuity.xml.RomAttributeParser;
import static javax.swing.BorderFactory.createLineBorder; import static javax.swing.BorderFactory.createLineBorder;
import javax.swing.*; import javax.swing.JLabel;
import java.awt.*; import javax.swing.JPanel;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.GridLayout;
import java.awt.Toolkit;
import java.awt.datatransfer.DataFlavor; import java.awt.datatransfer.DataFlavor;
import java.awt.datatransfer.StringSelection; import java.awt.datatransfer.StringSelection;
import java.awt.datatransfer.UnsupportedFlavorException; import java.awt.datatransfer.UnsupportedFlavorException;
@ -370,6 +375,7 @@ public class Table3D extends Table {
} }
xAxis.increment(increment); xAxis.increment(increment);
yAxis.increment(increment); yAxis.increment(increment);
colorize();
} }
public void multiply(double factor) { public void multiply(double factor) {