741 |
10 Oct 06 |
olle |
1 |
/* |
1652 |
22 May 07 |
gregory |
$Id$ |
741 |
10 Oct 06 |
olle |
3 |
|
1916 |
31 Aug 07 |
jari |
Copyright (C) 2006 Olle Mansson |
1916 |
31 Aug 07 |
jari |
Copyright (C) 2007 Gregory Vincic |
741 |
10 Oct 06 |
olle |
6 |
|
1652 |
22 May 07 |
gregory |
This file is part of Proteios. |
1652 |
22 May 07 |
gregory |
Available at http://www.proteios.org/ |
741 |
10 Oct 06 |
olle |
9 |
|
1652 |
22 May 07 |
gregory |
Proteios is free software; you can redistribute it and/or modify it |
1652 |
22 May 07 |
gregory |
under the terms of the GNU General Public License as published by |
1652 |
22 May 07 |
gregory |
the Free Software Foundation; either version 2 of the License, or |
1652 |
22 May 07 |
gregory |
(at your option) any later version. |
741 |
10 Oct 06 |
olle |
14 |
|
1652 |
22 May 07 |
gregory |
Proteios is distributed in the hope that it will be useful, but |
1652 |
22 May 07 |
gregory |
WITHOUT ANY WARRANTY; without even the implied warranty of |
1652 |
22 May 07 |
gregory |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
1652 |
22 May 07 |
gregory |
General Public License for more details. |
741 |
10 Oct 06 |
olle |
19 |
|
1652 |
22 May 07 |
gregory |
You should have received a copy of the GNU General Public License |
1652 |
22 May 07 |
gregory |
along with this program; if not, write to the Free Software |
1652 |
22 May 07 |
gregory |
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA |
1652 |
22 May 07 |
gregory |
02111-1307, USA. |
1652 |
22 May 07 |
gregory |
24 |
*/ |
741 |
10 Oct 06 |
olle |
25 |
|
741 |
10 Oct 06 |
olle |
// Xerver Free Web Server |
741 |
10 Oct 06 |
olle |
// Copyright (C) 2002-2005 Omid Rouhani |
741 |
10 Oct 06 |
olle |
28 |
// |
741 |
10 Oct 06 |
olle |
29 |
// |
741 |
10 Oct 06 |
olle |
// This program is free software; you can redistribute it and/or |
741 |
10 Oct 06 |
olle |
// modify it under the terms of the GNU General Public License |
741 |
10 Oct 06 |
olle |
// as published by the Free Software Foundation; either version 2 |
741 |
10 Oct 06 |
olle |
// of the License, or (at your option) any later version. |
741 |
10 Oct 06 |
olle |
34 |
// |
741 |
10 Oct 06 |
olle |
// This program is distributed in the hope that it will be useful, |
741 |
10 Oct 06 |
olle |
// but WITHOUT ANY WARRANTY; without even the implied warranty of |
741 |
10 Oct 06 |
olle |
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
741 |
10 Oct 06 |
olle |
// GNU General Public License for more details. |
741 |
10 Oct 06 |
olle |
39 |
// |
741 |
10 Oct 06 |
olle |
// You should have received a copy of the GNU General Public License |
741 |
10 Oct 06 |
olle |
// along with this program; if not, write to the Free Software |
741 |
10 Oct 06 |
olle |
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
741 |
10 Oct 06 |
olle |
43 |
// |
741 |
10 Oct 06 |
olle |
44 |
// |
741 |
10 Oct 06 |
olle |
45 |
// ############################################################# |
741 |
10 Oct 06 |
olle |
// ## YOU CAN CONTACT THE AUTHOR (OMID ROUHANI) AT: ## |
741 |
10 Oct 06 |
olle |
// ## HTTP://WWW.JAVASCRIPT.NU/XERVER/ ## |
741 |
10 Oct 06 |
olle |
48 |
// ## ## |
741 |
10 Oct 06 |
olle |
// ## IF YOUR SOFTWARE IS NOT RELEASED UNDER THE ## |
741 |
10 Oct 06 |
olle |
// ## GNU GENERAL PUBLIC LICENSE (GPL), ## |
741 |
10 Oct 06 |
olle |
// ## PLEASE DO NOT COPY ANYTHING FROM THIS SOURCE CODE!!! ## |
741 |
10 Oct 06 |
olle |
52 |
// ## ## |
741 |
10 Oct 06 |
olle |
// ## FOR FULL LICENSE, PLEASE READ "XERVER LICENSE". ## |
741 |
10 Oct 06 |
olle |
54 |
// ############################################################# |
741 |
10 Oct 06 |
olle |
55 |
|
1652 |
22 May 07 |
gregory |
56 |
package se.lu.thep.coreftpd.ftp_server; |
741 |
10 Oct 06 |
olle |
57 |
|
791 |
23 Oct 06 |
olle |
58 |
import se.lu.thep.coreftpd.common.GUIMethods; |
791 |
23 Oct 06 |
olle |
59 |
import se.lu.thep.coreftpd.common.HostInfo; |
791 |
23 Oct 06 |
olle |
60 |
import se.lu.thep.coreftpd.webserver.MenuOptions; |
791 |
23 Oct 06 |
olle |
61 |
import se.lu.thep.coreftpd.webserver.ProgramWindow; |
741 |
10 Oct 06 |
olle |
62 |
import java.awt.BorderLayout; |
741 |
10 Oct 06 |
olle |
63 |
import java.awt.Color; |
741 |
10 Oct 06 |
olle |
64 |
import java.awt.Container; |
741 |
10 Oct 06 |
olle |
65 |
import javax.swing.BoxLayout; |
741 |
10 Oct 06 |
olle |
66 |
import javax.swing.JLabel; |
741 |
10 Oct 06 |
olle |
67 |
import javax.swing.JTextField; |
741 |
10 Oct 06 |
olle |
68 |
|
741 |
10 Oct 06 |
olle |
69 |
/** |
1652 |
22 May 07 |
gregory |
70 |
* |
1652 |
22 May 07 |
gregory |
* <B>About this class:</B> <BR> |
1652 |
22 May 07 |
gregory |
* This class only contains static methods. It returns Containers with texts |
1652 |
22 May 07 |
gregory |
* such as "FTP server started", "FTP setup shut down" etc. which are used in |
1652 |
22 May 07 |
gregory |
* the Swing mode of Xerver. |
1652 |
22 May 07 |
gregory |
75 |
* |
741 |
10 Oct 06 |
olle |
* @author <a href="http://www.JavaScript.nu/xerver/" TARGET="_top">Omid Rouhani</a> |
741 |
10 Oct 06 |
olle |
* @version 1.0 |
741 |
10 Oct 06 |
olle |
78 |
*/ |
741 |
10 Oct 06 |
olle |
79 |
|
1652 |
22 May 07 |
gregory |
80 |
public class FTPMessages extends GUIMethods { |
1652 |
22 May 07 |
gregory |
81 |
public static final int START_FTP = 0; |
741 |
10 Oct 06 |
olle |
82 |
|
1652 |
22 May 07 |
gregory |
83 |
public static final int STOP_FTP = 1; |
741 |
10 Oct 06 |
olle |
84 |
|
1652 |
22 May 07 |
gregory |
85 |
public static final int START_FTP_SETUP = 2; |
1652 |
22 May 07 |
gregory |
86 |
|
1652 |
22 May 07 |
gregory |
87 |
public static final int STOP_FTP_SETUP = 3; |
1652 |
22 May 07 |
gregory |
88 |
|
1652 |
22 May 07 |
gregory |
89 |
public static final int SERVER_PORT_IN_USE = 4; |
1652 |
22 May 07 |
gregory |
90 |
|
1652 |
22 May 07 |
gregory |
91 |
public static final int SETUP_PORT_IN_USE = 5; |
1652 |
22 May 07 |
gregory |
92 |
|
1652 |
22 May 07 |
gregory |
93 |
public static final int SERVER_PORT_ERROR = 6; |
1652 |
22 May 07 |
gregory |
94 |
|
1652 |
22 May 07 |
gregory |
95 |
public static final int SETUP_PORT_ERROR = 7; |
1652 |
22 May 07 |
gregory |
96 |
|
1652 |
22 May 07 |
gregory |
97 |
public static Container getContainer(int show) { |
1652 |
22 May 07 |
gregory |
98 |
switch (show) { |
1652 |
22 May 07 |
gregory |
99 |
case START_FTP: |
1652 |
22 May 07 |
gregory |
100 |
return showStartFTP(); |
1652 |
22 May 07 |
gregory |
101 |
case STOP_FTP: |
1652 |
22 May 07 |
gregory |
102 |
return showStopFTP(); |
1652 |
22 May 07 |
gregory |
103 |
case START_FTP_SETUP: |
1652 |
22 May 07 |
gregory |
104 |
return showStartFTPSetup(); |
1652 |
22 May 07 |
gregory |
105 |
case STOP_FTP_SETUP: |
1652 |
22 May 07 |
gregory |
106 |
return showStopFTPSetup(); |
1652 |
22 May 07 |
gregory |
107 |
case SERVER_PORT_IN_USE: |
1652 |
22 May 07 |
gregory |
108 |
return showServerPortInUse(); |
1652 |
22 May 07 |
gregory |
109 |
case SETUP_PORT_IN_USE: |
1652 |
22 May 07 |
gregory |
110 |
return showSetupPortInUse(); |
1652 |
22 May 07 |
gregory |
111 |
case SERVER_PORT_ERROR: |
1652 |
22 May 07 |
gregory |
112 |
return showServerPortError(); |
1652 |
22 May 07 |
gregory |
113 |
case SETUP_PORT_ERROR: |
1652 |
22 May 07 |
gregory |
114 |
return showSetupPortError(); |
741 |
10 Oct 06 |
olle |
115 |
} |
741 |
10 Oct 06 |
olle |
116 |
return null; |
741 |
10 Oct 06 |
olle |
117 |
} |
741 |
10 Oct 06 |
olle |
118 |
|
1652 |
22 May 07 |
gregory |
119 |
private static Container showStartFTP() { |
1652 |
22 May 07 |
gregory |
120 |
Container cont = new Container(); |
741 |
10 Oct 06 |
olle |
121 |
cont.setLayout(new BorderLayout()); |
741 |
10 Oct 06 |
olle |
122 |
|
741 |
10 Oct 06 |
olle |
123 |
JTextField addressInfo; |
741 |
10 Oct 06 |
olle |
124 |
JTextField addressInfo2; |
741 |
10 Oct 06 |
olle |
125 |
JLabel txtAboveIP; |
741 |
10 Oct 06 |
olle |
126 |
JLabel txtAboveIP2; |
741 |
10 Oct 06 |
olle |
127 |
|
1652 |
22 May 07 |
gregory |
128 |
Container theFields = new Container(); |
741 |
10 Oct 06 |
olle |
129 |
theFields.setLayout(new BoxLayout(theFields, BoxLayout.Y_AXIS)); |
741 |
10 Oct 06 |
olle |
130 |
|
1652 |
22 May 07 |
gregory |
131 |
txtAboveIP = new JLabel("Your server's outer IP is:"); |
1652 |
22 May 07 |
gregory |
132 |
String s_outerIP = HostInfo.getIPFromInternet(); // Returns null if |
1652 |
22 May 07 |
gregory |
// not detected |
1652 |
22 May 07 |
gregory |
134 |
if (s_outerIP != null) { |
1652 |
22 May 07 |
gregory |
135 |
addressInfo = new JTextField(s_outerIP, 17); |
1652 |
22 May 07 |
gregory |
136 |
} else { |
1652 |
22 May 07 |
gregory |
137 |
addressInfo = new JTextField("IP could not be detected!", 17); |
741 |
10 Oct 06 |
olle |
138 |
} |
741 |
10 Oct 06 |
olle |
139 |
|
1652 |
22 May 07 |
gregory |
140 |
txtAboveIP2 = new JLabel("Your server's local IP is: "); |
1652 |
22 May 07 |
gregory |
141 |
addressInfo2 = new JTextField(HostInfo.getLocalIPorLocalhost(), 17); |
741 |
10 Oct 06 |
olle |
142 |
|
1652 |
22 May 07 |
gregory |
143 |
theFields.add(MenuOptions.make2ContainersTo1ContainerBeside(new JLabel( |
1652 |
22 May 07 |
gregory |
144 |
"Xerver Free FTP Server has been started!"), |
1652 |
22 May 07 |
gregory |
145 |
ProgramWindow.EMPTY_JLABEL)); |
741 |
10 Oct 06 |
olle |
146 |
theFields.add(new JLabel(" ")); |
1652 |
22 May 07 |
gregory |
147 |
theFields.add(MenuOptions.make2ContainersTo1ContainerBeside(MenuOptions |
1652 |
22 May 07 |
gregory |
148 |
.make2ContainersTo1ContainerAbove(txtAboveIP, MenuOptions |
1652 |
22 May 07 |
gregory |
149 |
.make2ContainersTo1ContainerBeside(addressInfo, |
1652 |
22 May 07 |
gregory |
150 |
ProgramWindow.aboutOuterIPButton)), |
1652 |
22 May 07 |
gregory |
151 |
ProgramWindow.EMPTY_JLABEL)); |
741 |
10 Oct 06 |
olle |
152 |
theFields.add(new JLabel(" ")); |
1652 |
22 May 07 |
gregory |
153 |
theFields.add(MenuOptions.make2ContainersTo1ContainerBeside(MenuOptions |
1652 |
22 May 07 |
gregory |
154 |
.make2ContainersTo1ContainerAbove(txtAboveIP2, MenuOptions |
1652 |
22 May 07 |
gregory |
155 |
.make2ContainersTo1ContainerBeside(addressInfo2, |
1652 |
22 May 07 |
gregory |
156 |
ProgramWindow.aboutLocalIPButton)), |
1652 |
22 May 07 |
gregory |
157 |
ProgramWindow.EMPTY_JLABEL)); |
741 |
10 Oct 06 |
olle |
158 |
theFields.add(new JLabel(" ")); |
1652 |
22 May 07 |
gregory |
159 |
theFields.add(MenuOptions.make2ContainersTo1ContainerBeside(new JLabel( |
1652 |
22 May 07 |
gregory |
160 |
"Server is running on port " + FTPServerController.getPort() |
1652 |
22 May 07 |
gregory |
161 |
+ "."), ProgramWindow.EMPTY_JLABEL)); |
741 |
10 Oct 06 |
olle |
162 |
|
1652 |
22 May 07 |
gregory |
163 |
/* |
1652 |
22 May 07 |
gregory |
* theFields.add(new JLabel("Xerver Free FTP Server has been |
1652 |
22 May 07 |
gregory |
* started!")); theFields.add(ProgramWindow.EMPTY_JLABEL); |
1652 |
22 May 07 |
gregory |
* theFields.add(new JLabel("Your server's outer IP is:")); |
1652 |
22 May 07 |
gregory |
* theFields.add(MenuOptions.make2ContainersTo1ContainerBeside(MenuOptions.make2ContainersTo1ContainerBeside(addressInfo,ProgramWindow.aboutOuterIPButton),ProgramWindow.EMPTY_JLABEL)); |
1652 |
22 May 07 |
gregory |
* theFields.add(ProgramWindow.EMPTY_JLABEL); theFields.add(new |
1652 |
22 May 07 |
gregory |
* JLabel("Your server's local IP is:")); |
1652 |
22 May 07 |
gregory |
* theFields.add(MenuOptions.make2ContainersTo1ContainerBeside(MenuOptions.make2ContainersTo1ContainerBeside(addressInfo2,ProgramWindow.aboutLocalIPButton),ProgramWindow.EMPTY_JLABEL)); |
1652 |
22 May 07 |
gregory |
* theFields.add(ProgramWindow.EMPTY_JLABEL); theFields.add(new |
1652 |
22 May 07 |
gregory |
* JLabel("Server is running on port |
1652 |
22 May 07 |
gregory |
* "+FTPServerController.getIP()+".")); |
1652 |
22 May 07 |
gregory |
174 |
*/ |
741 |
10 Oct 06 |
olle |
175 |
|
1652 |
22 May 07 |
gregory |
176 |
cont.add(MenuOptions |
1652 |
22 May 07 |
gregory |
177 |
.make2ContainersTo1ContainerAbove(MenuOptions |
1652 |
22 May 07 |
gregory |
178 |
.make2ContainersTo1ContainerBeside(theFields, |
1652 |
22 May 07 |
gregory |
179 |
ProgramWindow.EMPTY_JLABEL), |
1652 |
22 May 07 |
gregory |
180 |
ProgramWindow.EMPTY_JLABEL), BorderLayout.CENTER); |
1652 |
22 May 07 |
gregory |
// Cont.add(MenuOptions.make2ContainersTo1ContainerAbove(MenuOptions.make2ContainersTo1ContainerBeside(MenuOptions.make2ContainersTo1ContainerAbove(txtAboveIP,addressInfo),EMPTY_JLABEL),EMPTY_JLABEL),BorderLayout.CENTER); |
1652 |
22 May 07 |
gregory |
// Cont.add(MenuOptions.make2ContainersTo1ContainerBeside(MenuOptions.make2ContainersTo1ContainerAbove(txtAboveIP2,addressInfo2),EMPTY_JLABEL),BorderLayout.SOUTH); |
741 |
10 Oct 06 |
olle |
183 |
return cont; |
741 |
10 Oct 06 |
olle |
184 |
|
1652 |
22 May 07 |
gregory |
// return |
1652 |
22 May 07 |
gregory |
// MenuOptions.make2ContainersTo1ContainerAbove(MenuOptions.make2ContainersTo1ContainerBeside(theFields,ProgramWindow.EMPTY_JLABEL),ProgramWindow.EMPTY_JLABEL); |
741 |
10 Oct 06 |
olle |
187 |
|
1652 |
22 May 07 |
gregory |
188 |
/* |
1652 |
22 May 07 |
gregory |
* String [] showThisTextUp=new String [3], showThisTextDown=new String |
1652 |
22 May 07 |
gregory |
* [2]; showThisTextUp[0]="Xerver Free FTP Server has been started!"; |
1652 |
22 May 07 |
gregory |
* showThisTextUp[1]=""; showThisTextUp[2]="Host: "; |
1652 |
22 May 07 |
gregory |
* showThisTextDown[0]=""; showThisTextDown[1]="Server is running on |
1652 |
22 May 07 |
gregory |
* port "+FTPServerController.getPort()+"."; JTextField txtIPAdress=new |
1652 |
22 May 07 |
gregory |
* JTextField(FTPServerController.getIP(), 17); |
1652 |
22 May 07 |
gregory |
* txtIPAdress.setBackground(Color.white); |
1652 |
22 May 07 |
gregory |
* txtIPAdress.setEditable(false); txtIPAdress.setFont(defaultFont); |
1652 |
22 May 07 |
gregory |
* return make2ContainersTo1ContainerAbove( |
1652 |
22 May 07 |
gregory |
* make2ContainersTo1ContainerAbove( |
1652 |
22 May 07 |
gregory |
* giveContainerWithText(showThisTextUp), |
1652 |
22 May 07 |
gregory |
* make2ContainersTo1ContainerBeside( txtIPAdress, new JLabel(""))), |
1652 |
22 May 07 |
gregory |
* giveContainerWithText(showThisTextDown)); |
1652 |
22 May 07 |
gregory |
202 |
*/ |
741 |
10 Oct 06 |
olle |
203 |
|
741 |
10 Oct 06 |
olle |
204 |
} |
741 |
10 Oct 06 |
olle |
205 |
|
1652 |
22 May 07 |
gregory |
206 |
private static Container showStopFTP() { |
1652 |
22 May 07 |
gregory |
207 |
String[] showThisTextUp = new String[1]; |
1652 |
22 May 07 |
gregory |
208 |
showThisTextUp[0] = "Xerver Free FTP Server has been shut down!"; |
741 |
10 Oct 06 |
olle |
209 |
|
1652 |
22 May 07 |
gregory |
210 |
return showAsNorthBorderLayout(make2ContainersTo1ContainerAbove( |
1652 |
22 May 07 |
gregory |
211 |
giveContainerWithText(showThisTextUp), new JLabel(""))); |
741 |
10 Oct 06 |
olle |
212 |
|
741 |
10 Oct 06 |
olle |
213 |
} |
741 |
10 Oct 06 |
olle |
214 |
|
1652 |
22 May 07 |
gregory |
215 |
private static Container showStartFTPSetup() { |
1652 |
22 May 07 |
gregory |
216 |
String[] showThisTextUp = new String[3], showThisTextDown = new String[2]; |
1652 |
22 May 07 |
gregory |
217 |
showThisTextUp[0] = "Xerver Remote Setup has been turned on!"; |
1652 |
22 May 07 |
gregory |
218 |
showThisTextUp[1] = ""; |
1652 |
22 May 07 |
gregory |
219 |
showThisTextUp[2] = "A remote administrator can now change settings to Xerver at:"; |
741 |
10 Oct 06 |
olle |
220 |
|
741 |
10 Oct 06 |
olle |
221 |
JTextField txtIPAdress; |
1652 |
22 May 07 |
gregory |
222 |
String s_outerIP = HostInfo.getIPFromInternet(); // Returns null if |
1652 |
22 May 07 |
gregory |
// not detected |
1652 |
22 May 07 |
gregory |
224 |
if (s_outerIP != null) { |
1652 |
22 May 07 |
gregory |
225 |
txtIPAdress = new JTextField("http://" + s_outerIP + ":32124/", 17); |
1652 |
22 May 07 |
gregory |
226 |
} else { |
1652 |
22 May 07 |
gregory |
227 |
txtIPAdress = new JTextField("IP could not be detected!", 17); |
741 |
10 Oct 06 |
olle |
228 |
} |
741 |
10 Oct 06 |
olle |
229 |
|
741 |
10 Oct 06 |
olle |
230 |
txtIPAdress.setBackground(Color.white); |
741 |
10 Oct 06 |
olle |
231 |
txtIPAdress.setEditable(false); |
741 |
10 Oct 06 |
olle |
232 |
txtIPAdress.setFont(defaultFont); |
1652 |
22 May 07 |
gregory |
233 |
showThisTextDown[0] = ""; |
1652 |
22 May 07 |
gregory |
234 |
showThisTextDown[1] = "Please turn off Xerver Remote Setup when you feel you are done!"; |
1652 |
22 May 07 |
gregory |
235 |
return make2ContainersTo1ContainerAbove( |
1652 |
22 May 07 |
gregory |
236 |
make2ContainersTo1ContainerAbove( |
1652 |
22 May 07 |
gregory |
237 |
giveContainerWithText(showThisTextUp), |
1652 |
22 May 07 |
gregory |
238 |
make2ContainersTo1ContainerBeside(txtIPAdress, |
1652 |
22 May 07 |
gregory |
239 |
new JLabel(""))), |
1652 |
22 May 07 |
gregory |
240 |
giveContainerWithText(showThisTextDown)); |
741 |
10 Oct 06 |
olle |
241 |
} |
741 |
10 Oct 06 |
olle |
242 |
|
1652 |
22 May 07 |
gregory |
243 |
private static Container showStopFTPSetup() { |
741 |
10 Oct 06 |
olle |
244 |
|
1652 |
22 May 07 |
gregory |
245 |
String[] showThisTextUp = new String[6], showThisTextDown = new String[2]; |
1652 |
22 May 07 |
gregory |
246 |
showThisTextUp[0] = "Xerver FTP Remote Setup has been shut down!"; |
1652 |
22 May 07 |
gregory |
247 |
showThisTextUp[1] = ""; |
1652 |
22 May 07 |
gregory |
248 |
showThisTextUp[2] = "Note that the local FTP Setup only shuts down when you shut down Xerver."; |
1652 |
22 May 07 |
gregory |
249 |
showThisTextUp[3] = ""; |
1652 |
22 May 07 |
gregory |
250 |
showThisTextUp[4] = "You (and only you) can always change settings to Xerver FTP Setup at this address:"; |
1652 |
22 May 07 |
gregory |
251 |
showThisTextUp[5] = ""; |
1652 |
22 May 07 |
gregory |
252 |
JTextField txtIPAdress = new JTextField("http://" |
1652 |
22 May 07 |
gregory |
253 |
+ HostInfo.getLocalIPorLocalhost() + ":32124/", 17); |
741 |
10 Oct 06 |
olle |
254 |
txtIPAdress.setBackground(Color.white); |
741 |
10 Oct 06 |
olle |
255 |
txtIPAdress.setEditable(false); |
741 |
10 Oct 06 |
olle |
256 |
txtIPAdress.setFont(defaultFont); |
1652 |
22 May 07 |
gregory |
257 |
showThisTextDown[0] = ""; |
1652 |
22 May 07 |
gregory |
258 |
showThisTextDown[1] = "People from outside Internet can no longer change settings!"; |
1652 |
22 May 07 |
gregory |
259 |
return make2ContainersTo1ContainerAbove( |
1652 |
22 May 07 |
gregory |
260 |
make2ContainersTo1ContainerAbove( |
1652 |
22 May 07 |
gregory |
261 |
giveContainerWithText(showThisTextUp), |
1652 |
22 May 07 |
gregory |
262 |
make2ContainersTo1ContainerBeside(txtIPAdress, |
1652 |
22 May 07 |
gregory |
263 |
new JLabel(""))), |
1652 |
22 May 07 |
gregory |
264 |
giveContainerWithText(showThisTextDown)); |
741 |
10 Oct 06 |
olle |
265 |
|
741 |
10 Oct 06 |
olle |
266 |
} |
741 |
10 Oct 06 |
olle |
267 |
|
1652 |
22 May 07 |
gregory |
268 |
private static Container showServerPortInUse() { |
1652 |
22 May 07 |
gregory |
269 |
String[] showThisTextUp = new String[6]; |
1652 |
22 May 07 |
gregory |
270 |
showThisTextUp[0] = "Xerver FTP Server can't start since port " |
1652 |
22 May 07 |
gregory |
271 |
+ FTPServerController.getPort() + " is already in use!"; |
1652 |
22 May 07 |
gregory |
272 |
showThisTextUp[1] = ""; |
1652 |
22 May 07 |
gregory |
273 |
showThisTextUp[2] = "Please start FTP Setup and change which port shall be used."; |
1652 |
22 May 07 |
gregory |
274 |
showThisTextUp[3] = ""; |
1652 |
22 May 07 |
gregory |
275 |
showThisTextUp[4] = "It is also possible that you have another instance of"; |
1652 |
22 May 07 |
gregory |
276 |
showThisTextUp[5] = "Xerver FTP Setup running using this port number."; |
741 |
10 Oct 06 |
olle |
277 |
|
1652 |
22 May 07 |
gregory |
278 |
return showAsNorthBorderLayout(make2ContainersTo1ContainerAbove( |
1652 |
22 May 07 |
gregory |
279 |
giveContainerWithText(showThisTextUp), new JLabel(""))); |
741 |
10 Oct 06 |
olle |
280 |
} |
741 |
10 Oct 06 |
olle |
281 |
|
1652 |
22 May 07 |
gregory |
282 |
private static Container showSetupPortInUse() { |
1652 |
22 May 07 |
gregory |
283 |
String[] showThisTextUp = new String[6]; |
1652 |
22 May 07 |
gregory |
284 |
showThisTextUp[0] = "Xerver FTP Setup can't start the setup at port " |
1652 |
22 May 07 |
gregory |
285 |
+ FTPServerController.getSetupPort() |
1652 |
22 May 07 |
gregory |
286 |
+ " since the port is already in use!"; |
1652 |
22 May 07 |
gregory |
287 |
showThisTextUp[1] = ""; |
1652 |
22 May 07 |
gregory |
288 |
showThisTextUp[2] = "Please close any other application using this port and try again."; |
1652 |
22 May 07 |
gregory |
289 |
showThisTextUp[3] = ""; |
1652 |
22 May 07 |
gregory |
290 |
showThisTextUp[4] = "It is also possible that you have another instance of"; |
1652 |
22 May 07 |
gregory |
291 |
showThisTextUp[5] = "Xerver FTP Setup running using this port number."; |
741 |
10 Oct 06 |
olle |
292 |
|
1652 |
22 May 07 |
gregory |
293 |
return showAsNorthBorderLayout(make2ContainersTo1ContainerAbove( |
1652 |
22 May 07 |
gregory |
294 |
giveContainerWithText(showThisTextUp), new JLabel(""))); |
741 |
10 Oct 06 |
olle |
295 |
} |
741 |
10 Oct 06 |
olle |
296 |
|
1652 |
22 May 07 |
gregory |
297 |
private static Container showServerPortError() { |
1652 |
22 May 07 |
gregory |
298 |
String[] showThisTextUp = new String[3]; |
1652 |
22 May 07 |
gregory |
299 |
showThisTextUp[0] = "Xerver FTP Server can't start since port " |
1652 |
22 May 07 |
gregory |
300 |
+ FTPServerController.getPort() + " is an invalid port number!"; |
1652 |
22 May 07 |
gregory |
301 |
showThisTextUp[1] = ""; |
1652 |
22 May 07 |
gregory |
302 |
showThisTextUp[2] = "Please start FTP Setup and change which port shall be used."; |
741 |
10 Oct 06 |
olle |
303 |
|
1652 |
22 May 07 |
gregory |
304 |
return showAsNorthBorderLayout(make2ContainersTo1ContainerAbove( |
1652 |
22 May 07 |
gregory |
305 |
giveContainerWithText(showThisTextUp), new JLabel(""))); |
741 |
10 Oct 06 |
olle |
306 |
} |
741 |
10 Oct 06 |
olle |
307 |
|
1652 |
22 May 07 |
gregory |
308 |
private static Container showSetupPortError() { |
1652 |
22 May 07 |
gregory |
309 |
String[] showThisTextUp = new String[1]; |
1652 |
22 May 07 |
gregory |
310 |
showThisTextUp[0] = "Xerver FTP Setup can't start the setup at port " |
1652 |
22 May 07 |
gregory |
311 |
+ FTPServerController.getSetupPort() |
1652 |
22 May 07 |
gregory |
312 |
+ " since it is an invalid port number!"; |
741 |
10 Oct 06 |
olle |
313 |
|
1652 |
22 May 07 |
gregory |
314 |
return showAsNorthBorderLayout(make2ContainersTo1ContainerAbove( |
1652 |
22 May 07 |
gregory |
315 |
giveContainerWithText(showThisTextUp), new JLabel(""))); |
741 |
10 Oct 06 |
olle |
316 |
} |
741 |
10 Oct 06 |
olle |
317 |
} |