Package com.google.gwt.user.client.ui

Examples of com.google.gwt.user.client.ui.Panel


  private void showErrors() {
    clear();
    BuilderResult errors = result.result;

    Panel err = new SimplePanel();

    PackageBuilderWidget.showBuilderErrors(errors, err, editEvent);
    layout.startSection(constants.BuildErrorsUnableToRunScenarios());

    layout.addRow(err);
View Full Code Here


                        constraints.put( connectionRef,
                                         constraint );
                    }
                } );

                Panel panel = new HorizontalPanel();
                panel.add( new Label(constants.Priority()) );
                panel.add( priorityTextBox );
                panel.add( new Label(constants.ValueRuleFlow()) );
                panel.add( constraintTextBox );

                parametersForm.addAttribute( constraint.getName(),
                                             panel );
            }
        }
View Full Code Here

        return box;
    }

    private Widget listEditor(final ValueChanged changed) {
        Panel panel = new VerticalPanel();
        //nheron
        int i = 0;
        for (final FieldData f : this.field.collectionFieldList) {

            DirtyableHorizontalPane hpanel = new DirtyableHorizontalPane();

            FieldDataConstraintEditor fieldElement = new FieldDataConstraintEditor(f.collectionType, new ValueChanged() {
                public void valueChanged(String newValue) {
                    f.value = newValue ;
                    calculateValueFromList();
                    makeDirty();
                }
            }, f, givenFact, sce, scenario, executionTrace);
            hpanel.add(fieldElement);
            final int index = i;
            Image del = new ImageButton("images/delete_item_small.gif", Format.format(constants.AElementToDelInCollectionList(), "tt"), new ClickListener() {
                public void onClick(Widget w) {
                    field.collectionFieldList.remove(index);
                    calculateValueFromList();
                    refreshEditor();
                }
            });

            hpanel.add(del);

            Image addPattern = new ImageButton("images/new_item_below.png");
            addPattern.setTitle(constants.AddElementBelow());


            addPattern.addClickListener(new ClickListener(){
                public void onClick(Widget sender) {
                   FieldData newFieldData = new FieldData();
                   newFieldData.name = field.name;
                   newFieldData.collectionType = field.collectionType;
                   field.collectionFieldList.add(index+1,newFieldData);
                   calculateValueFromList();
                   refreshEditor();
                }
            });
            hpanel.add(addPattern);
            Image moveDown = new ImageButton("images/shuffle_down.gif");
            moveDown.setTitle(constants.MoveDownListMove());
            moveDown.addClickListener(new ClickListener(){
                public void onClick(Widget sender) {
                   if (index <field.collectionFieldList.size()-1){
                          FieldData onMyLine =field.collectionFieldList.get(index);
                          FieldData onDown =field.collectionFieldList.get(index+1);
                          field.collectionFieldList.set(index+1,onMyLine);
                          field.collectionFieldList.set(index,onDown);
                          calculateValueFromList();
                          refreshEditor();
                   }
                }
            });
            hpanel.add(moveDown);

            Image moveUp = new ImageButton("images/shuffle_up.gif");
            moveUp.setTitle(constants.MoveUpList());
            moveUp.addClickListener(new ClickListener(){
                public void onClick(Widget sender) {
                   if (index >0){
                          FieldData oneUp =field.collectionFieldList.get(index-1);
                          FieldData onMyLine =field.collectionFieldList.get(index);
                          field.collectionFieldList.set(index,oneUp);
                          field.collectionFieldList.set(index-1,onMyLine);
                          calculateValueFromList();
                          refreshEditor();
                   }
                }
            });
            hpanel.add(moveUp);
            panel.add(hpanel);
             i++;
        }
   

        if (this.field.collectionFieldList.size()==0){
            Image add = new ImageButton("images/new_item.gif", Format.format(constants.AElementToAddInCollectionList(), "tt"), new ClickListener() {
                public void onClick(Widget w) {
                    FieldData newFieldData = new FieldData();
                    newFieldData.name = field.name;
                    newFieldData.collectionType = field.collectionType;
                    field.collectionFieldList.add(newFieldData);
                    calculateValueFromList();
                    refreshEditor();
                }
            });
            panel.add(add);
        }
        return panel;
    }
