diff options
| author | unknown | 2014-01-31 15:34:22 +0100 |
|---|---|---|
| committer | unknown | 2014-01-31 15:34:22 +0100 |
| commit | f1fdca5246cce4c4c86a7fbb1418f1c758ed6175 (patch) | |
| tree | 4ffef5a757397d3766e9c41cd953c7c4110f8e98 /Dozentenmodul/src/GUI/searchRohling.java | |
| parent | Up - und Download der Images funktionieren nun, wichtig im Dozentenmodul muss... (diff) | |
| download | tutor-module-f1fdca5246cce4c4c86a7fbb1418f1c758ed6175.tar.gz tutor-module-f1fdca5246cce4c4c86a7fbb1418f1c758ed6175.tar.xz tutor-module-f1fdca5246cce4c4c86a7fbb1418f1c758ed6175.zip | |
Up - und Download funktionieren nun, wichtig im Dozentenmodul muss der volle Serverpfad angegeben sein.
Diffstat (limited to 'Dozentenmodul/src/GUI/searchRohling.java')
| -rw-r--r-- | Dozentenmodul/src/GUI/searchRohling.java | 78 |
1 files changed, 31 insertions, 47 deletions
diff --git a/Dozentenmodul/src/GUI/searchRohling.java b/Dozentenmodul/src/GUI/searchRohling.java index 807fc7b3..e0c0a9ba 100644 --- a/Dozentenmodul/src/GUI/searchRohling.java +++ b/Dozentenmodul/src/GUI/searchRohling.java @@ -19,7 +19,11 @@ import javax.swing.JTextField; import java.awt.event.KeyAdapter;
import java.awt.event.KeyEvent;
import java.net.SocketException;
+import java.rmi.RemoteException;
import java.security.NoSuchAlgorithmException;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.util.ArrayList;
import java.awt.List;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
@@ -35,18 +39,24 @@ import java.awt.event.WindowEvent; import javax.swing.JComboBox;
import javax.swing.DefaultComboBoxModel;
+import rmi.RmiClientMethods;
+import server.ServerInterface;
+
+import Models.User;
+
@SuppressWarnings("serial")
public class searchRohling extends JFrame {
private final JPanel contentPanel = new JPanel();
private JTextField textFieldsearch;
List list;
- String[] result;
- String host="132.230.4.16";
+ ArrayList<String> result;
+ String host="141.79.128.121";
+ User user;
int port=21;
- String user="openslx";
- String pass="openslx-ng";
- FTPUtility f=new FTPUtility(host, port, user, pass);
+ RmiClientMethods rmi=new RmiClientMethods();
+ ServerInterface sint=rmi.getInterface();
+ //FTPUtility f=new FTPUtility(host, port, user.getUsername(), user.getPass());
/**
* Launch the application.
*/
@@ -63,7 +73,7 @@ public class searchRohling extends JFrame { /**
* Create the dialog.
*/
- @SuppressWarnings({ "unchecked", "rawtypes" })
+
public searchRohling() {
getContentPane().setEnabled(false);
addWindowListener(new WindowAdapter() {
@@ -105,14 +115,14 @@ public class searchRohling extends JFrame { txtpnBitteWhlenSie.setBounds(10, 36, 509, 42);
panel.add(txtpnBitteWhlenSie);
}
- contentPanel.setBounds(10, 152, 567, 420);
+ contentPanel.setBounds(10, 126, 567, 446);
contentPanel.setBackground(Color.WHITE);
contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5));
getContentPane().add(contentPanel);
contentPanel.setLayout(null);
list = new List();
- list.setBounds(0, 10, 567, 400);
+ list.setBounds(10, 10, 547, 426);
contentPanel.add(list);
{
JPanel buttonPane = new JPanel();
@@ -161,21 +171,8 @@ public class searchRohling extends JFrame { textFieldsearch.addKeyListener(new KeyAdapter() {
@Override
public void keyReleased(KeyEvent arg0) {
- System.out.println(textFieldsearch.getText().toString());
-
- try {
- try {
- f.connect();
- } catch (NoSuchAlgorithmException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- result=f.getAllRohling(textFieldsearch.getText().toString());
- } catch (SocketException | FTPException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- list.removeAll();
+ System.out.println(textFieldsearch.getText().toString());}}
+ /*list.removeAll();
for(int i=0;i<result.length;i++)
{
if(result[i]!=null)
@@ -183,7 +180,7 @@ public class searchRohling extends JFrame { }
}
- });
+ }*/);
textFieldsearch.setBounds(91, 95, 166, 20);
getContentPane().add(textFieldsearch);
textFieldsearch.setColumns(10);
@@ -200,16 +197,6 @@ public class searchRohling extends JFrame { lblName.setBounds(10, 98, 71, 14);
getContentPane().add(lblName);
- JComboBox comboBox = new JComboBox();
- comboBox.setEnabled(false);
- comboBox.setModel(new DefaultComboBoxModel(new String[] {"Windows 7", "Windows 8", "Ubuntu"}));
- comboBox.setBounds(91, 121, 166, 20);
- getContentPane().add(comboBox);
-
- JLabel lblOs = new JLabel("OS:");
- lblOs.setBounds(10, 123, 71, 14);
- getContentPane().add(lblOs);
-
JMenuBar menuBar = new JMenuBar();
setJMenuBar(menuBar);
@@ -229,22 +216,19 @@ public class searchRohling extends JFrame { mnNewMenu_1.add(mntmOtrs);
try {
- try {
- f.connect();
- } catch (NoSuchAlgorithmException e1) {
- // TODO Auto-generated catch block
- e1.printStackTrace();
- }
- result=f.getAllRohling(textFieldsearch.getText().toString());
- list.removeAll();
- for(int i=0;i<result.length;i++)
+ result=sint.getImages();
+
+ for(int i=0; i<result.size();i++)
{
-
- list.add(result[i]);
+ System.out.println(result.get(i).toString());
+ list.add(result.get(i).toString());
}
- } catch (SocketException | FTPException e) {
+
+ //list.removeAll();
+
+ } catch (RemoteException e2) {
// TODO Auto-generated catch block
- e.printStackTrace();
+ e2.printStackTrace();
}
|
