Example usage for com.google.gwt.user.client.ui HorizontalPanel setCellVerticalAlignment

List of usage examples for com.google.gwt.user.client.ui HorizontalPanel setCellVerticalAlignment

Introduction

In this page you can find the example usage for com.google.gwt.user.client.ui HorizontalPanel setCellVerticalAlignment.

Prototype

public void setCellVerticalAlignment(IsWidget w, VerticalAlignmentConstant align) 

Source Link

Document

Overloaded version for IsWidget.

Usage

From source file:web.diva.client.somclust.view.UpdatedSomClustPanel.java

public UpdatedSomClustPanel() {
    this.setAnimationEnabled(true);
    this.ensureDebugId("cwBasicPopup-imagePopup");
    this.setModal(false);

    VerticalPanel framLayout = new VerticalPanel();
    framLayout.setWidth("300px");
    framLayout.setHeight("150px");

    VerticalPanel mainBodyLayout = new VerticalPanel();

    mainBodyLayout.setWidth("298px");
    mainBodyLayout.setHeight("150px");
    mainBodyLayout.setStyleName("modalPanelBody");

    HorizontalPanel topLayout = new HorizontalPanel();
    topLayout.setWidth("298px");
    topLayout.setHeight("20px");

    Label title = new Label("Hierarchical Clustering Settings");
    title.setStyleName("labelheader");
    topLayout.add(title);//from www.  j a v  a  2s . c  o  m
    title.setWidth(200 + "px");
    title.setHeight("18px");
    topLayout.setCellHorizontalAlignment(title, HorizontalPanel.ALIGN_LEFT);
    topLayout.setCellVerticalAlignment(title, HorizontalPanel.ALIGN_TOP);

    Label closeBtn = new Label();

    closeBtn.addStyleName("close");
    closeBtn.setHeight("16px");
    closeBtn.setWidth("16px");

    closeBtn.addClickHandler(new ClickHandler() {
        @Override
        public void onClick(ClickEvent event) {
            hide();
        }
    });

    topLayout.add(closeBtn);
    topLayout.setCellHorizontalAlignment(closeBtn, HorizontalPanel.ALIGN_RIGHT);
    topLayout.setCellVerticalAlignment(closeBtn, HorizontalPanel.ALIGN_TOP);

    //main body

    HorizontalPanel linkageLayout = new HorizontalPanel();
    mainBodyLayout.add(linkageLayout);
    linkageLayout.setWidth("298px");
    linkageLayout.setHeight("20px");

    Label linkageTitle = new Label("LINKAGE ");
    linkageTitle.setWidth("100px");
    linkageTitle.setHeight("20px");
    linkageTitle.setStyleName("secheadertitle");
    linkageLayout.add(linkageTitle);
    linkageLayout.setCellHorizontalAlignment(linkageTitle, HorizontalPanel.ALIGN_LEFT);

    linkage = new ListBox();
    linkage.setWidth("150px");
    linkage.setHeight("20px");
    linkage.setTitle("LINKAGE");

    linkage.addItem("SINGLE");
    linkage.addItem("WPGMA");
    linkage.addItem("UPGMA");
    linkage.addItem("COMPLETE");
    linkage.setSelectedIndex(1);
    linkageLayout.add(linkage);
    linkageLayout.setCellHorizontalAlignment(linkage, HorizontalPanel.ALIGN_LEFT);

    HorizontalPanel distanceMeasureLayout = new HorizontalPanel();
    mainBodyLayout.add(distanceMeasureLayout);
    distanceMeasureLayout.setWidth("298px");
    distanceMeasureLayout.setHeight("20px");

    Label distanceMeasureTitle = new Label("Distance Measure");
    distanceMeasureTitle.setWidth("100px");
    distanceMeasureTitle.setHeight("20px");
    distanceMeasureTitle.setStyleName("secheadertitle");
    distanceMeasureLayout.add(distanceMeasureTitle);
    distanceMeasureLayout.setCellHorizontalAlignment(distanceMeasureTitle, HorizontalPanel.ALIGN_LEFT);
    distanceMeasure = new ListBox();
    distanceMeasure.setTitle("DISTANCE MEASURE");
    distanceMeasure.setWidth("150px");
    distanceMeasure.setHeight("20px");
    distanceMeasure.addItem("Squared Euclidean");
    distanceMeasure.addItem("Euclidean");
    distanceMeasure.addItem("Bray Curtis");
    distanceMeasure.addItem("Manhattan");
    distanceMeasure.addItem("Cosine Correlation");
    distanceMeasure.addItem("Pearson Correlation");
    distanceMeasure.addItem("Uncentered Pearson Correlation");
    distanceMeasure.addItem("Euclidean (Nullweighted)");
    distanceMeasure.addItem("Camberra");
    distanceMeasure.addItem("Chebychev");
    distanceMeasure.addItem("Spearman Rank Correlation");
    distanceMeasure.setSelectedIndex(0);
    distanceMeasureLayout.add(distanceMeasure);
    distanceMeasureLayout.setCellHorizontalAlignment(distanceMeasureTitle, HorizontalPanel.ALIGN_LEFT);

    clusterColumns = new CheckBox("Cluster Columns");
    clusterColumns.setValue(true);
    clusterColumns.setHeight("20px");
    clusterColumns.setStyleName("secheadertitle");
    mainBodyLayout.add(clusterColumns);

    //ok button
    HLayout hlo = new HLayout();
    mainBodyLayout.add(hlo);
    hlo.setWidth("298px");
    hlo.setHeight("30px");
    processBtn = new IButton("Run Clustering");
    hlo.addMember(processBtn);

    hlo.setMargin(5);
    hlo.setMembersMargin(1);
    hlo.setAlign(Alignment.CENTER);

    framLayout.add(topLayout);
    framLayout.add(mainBodyLayout);
    this.setWidget(framLayout);
    framLayout.setStyleName("modalPanelLayout");

}

From source file:web.diva.client.unused.ClusteringLayoutComponent.java

public ClusteringLayoutComponent(SomClusteringResult somClusteringResults, SelectionManager selectionManager,
        DivaServiceAsync DivaClientService, int width, int height, boolean clusterColumn) {
    this.clustColumn = clusterColumn;
    this.DivaClientService = DivaClientService;

    tooltip.setStyleName("clustertooltip");

    mainThumbClusteringLayout = new VLayout();
    mainThumbClusteringLayout.setStyleName("somclustering");
    mainThumbClusteringLayout.setHeight("89%");
    mainThumbClusteringLayout.setWidth("29%");
    mainThumbClusteringLayout.setMargin(2);
    mainThumbClusteringLayout.setMembersMargin(0);

    HorizontalPanel topLayout = new HorizontalPanel();
    mainThumbClusteringLayout.addMember(topLayout);
    topLayout.setWidth("100%");
    topLayout.setHeight("18px");
    topLayout.setStyleName("whiteLayout");
    Label title = new Label("Hierarchical Clustering");
    title.setStyleName("labelheader");
    topLayout.add(title);//from ww w.j a  va2s .c o m
    title.setWidth("70%");
    title.setHeight("18px");

    topLayout.setCellHorizontalAlignment(title, HorizontalPanel.ALIGN_LEFT);

    HorizontalPanel btnsLayout = new HorizontalPanel();
    btnsLayout.setWidth("34px");
    btnsLayout.setHeight("18px");
    topLayout.add(btnsLayout);
    topLayout.setCellHorizontalAlignment(btnsLayout, HorizontalPanel.ALIGN_RIGHT);
    topLayout.setCellVerticalAlignment(btnsLayout, HorizontalPanel.ALIGN_TOP);

    Label minSettingBtn = new Label();
    minSettingBtn.addStyleName("settings");
    minSettingBtn.setHeight("16px");
    minSettingBtn.setWidth("16px");
    btnsLayout.add(minSettingBtn);
    btnsLayout.setCellHorizontalAlignment(minSettingBtn, HorizontalPanel.ALIGN_RIGHT);
    Label maxmizeBtn = new Label();
    maxmizeBtn.addStyleName("maxmize");
    maxmizeBtn.setHeight("16px");
    maxmizeBtn.setWidth("16px");
    btnsLayout.add(maxmizeBtn);
    btnsLayout.setCellHorizontalAlignment(maxmizeBtn, HorizontalPanel.ALIGN_RIGHT);

    mainThumbClusteringLayout.addMember(mainClusterPanelLayout);

    //add tooltip panel after clustering panel
    mainThumbClusteringLayout.addMember(tooltipPanel);
    tooltipPanel.setWidth("100%");
    tooltipPanel.setHeight("25px");
    tooltipPanel.setStyleName("whiteLayout");
    tooltipPanel.add(tooltip);
    tooltipPanel.setCellHorizontalAlignment(tooltip, HorizontalPanel.ALIGN_CENTER);
    tooltipPanel.setCellVerticalAlignment(tooltip, HorizontalPanel.ALIGN_TOP);
    tooltip.setWidth("100%");
    tooltip.setHeight("24px");
    //        sideTreeImg = new TopTreeImg(somClusteringResults.getSideTreeImg(), somClusteringResults.getRowNode(), 2, tooltip,0);//"data:sideTreeImg/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAAMPCAIAAAAfPw1YAAAUM0lEQVR42u3d2XYjqRIFUP//T/u+3nZpSCACAtgsP3S7pJy0fQhQDj+/mpbQfkpshHZeKwLLn7jEAkt78RH++QFLC8IksbQwWP/+t8TSBju7v7D++0uwtPZ8evcbiaW1JdOrKur346cGlvaMy0tY73/A0nphfV4MWNpTWC0/YGlDySSxtCmwJJYWCcs8lva9chrhKLG0t5MIA0GlxtKCYP37Loml9cB62W/+80uwwGqH9fnFEkt7BOvzSQ3vFgzWpUO/518t//nNu7NlzLyLpbZ8+gDrwzrBAqvt7b4r1FJgPVwnWGANlWgSC6yoNJJY2gNYOT9g3Q0rb51ggRW/OokFVqwn3xWCFcfo1RfSYIEVtMz//gYss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KROygb1PEAAAAASUVORK5CYII=");
    //        heatMapImg = new SplitHeatmapImg(somClusteringResults.getHeatMapImg(), somClusteringResults.getRowNames(), somClusteringResults.getColNames(), somClusteringResults.getValues(), tooltip,1,0,0);
    interactiveColImage = new Image("images/w.png");
    scaleImg = new Image(somClusteringResults.getScaleImgUrl());

    mainClusterPanelLayout.setWidth("100%");
    mainClusterPanelLayout.setHeight("95%");
    mainClusterPanelLayout.setStyleName("whiteLayout");
    mainClusterPanelLayout.setAlwaysShowScrollBars(false);

    mainClusterPanelLayout.add(clusterLayout);
    clusterLayout.setWidth("100%");
    clusterLayout.setHeight("100%");
    clusterLayout.setSpacing(0);

    clusterLayout.add(topClusterLayout);
    clusterLayout.setCellHorizontalAlignment(topClusterLayout, VerticalPanel.ALIGN_CENTER);
    clusterLayout.setCellVerticalAlignment(topClusterLayout, VerticalPanel.ALIGN_MIDDLE);

    clusterLayout.add(middleClusterLayout);
    clusterLayout.setCellHorizontalAlignment(middleClusterLayout, VerticalPanel.ALIGN_CENTER);
    clusterLayout.setCellVerticalAlignment(middleClusterLayout, VerticalPanel.ALIGN_MIDDLE);

    clusterLayout.add(bottomClusterLayout);
    clusterLayout.setCellHorizontalAlignment(bottomClusterLayout, VerticalPanel.ALIGN_CENTER);
    clusterLayout.setCellVerticalAlignment(bottomClusterLayout, VerticalPanel.ALIGN_MIDDLE);

    if (clusterColumn) {
        topClusterLayout.setHeight(70 + "px");
        topClusterLayout.setWidth("20%");
        //            upperTreeImg = new TopTreeImg(somClusteringResults.getUpperTreeImgUrl(), somClusteringResults.getColNode(), 1, tooltip,0,0);
        spacer.setSize((200 + "px"), (70 + "px"));
        spacer.setStyleName("borderless");

        spacer2.setSize((10 + "px"), (70 + "px"));
        spacer2.setStyleName("borderless");

        topClusterLayout.setHorizontalAlignment(HorizontalPanel.ALIGN_LEFT);
        topClusterLayout.add(spacer);
        topClusterLayout.setCellHorizontalAlignment(spacer, HorizontalPanel.ALIGN_LEFT);
        topClusterLayout.setCellWidth(spacer, 200 + "px");

        topClusterLayout.add(upperTreeImg);
        topClusterLayout.setCellHorizontalAlignment(upperTreeImg, HorizontalPanel.ALIGN_LEFT);
        topClusterLayout.setCellWidth(upperTreeImg, upperTreeImg.getWidth() + "px");
        topClusterLayout.add(spacer2);
        topClusterLayout.setCellHorizontalAlignment(spacer2, HorizontalPanel.ALIGN_LEFT);
        topClusterLayout.setCellWidth(spacer2, "10px");
    } else {
        topClusterLayout.setHeight(0 + "px");
    }

    initThumLayout(somClusteringResults);
    clustInfoLabel.setWidth(210 + "px");
    clustInfoLabel.setHeight("20px");
    clustInfoLabel.setStyleName("info");
    //       
    bottomClusterLayout.add(clustInfoLabel);

    bottomClusterLayout.add(scaleImg);

    if (upperTreeImg != null) {
        upperTreeImg.addClickHandler(new ClickHandler() {
            @Override
            public void onClick(ClickEvent event) {
                int y = (int) (event.getY());
                int x = ((int) (event.getX()));
                if (upperTreeImg.isSelectedNode()) {
                    //                        updateUpperTreeSelection(x, y);
                }
            }
        });
    }

    //        sideTreeImg.addClickHandler(new ClickHandler() {
    //            @Override
    //            public void onClick(ClickEvent event) {
    //                int y = (int) (event.getY());
    //                int x = ((int) (event.getX()));
    //                if (sideTreeImg.isSelectedNode()) {
    ////                    updateSideTreeSelection(x, y);
    //                }
    //
    //            }
    //
    //        });
    //
    this.selectionManager = selectionManager;
    //       

    final UpdatedSomClustPanel clusteringSettingPanel = new UpdatedSomClustPanel();

    ///done with normal mode start setteing and maxmize mode
    ClickHandler settingClickHandler = new ClickHandler() {

        @Override
        public void onClick(ClickEvent event) {
            //                if (clusteringPopup.isShowing()) {
            //                    clusteringPopup.hide(true);
            //                }
            clusteringSettingPanel.center();
            clusteringSettingPanel.show();

        }
    };
    minSettingBtn.addClickHandler(settingClickHandler);

    clusteringSettingPanel.getProcessBtn()
            .addClickHandler(new com.smartgwt.client.widgets.events.ClickHandler() {

                @Override
                public void onClick(com.smartgwt.client.widgets.events.ClickEvent event) {
                    clusteringSettingPanel.hide();
                    clustColumn = clusteringSettingPanel.isClusterColumns();
                    //                runSomClustering(clusteringSettingPanel.getLinkageValue(), clusteringSettingPanel.getDistanceMeasureValue(), clustColumn);

                }
            });
    maxmizeBtn.addClickHandler(new com.google.gwt.event.dom.client.ClickHandler() {
        @Override
        public void onClick(com.google.gwt.event.dom.client.ClickEvent event) {

            //                clusteringPopup.center();
            //                clusteringPopup.show();
            //                if (newUpdatedDrawPanel == null) {
            //                    newUpdatedDrawPanel = new MaxmizeClustering(sideTreeImg.getWidth(),sideTreeImg.getHeight(), defaultSideTreeImgURL, clustColumn);
            //                    mainClusteringPopupBodyLayout.addMember(newUpdatedDrawPanel);
            //                }

        }
    });
}

From source file:web.diva.client.unused.RankPanel.java

public RankPanel() {
    this.setAnimationEnabled(true);
    this.ensureDebugId("cwBasicPopup-imagePopup");
    this.setModal(false);

    VerticalPanel framLayout = new VerticalPanel();
    framLayout.setWidth("485px");
    framLayout.setHeight("230px");

    VerticalPanel mainBodyLayout = new VerticalPanel();
    mainBodyLayout.setWidth("483px");
    mainBodyLayout.setHeight("308px");
    mainBodyLayout.setStyleName("modalPanelBody");

    HorizontalPanel topLayout = new HorizontalPanel();
    //        mainBodyLayout.addMember(topLayout);
    topLayout.setWidth(483 + "px");
    topLayout.setHeight("18px");
    topLayout.setStyleName("whiteLayout");
    //        topLayout.setSpacing(3);

    Label title = new Label("Rank Product (Differential Expression)");
    topLayout.add(title);//w  w  w .  j  a  v a2 s  .c  om
    title.setStyleName("labelheader");
    title.setWidth(220 + "px");
    topLayout.setCellHorizontalAlignment(title, HorizontalPanel.ALIGN_LEFT);
    topLayout.setCellVerticalAlignment(title, HorizontalPanel.ALIGN_TOP);

    Label closeBtn = new Label();
    closeBtn.addStyleName("close");
    closeBtn.setHeight("16px");
    closeBtn.setWidth("16px");

    closeBtn.addClickHandler(new ClickHandler() {

        @Override
        public void onClick(ClickEvent event) {
            hide(true);
        }
    });

    topLayout.add(closeBtn);
    topLayout.setCellHorizontalAlignment(closeBtn, HorizontalPanel.ALIGN_RIGHT);
    topLayout.setCellVerticalAlignment(closeBtn, HorizontalPanel.ALIGN_TOP);

    try {

        VerticalPanel groupsTableLayout = new VerticalPanel();
        mainBodyLayout.add(groupsTableLayout);
        groupsTableLayout.setWidth(483 + "px");
        groupsTableLayout.setHeight("100px");
        groupsTableLayout.setStyleName("whiteLayout");

        Label tableTitle = new Label("Column Groups (Max 2)");
        tableTitle.setHeight("20px");
        tableTitle.setWidth("250px");
        tableTitle.setStyleName("secheadertitle");
        groupsTableLayout.add(tableTitle);

        groupsTableLayout.setCellVerticalAlignment(tableTitle, VerticalPanel.ALIGN_MIDDLE);

        selectionTable = new ListGrid();
        initSelectionTable();
        groupsTableLayout.add(selectionTable);
        groupsTableLayout.setCellVerticalAlignment(selectionTable, VerticalPanel.ALIGN_MIDDLE);
        groupsTableLayout.setCellHorizontalAlignment(selectionTable, VerticalPanel.ALIGN_CENTER);

        HorizontalPanel middleLayout = new HorizontalPanel();
        middleLayout.setWidth("483px");
        middleLayout.setHeight("100px");
        middleLayout.setStyleName("whiteLayout");

        DynamicForm form = new DynamicForm();
        form.setIsGroup(false);
        form.setWidth(150);
        form.setLayoutAlign(Alignment.CENTER);
        form.setHeight("100px");
        form.setNumCols(1);

        form.setLeft(20);

        radioGroupItem = new RadioGroupItem();
        radioGroupItem.setShowTitle(false);
        radioGroupItem.setHeight("50px");
        radioGroupItem.setWidth("150px");

        radioGroupItem.setTitle("Values ");
        radioGroupItem.setValueMap("Log 2", "Linear");
        radioGroupItem.setValue("Log 2");
        radioGroupItem.setShouldSaveValue(true);

        defaultGroupSelectionItem = new CheckboxItem();
        defaultGroupSelectionItem.setStartRow(true);
        defaultGroupSelectionItem.setTitle("Default Rank Product");
        defaultGroupSelectionItem.setShowTitle(false);
        defaultGroupSelectionItem.setValueMap("Default Rank Product");
        defaultGroupSelectionItem.setValue(true);
        //            defaultGroupSelectionItem.setTitleOrientation(TitleOrientation.RIGHT);
        defaultGroupSelectionItem.addChangeHandler(new ChangeHandler() {
            @Override
            public void onChange(ChangeEvent event) {
                defaultRank = (((Boolean) event.getValue()));
            }
        });
        defaultGroupSelectionItem.setTooltip("loaded by default on loading the dataset");
        form.setFields(radioGroupItem, defaultGroupSelectionItem);
        form.redraw();
        middleLayout.add(form);
        middleLayout.setCellWidth(form, "170px");
        middleLayout.setCellHorizontalAlignment(form, HorizontalPanel.ALIGN_CENTER);

        form2 = new DynamicForm();
        form2.setIsGroup(false);
        form2.setHeight("60px");
        form2.setWidth100();
        form2.setMargin(0);
        form2.setPadding(1);
        form2.setNumCols(3);

        permutation = new TextItem();
        permutation.setTitle("Permutation");
        permutation.setBrowserInputType("digits");
        permutation.setRequired(true);

        permutation.setValidators(new IsIntegerValidator());
        permutation.setValue(400);

        seed = new TextItem();
        seed.setTitle("Seed");
        seed.setRequired(true);
        seed.setBrowserInputType("digits");
        seed.disable();
        seed.setValue(Random.nextInt(1000000001));

        final ButtonItem btn = new ButtonItem("seed", "seed");
        btn.setStartRow(false);
        btn.setWidth(40);
        btn.addClickHandler(new com.smartgwt.client.widgets.form.fields.events.ClickHandler() {
            @Override
            public void onClick(com.smartgwt.client.widgets.form.fields.events.ClickEvent event) {
                seed.setValue(Random.nextInt(1000000001));
            }
        });
        form2.setFields(permutation, seed, btn);
        form2.setColWidths(new Object[] { 100, "*", 60 });
        //            form2.redraw();
        okBtn = new IButton("Process");
        okBtn.setWidth("200px");
        okBtn.setHeight("20px");
        okBtn.setAlign(Alignment.CENTER);
        VLayout hlo = new VLayout();
        hlo.setWidth("220px");
        hlo.setHeight("80px");
        hlo.setAlign(Alignment.CENTER);
        hlo.addMember(form2);

        form.redraw();

        middleLayout.add(hlo);

        mainBodyLayout.add(middleLayout);
        mainBodyLayout.add(okBtn);
        mainBodyLayout.setCellHorizontalAlignment(okBtn, VerticalPanel.ALIGN_CENTER);
    } catch (Exception e) {
        Window.alert("error is ");
    }

    errorlabl = new HTML(
            "<p style='font-size: 10px;color:red;margin-left: 20px;height=20px;'>PLEASE CHECK YOUR DATA INPUT .. PLEASE NOTE THAT YOU CAN NOT SELECT MORE THAN 2 GROUPS</p>");
    errorlabl.setVisible(false);
    errorlabl.setHeight("50px");
    errorlabl.setWidth("398px");
    mainBodyLayout.add(errorlabl);
    framLayout.add(topLayout);
    framLayout.add(mainBodyLayout);
    this.setWidget(framLayout);
    framLayout.setStyleName("modalPanelLayout");
    this.show();
    this.hide();

}

