Mercurial > hg > RemoteEditor > REPSessionManager
changeset 61:491962300d0a
Slect button for table is made
author | chiaki |
---|---|
date | Fri, 16 Nov 2007 16:08:37 +0900 |
parents | f7463e3cbd0b |
children | c8b66e3d13d1 |
files | rep/RPanel.java |
diffstat | 1 files changed, 7 insertions(+), 43 deletions(-) [+] |
line wrap: on
line diff
--- a/rep/RPanel.java Fri Nov 16 14:53:05 2007 +0900 +++ b/rep/RPanel.java Fri Nov 16 16:08:37 2007 +0900 @@ -62,41 +62,6 @@ //scrollPane = new JScrollPane(textArea); sessionViewer = new SessionViewer(); //viewerPane = new JScrollPane(sessionViewer.getTree()); - - SessionPlus s1 = new SessionPlus(1, "session 1"); - SessionPlus s2 = new SessionPlus(2, "session 2"); - s_list.add(s1); - s_list.add(s2); - - Vector vec = new Vector(); - s_host = "host-1"; - s_port = "port-1"; - s_file = "file-1"; - s_sid = "" + s1.getSID(); - s_eid = "eid-1"; - vec.add(s_host); - vec.add(s_port); - vec.add(s_file); - vec.add(s_sid); - vec.add(s_eid); - - Vector vec2 = new Vector(); - s_host = "host-2"; - s_port = "port-2"; - s_file = "file-2"; - s_sid = "" + s2.getSID(); - s_eid = "eid-2"; - vec2.add(s_host); - vec2.add(s_port); - vec2.add(s_file); - vec2.add(s_sid); - vec2.add(s_eid); - - - //veve = s_list.get(i); - s_tableModel.addRow(vec); - s_tableModel.addRow(vec2); - session_table = new JTable(s_tableModel); s_sp = new JScrollPane(session_table); editor_table = new JTable(e_tableModel); @@ -138,8 +103,8 @@ this.add(s_sp); this.add(e_sp); //this.add(label, BorderLayout.CENTER); - this.add(comboEditor); - this.add(comboSession); + //this.add(comboEditor); + //this.add(comboSession); this.add(buttonSelect); button.addActionListener(this); @@ -155,13 +120,12 @@ host = textField.getText(); listener.connectionOccured(new ConnectionEvent(host)); }else if(event.getSource() == buttonSelect){ - //System.out.println(session_table.getSelectedRow()); - //System.out.println(s_list.get(session_table.getSelectedRow()).getSID()); - //System.out.println(editor_table.getSelectedRow()); - //System.out.println(e_list.get(editor_table.getSelectedRow()).getEID()); - + /* actionListener.ActionOccured(new REPActionEvent((EditorPlus) comboEditor.getSelectedItem(), (SessionPlus)comboSession.getSelectedItem())); + */ + actionListener.ActionOccured(new REPActionEvent((EditorPlus) e_list.get(editor_table.getSelectedRow()), + (SessionPlus)s_list.get(session_table.getSelectedRow()))); } } @@ -202,7 +166,7 @@ Vector session = new Vector(); s_host = " "; s_port = " "; - s_file = " "; + s_file = "" + string; s_sid = "" + sessionID; s_eid = " "; session.add(s_host);