From 4747f9d0503f635f2b2fdbf531fb0d3537df3918 Mon Sep 17 00:00:00 2001 From: Jared Gould Date: Tue, 25 Jul 2006 15:52:59 +0000 Subject: [PATCH] Added font graying for locked tables git-svn-id: http://svn.3splooges.com/romraider-arch/trunk@175 d2e2e1cd-ba16-0410-be16-b7c4453c7c2d --- src/enginuity/maps/Table.java | 7 ++++++- src/enginuity/maps/Table3D.java | 13 ++++++++++++- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/src/enginuity/maps/Table.java b/src/enginuity/maps/Table.java index 96911894..428d7dbd 100644 --- a/src/enginuity/maps/Table.java +++ b/src/enginuity/maps/Table.java @@ -308,7 +308,7 @@ public abstract class Table extends JPanel implements Serializable { byteValue[2] = input[storageAddress + i * 4 - ramOffset + 2]; byteValue[3] = input[storageAddress + i * 4 - ramOffset + 3]; data[i].setBinValue(RomAttributeParser.byteToFloat(byteValue, endian)); - + } else { // integer storage type data[i].setBinValue( RomAttributeParser.parseByteValue(input, @@ -321,6 +321,11 @@ public abstract class Table extends JPanel implements Serializable { centerPanel.add(data[i]); data[i].setYCoord(i); data[i].setOriginalValue(data[i].getBinValue()); + + // show locked cell + if (tempLock) { + data[i].setForeground(Color.GRAY); + } } } } diff --git a/src/enginuity/maps/Table3D.java b/src/enginuity/maps/Table3D.java index 5c094585..d52bb52d 100644 --- a/src/enginuity/maps/Table3D.java +++ b/src/enginuity/maps/Table3D.java @@ -95,6 +95,10 @@ public class Table3D extends Table { if (!beforeRam) { ramOffset = container.getRomID().getRamOffset(); } + + // temporarily remove lock + boolean tempLock = locked; + locked = false; // populate axiis try { @@ -134,6 +138,11 @@ public class Table3D extends Table { storageAddress + offset * storageType - ramOffset, storageType)); } + + // show locked cell + if (tempLock) { + data[y][x].setForeground(Color.GRAY); + } centerPanel.add(data[y][x]); data[y][x].setXCoord(y); @@ -142,7 +151,9 @@ public class Table3D extends Table { offset++; } } - //this.colorize(); + + // reset locked status + locked = tempLock; GridLayout topLayout = new GridLayout(2, 1); JPanel topPanel = new JPanel(topLayout);