@Override public void initialize() { this.selectionBar = new SelectionBar(); selectionBar.afterCompose(); /* * build basic UI, same for all usages. */ this.setContent( ZK.div( ZK.hbox( ZK.sidebar(270, 700) .headersclass(STYLE.MODULE_HEADER) .labelsclass(STYLE.MODULE_TITLE, STYLE.MODULE_TITLE_DISABLED) .headersize(24) .id("sidebar"), ZK.separator(false).width(10).height(700).sclass(STYLE.SEPARATOR), ZK.vbox( ZK.c(selectionBar), OLMAPS .map( OLMAPS.googlelayer().maptype("physical").id("google"), OLMAPS.vectorlayer().drawcontrols(true).id("vector")) .zoom(2) .center(1073500.73, 4482706.85) .height(700) .width(MAPWIDTH) .id("map"), ZK.window() .width(MAPWIDTH) .height(700) .bgcolor("#cccccc") .color("#000000") .scroll() .id("tableview") .hide(), ZK.c(new ARIESStatusBar(STATUS.get(), this)) .id("statusbar") .height(28) .width("100%"), ZK.imagebutton("/aries/images/world48.png") .id("view") .tooltip("Toggle world views") .sclass("mapbutton")) .spacing(0) .id("mapwindow"), /* * container for storylines, to be shown when we have made our selection */ ZK.window().width(MAPWIDTH).height(760).id("storyline").hide()) .id("browser") .spacing(0), /* * container for scenario editor - FIXME this should be just in the storyline window */ ZK.c(new ScenarioEditor(this, 1270, 760)).id("sceditor").hide())); }
@Override public void initialize() { this.setContent( ZK.hbox( ZK.div( ZK.hbox( ZK.combobox() .listmodel(new GazModel(userModel.getDefaultLocations())) .listener( new EventListener() { @Override public void onEvent(Event arg0) throws Exception { if (((Combobox) arg0.getTarget()).getSelectedItem() != null) { ARIESUserModel.Location chosen = (Location) ((Combobox) arg0.getTarget()) .getSelectedItem() .getValue(); setRegionFromGazetteer(chosen.id.toString()); } else { /* * see if we put in a value and were too fast to have it searched */ String s = ((Combobox) arg0.getTarget()).getValue().trim(); if (s != null && !s.isEmpty()) { setRegionFromGazetteer(s); } } } }) .id("gazetteer") .width(280) /*, * * TODO * these should be re-enabled when they work. * ZK.imagebutton("/aries/images/icons/folder_open.png") .tooltip("load a previously saved configuration"), ZK.imagebutton("/aries/images/icons/save.png") .tooltip("save the current selection for future reference") */ )) .align("left"), ZK.div( ZK.hbox( ZK.image("/aries/images/icons/separator.png"), ZK.imagebutton("/aries/images/icons/edit.png") .id("addpolyg") .tooltip("Draw a shape and add it to the selection"), ZK.imagebutton("/aries/images/icons/cut_disabled.png") .enable(false) .id("subpolyg") .tooltip("Draw a shape and subtract it from the selection"), ZK.imagebutton("/aries/images/icons/delete_disabled.png") .enable(false) .id("resetdraw") .tooltip("Clear all selections made so far"), ZK.image("/aries/images/icons/separator.png"), ZK.imagebutton("/aries/images/icons/play_disabled.png") .enable(false) .id("run") .tooltip("Accept selection and continue to assessment"))) .align("right") .width("100%")) .width(MAPWIDTH) .height(24) .sclass(STYLE.MAP_TOOLBAR)); }