本文整理汇总了Java中com.google.gwt.user.client.ui.HTMLPanel.add方法的典型用法代码示例。如果您正苦于以下问题:Java HTMLPanel.add方法的具体用法?Java HTMLPanel.add怎么用?Java HTMLPanel.add使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.google.gwt.user.client.ui.HTMLPanel
的用法示例。
在下文中一共展示了HTMLPanel.add方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: generateLegend
import com.google.gwt.user.client.ui.HTMLPanel; //导入方法依赖的package包/类
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);
}
示例2: getPublishPanel
import com.google.gwt.user.client.ui.HTMLPanel; //导入方法依赖的package包/类
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;
}
示例3: getVerifyPanel
import com.google.gwt.user.client.ui.HTMLPanel; //导入方法依赖的package包/类
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;
}
示例4: createJob
import com.google.gwt.user.client.ui.HTMLPanel; //导入方法依赖的package包/类
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;
}
示例5: render
import com.google.gwt.user.client.ui.HTMLPanel; //导入方法依赖的package包/类
@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;
}
示例6: create
import com.google.gwt.user.client.ui.HTMLPanel; //导入方法依赖的package包/类
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;
}
示例7: showInfo
import com.google.gwt.user.client.ui.HTMLPanel; //导入方法依赖的package包/类
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);
}
示例8: getCronPanel
import com.google.gwt.user.client.ui.HTMLPanel; //导入方法依赖的package包/类
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;
}
示例9: Toolbar
import com.google.gwt.user.client.ui.HTMLPanel; //导入方法依赖的package包/类
public Toolbar() {
// DockPanel wrapper = new DockPanel();
leftToolbar = new TTabBar();
leftToolbar.setStylePrimaryName("DropDownToolBar");
rightToolbar = new TTabBar();
rightToolbar.setStylePrimaryName("DropDownToolBar");
rightToolbar.addStyleName("right");
centerToolbar = new TTabBar();
centerToolbar.setStylePrimaryName("DropDownToolBar");
centerToolbar.addStyleName("center");
HTMLPanel tbar = new HTMLPanel("<div style='white-space:nowrap'>\n" +
" <div id='leftBar' style='display:inline-block'></div>\n" +
" <div id='centerBar' style='display:inline-block;margin-left:20px'></div>\n" +
" <div id='rightBar' style='display:inline-block;position:absolute;right:0'></div>\n" +
"</div>");
tbar.add(leftToolbar, "leftBar");
tbar.add(centerToolbar, "centerBar");
tbar.add(rightToolbar, "rightBar");
initWidget(tbar);
EventHandler eventHandler = new EventHandler();
leftToolbar.addBeforeSelectionHandler(eventHandler);
centerToolbar.addBeforeSelectionHandler(eventHandler);
rightToolbar.addBeforeSelectionHandler(eventHandler);
leftToolbar.addSelectionHandler(eventHandler);
centerToolbar.addSelectionHandler(eventHandler);
rightToolbar.addSelectionHandler(eventHandler);
}
示例10: createContentAndPages
import com.google.gwt.user.client.ui.HTMLPanel; //导入方法依赖的package包/类
private void createContentAndPages () {
content = new HTMLPanel("<!-- content -->");
RootPanel.get().add(content);
content.add(new CookieNoticePart());
content.add(HeaderPart.get());
content.add(NavigationController.get()
.setPageHolder(new HTMLPanel("<!-- pages -->")));
content.add(FooterPart.get());
}
示例11: onLoad
import com.google.gwt.user.client.ui.HTMLPanel; //导入方法依赖的package包/类
@Override
public void onLoad (PreloadedImage image) {
image.addStyleName("img-rounded");
image.addStyleName("col-xs-" + (int) (12 / IMAGES_PER_ROW));
if ((resources.size() - 1) % IMAGES_PER_ROW == 0) {
currentResourceRow = new HTMLPanel(
SafeHtmlUtils.EMPTY_SAFE_HTML);
currentResourceRow.addStyleName("row");
pnlImagePreviews.add(currentResourceRow);
}
currentResourceRow.add(image);
}
示例12: SpinControl
import com.google.gwt.user.client.ui.HTMLPanel; //导入方法依赖的package包/类
@UiConstructor
public SpinControl( ImageResource upRsrc, ImageResource downRsrc )
{
String imgsPlace = DOM.createUniqueId();
String labelPlace = DOM.createUniqueId();
up = new Image( upRsrc );
down = new Image( downRsrc );
valueLabel = new EditableLabel<Void>( ImageResources.INSTANCE.loading16x16(), new EditableLabel.Callback<Void>()
{
@Override
public void onWantChange( String text, EditableWidget<Label, Void> widget, Void cookie )
{
try
{
value = Integer.parseInt( text );
valueLabel.setText( String.valueOf( value ) );
signalCallbacks();
}
catch( Exception e )
{
}
}
}, null );
valueLabel.setText( String.valueOf( value ) );
up.getElement().getStyle().setDisplay( Display.BLOCK );
w = new HTMLPanel( "<table><tr>" + "<td id='" + imgsPlace + "'></td>" + "<td id='" + labelPlace + "'></td>" + "</tr></table>" );
w.add( up, imgsPlace );
w.add( down, imgsPlace );
w.add( valueLabel, labelPlace );
initWidget( w );
up.addClickHandler( this );
down.addClickHandler( this );
}
示例13: initInfoPanel
import com.google.gwt.user.client.ui.HTMLPanel; //导入方法依赖的package包/类
/**
* Init the info panel.
*/
private void initInfoPanel() {
infoPopupPanel.addStyleName(ApplicationResource.INSTANCE.css().infoPopupPanel());
HTMLPanel infoPopupPanelWrapper = new HTMLPanel("");
closeInfoPopupPanelButton.addStyleName(ApplicationResource.INSTANCE.css().closePopupPanelButton());
closeInfoPopupPanelButton.addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
infoPopupPanel.hide();
ApplicationService.getInstance().setTooltipShowingAllowed(true);
}
});
HTMLPanel closeInfoButtonContainer = new HTMLPanel("");
closeInfoButtonContainer.addStyleName(ApplicationResource.INSTANCE.css().popupPanelHeader());
Label infoTitle = new Label(msg.infoPanelTitle());
closeInfoButtonContainer.add(infoTitle);
closeInfoButtonContainer.add(closeInfoPopupPanelButton);
infoPopupPanelWrapper.add(closeInfoButtonContainer);
infoPopupPanelContent = new HTMLPanel("");
infoPopupPanelContent.addStyleName(ApplicationResource.INSTANCE.css().infoPopupPanelContent());
ScrollPanel infoPopupPanelScroll = new ScrollPanel();
infoPopupPanelScroll.addStyleName(ApplicationResource.INSTANCE.css().infoPopupPanelScroll());
infoPopupPanelScroll.add(infoPopupPanelContent);
infoPopupPanelWrapper.add(infoPopupPanelScroll);
infoPopupPanel.add(infoPopupPanelWrapper);
infoPopupPanel.hide();
}
示例14: initLayerLegend
import com.google.gwt.user.client.ui.HTMLPanel; //导入方法依赖的package包/类
/**
* Init the layer legend panel.
*/
private void initLayerLegend() {
HTMLPanel layerPopupPanelWrapper = new HTMLPanel("");
closeLayerPopupPanelButton.addStyleName(ApplicationResource.INSTANCE.css().closePopupPanelButton());
closeLayerPopupPanelButton.addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
layerLegendPanel.hide();
ApplicationService.getInstance().setTooltipShowingAllowed(true);
}
});
HTMLPanel closeLayerButtonContainer = new HTMLPanel("");
closeLayerButtonContainer.addStyleName(ApplicationResource.INSTANCE.css().popupPanelHeader());
Label layerTitle = new Label(msg.layerLegendPanelTitle());
closeLayerButtonContainer.add(layerTitle);
closeLayerButtonContainer.add(closeLayerPopupPanelButton);
layerPopupPanelWrapper.add(closeLayerButtonContainer);
HTMLPanel layerPopupPanelContent = new HTMLPanel("");
layerPopupPanelContent.addStyleName(ApplicationResource.INSTANCE.css().layerPopupPanelContent());
// Add a generated layers legend.
layerPopupPanelWrapper.add(
getLayersLegend(layerPopupPanelContent, mapPresenter.getLayersModel())
);
layerLegendPanel.add(layerPopupPanelWrapper);
}
示例15: AuditCSVPopup
import com.google.gwt.user.client.ui.HTMLPanel; //导入方法依赖的package包/类
public AuditCSVPopup(String keyString) {
super();
String[] parts = keyString.split("\\?");
if (parts.length != 2)
throw new RuntimeException("blobKey missing in keyString");
String blobKey = parts[1].split("=")[1];
setTitle("Audit CSV");
int width = Window.getClientWidth() / 2;
int height = Window.getClientHeight() / 2;
final HTMLPanel panel = new HTMLPanel("");
panel.add(new SimplePanel(new ClosePopupButton(this)));
panel.add(new HTML("<h2>Audit CSV contents</h2>"));
panel.setStylePrimaryName(UIConsts.VERTICAL_FLOW_PANEL_STYLENAME);
panel.getElement().getStyle().setProperty("overflow", "scroll");
panel.setPixelSize(width + 6, height + 30);
setWidget(panel);
AsyncCallback<String> callback = new AsyncCallback<String>() {
public void onFailure(Throwable caught) {
AggregateUI.getUI().reportError(caught);
}
public void onSuccess(String csvContents) {
String[] allLines = csvContents.split("\n");
StringBuilder html = new StringBuilder("<table class=\"dataTable\">");
html.append("<tr class=\"titleBar\">")
.append("<td>Event</td><td>Node</td><td>Start</td><td>End</td>")
.append("</tr>");
for (int i = 1, max = allLines.length; i < max; i++) {
html.append(Row.from(allLines[i]).asTr());
}
html.append("</table>");
AggregateUI.getUI().clearError();
panel.add(new HTML(html.toString()));
AggregateUI.resize();
}
};
SecureGWT.getSubmissionService().getSubmissionAuditCSV(blobKey, callback);
}