mirror of https://github.com/rusefi/RomRaider.git
Fixed CEL fix table inheritance not working properly
git-svn-id: http://svn.3splooges.com/romraider-arch/trunk@317 d2e2e1cd-ba16-0410-be16-b7c4453c7c2d
This commit is contained in:
parent
9363146600
commit
20f84bdc69
|
@ -78,6 +78,15 @@ public class TableSwitch extends Table {
|
|||
on[i] = (byte) RomAttributeParser.parseHexString(tokens.nextToken());
|
||||
}
|
||||
}
|
||||
|
||||
public String getOnValues() {
|
||||
StringBuffer values = new StringBuffer();
|
||||
for (int i = 0; i < on.length; i++) {
|
||||
values.append(on[i]);
|
||||
if (i < on.length) values.append(" ");
|
||||
}
|
||||
return values+"";
|
||||
}
|
||||
|
||||
public void setOffValues(String input) {
|
||||
StringTokenizer tokens = new StringTokenizer(input);
|
||||
|
@ -86,6 +95,15 @@ public class TableSwitch extends Table {
|
|||
}
|
||||
}
|
||||
|
||||
public String getOffValues() {
|
||||
StringBuffer values = new StringBuffer();
|
||||
for (int i = 0; i < off.length; i++) {
|
||||
values.append(off[i]);
|
||||
if (i < off.length) values.append(" ");
|
||||
}
|
||||
return values+"";
|
||||
}
|
||||
|
||||
public Dimension getFrameSize() {
|
||||
int height = verticalOverhead + 75;
|
||||
int width = horizontalOverhead;
|
||||
|
|
|
@ -445,10 +445,10 @@ public final class DOMRomUnmarshaller {
|
|||
} else if (n.getNodeName().equalsIgnoreCase("state")) {
|
||||
// set on/off values for switch type
|
||||
if (unmarshallAttribute(n, "name", "").equalsIgnoreCase("on")) {
|
||||
((TableSwitch) table).setOnValues(unmarshallAttribute(n, "data", "0"));
|
||||
((TableSwitch) table).setOnValues(unmarshallAttribute(n, "data", ((TableSwitch)table).getOnValues()));
|
||||
|
||||
} else if (unmarshallAttribute(n, "name", "").equalsIgnoreCase("off")) {
|
||||
((TableSwitch) table).setOffValues(unmarshallAttribute(n, "data", "0"));
|
||||
((TableSwitch) table).setOffValues(unmarshallAttribute(n, "data", ((TableSwitch)table).getOffValues()));
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue