Java 类com.google.gwt.user.client.ui.HTMLPanel 实例源码

项目:dataworks-zeus    文件:CardUserInfo.java   
public CardUserInfo(UserPresenter presenter) {
    this.presenter = presenter;
    addButton(edituser);
    if (presenter.getZuser().getUid().equals(UserUtil.admin)) {
        addButton(checkuser);
    }
    FlowLayoutContainer centerContainer=new FlowLayoutContainer();
    VerticalLayoutContainer p = new VerticalLayoutContainer();
    luid=new Label();
    lname=new Label();
    luserType=new Label();
    leffective=new Label();
    lemail=new Label("");
    phoneContent=new HTMLPanel("");
    descriptionContent=new HTMLPanel("");
    p.add(new FieldLabel(luid, "用户账号"),new VerticalLayoutContainer.VerticalLayoutData(1, -1,new Margins(10)));
    p.add(new FieldLabel(lname,"用户姓名"),new VerticalLayoutContainer.VerticalLayoutData(1, -1,new Margins(10)));
    p.add(new FieldLabel(luserType,"用户状态"),new VerticalLayoutContainer.VerticalLayoutData(1, -1,new Margins(10)));
    p.add(new FieldLabel(leffective,"用户类型"),new VerticalLayoutContainer.VerticalLayoutData(1, -1,new Margins(10)));
    p.add(new FieldLabel(lemail, "邮箱地址"),new VerticalLayoutContainer.VerticalLayoutData(1, -1,new Margins(10)));
    p.add(new FieldLabel(phoneContent, "手机号码"),new VerticalLayoutContainer.VerticalLayoutData(1, -1,new Margins(10)));
    p.add(new FieldLabel(descriptionContent, "描述"),new VerticalLayoutContainer.VerticalLayoutData(1, -1,new Margins(10)));

    centerContainer.add(p);
    setCenter(centerContainer);
}
项目:che    文件:View.java   
View(Window.Resources res, boolean showBottomPanel) {
  this.res = res;
  this.css = res.windowCss();
  windowWidth = com.google.gwt.user.client.Window.getClientWidth();
  clientLeft = Document.get().getBodyOffsetLeft();
  clientTop = Document.get().getBodyOffsetTop();
  initWidget(uiBinder.createAndBindUi(this));
  footer = new HTMLPanel("");
  if (showBottomPanel) {
    footer.setStyleName(res.windowCss().footer());
    contentContainer.add(footer);
  }
  handleEvents();

  FocusPanel dummyFocusElement = new FocusPanel();
  dummyFocusElement.setTabIndex(0);
  dummyFocusElement.addFocusHandler(
      new FocusHandler() {
        @Override
        public void onFocus(FocusEvent event) {
          setFocus();
        }
      });
  contentContainer.add(dummyFocusElement);
}
项目:riscoss-corporate    文件:ComparisonPanel.java   
protected void generateLegend(int i, String ras) {
    String c = "col" + i;
    HTMLPanel html = new HTMLPanel("<span id='" + c + "'></span>");
    SimplePanel p = new SimplePanel();
    p.setSize("20px", "20px");
    p.getElement().getStyle().setBackgroundColor(colorsArray[i]);
    p.setStyleName("colorBox");
    HorizontalPanel hp = new HorizontalPanel();
    hp.setStyleName("margin-bottom");
    hp.add(p);
    String htmlString = "<b>" + ras + "</b>";
    HTMLPanel htm = new HTMLPanel( htmlString );
    hp.add(htm);
    html.add(hp, c);
    legend.add(html);
}
项目:gerrit-ci    文件:JobPanels.java   
private static HTMLPanel getCronPanel() {
    HTMLPanel cronPanel = new HTMLPanel(GerritCiPlugin.cronPanel.toString());
    TextBox cronCommand = new TextBox();
    cronCommand.setName("cronCommand");
    cronCommand.setText("./scripts/cron.sh");
    TextBox cronSchedule = new TextBox();
    cronSchedule.setName("cronJob");
    TextBox jobType = new TextBox();
    jobType.setText("cron");
    jobType.setName("jobType");
    jobType.setVisible(false);
    cronPanel.add(jobType);
    cronPanel.addAndReplaceElement(cronCommand, "cronCommand");
    cronPanel.addAndReplaceElement(cronSchedule, "cronJob");
    addCommonFields(cronPanel);
    return cronPanel;
}
项目:gerrit-ci    文件:JobPanels.java   
private static HTMLPanel getPublishPanel() {
    HTMLPanel publishPanel = new HTMLPanel(GerritCiPlugin.publishJobPanel.toString());
    TextBox publishCommand = new TextBox();
    publishCommand.setName("publishCommand");
    publishCommand.setText("./scripts/publish.sh");
    TextBox publishBranchRegex = new TextBox();
    publishBranchRegex.setName("publishBranchRegex");
    publishBranchRegex.setText("refs/heads/(develop|master)");
    TextBox jobType = new TextBox();
    jobType.setText("publish");
    jobType.setName("jobType");
    jobType.setVisible(false);
    publishPanel.add(jobType);
    publishPanel.addAndReplaceElement(publishCommand, "publishCommand");
    publishPanel.addAndReplaceElement(publishBranchRegex, "publishBranchRegex");
    addCommonFields(publishPanel);
    return publishPanel;
}
项目:gerrit-ci    文件:JobPanels.java   
private static HTMLPanel getVerifyPanel() {
    HTMLPanel verifyPanel = new HTMLPanel(GerritCiPlugin.verifyJobPanel.toString());
    TextBox verifyCommand = new TextBox();
    verifyCommand.setName("verifyCommand");
    verifyCommand.setText("./scripts/verify.sh");
    TextBox verifyBranchRegex = new TextBox();
    verifyBranchRegex.setName("verifyBranchRegex");
    verifyBranchRegex.setText(".*");
    TextBox jobType = new TextBox();
    jobType.setText("verify");
    jobType.setName("jobType");
    jobType.setVisible(false);
    verifyPanel.add(jobType);
    verifyPanel.addAndReplaceElement(verifyCommand, "verifyCommand");
    verifyPanel.addAndReplaceElement(verifyBranchRegex, "verifyBranchRegex");
    addCommonFields(verifyPanel);
    return verifyPanel;
}
项目:gerrit-ci    文件:ProjectConfigurationScreen.java   
private HTMLPanel createJob(String jobType) {
    final HTMLPanel p = JobPanels.createJobPanel(jobType);
    TextBox jobName = new TextBox();
    jobName.setName("jobName");
    jobName.setText(jobType + "_" + projectName + "_" + Random.nextInt());
    jobName.setVisible(false);
    p.add(jobName);
    final Button deleteButton = new Button("delete");
    deleteButton.addClickHandler(new ClickHandler() {
        @Override
        public void onClick(ClickEvent event) {
            deletePanel(p);
        }
    });
    p.addAndReplaceElement(deleteButton, "delete");
    if(jobType.equals("cron")) {
        addCronToggleButton(p, deleteButton);
    }
    activePanels.add(p);
    return p;
}
项目:blogwt    文件:GalleryPart.java   
/**
 * @param line
 */
