Package com.extjs.gxt.ui.client.widget.form

Examples of com.extjs.gxt.ui.client.widget.form.CheckBox


                        FormPanel form = new FormPanel();
                        form.setHeaderVisible(false);
                        form.setLabelWidth(200);
                        form.setFieldWidth(300);
                        final CheckBox box = new CheckBox();
                        box.setFieldLabel(Messages.get("label.workflow.inherited","Same workflow as parent"));
                        form.add(box);

                        final ListStore<GWTJahiaWorkflowDefinition> states = new ListStore<GWTJahiaWorkflowDefinition>();
                        final ComboBox<GWTJahiaWorkflowDefinition> combo = new ComboBox<GWTJahiaWorkflowDefinition>();
                        combo.setFieldLabel(Messages.get("label.workflow","Workflow"));
                        combo.setForceSelection(true);
                        combo.setDisplayField("displayName");
                        combo.setWidth(400);
                        combo.setStore(states);
                        combo.setTypeAhead(true);
                        combo.setTriggerAction(ComboBox.TriggerAction.ALL);
                        form.add(combo);

                        data = new BorderLayoutData(Style.LayoutRegion.CENTER);
                        layoutContainer.add(form, data);


                        grid.getSelectionModel().addSelectionChangedListener(new SelectionChangedListener<GWTJahiaWorkflowType>() {
                            @Override
                            public void selectionChanged(SelectionChangedEvent<GWTJahiaWorkflowType> se) {
                                previousSelection = null;
                                combo.setValue(null);
                                combo.clearSelections();
                                states.removeAll();
                                final List<GWTJahiaWorkflowDefinition> list = workflowRules.get(se.getSelectedItem());
                                states.add(list);
                                states.sort("displayName", Style.SortDir.ASC);
                                for (GWTJahiaWorkflowDefinition definition : list) {
                                    if (Boolean.TRUE.equals(definition.get("active"))) {
                                        box.setValue(!Boolean.TRUE.equals(definition.get("set")));
                                        combo.setValue(definition);
                                        return;
                                    }
                                }
                                box.setValue(true);
                            }
                        });

                        box.addListener(Events.Change, new Listener<FieldEvent>() {
                            public void handleEvent(FieldEvent be) {
                                combo.setEnabled(!box.getValue());
                                if (combo.getSelection().size() == 1) {
                                    combo.getSelection().get(0).set("set", !box.getValue());
                                    if (!box.getValue()) {
                                        combo.getSelection().get(0).set("active", Boolean.TRUE);
                                    }
                                }
                            }
                        });

                        combo.addSelectionChangedListener(new SelectionChangedListener<GWTJahiaWorkflowDefinition>() {
                            @Override
                            public void selectionChanged(
                                    SelectionChangedEvent<GWTJahiaWorkflowDefinition> event) {
                                if (previousSelection != null) {
                                    previousSelection.set("set", Boolean.FALSE);
                                    previousSelection.set("active", Boolean.FALSE);
                                }
                                if (event.getSelectedItem() != null) {
                                    event.getSelectedItem().set("set", !box.getValue());
                                    if (!box.getValue()) {
                                        event.getSelectedItem().set("active", Boolean.TRUE);
                                    }
                                }
                                previousSelection = event.getSelectedItem();
                                tab.layout();
                            }
                        });

                        // todo : use specific permission to manage workflows ?
                        if (!PermissionsUtils.isPermitted("jcr:write", engine.getNode()) || engine.getNode().isLocked()) {
                            box.setReadOnly(true);
                            combo.setReadOnly(true);
                        }

                        grid.getSelectionModel().select(0, false);
View Full Code Here


      domainField = new TextField<String>()
      domainField.setFieldLabel(JabberApp.getConstants().domain())
      moreFieldSet.add(domainField)
      domainField.setValue(domain);
     
      saslAuthField = new CheckBox();
      saslAuthField.setBoxLabel(JabberApp.getConstants().securelink_prompt());
      saslAuthField.setHideLabel(true);
      moreFieldSet.add(saslAuthField)
      if(authType.equals("sasl"))
        saslAuthField.setValue(true);
View Full Code Here

          if (getButtons().contains(Dialog.YES)) {
            setFocusWidget(getButtonBar().getButtonById(Dialog.YES));
          }
      }
   
      doNotShowAgain = new CheckBox();
      doNotShowAgain.setBoxLabel(constants.doNotNeedThisInformation());                   
    ButtonBar bb = getButtonBar();
    for (int i = 0; i < bb.getItemCount(); i++) {
      if (bb.getItem(i).getItemId().equalsIgnoreCase(Dialog.YES) && isCells) {
        bb.getItem(i).setText(constants.continueOp());
View Full Code Here

    container.add(hp, ldata);
    return textfield;   
  }
 
  private CheckBox addCheckBox(LayoutContainer container, String title) {
    CheckBox checkbox = new CheckBox();
    checkbox.setBoxLabel(title);   
    container.add(checkbox);
    return checkbox;   
  }
View Full Code Here

    container.add(checkbox);
    return checkbox;   
  }
 
  private void addTitlePanel(LayoutContainer container) {
    printTitle = new CheckBox();
    printTitle.setBoxLabel(constants.title() + ":");
   
    HorizontalPanel hp = new HorizontalPanel();
    hp.setVerticalAlign(VerticalAlignment.MIDDLE);
    hp.add(printTitle);
View Full Code Here

    XUser user = ((Workbench)Registry.get(Workbench.ID)).getUser();
    panel.setLayout(new RowLayout(Orientation.HORIZONTAL));
    panel.setSize(280, 22); //have to hard code to make it visible in FF...
    RowData layoutData = new RowData();
    layoutData.setMargins(new Margins(0, 5, 0, 0));
    showOnRight = new CheckBox();
    showOnRight.setBoxLabel(constants.alwaysShowFilterOnRight());
    showOnRight.setValue(false);
    panel.add(showOnRight, layoutData);
//    addIconButton(BTN_ADD_NODE, panel, layoutData);
//    addIconButton(BTN_REMOVE_NODE, panel, layoutData);
View Full Code Here

       
    TableData ldata2 = new TableData();
    ldata2.setColspan(2);
    rights.add(hp2, ldata2);

    hideNavigator = new CheckBox();
    hideNavigator.setBoxLabel(constants.hideNavigator());   
    hideViewTabs = new CheckBox();
    hideViewTabs.setBoxLabel(constants.hideViewTabs());
    autoLogin = new CheckBox();
    autoLogin.setBoxLabel(constants.addPassword());
    autoUser = new CheckBox();
    autoUser.setBoxLabel(constants.addUserFlag());
    hideTitleBar = new CheckBox();
    hideTitleBar.setBoxLabel(constants.hideTitleBar());
    hideToolBar = new CheckBox();
    hideToolBar.setBoxLabel(constants.hideToolBar());
    hideSave = new CheckBox();
    hideSave.setBoxLabel(constants.hideSave());
    hideFilter = new CheckBox();
    hideFilter.setBoxLabel(constants.hideFilter());
    hideStaticFilter = new CheckBox();
    hideStaticFilter.setBoxLabel(constants.hideStaticFilter());
    hideHorizontalAxis = new CheckBox();
    hideHorizontalAxis.setBoxLabel(constants.hideHorizontalAxis());
    hideVerticalAxis = new CheckBox();
    hideVerticalAxis.setBoxLabel(constants.hideVerticalAxis());
   
    Listener <BaseEvent> listener = new Listener<BaseEvent>() {
      public void handleEvent(BaseEvent be) {
        directLink.setValue(getLinkString());
View Full Code Here

        Date date = new Date(System.currentTimeMillis() + 1000l * 60l * 60l * 24l * 30l);
        Cookies.setCookie(SHOW_ADMIN_TIPS_COOKIE + cookieTitle + user, cookieData, date);       
      }     
    });

      doNotShowAgain = new CheckBox();
      doNotShowAgain.setBoxLabel(constants.doNotShowThisMessageAgain());                   
   
      String message = msg;
       
      messageLabel = new LabelField(message);
View Full Code Here

    // Checkboxes for public/editable:
    LayoutContainer rights = new LayoutContainer();   
    RowLayout rLayout = new RowLayout();
    rights.setLayout(rLayout);
   
    makePublicView = new CheckBox();
    makePublicView.setBoxLabel(constants.visibleForAllViewers());
   
    makeEditableView = new CheckBox();
    makeEditableView.setBoxLabel(constants.visibleAndEditableForAllEditors());
       
    rights.add(makePublicView);
    rights.add(makeEditableView);
   
View Full Code Here

    // Checkboxes for public/editable:
    final LayoutContainer rights = new LayoutContainer();
    RowLayout rLayout = new RowLayout();
    rights.setLayout(rLayout);
   
    makePublicView = new CheckBox();
    makePublicView.setBoxLabel(constants.visibleForAllViewers());
   
    makeEditableView = new CheckBox();
    makeEditableView.setBoxLabel(constants.visibleAndEditableForAllEditors());
       
    if (showBoxes) {
      rights.add(makePublicView);
      rights.add(makeEditableView);
View Full Code Here

TOP

Related Classes of com.extjs.gxt.ui.client.widget.form.CheckBox

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.