mirror of https://github.com/rusefi/RomRaider.git
Added ability to view (but not modify) tables over your user level
git-svn-id: http://svn.3splooges.com/romraider-arch/trunk@325 d2e2e1cd-ba16-0410-be16-b7c4453c7c2d
This commit is contained in:
parent
09fe1e3f8c
commit
290f17ac1d
|
@ -44,7 +44,7 @@ public class ECUEditor extends JFrame implements WindowListener, PropertyChangeL
|
|||
private RomTree imageList = new RomTree(imageRoot);
|
||||
private Settings settings = new Settings();
|
||||
private String version = "0.4.0 Beta";
|
||||
private String versionDate = "11/03/2006";
|
||||
private String versionDate = "11/06/2006";
|
||||
private String titleText = "Enginuity v" + version;
|
||||
public MDIDesktopPane rightPanel = new MDIDesktopPane();
|
||||
private Rom lastSelectedRom = null;
|
||||
|
|
|
@ -641,33 +641,48 @@ public abstract class Table extends JPanel implements Serializable {
|
|||
}
|
||||
|
||||
public void increment(double increment) {
|
||||
if (!isStatic && !locked) {
|
||||
if (!isStatic && !locked && !(userLevel > settings.getUserLevel())) {
|
||||
for (DataCell cell : data) {
|
||||
if (cell.isSelected()) {
|
||||
cell.increment(increment);
|
||||
}
|
||||
}
|
||||
} else if (userLevel > settings.getUserLevel()) {
|
||||
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.",
|
||||
"Table cannot be modified",
|
||||
JOptionPane.INFORMATION_MESSAGE);
|
||||
}
|
||||
}
|
||||
|
||||
public void multiply(double factor) {
|
||||
if (!isStatic && !locked) {
|
||||
if (!isStatic && !locked && !(userLevel > settings.getUserLevel())) {
|
||||
for (DataCell cell : data) {
|
||||
if (cell.isSelected()) {
|
||||
cell.multiply(factor);
|
||||
}
|
||||
}
|
||||
} else if (userLevel > settings.getUserLevel()) {
|
||||
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.",
|
||||
"Table cannot be modified",
|
||||
JOptionPane.INFORMATION_MESSAGE);
|
||||
}
|
||||
colorize();
|
||||
}
|
||||
|
||||
public void setRealValue(String realValue) {
|
||||
if (!isStatic && !locked) {
|
||||
if (!isStatic && !locked && !(userLevel > settings.getUserLevel())) {
|
||||
for (DataCell cell : data) {
|
||||
if (cell.isSelected()) {
|
||||
cell.setRealValue(realValue);
|
||||
}
|
||||
}
|
||||
} else if (userLevel > settings.getUserLevel()) {
|
||||
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.",
|
||||
"Table cannot be modified",
|
||||
JOptionPane.INFORMATION_MESSAGE);
|
||||
}
|
||||
colorize();
|
||||
}
|
||||
|
|
|
@ -42,9 +42,9 @@ public class RomTree extends JTree implements MouseListener {
|
|||
|
||||
TableTreeNode node = (TableTreeNode) selectedRow;
|
||||
|
||||
if (!(node.getTable().getUserLevel() > container.getSettings().getUserLevel())) {
|
||||
//if (!(node.getTable().getUserLevel() > container.getSettings().getUserLevel())) {
|
||||
container.displayTable(node.getFrame());
|
||||
}
|
||||
//}
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue