Public Member Functions | |
void | run () |
Package Functions | |
ButtonThreadJvn2 (IrcJvn2 i, ButtonType b) | |
Private Attributes | |
IrcJvn2 | irc |
ButtonType | button |
Definition at line 142 of file IrcJvn2.java.
irc.ButtonThreadJvn2.ButtonThreadJvn2 | ( | IrcJvn2 | i, | |
ButtonType | b | |||
) | [package] |
Constructor: initialized the ButtonThread.
i | IRC class to use. | |
b | Which button has been pressed. |
Definition at line 152 of file IrcJvn2.java.
References irc.ButtonThreadJvn2.button, and irc.ButtonThreadJvn2.irc.
void irc.ButtonThreadJvn2.run | ( | ) |
Starts the thread.
Definition at line 162 of file IrcJvn2.java.
References irc.ButtonThreadJvn2.button, irc.IrcJvn2.data, jvn.JvnException.getMessage(), irc.ButtonThreadJvn2.irc, irc.IrcJvn2.sentence, and irc.IrcJvn2.text.
00162 { 00163 try { 00164 if( button == ButtonType.Read ) { 00165 // invoke the method 00166 String s = irc.sentence.read(); 00167 00168 // display the read value 00169 irc.data.setText(s); 00170 irc.text.append(s+"\n"); 00171 00172 } else if( button == ButtonType.Write ) { 00173 // get the value to be written from the buffer 00174 String s = irc.data.getText(); 00175 00176 // invoke the method 00177 irc.sentence.write(s); 00178 } 00179 } catch (JvnException je) { 00180 System.out.println("Javanaise error while processing IRC button action: " + je.getMessage()); 00181 } catch( Exception e ) { 00182 System.out.println( "Error while processing IRC button action: "+e); 00183 } 00184 }
IrcJvn2 irc.ButtonThreadJvn2.irc [private] |
Definition at line 143 of file IrcJvn2.java.
Referenced by irc.ButtonThreadJvn2.ButtonThreadJvn2(), and irc.ButtonThreadJvn2.run().
ButtonType irc.ButtonThreadJvn2.button [private] |
Definition at line 144 of file IrcJvn2.java.
Referenced by irc.ButtonThreadJvn2.ButtonThreadJvn2(), and irc.ButtonThreadJvn2.run().