for(int i = 0; i < applicationsArray.length() - 1; i++) {
final Application app = applicationsMap.get(applicationsArray.get(i));
final FlowPanel application = new FlowPanel();
final FocusPanel applicationLabel = new FocusPanel();
final Label appName = new Label(app.getName());
final Label httpLabel = new Label("HTTP");
final Label httpsLabel = new Label("HTTPS");
final Label settingsLabel = new Label("Settings");
Image appIcon = new Image();
if(app.getIconURL().split("//").length < 2) {
appIcon = new Image(JSVarHandler.getCommunityBaseURL() + app.getIconURL());
} else {
appIcon = new Image(app.getIconURL());
}
appIcon.setSize("64px", "64px");
application.add(appIcon);
application.add(appName);
application.add(httpLabel);
application.add(httpsLabel);
application.add(settingsLabel);
application.setStyleName(manager.appIcon());
applicationLabel.add(application);
applicationLabel.addMouseOverHandler(new MouseOverHandler() {
public void onMouseOver(MouseOverEvent event){
if(project.isActive()) {
applicationLabel.setStyleName(manager.appIconActive());
appName.addStyleName(manager.text());
httpLabel.addStyleName(manager.link());
httpsLabel.addStyleName(manager.link());
settingsLabel.addStyleName(manager.link());
}
}
});
applicationLabel.addMouseOutHandler(new MouseOutHandler() {
public void onMouseOut(MouseOutEvent event){
applicationLabel.setStyleName(manager.appIcon());
appName.removeStyleName(manager.text());
httpLabel.removeStyleName(manager.link());
httpsLabel.removeStyleName(manager.link());
settingsLabel.removeStyleName(manager.link());
}