Mercurial > hg > RemoteEditor > REPSessionManager
view rep/SessionManagerGUIimpl.java @ 343:21ad256c25c2
*** empty log message ***
author | kono |
---|---|
date | Mon, 13 Oct 2008 13:16:31 +0900 |
parents | 83790b8b8174 |
children |
line wrap: on
line source
package rep; import java.awt.Container; import java.util.LinkedList; import javax.swing.JFrame; import javax.swing.SwingUtilities; import rep.gui.RPanel; public class SessionManagerGUIimpl implements Runnable, SessionManagerGUI { public static void main(String[] args){ SessionManagerGUIimpl gui = new SessionManagerGUIimpl(new SessionManagerEventListener() { public void buttonPressed(SessionManagerEvent event) { } public void closeSession(SessionManagerEvent event) { } public void selectSession(SelectButtonEvent selectButtonEvent) { } }); Thread th = new Thread( gui ); th.start(); } public SessionManagerGUIimpl(SessionManagerEventListener manager) { rp = new RPanel(); rp.addREPActionListener(manager); Thread th = new Thread(this); th.start(); } private RPanel rp; private JFrame frame; public void run() { frame = new JFrame("SessionManager"); frame.setBounds(100, 100, 600, 300); Container cont = frame.getContentPane(); cont.add(rp); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.setVisible(true); } /* (non-Javadoc) * @see rep.SessionManagerGUIint#update(java.util.LinkedList, java.util.LinkedList) */ public void update(LinkedList<Session> slist, LinkedList<Editor> elist) { rp.setTableSession(slist); rp.setTableEditor(elist); } public void invokeLater(Runnable doRun) { SwingUtilities.invokeLater(doRun); } }