protected void doInit() {
super.doInit();
authImage = loadImage(SWTSystemTrayGUI.class, "/images/authentication-dialog.png"); //$NON-NLS-1$
addMenu("Connection");
addMenuItem("Connection", new AgentAction() {
public void actionPerformed() {
try {
getAgent().connect("localhost", 443, true, null, null, false);
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (HttpException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (UnsupportedAuthenticationException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (AuthenticationCancelledException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
public String getAction() {
return "Connect";
}
});
addMenuItem("Connection", new AgentAction() {
public void actionPerformed() {
getAgent().disconnect();
}