Revision: b79066856f00 Branch: default Author: John Boyer <john.boyer@xxxxxxxxxxxxxxxxx> Date: Fri Jan 18 06:23:47 2013 Log: removed static from semanticsTable http://code.google.com/p/brailleblaster/source/detail?r=b79066856f00&repo=newdesign Modified: /src/main/org/brailleblaster/document/Actions.java /src/main/org/brailleblaster/document/Semantics.java /src/main/org/brailleblaster/document/Styles.java =======================================--- /src/main/org/brailleblaster/document/Actions.java Wed Jan 9 23:35:09 2013 +++ /src/main/org/brailleblaster/document/Actions.java Fri Jan 18 06:23:47 2013
@@ -55,6 +55,11 @@ * They are distinct from styles. */ class Actions { + +Semantics sm; +Actions (final Semantics sm) { +this.sm = sm; +} /** * The various actions that can be carried out on an xml document, in =======================================--- /src/main/org/brailleblaster/document/Semantics.java Tue Jan 15 04:41:13 2013 +++ /src/main/org/brailleblaster/document/Semantics.java Fri Jan 18 06:23:47 2013
@@ -76,9 +76,13 @@ */ private Element rootElement; +private Styles st; +private Actions act; Semantics() { workingDocument = null; semanticsList = null; +st = new Styles(this); +act = new Actions (this); } /** @@ -139,9 +143,9 @@ * being processed is read and each line is used to create an entry in * this table. */ -static SemanticEntry[] semanticsTable = new SemanticEntry[100]; +SemanticEntry[] semanticsTable = new SemanticEntry[100]; int semanticsCount = 0; // Number of entries in semanticsTable -static SemanticEntry getSemanticEntry (int index) { +SemanticEntry getSemanticEntry (int index) { return semanticsTable[index]; } @@ -153,8 +157,6 @@ Hashtable<String, Integer> semanticsLookup = new Hashtable<String, Integer>(); -private Styles st = new Styles(); -private Actions act = new Actions(); private LocaleHandler lh = new LocaleHandler(); private boolean internetAccessRequired; private boolean haveSemanticFile = true; =======================================--- /src/main/org/brailleblaster/document/Styles.java Tue Jan 15 04:41:13 2013 +++ /src/main/org/brailleblaster/document/Styles.java Fri Jan 18 06:23:47 2013
@@ -56,8 +56,9 @@ * etc. are dealt with by action methods in the Actions class.</p> */ class Styles { - -Styles() { +Semantics sm; +Styles (final Semantics sm) { +this.sm = sm; makeStyleTable(); } @@ -243,7 +244,7 @@ * of the stack. If the element does not have a style it returns false. */ boolean startStyle (Semantics.ElementSemantics es) { - Semantics.SemanticEntry se = Semantics.getSemanticEntry + Semantics.SemanticEntry se = sm.getSemanticEntry (es.semanticsIndex); if (!se.operation.equals ("style")) { return false;