10.07.2015 Views

Lotus Instant Messaging/ Web Conferencing ... - IBM Redbooks

Lotus Instant Messaging/ Web Conferencing ... - IBM Redbooks

Lotus Instant Messaging/ Web Conferencing ... - IBM Redbooks

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

}} else if (event.getSource() == m_btnQueueInOut) {// button under list box (Ask a question) button triggered the eventif (m_btnQueueInOut.getLabel().equals(BTN_TEXT_INSECTION)) {// ask a question by entering the queuem_myself.changeSection(m_queue);} else if (m_btnQueueInOut.getLabel().equals(BTN_TEXT_INQUEUE)) {// did not ask a question, but want to leavem_myself.changeSection(m_lobby);} else if (m_btnQueueInOut.getLabel().equals(BTN_TEXT_FINISHED)) {m_myself.changeSection(m_lobby);m_chScope.select(0);}}After the text message is sent, the applet listens for the translated message to besent back by the activity. Once received, it will add the message to the PanelDiscussion Transcript text area.8.4.14 Leaving the QueueIn the Panel Discussion example, a user can be in two states when they decideto leave the Queue. They could either be finished asking their questions or theycould have decided that they did not want to ask their question anymore. Eitherway, when the user chooses to leave the Queue, they click on a button. Thebutton will either be labeled “No more questions” or “Return to Section”. Whenclicked, the button will trigger the actionPerformed() event. Instead of trying toremember the section the user came from, we decided to take a little short cutand just sent them back to the Lobby. When the user re-enters the Lobby, theserver application will move them back into the appropriate section. Example 8-5shows the relevant process.Example 8-5 Leaving the Queuepublic void actionPerformed(ActionEvent event){PlaceMember receiver = null;// check which object triggered this eventif (event.getSource() == m_btnSend){//// code removed from example//} else if (event.getSource() == m_btnQueueInOut) {// button under list box (Ask a question) button triggered the eventif (m_btnQueueInOut.getLabel().equals(BTN_TEXT_INSECTION)) {// ask a question by entering the queueChapter 8. Places and Place awareness 201

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!