From source file:web.diva.client.view.core.GroupPanel.java

public GroupPanel() {

    this.setAnimationEnabled(true);
    this.ensureDebugId("cwBasicPopup-imagePopup");
    this.setModal(false);
    //        this.getElement().setAttribute("style", "overflow: visible; visibility: visible; margin-left: 40%; margin-top: auto; position: absolute; left:0px; top:0px; background: none;width: 230px;height: 170px; clip:auto;");

    framLayout = new VLayout();
    framLayout.setWidth(230);//from www .  j a va 2s. com
    framLayout.setHeight(170);

    mainBodyLayout = new VLayout();
    mainBodyLayout.setWidth(228);
    mainBodyLayout.setHeight(148);
    mainBodyLayout.setMembersMargin(5);

    try {

        HorizontalPanel topLayout = new HorizontalPanel();
        topLayout.setWidth("228px");
        topLayout.setHeight("20px");
        topLayout.setSpacing(3);
        framLayout.addMember(topLayout);

        Label title = new Label("Create Group");
        title.setStyleName("labelheader");
        topLayout.add(title);
        title.setWidth(170 + "px");
        title.setHeight("18px");
        topLayout.setCellHorizontalAlignment(title, HorizontalPanel.ALIGN_LEFT);
        topLayout.setCellVerticalAlignment(title, HorizontalPanel.ALIGN_TOP);

        Label closeBtn = new Label();

        closeBtn.addStyleName("close");
        closeBtn.setHeight("16px");
        closeBtn.setWidth("16px");

        closeBtn.addClickHandler(new ClickHandler() {
            @Override
            public void onClick(ClickEvent event) {
                hide();
            }
        });

        topLayout.add(closeBtn);
        topLayout.setCellHorizontalAlignment(closeBtn, HorizontalPanel.ALIGN_RIGHT);
        topLayout.setCellVerticalAlignment(closeBtn, HorizontalPanel.ALIGN_TOP);
    } catch (Exception e) {
        Window.alert("error");
    }
    framLayout.addMember(mainBodyLayout);
    mainBodyLayout.setStyleName("modalPanelBody");
    form = new DynamicForm();
    form.setGroupTitle("Create Group");
    form.setWidth(228);
    form.setLayoutAlign(Alignment.CENTER);

    name = new TextItem();
    name.setTitle("Group Name");
    name.setRequired(true);

    description = new TextItem();
    description.setTitle("Description");
    description.setRequired(true);
    colorPicker = new ColorPickerItem("groupColor", "Group Color");
    colorPicker.setRequired(Boolean.TRUE);
    //        colorPicker.getPicker().setZIndex(framLayout.getZIndex()+1000);
    //       colorPicker.setValue("red");
    //        SC.say(colorPicker.getPicker().getScClassName()+"  "+colorPicker.getPicker().getZIndex());
    members = new TextItem();
    members.setTitle("Memebers");
    members.setRequired(true);

    members.disable();

    form.setFields(name, description, colorPicker, members);
    form.redraw();
    mainBodyLayout.addMember(form);

    HorizontalPanel hlo = new HorizontalPanel();
    mainBodyLayout.addMember(hlo);
    hlo.setWidth("228px");
    hlo.setHeight("20px");
    okBtn = new IButton("Process");
    hlo.add(okBtn);
    hlo.setCellHorizontalAlignment(okBtn, HorizontalPanel.ALIGN_CENTER);
    hlo.setCellVerticalAlignment(okBtn, HorizontalPanel.ALIGN_MIDDLE);

    this.setWidget(framLayout);
    framLayout.setStyleName("modalPanelLayout");
    framLayout.redraw();
    this.show();
    this.hide();

}

From source file:web.diva.client.view.core.RowGroupPanel.java

public RowGroupPanel(List<DivaGroup> rowGroupsList, String type, SelectionStyle selectionStyle) {

    this.setAnimationEnabled(true);
    this.ensureDebugId("cwBasicPopup-imagePopup");
    this.setModal(false);

    framLayout = new VerticalPanel();
    framLayout.setWidth("400px");
    framLayout.setHeight("256px");

    mainBodyLayout = new VerticalPanel();
    mainBodyLayout.setWidth("398px");
    mainBodyLayout.setHeight("234px");
    mainBodyLayout.setStyleName("modalPanelBody");

    HorizontalPanel topLayout = new HorizontalPanel();
    //        topLayout.setMembersMargin(1);
    topLayout.setWidth("398px");
    topLayout.setHeight("20px");
    framLayout.add(topLayout);/*  w  ww . j a v  a  2  s  .  c  o  m*/
    framLayout.add(mainBodyLayout);
    Label title = new Label(type);
    title.setStyleName("labelheader");
    topLayout.add(title);
    title.setWidth(200 + "px");
    topLayout.setCellHorizontalAlignment(title, HorizontalPanel.ALIGN_LEFT);
    topLayout.setCellVerticalAlignment(title, HorizontalPanel.ALIGN_TOP);

    Label closeBtn = new Label();

    closeBtn.addStyleName("close");
    closeBtn.setHeight("16px");
    closeBtn.setWidth("16px");

    closeBtn.addClickHandler(new ClickHandler() {

        @Override
        public void onClick(ClickEvent event) {
            hide();
        }
    });

    topLayout.add(closeBtn);
    topLayout.setCellHorizontalAlignment(closeBtn, HorizontalPanel.ALIGN_RIGHT);
    topLayout.setCellVerticalAlignment(closeBtn, HorizontalPanel.ALIGN_TOP);
    try {

        selectionTable = new ListGrid();
        initSelectionTable(selectionStyle);
        mainBodyLayout.add(selectionTable);
        this.updateData(rowGroupsList);
        selectionTable.addCellSelectionChangedHandler(new CellSelectionChangedHandler() {

            @Override
            public void onCellSelectionChanged(CellSelectionChangedEvent event) {

                ListGridRecord[] records = selectionTable.getRecords();
                int counter = 0;
                for (ListGridRecord record : records) {
                    if (Boolean.valueOf(record.getAttribute("selection")) == true) {
                        counter++;
                        if (counter > 1) {
                            event.cancel();
                            errorlabl.setVisible(true);

                        }
                    }
                }
            }

        });

    } catch (Exception e) {
        Window.alert("error is ");
    }

    if (type.equalsIgnoreCase("Create Sub-Dataset")) {
        form = new DynamicForm();
        form.setGroupTitle("");
        form.setWidth(398);
        form.setLayoutAlign(Alignment.CENTER);

        name = new TextItem();
        name.setTitle("Sub-DS Name");
        name.setRequired(true);
        name.setWidth(200);
        form.setFields(name);
        form.redraw();
        mainBodyLayout.add(form);

    }

    HorizontalPanel hlo = new HorizontalPanel();
    hlo.setWidth("398px");
    hlo.setHeight("30px");
    okBtn = new IButton(type);
    okBtn.setWidth(200);
    hlo.add(okBtn);
    hlo.setCellHorizontalAlignment(okBtn, HorizontalPanel.ALIGN_CENTER);
    hlo.setCellVerticalAlignment(okBtn, HorizontalPanel.ALIGN_MIDDLE);

    mainBodyLayout.add(hlo);

    errorlabl = new HTML(
            "<h4 style='color:red;margin-left: 20px;height=20px;'>PLEASE CHECK YOUR DATA INPUT ..</h4>");
    errorlabl.setVisible(false);
    errorlabl.setHeight("30px");
    errorlabl.setWidth("40px");
    mainBodyLayout.add(errorlabl);
    rowGroupsList = null;
    //        mainBodyLayout.redraw();
    this.setWidget(framLayout);
    framLayout.setStyleName("modalPanelLayout");
    this.show();
    this.hide();

}

From source file:web.diva.client.view.core.SaveAsPanel.java

public SaveAsPanel(String fileType, final String url) {
    this.setAnimationEnabled(true);
    this.ensureDebugId("cwBasicPopup-imagePopup");
    this.setModal(false);

    VerticalPanel framLayout = new VerticalPanel();
    framLayout.setWidth("200px");
    framLayout.setHeight("80px");

    VerticalPanel mainBodyLayout = new VerticalPanel();
    mainBodyLayout.setWidth("198px");
    mainBodyLayout.setHeight("78px");

    mainBodyLayout.setStyleName("modalPanelBody");

    HorizontalPanel topLayout = new HorizontalPanel();
    topLayout.setWidth("200px");
    topLayout.setHeight("20px");
    Label title = new Label("Save " + fileType);
    title.setStyleName("labelheader");
    topLayout.add(title);/*  w w w  .j a va2 s . c om*/
    title.setWidth(150 + "px");

    Label closeBtn = new Label();

    closeBtn.addStyleName("close");
    closeBtn.setHeight("16px");
    closeBtn.setWidth("16px");

    topLayout.add(closeBtn);

    topLayout.setCellVerticalAlignment(closeBtn, HorizontalPanel.ALIGN_TOP);
    topLayout.setCellHorizontalAlignment(closeBtn, HorizontalPanel.ALIGN_RIGHT);

    topLayout.setCellVerticalAlignment(closeBtn, HorizontalPanel.ALIGN_TOP);
    topLayout.setCellHorizontalAlignment(closeBtn, HorizontalPanel.ALIGN_RIGHT);

    final HorizontalPanel btnsLayout = new HorizontalPanel();
    btnsLayout.setWidth("198px");
    btnsLayout.setHeight("30px");
    mainBodyLayout.add(btnsLayout);
    mainBodyLayout.setCellVerticalAlignment(btnsLayout, VerticalPanel.ALIGN_MIDDLE);
    mainBodyLayout.setCellHorizontalAlignment(btnsLayout, VerticalPanel.ALIGN_CENTER);

    //        downloadLink = new HTML("<a href='"+url+"'style='color: black;'target='_blank' download> Save As</a>");
    downloadLink = new HTML(new SafeHtml() {

        @Override
        public String asString() {
            return "<a href='" + url + "'style='color: black;'target='_blank' download> Save As</a>";
        }
    });
    downloadLink.setStyleName("buttonRounded");
    downloadLink.setWidth("60px");
    btnsLayout.add(downloadLink);
    btnsLayout.setCellVerticalAlignment(downloadLink, HorizontalPanel.ALIGN_MIDDLE);
    btnsLayout.setCellHorizontalAlignment(downloadLink, HorizontalPanel.ALIGN_CENTER);

    openLink = new HTML(new SafeHtml() {

        @Override
        public String asString() {
            return ("<a href='" + url + "'style='color: black;'target='_blank' > Open</a>");
        }
    });
    openLink.setStyleName("buttonRounded");
    openLink.setWidth("60px");
    btnsLayout.add(openLink);
    btnsLayout.setCellVerticalAlignment(openLink, HorizontalPanel.ALIGN_MIDDLE);
    btnsLayout.setCellHorizontalAlignment(openLink, HorizontalPanel.ALIGN_CENTER);

    //        ClickHandler hideHandler = new ClickHandler() {
    //
    //            @Override
    //            public void onClick(ClickEvent event) {
    ////                reg1.removeHandler();
    ////                reg2.removeHandler();
    //                clear();                
    //                hide(true);
    //
    //            }
    //        }; 
    //       reg1 =downloadLink.addClickHandler(hideHandler);
    //       reg2= openLink.addClickHandler(hideHandler);
    //        closeBtn.addClickHandler(hideHandler);
    closeBtn.addDomHandler(new ClickHandler() {

        @Override
        public void onClick(ClickEvent event) {
            clear();
            hide(true);
        }
    }, ClickEvent.getType());

    framLayout.add(topLayout);
    framLayout.add(mainBodyLayout);
    this.setWidget(framLayout);
    framLayout.setStyleName("modalPanelLayout");

}