public void addImageWithLine (String line) {
    if (line.length() > 0) {
        ConfigLine config = parseConfigLine(line);

        if (config.url != null && config.url.length() > 0) {
            Image image = new Image(config.url);

            if (config.name != null) {
                image.setTitle(config.name);
                image.setAltText(config.caption);
            }

            ((HTMLPanel) this.getWidget()).add(image);

            if (config.caption != null) {
                ((HTMLPanel) this.getWidget())
                        .add(new HTMLPanel(SafeHtmlUtils.fromTrustedString(
                                PostHelper.makeMarkup(config.caption))));
            }
        }
    }
}
项目:blogwt    文件:FormPlugin.java   
@Override
public void emit (StringBuilder out, final List<String> lines,
        final Map<String, String> params) {

    final String id = HTMLPanel.createUniqueId();
    out.append("<div id=\"");
    out.append(id);
    out.append("\"> Loading form...</div>");

    Scheduler.get().scheduleDeferred( () -> {
        if (manager != null) {
            manager.fireEvent(new PluginContentReadyEvent(FormPlugin.this,
                    lines, params, id, "None"));
        }
    });
}
项目:blogwt    文件:GalleryPlugin.java   
@Override
public void emit (StringBuilder out, final List<String> lines,
        final Map<String, String> params) {
    final String id = HTMLPanel.createUniqueId();
    out.append("<div id=\"");
    out.append(id);
    out.append("\"> Loading gallery...</div>");

    Scheduler.get().scheduleDeferred(new ScheduledCommand() {

        @Override
        public void execute () {
            if (manager != null) {
                manager.fireEvent(new PluginContentReadyEvent(
                        GalleryPlugin.this, lines, params, id, "None"));
            }
        }
    });
}
项目:blogwt    文件:CachedIncludePlugin.java   
@Override
public void emit (StringBuilder out, List<String> lines,
        Map<String, String> params) {
    String src = params.get("src");
    try {
        if (src != null && src.length() > 0) {
            String id = HTMLPanel.createUniqueId();
            out.append(CachedIncludePluginTemplates.INSTANCE.loadingButton(
                    id, Resources.RES.defaultLoader().getSafeUri(), src)
                    .asString());

            getContent(src, id, lines, params);
        }
    } catch (Exception e) {
        throw new RuntimeException("Error while rendering "
                + this.getClass().getName(), e);
    }
}
项目:google-apis-explorer    文件:SchemaForm.java   
@Override
public Widget render(Schema property) {
  HTMLPanel panel = new HTMLPanel("");
  panel.getElement().getStyle().setDisplay(Display.INLINE);

  panel.add(new InlineLabel("\""));
  if (property.locked()) {
    InlineLabel label = new InlineLabel();
    panel.add(label);
    hasText = label;
  } else {
    TextArea editor = new TextArea();
    panel.add(editor);
    hasText = editor;
  }
  panel.add(new InlineLabel("\""));

  if (property.getDefault() != null) {
    hasText.setText(property.getDefault());
  }

  return panel;
}
项目:switchyard    文件:MetricsView.java   
@Override
public Widget createWidget() {
    final Button resetButton = new Button(Singleton.MESSAGES.label_resetAllMetrics(), new ClickHandler() {
        @Override
        public void onClick(ClickEvent event) {
            _presenter.resetSystemMetrics();
        }
    });
    SimpleLayout layout = new SimpleLayout().setTitle(Singleton.MESSAGES.label_switchYardMessageMetrics()).setHeadline(Singleton.MESSAGES.label_system())
            .setDescription(Singleton.MESSAGES.description_systemMetrics())
            .addContent(Singleton.MESSAGES.label_systemMessageMetrics(), _systemMetricsViewer.asWidget())
            .addContent("reset", resetButton) //$NON-NLS-1$
            .addContent("spacer", new HTMLPanel("&nbsp;")) //$NON-NLS-1$ //$NON-NLS-2$
            .addContent(Singleton.MESSAGES.label_serviceMessageMetrics(), _servicesList.asWidget())
            .addContent(Singleton.MESSAGES.label_referenceMessageMetrics(), _referencesList.asWidget());

    final Widget result = layout.build();
    // hackery, prevent button from filling the row
    resetButton.getElement().removeClassName("fill-layout-width"); //$NON-NLS-1$
    return result;
}
项目:gwtinaction2    文件:BasicProject.java   
/**
 * We'll build the tab panel's content from the HTML that is already in the HTML
 * page.
 */
private void buildTabContent(){
    // Create the main content widget
    // First retrieve the existing content for the pages from the HTML page
    this.homePanel = new HTMLPanel(getContent(Pages.HOME.getText()));
    this.productsPanel = new HTMLPanel(getContent(Pages.PRODUCTS.getText()));
    this.contactPanel = new HTMLPanel(getContent(Pages.CONTACT.getText()));

    // set the style of HTMLPanels
    this.homePanel.addStyleName("htmlPanel");
    this.productsPanel.addStyleName("htmlPanel");
    this.contactPanel.addStyleName("htmlPanel");

    // Create the tab panel widget
    this.content = new TabLayoutPanel(20, Unit.PX);

    // Add the content we have just created to the tab panel widget
    this.content.add(this.homePanel, Pages.HOME.getText());
    this.content.add(this.productsPanel, Pages.PRODUCTS.getText());
    this.content.add(this.contactPanel, Pages.CONTACT.getText());

    // Indicate that we should show the HOME tab initially.
    this.content.selectTab(DECK_HOME);
}
项目:hexa.tools    文件:FormCreator.java   
public HTMLPanel create()
{
    FormCreatorBundle.CSS.ensureInjected();

    HTMLPanel panel = new HTMLPanel( sb.toString() );
    panel.setStyleName( FormCreatorBundle.CSS.form() );
    panel.setWidth( totalWidth + "px" );

    for( Entry<String, Widget> e : wMap.entrySet() )
    {
        e.getValue().setWidth( "100%" );
        panel.add( e.getValue(), e.getKey() );
    }

    return panel;
}
项目:socom    文件:InfluenceAnswerTextView.java   
@Override
public void switchResultView(boolean showResultView) {
    this.isResultView = showResultView;
    if (!isResultView)
    {       
        if (answerCheckbox.getElement().getId() == null || answerCheckbox.getElement().getId() == "")
        {
            String id = HTMLPanel.createUniqueId();     
            // link them together
            answerCheckbox.getElement().setId(id); // works because we use a SimpleCheckBox
            answerLabel.setHtmlFor(id);
        }
        oldCheckboxValue = answerCheckbox.getValue();

        answerCheckbox.setEnabled(true);
        answerCheckbox.getElement().getStyle().setProperty("opacity", "1");
        resultBar.addClassName("hidden");
    }
    else    // in case this is a result display, just show results and hide form stuff
    {
        answerCheckbox.setEnabled(false);
        answerCheckbox.getElement().getStyle().setProperty("opacity", "0");
        resultBar.removeClassName("hidden");
    }
}
项目:socom    文件:InfluenceAnswerAudioView.java   
@Override
public void switchResultView(boolean showResultView) {
    this.isResultView = showResultView;
    if (!isResultView)
    {       
        if (answerCheckbox.getElement().getId() == null || answerCheckbox.getElement().getId() == "")
        {
            String id = HTMLPanel.createUniqueId();     
            // link them together
            answerCheckbox.getElement().setId(id); // works because we use a SimpleCheckBox
            answerLabel.setHtmlFor(id);             
        }
        oldCheckboxValue = answerCheckbox.getValue();
        answerCheckbox.setEnabled(true);
        answerCheckbox.getElement().getStyle().setProperty("opacity", "1");
        resultBar.addClassName("hidden");
    }
    else    // in case this is a result display, just show results and hide form stuff
    {
        answerCheckbox.setEnabled(false);
        answerCheckbox.getElement().getStyle().setProperty("opacity", "0");
        resultBar.removeClassName("hidden");
    }

}
项目:markdown4j-gwt    文件:IncludePlugin.java   
@Override
public void emit (final StringBuilder out, final List<String> lines,
        final Map<String, String> params) {
    String src = params.get("src");
    try {
        String id = null;
        out.append("<div id=\"");
        out.append(id = HTMLPanel.createUniqueId());
        out.append("\">Loading...</div>");

        if (src != null && src.length() > 0) {
            getContent(src, id, lines, params);
        }
    } catch (Exception e) {
        throw new RuntimeException(
                "Error while rendering " + this.getClass().getName(), e);
    }
}
项目:gwt-youtube    文件:YouTubePlayer.java   
public YouTubePlayer(PlayerConfiguration playerConfiguration) {
    this.divId = "youtube-" + System.currentTimeMillis();
    this.playerConfiguration = playerConfiguration;
    Events events = (Events) Events.createObject();
    events.setOnReady(divId + "or");
    events.setOnStateChangey(divId + "osc");
    events.setOnPlaybackQualityChange(divId + "opqc");
    events.setOnPlaybackRateChange(divId + "oprc");
    events.setOnError(divId + "oe");
    events.setOnApiChange(divId + "oac");

    this.playerConfiguration.setEvents(events);
    container = (HTMLPanel) uiBinder.createAndBindUi(this);
    initWidget(container);
    pl.setId(divId);
    exportOnHandlers(divId, this);
}
项目:DMWeb    文件:DMGwtWidgetHostAttachHandler.java   
@Override
public void onAttachOrDetach(AttachEvent event)
{
   if (event.isAttached())
   {
      if (this.gwtWidget == null)
      {
         this.gwtWidget = this.factory.create();
      }
      (this.htmlPanel = HTMLPanel.wrap(this.widget.getElement())).add(this.gwtWidget);
   }
   else
   {
      RootPanel.detachNow(this.htmlPanel);
      this.htmlPanel = null;
   }
}
项目:FallenGalaxy    文件:ApplicantDialog.java   
public ApplicantDialog() {
    super("Candidature", true, true, true);

    descriptionPanel = new HTMLPanel("");
    descriptionPanel.setWidth("290px");
    descriptionPanel.getElement().getStyle().setProperty("padding", "20px 5px");

    cancelApplyBt = new JSButton("Retirer ma candidature");
    cancelApplyBt.setPixelWidth(200);
    cancelApplyBt.addClickListener(this);

    JSRowLayout layout = new JSRowLayout();
    layout.addComponent(descriptionPanel);
    layout.addRow();
    layout.setRowAlignment(JSRowLayout.ALIGN_CENTER);
    layout.addComponent(cancelApplyBt);

    setComponent(layout);
    centerOnScreen();
}
项目:FallenGalaxy    文件:AchievementDialog.java   
public AchievementDialog() {
    super("Trophées", false, true, true);

    tabs = new JSTabbedPane();
    tabs.addTab("En cours");
    tabs.addTab("Réussi");
    tabs.setPixelWidth(420);
    tabs.addSelectionListener(this);

    container = new HTMLPanel("");
    OpenJWT.setElementFloat(container.getElement(), "left");

    scrollPane = new JSScrollPane();
    scrollPane.setPixelSize(420, 300);
    scrollPane.setView(container);

    updateUI();

    JSRowLayout layout = new JSRowLayout();
    layout.addComponent(tabs);
    layout.addRowSeparator(5);
    layout.addComponent(scrollPane);

    setComponent(layout);
    centerOnScreen();
}
项目:gwtmockito    文件:GwtMockitoWidgetBaseClassesTest.java   
@Test
public void testPanels() throws Exception {
  invokeAllAccessibleMethods(new AbsolutePanel() {});
  invokeAllAccessibleMethods(new CellPanel() {});
  invokeAllAccessibleMethods(new ComplexPanel() {});
  invokeAllAccessibleMethods(new DeckLayoutPanel() {});
  invokeAllAccessibleMethods(new DeckPanel() {});
  invokeAllAccessibleMethods(new DecoratorPanel() {});
  invokeAllAccessibleMethods(new DockLayoutPanel(Unit.PX) {});
  invokeAllAccessibleMethods(new DockPanel() {});
  invokeAllAccessibleMethods(new FlowPanel() {});
  invokeAllAccessibleMethods(new FocusPanel() {});
  invokeAllAccessibleMethods(new HorizontalPanel() {});
  invokeAllAccessibleMethods(new HTMLPanel("") {});
  invokeAllAccessibleMethods(new LayoutPanel() {});
  invokeAllAccessibleMethods(new PopupPanel() {});
  invokeAllAccessibleMethods(new RenderablePanel("") {});
  invokeAllAccessibleMethods(new ResizeLayoutPanel() {});
  invokeAllAccessibleMethods(new SimpleLayoutPanel() {});
  invokeAllAccessibleMethods(new SimplePanel() {});
  invokeAllAccessibleMethods(new SplitLayoutPanel() {});
  invokeAllAccessibleMethods(new StackPanel() {});
  invokeAllAccessibleMethods(new VerticalPanel() {});
}
项目:LAS    文件:PrintPanel.java   
public PrintPanel(String url) {
    RequestBuilder builder = new RequestBuilder(RequestBuilder.GET, url);
    initWidget(panel);
    try {
        builder.sendRequest(null, fillPanelCallback);
    } catch (RequestException e) {
        HTMLPanel html = new HTMLPanel("<b>Unable to retrieve image.</b>");     
        panel.add(html);
    }
}
项目:dataworks-zeus    文件:CardInfo.java   
public FieldSet getConfigFieldSet() {
    if(configFieldSet==null){
        configFieldSet=new FieldSet();
        configFieldSet.setCollapsible(true);
        configFieldSet.setHeadingText("配置项信息");
        configContent=new HTMLPanel("");
        configFieldSet.add(configContent);
    }
    return configFieldSet;
}
项目:dataworks-zeus    文件:CardInfo.java   
public FieldSet getConfigParentField() {
    if(configParentField==null){
        configParentField=new FieldSet();
        configParentField.setCollapsible(true);
        configParentField.setHeadingText("继承的配置项信息");

        configParentContent=new HTMLPanel("");
        configParentField.add(configParentContent);
    }
    return configParentField;
}
项目:dataworks-zeus    文件:CardInfo.java   
public FieldSet getResourceField() {
    if(resourceField==null){
        resourceField=new FieldSet();
        resourceField.setCollapsible(true);
        resourceField.setHeadingText("资源信息");

        resourceContent=new HTMLPanel("");
        resourceField.add(resourceContent);
    }
    return resourceField;
}
项目:dataworks-zeus    文件:CardInfo.java   
public FieldSet getResourceParentField() {
    if(resourceParentField==null){
        resourceParentField=new FieldSet();
        resourceParentField.setCollapsible(true);
        resourceParentField.setHeadingText("继承的资源信息");
        resourceParentContent=new HTMLPanel("");
        resourceParentField.add(resourceParentContent);
    }
    return resourceParentField;
}
项目:dataworks-zeus    文件:CardDepGraph.java   
public CardDepGraph(JobPresenter p){
        this.presenter=p;

        addButton(new TextButton("返回",new SelectHandler() {
            public void onSelect(SelectEvent event) {
                presenter.display(presenter.getJobModel());
            }
        }));

        FlowLayoutContainer container=new FlowLayoutContainer();
        container.setScrollMode(ScrollMode.AUTOY);

//      FieldSet dependeeField=new FieldSet();
//      dependeeField.setHeight(400);
//      dependeeField.setHeadingText("任务依赖图");
        dependeeST=new SpaceTree("bottom");
        dependeeST.setBorders(true);
//      dependeeField.add(dependeeST);

//      FieldSet dependerField=new FieldSet();
//      dependerField.setHeight(400);
//      dependerField.setHeadingText("任务被依赖图");
        dependerST=new SpaceTree("top");
        dependerST.setBorders(true);
//      dependerField.add(dependerST);

//      container.add(dependeeField);
//      container.add(dependerField);

        container.add(new HTMLPanel("任务依赖图:"));
        container.add(dependeeST);
        container.add(new HTMLPanel("任务被依赖图:"));
        container.add(dependerST);

        setCenter(container);
    }
