/* The HistSender initiates a socket to the server and can then perform a
*SearchRequest given a HistQuery using an ObjectInput- and an
*ObjectOutputStream.*/
publicclassHistSender{
privateSocketsocket;
privateObjectInputStreamin;
privateObjectOutputStreamout;
Objectroot;
finalstaticintPORT=4447;
publicHistSender(Objectr){
root=r;
setup();
}
// initiate the socket to the server
privatevoidsetup(){
try{
URLurl;
StringurlString="192.168.60.16";
try{
url=((JApplet)root).getCodeBase();
if(url!=null)
urlString=url.getHost();
}
catch(Exceptione)
{
System.out.println("Program not run from applet..."+e);
}
socket=newSocket(urlString,PORT);
}
catch(UnknownHostExceptione){
System.err.println("Don't know about host: taranis.");
//System.exit(1);
}
catch(IOExceptione){
JOptionPane.showMessageDialog(null,"Couldn't get contact with the server (HistServer). \n Kunde inte ansluta till servern(HistServer).","I/O Error",JOptionPane.ERROR_MESSAGE);
{"Copy to Excel","Your search result has been put on the Clipboard.\nOpen a new document in Excel and choose \"Paste\" from the Edit menu\nto create a Worksheet with your search result."},
{"Kopiera till Excel","Ditt skresultat har nu lagrats i Urklipp.\nppna ett nytt dokument i Excel och vlj \"Klistra in\" i Redigeramenyn\nfr att skapa ett Excelark med ditt skresultat."}
};
intlang=0;
// Language sensitive constructor
publicHistTable(intl,JopSessions){
session=s;
lang=l;
setup();
}
//Layout the HistTable. Add a mouse Listener to the JTable alarmTable
/* The HistSender initiates a socket to the server and can then perform a
*SearchRequest given a HistQuery using an ObjectInput- and an
*ObjectOutputStream.*/
publicclassHistSender{
privateSocketsocket;
privateObjectInputStreamin;
privateObjectOutputStreamout;
Objectroot;
finalstaticintPORT=4447;
publicHistSender(Objectr){
root=r;
setup();
}
// initiate the socket to the server
privatevoidsetup(){
try{
URLurl;
StringurlString="192.168.60.16";
try{
url=((JApplet)root).getCodeBase();
if(url!=null)
urlString=url.getHost();
}
catch(Exceptione)
{
System.out.println("Program not run from applet..."+e);
}
socket=newSocket(urlString,PORT);
}
catch(UnknownHostExceptione){
System.err.println("Don't know about host: taranis.");
//System.exit(1);
}
catch(IOExceptione){
JOptionPane.showMessageDialog(null,"Couldn't get contact with the server (HistServer). \n Kunde inte ansluta till servern(HistServer).","I/O Error",JOptionPane.ERROR_MESSAGE);
{"Copy to Excel","Your search result has been put on the Clipboard.\nOpen a new document in Excel and choose \"Paste\" from the Edit menu\nto create a Worksheet with your search result."},
{"Kopiera till Excel","Ditt skresultat har nu lagrats i Urklipp.\nppna ett nytt dokument i Excel och vlj \"Klistra in\" i Redigeramenyn\nfr att skapa ett Excelark med ditt skresultat."}
};
intlang=0;
// Language sensitive constructor
publicHistTable(intl,JopSessions){
session=s;
lang=l;
setup();
}
//Layout the HistTable. Add a mouse Listener to the JTable alarmTable