View Full Code Here

    comments.setVisible(msgList.size() > 0);
  }

  private LinkMenuBar messagesMenuBar() {
    final Panel c = comments;
    final LinkMenuBar menuBar = new LinkMenuBar();
    menuBar.addItem(Util.C.messageExpandRecent(), new ExpandAllCommand(c, true) {
      @Override
      protected void expand(final CommentPanel w) {
        w.setOpen(w.isRecent());
View Full Code Here

    commentEditors = new ArrayList<CommentEditorPanel>();

    if (!r.getDrafts().isEmpty()) {
      draftsPanel.add(new SmallHeading(Util.C.headingPatchComments()));

      Panel panel = null;
      String priorFile = "";
      for (final PatchLineComment c : r.getDrafts()) {
        final Patch.Key patchKey = c.getKey().getParentKey();
        final String fn = patchKey.get();
        if (!fn.equals(priorFile)) {
          panel = new FlowPanel();
          panel.addStyleName(Gerrit.RESOURCES.css().patchComments());
          draftsPanel.add(panel);
          // Parent table can be null here since we are not showing any
          // next/previous links
          panel.add(new PatchLink.SideBySide(
              PatchTable.getDisplayFileName(patchKey), null, patchKey, 0, null, null));
          priorFile = fn;
        }

        final CommentEditorPanel editor = new CommentEditorPanel(c);
        editor.setAuthorNameText(Util.M.lineHeader(c.getLine()));
        editor.setOpen(true);
        commentEditors.add(editor);
        panel.add(editor);
      }
    }

    submit.setVisible(r.canSubmit());
    if (Gerrit.getConfig().testChangeMerge()) {
View Full Code Here

        presenter.onClose();
    }

    public void showErrors(BuilderResult errors) {

        Panel err = new SimplePanel();

        PackageBuilderWidget.showBuilderErrors(
                errors,
                err,
                clientFactory);
View Full Code Here

    public DecisionTableControlsWidget( final AbstractDecisionTableWidget dtable,
                                        final GuidedDecisionTable52 model,
                                        final Identity identity,
                                        final boolean isReadOnly ) {

        Panel panel = new HorizontalPanel();

        // Add row button
        addRowButton = new Button( GuidedDecisionTableConstants.INSTANCE.AddRow(),
                                   new ClickHandler() {
                                       public void onClick( ClickEvent event ) {
                                           if ( dtable != null ) {
                                               dtable.appendRow();
                                           }
                                       }
                                   } );
        addRowButton.setEnabled( !isReadOnly );
        panel.add( addRowButton );

        //Otherwise button
        otherwiseButton = new Button( GuidedDecisionTableConstants.INSTANCE.Otherwise(),
                                      new ClickHandler() {
                                          public void onClick( ClickEvent event ) {
                                              if ( dtable != null ) {
                                                  dtable.makeOtherwiseCell();
                                              }
                                          }
                                      } );
        otherwiseButton.setEnabled( false );
        panel.add( otherwiseButton );

        // Analyse button
        analyzeButton = new Button( GuidedDecisionTableConstants.INSTANCE.Analyze(),
                                    new ClickHandler() {
                                        public void onClick( ClickEvent event ) {
                                            if ( dtable != null ) {
                                                dtable.analyze();
                                            }
                                        }
                                    } );
        analyzeButton.setEnabled( !isReadOnly );
        panel.add( analyzeButton );

        // Audit Log button
        auditLogButton = new Button( GuidedDecisionTableConstants.INSTANCE.DecisionTableAuditLog(),
                                     new ClickHandler() {
                                         public void onClick( ClickEvent event ) {
                                             if ( dtable != null ) {
                                                 AuditLog log = new AuditLog( dtable.model,
                                                                              identity );
                                                 log.show();
                                             }
                                         }
                                     } );
        auditLogButton.setEnabled( !isReadOnly );
        panel.add( auditLogButton );

        initWidget( panel );
    }
View Full Code Here

      buffer.deleteCharAt(buffer.length() - 1);
    buffer.append("]}");
    return buffer.toString();
  }
  private void addPopUpWidgets(Widget vkMainDrawingPanel, StringBuffer buffer) {
    Panel parent = (Panel) vkMainDrawingPanel.getParent();
    Iterator<Widget> popUpWidgets = parent.iterator();
    while(popUpWidgets.hasNext()) {
      Widget popup = popUpWidgets.next();
      if(popup != vkMainDrawingPanel)
        serializeChild(popup, buffer);
    }
View Full Code Here

  }
  public void refreshStylePanel(Element invokingElement) {
    TabPanel styleTabPanel = (TabPanel)getWidget();
    styleTabPanel.clear();
    styleTabPanel.setPixelSize(500, 250);
    Panel panel = addDecorationPanel(invokingElement);
    styleTabPanel.add(panel, "Decorations");
    styleTabPanel.getTabBar().selectTab(0);
    panel.setSize("100%", "250px");
    panel = addFontPanel(invokingElement);
    styleTabPanel.add(panel, "Font & Text");
    panel.setSize("100%", "250px");
    panel = addColorPanel(invokingElement);
    styleTabPanel.add(panel, "Color & Background");
    panel.setSize("100%", "250px");
    panel = addMiscellaneousPanel(invokingElement);
    styleTabPanel.add(panel, "Miscellaneous");
    panel.setSize("100%", "250px");
  }
View Full Code Here

    int rowCount = sourceTable.getRowCount();
    VkStateHelper.getInstance().setDesignerMode(true);
    for(int i = 0; i < rowCount; i++) {
      for(int j = 0, colNum = 0, columnCount = sourceTable.getCellCount(i); j < columnCount; j++) {
        targetTable.makeCell(i, j , colNum);
        Panel sourcePanel = (Panel) sourceTable.getWidget(i, j);
        Panel targetPanel = (Panel) targetTable.getWidget(i, j);
        for(Widget k : sourcePanel) {
          IVkWidget currentWidget = ((IVkWidget) k);
          Widget newWidget = VkStateHelper.getInstance().getEngine().getWidget(currentWidget.getWidgetName());
          VkStateHelper.getInstance().getWidgetEngineMapping().getEngineMap().get(currentWidget.getWidgetName()).deepClone((Widget) currentWidget, newWidget);
          targetPanel.add(newWidget);
        }
        int colspan = sourceTable.getColSpan(i, j);
        colNum += colspan;
        targetTable.setRowSpan(i, j, sourceTable.getRowSpan(i, j));
        targetTable.setColSpan(i, j, colspan);
View Full Code Here

TOP

Related Classes of com.google.gwt.user.client.ui.Panel

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.