项目:dataworks-zeus    文件:CardInfo.java   
public FieldSet getConfigParentField() {
    if(configParentField==null){
        configParentField=new FieldSet();
        configParentField.setHeadingText("继承的配置项信息");
        configParentField.setCollapsible(true);

        configParentContent=new HTMLPanel("");
        configParentField.add(configParentContent);
    }
    return configParentField;
}
项目:dataworks-zeus    文件:CardInfo.java   
public FieldSet getResourceField() {
    if(resourceField==null){
        resourceField=new FieldSet();
        resourceField.setHeadingText("资源信息");
        resourceContent=new HTMLPanel("");
        resourceField.add(resourceContent);
    }
    return resourceField;
}
项目:dataworks-zeus    文件:CardInfo.java   
public FieldSet getResourceParentField() {
    if(resourceParentField==null){
        resourceParentField=new FieldSet();
        resourceParentField.setHeadingText("继承的资源信息");
        resourceParentContent=new HTMLPanel("");
        resourceParentField.add(resourceParentContent);
    }
    return resourceParentField;
}
项目:dataworks-zeus    文件:CardInfo.java   
public FieldSet getConfigFieldSet() {
    if(configFieldSet==null){
        configFieldSet=new FieldSet();
        configFieldSet.setHeadingText("配置项信息");

        configContent=new HTMLPanel("");
        configFieldSet.add(configContent);
    }
    return configFieldSet;
}
项目:markdown4j-gwt-demo    文件:MarkdownDemoPage.java   
@UiHandler("another")
void onAnotherClicked (ClickEvent ce) {
    if (markdown.getText().length() > 0) {
        process();
        converted.add(new HTMLPanel(SafeHtmlUtils.EMPTY_SAFE_HTML));
        markdown.setText("");
    }
}
项目:gwt-material    文件:MaterialInfo.java   
public void showInfo(HTMLPanel panel, ImageResource resource, String message) {
    panel.clear();

    HTMLPanel container = new HTMLPanel("");
    container.addStyleName(CssName.MATERIAL_INFO);
    container.add(new Image(resource));
    container.add(new Label(message));
    panel.add(container);
}
项目:che    文件:TextEditorPartViewImpl.java   
@Inject
public TextEditorPartViewImpl(final InfoPanel infoPanel) {
  this.infoPanel = infoPanel;

  final HTMLPanel panel = uibinder.createAndBindUi(this);
  initWidget(panel);
}
项目:easy-vote    文件:EasyVote.java   
/**
 * This is the entry point method.
 */
