@Override public void addComponentToForm() { if (grid != null) { this.formPanel.add(grid); } addOtherComponents(); }
private void adjustAppearanceToFitDialog(final FormT form) { if (!form.isRendered()) { form.setHeaderVisible(false); form.setFrame(false); } }
/** * Returns true if the form is invalid. * * @return true if all fields are valid */ public boolean isValid() { return isValid(false); }
@Override public void initSizeFormPanel() { formPanel.setHeaderVisible(false); formPanel.setSize(470, 250); }
public FormButtonBinding(FormPanel panel) { this.panel = panel; buttons = new ArrayList<Button>(); timer = new Timer() { @Override public void run() { FormButtonBinding.this.checkPanel(); } }; listener = new Listener<ComponentEvent>() { public void handleEvent(ComponentEvent be) { if (be.getType() == Events.Attach) { FormButtonBinding.this.startMonitoring(); } else if (be.getType() == Events.Detach) { FormButtonBinding.this.stopMonitoring(); } } }; panel.addListener(Events.Attach, listener); panel.addListener(Events.Detach, listener); if (panel.isAttached()) { startMonitoring(); } }
form = new FormPanel(); form.setFrame(true); form.setAction(GWT.getModuleBaseURL() + controllerUrl + "?" + CONTROLLER_UPLOAD); form.setEncoding(FormPanel.Encoding.MULTIPART); form.setMethod(FormPanel.Method.POST); form.setHeaderVisible(false); form.addListener(Events.Submit, new Listener<FormEvent>() { form.add(fuf); form.addButton(uploadButton);
formPanel = new FormPanel(); formPanel.setHeaderVisible(false); formPanel.setFrame(true); formPanel.setLayout(new FlowLayout()); formPanel.add(searchFieldSet); formPanel.add(this.grid); formPanel.getButtonBar().add(this.searchStatus); formPanel.getButtonBar().add(new LabelToolItem(" ")); formPanel.setButtonAlign(HorizontalAlignment.RIGHT); select.disable(); formPanel.addButton(this.select); formPanel.addButton(cancel); formPanel.setBottomComponent(this.toolBar);
formPanel = new FormPanel(); formPanel.setFrame(true); formPanel.setHeaderVisible(false); formPanel.setAutoHeight(true); formPanel.add(fieldSet);
@Override protected void onRender(Element target, int index) { super.onRender(target, index); body.setStyleAttribute("background", "none"); form = new El(DOM.createForm()); form.setStyleAttribute("overflow", "hidden"); body.appendChild(form.dom); setMethod(method); setTarget(this.target); if (encoding != null) { setEncoding(encoding); } if (action != null) { setAction(action); } getLayoutTarget().setStyleAttribute("padding", padding + "px"); if (getLayout() == null) { FormLayout layout = new FormLayout(); layout.setDefaultWidth(fieldWidth); layout.setLabelWidth(labelWidth); layout.setLabelAlign(labelAlign); layout.setLabelSeparator(labelSeparator); layout.setHideLabels(hideLabels); setLayout(layout); } form.addEventsSunk(Event.ONLOAD); setAriaRole("region"); }
public void createLayout() { FormPanel form = new FormPanel(); form.setHeaderVisible(false); form.setLabelWidth(100); setLayout(new FitLayout()); add(form); emailFrequency.add(monthly); form.add(emailFrequency); dayOfWeek.add(i + 1, weekDays[i]); form.add(dayOfWeek); dayOfMonth.add(i, String.valueOf(i)); form.add(dayOfMonth);
private void showPanel(AppEvent event) { if (this.ruleRowEditor.store != null) { this.ruleRowEditor.store.removeAll(); } this.ruleRowEditor.createStore(); this.ruleRowEditor.store.add((RuleModel) event.getData()); this.ruleRowEditor.initGrid(); if (!this.ruleRowEditor.formPanel.isRendered()) { this.ruleRowEditor.formPanel.setFrame(true); this.ruleRowEditor.formPanel.setLayout(new FlowLayout()); } if (!this.ruleRowEditor.isRendered()) { this.ruleRowEditor.initializeFormPanel(); this.ruleRowEditor.setFrame(true); this.ruleRowEditor.setLayout(new FlowLayout()); this.ruleRowEditor.initSizeFormPanel(); } this.ruleRowEditor.setModel((RuleModel) event.getData()); this.ruleRowEditor.addComponentToForm(); this.ruleRowEditor.setClosable(false); this.ruleRowEditor.show(); this.ruleRowEditor.formPanel.show(); this.ruleRowEditor.repaint(); this.ruleRowEditor.formPanel.repaint(); }
private void showPanelData(AppEvent event) { if (this.ruleRowEditor.store != null) { this.ruleRowEditor.store.removeAll(); } else { this.ruleRowEditor.createStore(); } if (!this.ruleRowEditor.isRendered()) { this.ruleRowEditor.initGrid(); this.ruleRowEditor.setFrame(true); this.ruleRowEditor.setLayout(new FlowLayout()); this.ruleRowEditor.formPanel.setFrame(true); this.ruleRowEditor.formPanel.setLayout(new FlowLayout()); this.ruleRowEditor.initSizeFormPanel(); this.ruleRowEditor.addComponentToForm(); } this.ruleRowEditor.store.add(((GridStatus) event.getData()).getModel()); this.ruleRowEditor.setClosable(false); this.ruleRowEditor.show(); this.ruleRowEditor.formPanel.show(); this.ruleRowEditor.grid.repaint(); }
/** * Clears all values from all fields. */ public void clear() { for (Field<?> f : getFields()) { f.clear(); } }
@Override public void initSizeFormPanel() { formPanel.setHeaderVisible(false); }
@Override public void componentSelected(ButtonEvent arg0) { if (!form.isValid()) { FileDescriptorGxt fdg = new FileDescriptorGxt(); // lkc: wykomentowalem to bo w 1.2.1 gxt nie ma juz tego wywolania // fdg.setFileName(fuf.getFileName()); onSubmit(STATUS_NOT_VALID, "File upload field should not be empty", fdg); return; } form.submit(); } });
/** * Adds the buttons. */ public void addButtons() { formPanel.setButtonAlign(HorizontalAlignment.LEFT); this.saveStatus = new SaveStaus(); saveStatus.setAutoWidth(true); formPanel.getButtonBar().add(saveStatus); formPanel.getButtonBar().add(new FillToolItem()); this.submit = new Button("SUBMIT"); this.submit.addSelectionListener(new SelectionListener<ButtonEvent>() { @Override public void componentSelected(ButtonEvent ce) { if (formPanel.isValid()) execute(); } }); submit.setIconStyle("x-geofence-submit"); formPanel.addButton(submit); this.cancel = new Button("CANCEL"); this.cancel.addSelectionListener(new SelectionListener<ButtonEvent>() { @Override public void componentSelected(ButtonEvent ce) { cancel(); } }); this.cancel.setIconStyle("x-geofence-cancel"); formPanel.addButton(cancel); }
@Override public FormPanel createFormPanel() FormPanel fp = new FormPanel(); fp.setFrame(true); fp.setHeaderVisible(false); fp.add(fieldSet); fp.add(table);