Ejemplo n.º 1
0
 @Override
 protected Widget loadComponent() {
   if (algebrap == null) {
     algebrap = new ScrollPanel(); // temporarily
     algebrap.setSize("100%", "100%");
     algebrap.setAlwaysShowScrollBars(false);
   }
   if (app != null) {
     // force loading the algebra view,
     // as loadComponent should only load when needed
     setAlgebraView((AlgebraViewW) app.getAlgebraView());
     aview.setInputPanel();
   }
   return algebrap;
 }
Ejemplo n.º 2
0
  public ChildrenGadget(Manager _manager) {

    super(_manager);

    childPanel = new VerticalPanel();
    childPanel.addStyleName("H-ChildDisplay");

    // PEND awkward. we'd really like to set scroll.setMaxHeight(),
    // but that doesn't exist. setting it in all cases leads to excess space
    scroll = new ScrollPanel(childPanel);
    scroll.setAlwaysShowScrollBars(false);

    scroll.setHeight(MAX_HEIGHT + "px");

    initWidget(scroll);
  }
Ejemplo n.º 3
0
 public AlgebraDockPanelW() {
   super(0, null, null, false, 0);
   initWidget(algebrap = new ScrollPanel()); // temporarily
   algebrap.setSize("100%", "100%");
   algebrap.setAlwaysShowScrollBars(false);
 }
Ejemplo n.º 4
0
  public PackageBuilderWidget(final PackageConfigData conf, ClientFactory clientFactory) {

    this.conf = conf;
    this.clientFactory = clientFactory;

    // UI above the results table
    FormStyleLayout layout = new FormStyleLayout();
    final VerticalPanel container = new VerticalPanel();
    final VerticalPanel buildResults = new VerticalPanel();

    RadioButton wholePackageRadioButton = new RadioButton("action", constants.BuildWholePackage());
    RadioButton builtInSelectorRadioButton =
        new RadioButton("action", constants.BuildPackageUsingBuiltInSelector());
    RadioButton customSelectorRadioButton =
        new RadioButton("action", constants.BuildPackageUsingCustomSelector());
    wholePackageRadioButton.addClickHandler(
        new ClickHandler() {
          public void onClick(ClickEvent event) {
            buildWholePackageLayout.setVisible(true);
            builtInSelectorLayout.setVisible(false);
            customSelectorLayout.setVisible(false);
            buildMode = "buildWholePackage";
          }
        });
    builtInSelectorRadioButton.addClickHandler(
        new ClickHandler() {
          public void onClick(ClickEvent event) {
            buildWholePackageLayout.setVisible(false);
            builtInSelectorLayout.setVisible(true);
            customSelectorLayout.setVisible(false);
            buildMode = "BuiltInSelector";
          }
        });
    customSelectorRadioButton.addClickHandler(
        new ClickHandler() {
          public void onClick(ClickEvent event) {
            buildWholePackageLayout.setVisible(false);
            builtInSelectorLayout.setVisible(false);
            customSelectorLayout.setVisible(true);
            buildMode = "customSelector";
          }
        });

    VerticalPanel verticalPanel = new VerticalPanel();

    HorizontalPanel wholePackageRadioButtonPanel = new HorizontalPanel();
    wholePackageRadioButtonPanel.add(wholePackageRadioButton);
    wholePackageRadioButtonPanel.add(
        new InfoPopup(constants.BuildWholePackage(), constants.BuildWholePackageTip()));
    verticalPanel.add(wholePackageRadioButtonPanel);

    HorizontalPanel builtInSelectorRadioButtonPanel = new HorizontalPanel();
    builtInSelectorRadioButtonPanel.add(builtInSelectorRadioButton);
    builtInSelectorRadioButtonPanel.add(
        new InfoPopup(constants.BuiltInSelector(), constants.BuiltInSelectorTip()));
    verticalPanel.add(builtInSelectorRadioButtonPanel);

    HorizontalPanel customSelectorRadioButtonPanel = new HorizontalPanel();
    customSelectorRadioButtonPanel.add(customSelectorRadioButton);
    customSelectorRadioButtonPanel.add(
        new InfoPopup(constants.CustomSelector(), constants.SelectorTip()));
    verticalPanel.add(customSelectorRadioButtonPanel);

    layout.addAttribute("", verticalPanel);
    wholePackageRadioButton.setValue(true);

    buildWholePackageLayout.setVisible(true);
    builtInSelectorLayout.setVisible(false);
    customSelectorLayout.setVisible(false);

    // Build whole package layout
    layout.addRow(buildWholePackageLayout);

    // Built-in selector layout
    builtInSelectorLayout.addRow(
        new HTML("&nbsp;&nbsp;<i>" + constants.BuildPackageUsingFollowingAssets() + "</i>"));

    HorizontalPanel builtInSelectorStatusPanel = new HorizontalPanel();
    final CheckBox enableStatusCheckBox = new CheckBox();
    enableStatusCheckBox.setValue(false);
    builtInSelectorStatusPanel.add(enableStatusCheckBox);
    builtInSelectorStatusPanel.add(
        new HTML("&nbsp;&nbsp;<i>" + constants.BuildPackageUsingBuiltInSelectorStatus() + " </i>"));
    final ListBox statusOperator = new ListBox();
    String[] vals = new String[] {"=", "!="};
    for (int i = 0; i < vals.length; i++) {
      statusOperator.addItem(vals[i], vals[i]);
    }
    builtInSelectorStatusPanel.add(statusOperator);

    final TextBox statusValue = new TextBox();
    statusValue.setTitle(constants.WildCardsSearchTip());
    builtInSelectorStatusPanel.add(statusValue);

    builtInSelectorLayout.addRow(builtInSelectorStatusPanel);

    HorizontalPanel builtInSelectorCatPanel = new HorizontalPanel();
    final CheckBox enableCategoryCheckBox = new CheckBox();
    enableCategoryCheckBox.setValue(false);
    builtInSelectorCatPanel.add(enableCategoryCheckBox);
    builtInSelectorCatPanel.add(
        new HTML("&nbsp;&nbsp;<i>" + constants.BuildPackageUsingBuiltInSelectorCat() + " </i>"));
    final ListBox catOperator = new ListBox();
    String[] catVals = new String[] {"=", "!="};
    for (int i = 0; i < catVals.length; i++) {
      catOperator.addItem(catVals[i], catVals[i]);
    }
    builtInSelectorCatPanel.add(catOperator);
    final CategoryExplorerWidget catChooser =
        new CategoryExplorerWidget(
            new CategorySelectHandler() {
              public void selected(String selectedPath) {}
            });
    ScrollPanel catScroll = new ScrollPanel(catChooser);
    catScroll.setAlwaysShowScrollBars(true);
    catScroll.setSize("300px", "130px");

    builtInSelectorCatPanel.add(catScroll);
    builtInSelectorLayout.addRow(builtInSelectorCatPanel);

    layout.addRow(builtInSelectorLayout);

    // Custom selector layout
    customSelectorLayout.setVisible(false);
    HorizontalPanel customSelectorPanel = new HorizontalPanel();
    customSelectorPanel.add(
        new HTML(
            "&nbsp;&nbsp;<i>"
                + constants.BuildPackageUsingCustomSelectorSelector()
                + " </i>")); // NON-NLS

    final ListBox customSelector = new ListBox();
    customSelector.setTitle(constants.WildCardsSearchTip());
    customSelectorPanel.add(customSelector);
    loadCustomSelectorList(customSelector);

    customSelectorLayout.addRow(customSelectorPanel);
    layout.addRow(customSelectorLayout);

    final Button b = new Button(constants.BuildPackage());
    b.setTitle(constants.ThisWillValidateAndCompileAllTheAssetsInAPackage());
    b.addClickHandler(
        new ClickHandler() {
          public void onClick(ClickEvent event) {
            doBuild(
                buildResults,
                statusOperator.getValue(statusOperator.getSelectedIndex()),
                statusValue.getText(),
                enableStatusCheckBox.getValue(),
                catOperator.getValue(catOperator.getSelectedIndex()),
                catChooser.getSelectedPath(),
                enableCategoryCheckBox.getValue(),
                customSelector.getSelectedIndex() != -1
                    ? customSelector.getValue(customSelector.getSelectedIndex())
                    : null);
          }
        });
    HorizontalPanel buildStuff = new HorizontalPanel();
    buildStuff.add(b);

    layout.addAttribute(constants.BuildBinaryPackage(), buildStuff);
    layout.addRow(
        new HTML("<i><small>" + constants.BuildingPackageNote() + "</small></i>")); // NON-NLS
    container.add(layout);

    // The build results
    container.add(buildResults);

    // UI below the results table
    layout = new FormStyleLayout();
    Button snap = new Button(constants.CreateSnapshotForDeployment());
    snap.addClickHandler(
        new ClickHandler() {
          public void onClick(ClickEvent event) {
            showSnapshotDialog(conf.getName(), null);
          }
        });
    layout.addAttribute(constants.TakeSnapshot(), snap);
    container.add(layout);

    initWidget(container);
  }