/** * Reset Display * * @param selIndex select index * @return selected activity */ private MWFActivity resetDisplay(int selIndex) { fAnswerText.setVisible(false); fAnswerList.setVisible(false); fAnswerButton.setVisible(false); fAnswerButton.setImage("/images/mWindow.png"); fTextMsg.setReadonly(!(selIndex >= 0)); bZoom.setEnabled(selIndex >= 0); bOK.setEnabled(selIndex >= 0); fForward.setValue(null); fForward.setReadWrite(selIndex >= 0); // statusBar.setStatusDB(String.valueOf(selIndex + 1) + "/" + m_activities.length); m_activity = null; m_column = null; if (m_activities.length > 0) { if (selIndex >= 0 && selIndex < m_activities.length) m_activity = m_activities[selIndex]; } // Nothing to show if (m_activity == null) { fNode.setText(""); fDescription.setText(""); fHelp.setText(""); fHistory.setContent(HISTORY_DIV_START_TAG + " </div>"); statusBar.setStatusDB("0/0"); statusBar.setStatusLine(Msg.getMsg(Env.getCtx(), "WFNoActivities")); } return m_activity; } // resetDisplay
private void init() { Grid grid = new Grid(); grid.setWidth("100%"); grid.setHeight("100%"); grid.setStyle("margin:0; padding:0; position: absolute; align: center; valign: center;"); grid.makeNoStrip(); grid.setOddRowSclass("even"); Rows rows = new Rows(); grid.appendChild(rows); Row row = new Row(); rows.appendChild(row); Div div = new Div(); div.setAlign("right"); div.appendChild(lNode); row.appendChild(div); row.appendChild(fNode); fNode.setWidth("100%"); fNode.setReadonly(true); row = new Row(); rows.appendChild(row); row.setValign("top"); div = new Div(); div.setAlign("right"); div.appendChild(lDesctiption); row.appendChild(div); row.appendChild(fDescription); fDescription.setMultiline(true); fDescription.setWidth("100%"); fDescription.setReadonly(true); row = new Row(); rows.appendChild(row); div = new Div(); div.setAlign("right"); div.appendChild(lHelp); row.appendChild(div); row.appendChild(fHelp); fHelp.setMultiline(true); fHelp.setWidth("100%"); fHelp.setReadonly(true); fHelp.setRows(3); row.appendChild(new Label()); row = new Row(); rows.appendChild(row); div = new Div(); div.setAlign("right"); div.appendChild(lHistory); row.appendChild(div); row.appendChild(fHistory); row.appendChild(new Label()); row = new Row(); rows.appendChild(row); div = new Div(); div.setAlign("right"); div.appendChild(lAnswer); row.appendChild(div); Hbox hbox = new Hbox(); hbox.appendChild(fAnswerText); hbox.appendChild(fAnswerList); hbox.appendChild(fAnswerButton); fAnswerButton.addEventListener(Events.ON_CLICK, this); row.appendChild(hbox); row.appendChild(bZoom); bZoom.addEventListener(Events.ON_CLICK, this); row = new Row(); rows.appendChild(row); div = new Div(); div.setAlign("right"); div.appendChild(lTextMsg); row.appendChild(div); row.appendChild(fTextMsg); fTextMsg.setMultiline(true); fTextMsg.setWidth("100%"); row.appendChild(new Label()); row = new Row(); rows.appendChild(row); div = new Div(); div.setAlign("right"); div.appendChild(lForward); row.appendChild(div); hbox = new Hbox(); hbox.appendChild(fForward.getComponent()); hbox.appendChild(lOptional); row.appendChild(hbox); row.appendChild(bOK); bOK.addEventListener(Events.ON_CLICK, this); Borderlayout layout = new Borderlayout(); layout.setWidth("100%"); layout.setHeight("100%"); layout.setStyle("background-color: transparent; position: absolute;"); North north = new North(); north.appendChild(listbox); north.setSplittable(true); north.setFlex(true); north.setHeight("50%"); layout.appendChild(north); north.setStyle("background-color: transparent"); listbox.addEventListener(Events.ON_SELECT, this); Center center = new Center(); center.appendChild(grid); layout.appendChild(center); center.setStyle("background-color: transparent"); center.setFlex(true); South south = new South(); south.appendChild(statusBar); layout.appendChild(south); south.setStyle("background-color: transparent"); this.appendChild(layout); this.setStyle("height: 100%; width: 100%; position: absolute;"); }