public void onModuleLoad() {
    HTMLPanel logoContainer = new HTMLPanel("<img src=\"easyvote.jpg\" />");
    logoContainer.getElement().setAttribute("id", "logoContainer");
    RootPanel.get().add(logoContainer); // Use RootPanel.get() to get the entire body element

    basePanel = new FlowPanel();
    basePanel.getElement().setAttribute("id", "mainPageColumn");
    RootPanel.get().add(basePanel);

    loginWidget = new LoginWidget(new LoginCallback(), new LogoutCallback());
    basePanel.add(loginWidget);

    infoPanel = new InfoPanelWidget();
    infoPanel.setInformation("Please use your credentials to log in.");
    basePanel.add(infoPanel);

    tokensPanel = new VerticalPanel();
    tokensPanel.setVisible(false);
    tokensPanel.setStyleName("tokensPanel");
    basePanel.add(tokensPanel);

    optionsPanel = new OptionsPanel();
    optionsPanel.setHandlers(new VoteOptionHandler(), new VerifyVoteOptionHandler(),
            new AuditOptionHandler(), new VerifyOffsetOptionHandler());
    basePanel.add(optionsPanel);

    loginWidget.promptLogin();
}
项目:gerrit-ci    文件:JobPanels.java   
public static HTMLPanel createJobPanel(String jobType) {
    if (jobType.equals("cron")) {
        return getCronPanel();
    }
    if(jobType.equals("publish"))
        return getPublishPanel();
    if(jobType.equals("verify"))
        return getVerifyPanel();
    return null;
}
项目:gerrit-ci    文件:JobPanels.java   
public static void addCommonFields(HTMLPanel p){
    CheckBox junitEnabled = new CheckBox();
    junitEnabled.setName("junitEnabled");
    junitEnabled.setValue(true);
    TextBox junitPath = new TextBox();
    junitPath.setText("build/test-results/*.xml");
    junitPath.setName("junitPath");
    TextBox timeoutMinutes = new TextBox();
    timeoutMinutes.setText("30");
    timeoutMinutes.setName("timeoutMinutes");
    p.addAndReplaceElement(junitEnabled, "junitEnabled");
    p.addAndReplaceElement(junitPath,"junitPath");
    p.addAndReplaceElement(timeoutMinutes, "timeoutMinutes");
}
项目:gerrit-ci    文件:JobPanels.java   
public static Map<String,String> getValueMap(HTMLPanel p){
    HashMap<String,String> vals = new HashMap<String, String>();
    for (Widget w: p) {
        if (w instanceof TextBox) {
         vals.put(((TextBox)w).getName(),makeXMLFriendly(((TextBox)w).getValue()));
        }
        if (w instanceof CheckBox) {
            vals.put(((CheckBox)w).getName(),((CheckBox)w).getValue().toString());
       }
     }
    return vals;
}