本文整理汇总了Java中com.google.gwt.user.client.ui.HTML类的典型用法代码示例。如果您正苦于以下问题:Java HTML类的具体用法?Java HTML怎么用?Java HTML使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
HTML类属于com.google.gwt.user.client.ui包,在下文中一共展示了HTML类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: BaseWidget
import com.google.gwt.user.client.ui.HTML; //导入依赖的package包/类
public BaseWidget(String text, String id) {
this.label = new Label(text);
p.setWidget(new HTML(text));
p.getElement().getStyle().setZIndex(6);
this.id = id;
label.setStyleName("basewidget");
label.setTitle(text);
canvas = new GWTCanvas();
abspanel.add(label, 0, 0);
abspanel.add(canvas, 0, 0);
focusPanel.add(abspanel.asWidget());
focusPanel.setHeight("35px");
focusPanel.setFocus(true);
focusPanel.setStyleName("basefocuspanel");
abspanel.setHeight("100%");
initWidget(focusPanel);
addDomHandler(this, MouseDownEvent.getType());
addDomHandler(this, MouseUpEvent.getType());
addDomHandler(this, MouseOverEvent.getType());
addDomHandler(this, MouseOutEvent.getType());
}
示例2: IconCell
import com.google.gwt.user.client.ui.HTML; //导入依赖的package包/类
public IconCell(ImageResource resource, final String title, String text) {
super(null);
iIcon = new Image(resource);
iIcon.setTitle(title);
iIcon.setAltText(title);
if (text != null && !text.isEmpty()) {
iLabel = new HTML(text, false);
iPanel = new HorizontalPanel();
iPanel.setStyleName("icon");
iPanel.add(iIcon);
iPanel.add(iLabel);
iIcon.getElement().getStyle().setPaddingRight(3, Unit.PX);
iPanel.setCellVerticalAlignment(iIcon, HasVerticalAlignment.ALIGN_MIDDLE);
}
iIcon.addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
event.stopPropagation();
UniTimeConfirmationDialog.info(title);
}
});
}
示例3: ChipPanel
import com.google.gwt.user.client.ui.HTML; //导入依赖的package包/类
public ChipPanel(Chip chip, String color) {
iChip = chip;
setStyleName("chip");
addStyleName(color);
iLabel = new Label(chip.getTranslatedValue());
iLabel.setStyleName("text");
add(iLabel);
iButton = new HTML("×");
iButton.setStyleName("button");
add(iButton);
if (chip.hasToolTip())
setTitle(toString() + "\n" + chip.getToolTip());
else
setTitle(toString());
Roles.getDocumentRole().setAriaHiddenState(getElement(), true);
}
示例4: BusyPanel
import com.google.gwt.user.client.ui.HTML; //导入依赖的package包/类
public BusyPanel(String text, int dayOfWeek, int startSlot, int length) {
super();
iText = text;
iDayOfWeek = dayOfWeek;
iStartSlot = startSlot;
iLength = length;
if (iText != null || !iText.isEmpty()) {
setTitle(iText);
boolean empty = true;
for (int i = 0; i < 3; i++) {
if (iMeetingTable[iDayOfWeek].length <= iStartSlot + i) { empty = false; break; }
if (iMeetingTable[iDayOfWeek][iStartSlot + i] != null && !iMeetingTable[iDayOfWeek][iStartSlot + i].isEmpty()) {
empty = false; break;
}
}
if (empty) {
HTML widget = new HTML(text, false);
widget.setStyleName("text");
setWidget(widget);
}
}
setStyleName("busy");
getElement().getStyle().setWidth(iCellWidth + (iPrint ? 3 : iDayOfWeek + 1 < iNrDays ? 3 : 0), Unit.PX);
getElement().getStyle().setHeight(125 * iLength / 30, Unit.PX);
iGrid.insert(this, iCellWidth * iDayOfWeek, 125 * iStartSlot / 30 - 50 * iStart, 1);
}
示例5: showDialog
import com.google.gwt.user.client.ui.HTML; //导入依赖的package包/类
private void showDialog(final HTML htmlReport) {
final Dialog simple = new Dialog();
simple.setHeadingText(project.getTitle());
simple.setSize("420px", "420px");
simple.setResizable(true);
simple.setHideOnButtonClick(true);
simple.setPredefinedButtons(PredefinedButton.CLOSE);
simple.setBodyStyleName("pad-text");
simple.getBody().addClassName("pad-text");
simple.add(getPanel(htmlReport));
simple.addButton(new TextButton(UIMessages.INSTANCE.download(),
new SelectHandler() {
@Override
public void onSelect(SelectEvent event) {
FileExporter.saveAs(htmlReport.getHTML(),
project.getTitle() + ".html");
}
}));
simple.show();
}
示例6: showDialog
import com.google.gwt.user.client.ui.HTML; //导入依赖的package包/类
private void showDialog(final HTML info) {
final Dialog simple = new Dialog();
simple.setHeadingText(UIMessages.INSTANCE.wmsInfo());
HorizontalLayoutContainer container = new HorizontalLayoutContainer();
container.setScrollMode(ScrollMode.AUTO);
container.setSize("280px", "180px");
container.add(replaceHref(info));
simple.setSize("300px", "200px");
simple.setResizable(true);
simple.setHideOnButtonClick(true);
simple.setPredefinedButtons(PredefinedButton.CLOSE);
simple.setBodyStyleName("pad-text");
simple.getBody().addClassName("pad-text");
simple.add(container);
simple.show();
}
示例7: showDialog
import com.google.gwt.user.client.ui.HTML; //导入依赖的package包/类
private void showDialog(final HTML htmlReport) {
final Dialog simple = new Dialog();
simple.setHeadingText("GeoWe Report");
simple.setSize("420px", "420px");
simple.setResizable(true);
simple.setHideOnButtonClick(true);
simple.setPredefinedButtons(PredefinedButton.CLOSE);
simple.setBodyStyleName("pad-text");
simple.getBody().addClassName("pad-text");
simple.add(getPanel(htmlReport));
simple.addButton(new TextButton(UIMessages.INSTANCE.download(),
new SelectHandler() {
@Override
public void onSelect(SelectEvent event) {
FileExporter.saveAs(htmlReport.getHTML(),
getSelectedVectorLayer().getName() + ".html");
}
}));
simple.show();
}
示例8: getFoot
import com.google.gwt.user.client.ui.HTML; //导入依赖的package包/类
private VerticalPanel getFoot() {
slider.setWidth("290px");
slider.disable();
slider.setIncrement(1);
slider.addValueChangeHandler(new ValueChangeHandler<Integer>() {
@Override
public void onValueChange(final ValueChangeEvent<Integer> event) {
final Layer layer = getSelectedLayer(getSelectedTabName());
layer.setOpacity((float) (event.getValue().intValue() / 100.0));
}
});
final VerticalPanel panel = new VerticalPanel();
panel.setWidth("300px");
panel.addStyleName(ThemeStyles.get().style().borderTop());
panel.add(new HTML(UIMessages.INSTANCE.lmOpacityHtmlLabel()));
panel.add(slider);
panel.add(statusBar);
return panel;
}
示例9: SimpleDayCell
import com.google.gwt.user.client.ui.HTML; //导入依赖的package包/类
public SimpleDayCell(VCalendar calendar, int row, int cell) {
this.calendar = calendar;
this.row = row;
this.cell = cell;
setStylePrimaryName("v-calendar-month-day");
caption = new Label();
caption.setStyleName("v-calendar-day-number");
caption.addMouseDownHandler(this);
caption.addMouseUpHandler(this);
add(caption);
bottomspacer = new HTML();
bottomspacer.setStyleName("v-calendar-bottom-spacer-empty");
bottomspacer.setWidth(3 + "em");
add(bottomspacer);
}
示例10: initAppShare
import com.google.gwt.user.client.ui.HTML; //导入依赖的package包/类
/**
* Helper method called by constructor to initialize the report section
*/
private void initAppShare() {
final HTML sharePrompt = new HTML();
sharePrompt.setHTML(MESSAGES.gallerySharePrompt());
sharePrompt.addStyleName("primary-prompt");
final TextBox urlText = new TextBox();
urlText.addStyleName("action-textbox");
urlText.setText(Window.Location.getHost() + MESSAGES.galleryGalleryIdAction() + app.getGalleryAppId());
urlText.addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
urlText.selectAll();
}
});
appSharePanel.add(sharePrompt);
appSharePanel.add(urlText);
}
示例11: refreshAssetList
import com.google.gwt.user.client.ui.HTML; //导入依赖的package包/类
private void refreshAssetList() {
OdeLog.log("AssetList: refreshing for project " + projectId);
assetList.clear();
if (assetsFolder != null) {
for (ProjectNode node : assetsFolder.getChildren()) {
// Add the name to the tree. We need to enclose it in a span
// because the CSS style for selection specifies a span.
String nodeName = node.getName();
if (nodeName.length() > 20)
nodeName = nodeName.substring(0, 8) + "..." + nodeName.substring(nodeName.length() - 9,
nodeName.length());
TreeItem treeItem = new TreeItem(
new HTML("<span>" + nodeName + "</span>"));
// keep a pointer from the tree item back to the actual node
treeItem.setUserObject(node);
assetList.addItem(treeItem);
}
}
}
示例12: upgradeWarnDialog
import com.google.gwt.user.client.ui.HTML; //导入依赖的package包/类
private static void upgradeWarnDialog(String aMessage) {
final DialogBox dialogBox = new DialogBox(false, true);
dialogBox.setStylePrimaryName("ode-DialogBox");
dialogBox.setText(MESSAGES.warningDialogTitle());
dialogBox.setGlassEnabled(true);
dialogBox.setAnimationEnabled(true);
final HTML message = new HTML(aMessage);
message.setStyleName("DialogBox-message");
VerticalPanel vPanel = new VerticalPanel();
Button okButton = new Button("OK");
okButton.addClickListener(new ClickListener() {
@Override
public void onClick(Widget sender) {
dialogBox.hide();
}
});
vPanel.add(message);
vPanel.add(okButton);
dialogBox.setWidget(vPanel);
dialogBox.center();
dialogBox.show();
}
示例13: OdeLog
import com.google.gwt.user.client.ui.HTML; //导入依赖的package包/类
/**
* Creates a new output panel for displaying internal messages.
*/
private OdeLog() {
// Initialize UI
Button clearButton = new Button(MESSAGES.clearButton());
clearButton.addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
clear();
}
});
text = new HTML();
text.setWidth("100%");
VerticalPanel panel = new VerticalPanel();
panel.add(clearButton);
panel.add(text);
panel.setSize("100%", "100%");
panel.setCellHeight(text, "100%");
panel.setCellWidth(text, "100%");
initWidget(panel);
}
示例14: getBuiltInBlocksTree
import com.google.gwt.user.client.ui.HTML; //导入依赖的package包/类
/**
* Constructs a tree item for built-in blocks.
*
* @return tree item
*/
public TreeItem getBuiltInBlocksTree() {
initBundledImages();
TreeItem builtinNode = new TreeItem(new HTML("<span>" + MESSAGES.builtinBlocksLabel()
+ "</span>"));
for (final String drawerName : BUILTIN_DRAWER_NAMES) {
Image drawerImage = new Image(bundledImages.get(drawerName));
TreeItem itemNode = new TreeItem(new HTML("<span>" + drawerImage
+ getBuiltinDrawerNames(drawerName) + "</span>"));
SourceStructureExplorerItem sourceItem = new BlockSelectorItem() {
@Override
public void onSelected() {
fireBuiltinDrawerSelected(drawerName);
}
};
itemNode.setUserObject(sourceItem);
builtinNode.addItem(itemNode);
}
builtinNode.setState(true);
return builtinNode;
}
示例15: getGenericComponentsTree
import com.google.gwt.user.client.ui.HTML; //导入依赖的package包/类
/**
* Constructs a tree item for generic ("Advanced") component blocks for
* component types that appear in form.
*
* @param form
* only component types that appear in this Form will be included
* @return tree item for this form
*/
public TreeItem getGenericComponentsTree(MockForm form) {
Map<String, String> typesAndIcons = Maps.newHashMap();
form.collectTypesAndIcons(typesAndIcons);
TreeItem advanced = new TreeItem(new HTML("<span>" + MESSAGES.anyComponentLabel() + "</span>"));
List<String> typeList = new ArrayList<String>(typesAndIcons.keySet());
Collections.sort(typeList);
for (final String typeName : typeList) {
TreeItem itemNode = new TreeItem(new HTML("<span>" + typesAndIcons.get(typeName)
+ MESSAGES.textAnyComponentLabel()
+ ComponentsTranslation.getComponentName(typeName) + "</span>"));
SourceStructureExplorerItem sourceItem = new BlockSelectorItem() {
@Override
public void onSelected() {
fireGenericDrawerSelected(typeName);
}
};
itemNode.setUserObject(sourceItem);
advanced.addItem(itemNode);
}
return advanced;
}