public PlanBookDay() { super(); this.appendChild(fieldGrid); fieldGrid.setWidth("100%"); Rows rows = fieldGrid.newRows(); Row row = rows.newRow(); row.appendChild(lDate); row = rows.newRow(); row.appendChild(lDayName); row = rows.newRow(); row.appendChild(lDayNo); row = rows.newRow(); row.appendChild(new Space()); row = rows.newRow(); row.setHeight("35px"); row.appendChild(fUnit); row = rows.newRow(); row.setHeight("35px"); row.appendChild(fLesson); row = rows.newRow(); row.setHeight("35px"); row.appendChild(fStage); row = rows.newRow(); row.setHeight("35px"); row.appendChild(fActivity); row = rows.newRow(); row.setHeight("35px"); row.appendChild(fHomework); row = rows.newRow(); row.setHeight("35px"); row.appendChild(fValues); row = rows.newRow(); row.setHeight("35px"); row.appendChild(fComments); row = rows.newRow(); row.setHeight("35px"); row.appendChild(fLink); row = rows.newRow(); row.setHeight("35px"); row.appendChild(fImage); }
private void zkInit() { form.appendChild(mainLayout); mainLayout.setWidth("99%"); mainLayout.setHeight("100%"); parameterPanel.appendChild(parameterLayout); lGroup = new Label(Msg.getMsg(Env.getCtx(), "Group")); lBPartner = new Label(Msg.getMsg(Env.getCtx(), "Teacher")); lDateFrm = new Label(Msg.getMsg(Env.getCtx(), "Date")); lSubject = new Label(Msg.getMsg(Env.getCtx(), "Subject")); North north = new North(); north.setStyle("border: none"); mainLayout.appendChild(north); north.appendChild(parameterPanel); Rows rows = null; Row row = null; parameterLayout.setWidth("800px"); rows = parameterLayout.newRows(); row = rows.newRow(); row.appendChild(lGroup); row.appendChild(fGroup.getComponent()); row.appendChild(lBPartner); row.appendChild(fBPartner.getComponent()); row = rows.newRow(); row.appendChild(lDateFrm); row.appendChild(fDateFrom.getComponent()); row.appendChild(lSubject); row.appendChild(fSubject.getComponent()); row = rows.newRow(); row.appendChild(new Space()); row = rows.newRow(); row.appendChild(new Space()); row.appendChild(periodControl); Span span = new Span(); span.setParent(periodControl); span.setStyle("height: 99%; display: inline-block; width: 20%;"); span.appendChild(bBack); span = new Span(); span.setParent(periodControl); span.setStyle("height: 99%; display: inline-block; width: 10%;"); span.appendChild(lPeriod); span = new Span(); span.setParent(periodControl); span.setStyle("height: 99%; display: inline-block; width: 20%;"); span.appendChild(bNext); row.appendChild(new Space()); row.appendChild(bSave); Center center = new Center(); center.setFlex(true); center.appendChild(mainPanel); span = new Span(); span.setParent(mainPanel); span.setStyle("height: 99%; display: inline-block; width: 10%;"); span.appendChild(labelGrid); labelGrid.setWidth("90%"); rows = labelGrid.newRows(); row = rows.newRow(); row.appendChild(new Space()); row = rows.newRow(); row.appendChild(new Space()); row = rows.newRow(); row.appendChild(lDay.rightAlign()); row = rows.newRow(); row.appendChild(new Space()); row = rows.newRow(); row.setHeight("35px"); row.appendChild(lUnit.rightAlign()); row = rows.newRow(); row.setHeight("35px"); row.appendChild(lLesson.rightAlign()); row = rows.newRow(); row.setHeight("35px"); row.appendChild(lStage.rightAlign()); row = rows.newRow(); row.setHeight("35px"); row.appendChild(lActivity.rightAlign()); row = rows.newRow(); row.setHeight("35px"); row.appendChild(lHomework.rightAlign()); row = rows.newRow(); row.setHeight("35px"); row.appendChild(lValues.rightAlign()); row = rows.newRow(); row.setHeight("35px"); row.appendChild(lComments.rightAlign()); row = rows.newRow(); row.setHeight("35px"); row.appendChild(lLink.rightAlign()); row = rows.newRow(); row.setHeight("35px"); row.appendChild(lImage.rightAlign()); for (PlanBookDay planDay : planDays) { span = new Span(); span.setParent(mainPanel); span.setStyle("height: 99%; display: inline-block; width: 16%;"); span.appendChild(planDay); } mainLayout.appendChild(center); }
/** * Init Main Panel * * @return void */ private void initMainPanel() { // Instance Panel // Panel buttonsPanel = new Panel(); Rows rows = null; Row row = null; South north = new South(); northPanel = new Panel(); mainLayout = new Borderlayout(); north.setStyle("border: none"); mainLayout.appendChild(north); north.appendChild(northPanel); Grid productLayout = GridFactory.newGridLayout(); northPanel.appendChild(productLayout); rows = productLayout.newRows(); row = rows.newRow(); buttonsPanel.setAlign("Center"); row.setHeight("65px"); row.setSpans("6"); buttonNew = createButtonAction("New", KeyStroke.getKeyStroke(KeyEvent.VK_N, 0)); buttonNew.setId("New"); buttonsPanel.appendChild(buttonNew); buttonNew.addActionListener(this); buttonEdit = createButtonAction("Edit", KeyStroke.getKeyStroke(KeyEvent.VK_N, 0)); buttonEdit.setId("Edit"); buttonsPanel.appendChild(buttonEdit); buttonEdit.addActionListener(this); buttonReset = createButtonAction("Reset", KeyStroke.getKeyStroke(KeyEvent.VK_F5, 0)); buttonsPanel.appendChild(buttonReset); buttonReset.setId("Reset"); buttonRefresh = createButtonAction("Refresh", KeyStroke.getKeyStroke(KeyEvent.VK_F5, 0)); buttonsPanel.appendChild(buttonRefresh); buttonRefresh.setId("Refresh"); buttonOk = createButtonAction("Ok", KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0)); buttonsPanel.appendChild(buttonOk); buttonOk.setId("Ok"); buttonCancel = createButtonAction("Cancel", KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0)); buttonsPanel.appendChild(buttonCancel); buttonCancel.setId("Cancel"); buttonOk.setTooltiptext(Msg.translate(ctx, "Ok")); buttonCancel.setTooltiptext(Msg.translate(ctx, "Cancel")); buttonOk.setTooltiptext(Msg.translate(ctx, "Ok")); buttonCancel.setTooltiptext(Msg.translate(ctx, "Cancel")); buttonNew.setTooltiptext(Msg.translate(ctx, "New")); buttonEdit.setTooltiptext(Msg.translate(ctx, "Edit")); buttonRefresh.setTooltiptext(Msg.translate(ctx, "Refresh")); row.appendChild(buttonsPanel); // Center posTable = new WListbox(); posTable.addActionListener(this); // Visible New buttonNew.setVisible(false); buttonEdit.setVisible(false); buttonEdit.setEnabled(false); }