クラス org.objectweb.cjdbc.console.gui.threads.GuiParsingThread

すべてのメンバ一覧

説明

This class defines a GuiParsingThread

作者:
Nicolas Modrzyk
バージョン:
1.0

GuiParsingThread.java46 行で定義されています。

Public メソッド

 GuiParsingThread (JTextPane xmlTextPane)
DTD getDtd ()
void run ()
void keyPressed (KeyEvent e)
void keyReleased (KeyEvent e)
void keyTyped (KeyEvent e)
void setOutputPane (JTextPane rightPane)
void caretUpdate (CaretEvent e)

Private 変数

JTextPane xmlTextPane
JTextPane outputPane
DTDParser dtdparser
DTD dtd


コンストラクタとデストラクタ

org.objectweb.cjdbc.console.gui.threads.GuiParsingThread.GuiParsingThread JTextPane  xmlTextPane  ) 
 

Creates a new GuiParsingThread.java object

引数:
xmlTextPane panel that contains the xml to parse
GuiParsingThread.java61 行で定義されています。

参照先 org.objectweb.cjdbc.console.gui.threads.GuiParsingThread.dtd, と org.objectweb.cjdbc.console.gui.threads.GuiParsingThread.dtdparser.

00062 { 00063 this.xmlTextPane = xmlTextPane; 00064 //xmlTextPane.addCaretListener(this); 00065 try 00066 { 00067 this.dtdparser = new DTDParser(this.getClass().getResource( 00068 "/c-jdbc-controller.dtd")); 00069 dtd = dtdparser.parse(); 00070 } 00071 catch (Exception e) 00072 { 00073 e.printStackTrace(); 00074 } 00075 }


メソッド

void org.objectweb.cjdbc.console.gui.threads.GuiParsingThread.caretUpdate CaretEvent  e  ) 
 

参照:
javax.swing.event.CaretListener#caretUpdate(javax.swing.event.CaretEvent)
GuiParsingThread.java153 行で定義されています。
00154 { 00155 // int pos = e.getDot(); 00156 // String string = xmlTextPane.getText(); 00157 // int low = string.indexOf("<", pos); 00158 // int sup = string.indexOf(">", pos); 00159 // int end = string.indexOf("/>", pos); 00160 // int close = string.indexOf("</", pos); 00161 // 00162 // System.out.println("low:" + low + ":sup:" + sup + ":end:" + end + 00163 // ":close:" 00164 // + close); 00165 // 00166 // String element = null; 00167 // if (low == -1 && end == -1 && close == -1) 00168 // { 00169 // //System.out.println("0"); 00170 // // end of the file last tag 00171 // if (sup == -1) 00172 // sup = string.length() - 2; 00173 // int ind = sup; 00174 // while (string.charAt(ind) != '/') 00175 // ind--; 00176 // element = string.substring(ind + 1, sup); 00177 // } 00178 // else if (lt(sup, low) && lt(sup, end) && lt(sup, close)) 00179 // { 00180 // //System.out.println("1"); 00181 // // we search for an opening tag, like <tag> 00182 // int ind = sup; 00183 // while (string.charAt(ind) != '<') 00184 // ind--; 00185 // element = string.substring(ind + 1, string.indexOf(' ', ind)); 00186 // } 00187 // else if (lt(end, sup) && lt(end, low) && lt(end, close)) 00188 // { 00189 // //System.out.println("2"); 00190 // //we search for a standalone closed tag <tag/> 00191 // int ind = end; 00192 // while (string.charAt(ind) != '<') 00193 // ind--; 00194 // element = string.substring(ind + 1, string.indexOf(' ', ind)); 00195 // } 00196 // else if (lt(low, sup) && lt(low, end) && lt(low, close)) 00197 // { 00198 // //System.out.println("3"); 00199 // //we search for the next starting tag <tag> 00200 // element = string.substring(low + 1, nextLow(string, low)); 00201 // } 00202 // else if (lt(close, sup) && lt(close, end) && close == low) 00203 // { 00204 // //System.out.println("4"); 00205 // //we search for the name of the closing tag <tag>...</tag> 00206 // int space = string.indexOf('>', close + 2); 00207 // element = string.substring(close + 2, space); 00208 // } 00209 // 00210 // DTDElement elm = (DTDElement) dtd.elements.get(element); 00211 // //System.out.println(element); 00212 // 00213 // Hashtable attributes = elm.attributes; 00214 // Enumeration enume = attributes.keys(); 00215 // while (enume.hasMoreElements()) 00216 // { 00217 // DTDAttribute att = (DTDAttribute) attributes.get(enume.nextElement()); 00218 // ////System.out.println(att.name+":"+att.defaultValue); 00219 // } 00220 00221 }

DTD org.objectweb.cjdbc.console.gui.threads.GuiParsingThread.getDtd  ) 
 

Returns the dtd value.

戻り値:
Returns the dtd.
GuiParsingThread.java82 行で定義されています。

参照先 org.objectweb.cjdbc.console.gui.threads.GuiParsingThread.dtd.

00083 { 00084 return dtd; 00085 }

void org.objectweb.cjdbc.console.gui.threads.GuiParsingThread.keyPressed KeyEvent  e  ) 
 

参照:
java.awt.event.KeyListener#keyPressed(java.awt.event.KeyEvent)
GuiParsingThread.java117 行で定義されています。
00118 { 00119 synchronized (this) 00120 { 00121 this.notify(); 00122 } 00123 }

void org.objectweb.cjdbc.console.gui.threads.GuiParsingThread.keyReleased KeyEvent  e  ) 
 

参照:
java.awt.event.KeyListener#keyReleased(java.awt.event.KeyEvent)
GuiParsingThread.java128 行で定義されています。
00129 { 00130 }

void org.objectweb.cjdbc.console.gui.threads.GuiParsingThread.keyTyped KeyEvent  e  ) 
 

参照:
java.awt.event.KeyListener#keyTyped(java.awt.event.KeyEvent)
GuiParsingThread.java135 行で定義されています。
00136 { 00137 00138 }

void org.objectweb.cjdbc.console.gui.threads.GuiParsingThread.run  ) 
 

参照:
java.lang.Runnable#run()
GuiParsingThread.java90 行で定義されています。

参照先 org.objectweb.cjdbc.common.xml.XmlValidator.getExceptions(), org.objectweb.cjdbc.console.gui.threads.GuiParsingThread.outputPane, と org.objectweb.cjdbc.console.gui.threads.GuiParsingThread.xmlTextPane.

00091 { 00092 while (true) 00093 { 00094 synchronized (this) 00095 { 00096 try 00097 { 00098 wait(); 00099 } 00100 catch (InterruptedException e) 00101 { 00102 } 00103 XmlValidator validator = new XmlValidator("c-jdbc-controller.dtd", 00104 xmlTextPane.getText()); 00105 StringBuffer buffer = new StringBuffer(); 00106 ArrayList exceptions = validator.getExceptions(); 00107 for (int i = 0; i < exceptions.size(); i++) 00108 buffer.append(((Exception) (exceptions.get(i))).getMessage() + "\n"); 00109 outputPane.setText(buffer.toString()); 00110 } 00111 } 00112 }

void org.objectweb.cjdbc.console.gui.threads.GuiParsingThread.setOutputPane JTextPane  rightPane  ) 
 

Set the output panel for this parsing thread

引数:
rightPane the pane to display the output
GuiParsingThread.java145 行で定義されています。

参照元 org.objectweb.cjdbc.console.gui.CjdbcGuiLoader.defineRightPane().

00146 { 00147 this.outputPane = rightPane; 00148 }


変数

DTD org.objectweb.cjdbc.console.gui.threads.GuiParsingThread.dtd [private]
 

GuiParsingThread.java54 行で定義されています。

参照元 org.objectweb.cjdbc.console.gui.threads.GuiParsingThread.getDtd(), と org.objectweb.cjdbc.console.gui.threads.GuiParsingThread.GuiParsingThread().

DTDParser org.objectweb.cjdbc.console.gui.threads.GuiParsingThread.dtdparser [private]
 

GuiParsingThread.java53 行で定義されています。

参照元 org.objectweb.cjdbc.console.gui.threads.GuiParsingThread.GuiParsingThread().

JTextPane org.objectweb.cjdbc.console.gui.threads.GuiParsingThread.outputPane [private]
 

GuiParsingThread.java52 行で定義されています。

参照元 org.objectweb.cjdbc.console.gui.threads.GuiParsingThread.run().

JTextPane org.objectweb.cjdbc.console.gui.threads.GuiParsingThread.xmlTextPane [private]
 

GuiParsingThread.java51 行で定義されています。

参照元 org.objectweb.cjdbc.console.gui.threads.GuiParsingThread.run().


このクラスの説明は次のファイルから生成されました:
CJDBCversion1.0.4に対してTue Oct 12 15:16:24 2004に生成されました。 doxygen 1.3.8