From source file:web.diva.client.view.core.SaveDatasetPanel.java

public SaveDatasetPanel() {
    this.setAnimationEnabled(true);
    this.setAnimationEnabled(true);
    this.ensureDebugId("cwBasicPopup-imagePopup");
    this.setModal(false);
    VerticalPanel framLayout = new VerticalPanel();
    framLayout.setWidth("300px");
    framLayout.setHeight("100px");

    VerticalPanel mainBodyLayout = new VerticalPanel();
    mainBodyLayout.setWidth("298px");
    mainBodyLayout.setHeight("128px");
    mainBodyLayout.setStyleName("modalPanelBody");

    HorizontalPanel topLayout = new HorizontalPanel();
    topLayout.setWidth("298px");
    topLayout.setHeight("18px");

    Label title = new Label("Publish Dataset Online");
    title.setStyleName("labelheader");
    topLayout.add(title);//from   w  w  w  .  j  a  v a 2 s  . c  o m
    title.setWidth(150 + "px");
    topLayout.setCellHorizontalAlignment(title, HorizontalPanel.ALIGN_LEFT);
    topLayout.setCellVerticalAlignment(title, HorizontalPanel.ALIGN_TOP);

    Label closeBtn = new Label();
    closeBtn.addStyleName("close");
    closeBtn.setHeight("16px");
    closeBtn.setWidth("16px");

    closeBtn.addClickHandler(new ClickHandler() {
        @Override
        public void onClick(ClickEvent event) {
            hide();
        }
    });

    topLayout.add(closeBtn);
    topLayout.setCellHorizontalAlignment(closeBtn, HorizontalPanel.ALIGN_RIGHT);
    topLayout.setCellVerticalAlignment(closeBtn, HorizontalPanel.ALIGN_TOP);

    form = new DynamicForm();
    form.setGroupTitle("");

    form.setIsGroup(false);
    form.setWidth(288);
    form.setPadding(10);
    form.setLayoutAlign(Alignment.CENTER);

    name = new TextItem();
    name.setTitle("Dataset Name");
    name.setWidth(250);
    name.setRequired(true);
    name.setTitleOrientation(TitleOrientation.TOP);
    form.setFields(name);
    form.setBorder("0px solid");
    form.draw();

    mainBodyLayout.add(form);

    VerticalPanel hlo = new VerticalPanel();
    hlo.setWidth("298px");
    hlo.setHeight("20px");
    okBtn = new IButton("Process");
    hlo.add(okBtn);
    hlo.setCellHorizontalAlignment(okBtn, VerticalPanel.ALIGN_CENTER);
    hlo.setCellVerticalAlignment(okBtn, VerticalPanel.ALIGN_MIDDLE);

    mainBodyLayout.add(hlo);

    framLayout.add(topLayout);
    framLayout.add(mainBodyLayout);
    this.setWidget(framLayout);
    framLayout.setStyleName("modalPanelLayout");

}

From source file:ywb.c.page.BrandingPage.java

License:Apache License

public void setCountry(String country) {
    String filteredName = country.replace(" ", "_");
    HTML smallTxt = new HTML("All text is available under the terms of the GNU Free Documentation License. "
            + "<p class='small'>Original content available at <u>en.wikipedia.org/wiki/" + filteredName
            + "</u></p>");
    smallTxt.setStyleName("ySmallTxt");
    ImageButton wikiBtn = new ImageButton(RES.wikiTxt());
    HorizontalPanel hp = new HorizontalPanel();
    hp.add(wikiBtn);/*from  w  ww.  java  2  s  .c o m*/
    hp.add(smallTxt);

    hp.setCellVerticalAlignment(smallTxt, HasVerticalAlignment.ALIGN_MIDDLE);
    hp.setCellVerticalAlignment(wikiBtn, HasVerticalAlignment.ALIGN_MIDDLE);

    setWidget(hp);
}