List of usage examples for com.google.gwt.user.client.ui HTML HTML
protected HTML(Element element)
From source file:ar.com.kyol.jet.client.JetColumn.java
License:Open Source License
/** * Instantiates a new jet column.//from w w w . ja va2s .c om * * @param columnName the column name * @param title the title * @param contentStyle the content style * @param widget the widget * @param columnWidth the column width * @param readonly the readonly */ public JetColumn(String columnName, String title, String contentStyle, WrapperGenerator widget, Integer columnWidth, ReadOnlyCondition readonly) { this(columnName, new HTML(title), contentStyle, widget, columnWidth, readonly); }
From source file:ar.com.kyol.jet.client.JetTable.java
License:Open Source License
public void addColumn(String columnName, String title, String contentStyle, WrapperGenerator widget, Integer columnWidth, ReadOnlyCondition readonly) { addColumn(columnName, new HTML(title), contentStyle, widget, columnWidth, readonly); }
From source file:asquare.gwt.tests.history.client.Demo.java
License:Apache License
private static Widget createGrains() { HTML html = new HTML("<h4>Grains</h4><ul><li>wheat</li><li>rice</li><li>quinoa</li><li>beer</li></ul>"); DOM.setElementProperty(html.getElement(), "id", "_grains"); return html;/* w ww . java 2 s . co m*/ }
From source file:asquare.gwt.tests.history.client.Demo.java
License:Apache License
private static Widget createVegetables() { HTML html = new HTML( "<h4>Vegetables</h4><ul><li>crucifers</li><li>carrots</li><li>spinach</li><li>bacon</li></ul>"); DOM.setElementProperty(html.getElement(), "id", "_vegetables"); return html;//from w ww . j av a2 s .com }
From source file:asquare.gwt.tests.history.client.Demo.java
License:Apache License
private static Widget createFruit() { HTML html = new HTML("<h4>Fruit</h4><ul><li>cherries</li><li>rasberries</li><li>strawberries</li></ul>"); /*//from w ww . j a va 2s. c o m * This causes the bug. * The history token and the element id conflict. */ DOM.setElementProperty(html.getElement(), "id", "fruit"); return html; }
From source file:asquare.gwt.tests.history.client.Demo.java
License:Apache License
private static Widget createStimulants() { HTML html = new HTML( "<h4>Stimulants</h4><ul><li>coffee</li><li>tea</li><li>Jolt</li><li>yerba maté</li></ul>"); DOM.setElementProperty(html.getElement(), "id", "_stimulants"); return html;//from ww w .j a v a 2 s . c o m }
From source file:asquare.gwt.tests.popupflash.client.Demo.java
License:Apache License
public void onModuleLoad() { RootPanel body = RootPanel.get();// w w w. ja va2s. c o m DOM.setStyleAttribute(body.getElement(), "background", "blue"); body.add(new Button("Show popup", new ClickHandler() { public void onClick(ClickEvent event) { Button showPopupButton = (Button) event.getSource(); PopupPanel popup = new PopupPanel(true); popup.add(new HTML("Click outside the popup to dismiss it")); DOM.setStyleAttribute(popup.getElement(), "border", "solid white 5px"); DOM.setStyleAttribute(popup.getElement(), "background", "red"); popup.setSize("20em", "20em"); int x = showPopupButton.getAbsoluteLeft(); int y = showPopupButton.getAbsoluteTop() + showPopupButton.getOffsetHeight(); popup.setPopupPosition(x, y); popup.show(); } })); }
From source file:asquare.gwt.tests.popuphidden.client.Demo.java
License:Apache License
public void onModuleLoad() { RootPanel body = RootPanel.get();//from ww w. j a v a2 s . c om DOM.setStyleAttribute(body.getElement(), "background", "blue"); final Button showPopupButton = new Button("Show popup"); showPopupButton.addClickHandler(new ClickHandler() { public void onClick(ClickEvent event) { final PopupPanel popup = new PopupPanel(true); VerticalPanel outer = new VerticalPanel(); outer.add(new HTML("Click outside the popup to dismiss it")); outer.add(new Button("DOM.setStyleAttribute(popup.getElement(), \"visibility\", \"hidden\")", new ClickHandler() { public void onClick(ClickEvent event) { DOM.setStyleAttribute(popup.getElement(), "visibility", "hidden"); } })); popup.setWidget(outer); DOM.setStyleAttribute(popup.getElement(), "border", "double black 4px"); DOM.setStyleAttribute(popup.getElement(), "background", "red"); popup.setSize("20em", "20em"); int x = showPopupButton.getAbsoluteLeft(); int y = showPopupButton.getAbsoluteTop() + showPopupButton.getOffsetHeight(); popup.setPopupPosition(x, y); popup.show(); } }); body.add(showPopupButton); }
From source file:asquare.gwt.tk.client.ui.AlertDialog.java
License:Apache License
/** * Set the message which will be displayed in the dialog. * //from ww w .j a v a 2 s . c o m * @param text a String, or <code>null</code> * @param asHtml true to treat <code>captionText</code> as HTML, false to * treat <code>captionText</code> as plain text */ public void setMessage(String text, boolean asHtml) { if (text == null) { setMessage((Widget) null); } else { if (asHtml) { setMessage(new HTML(text)); } else { setMessage(new Label(text)); } } }
From source file:asquare.gwt.tk.demo.client.MiscPanel.java
License:Apache License
private Widget createSimpleHyperLinkPanel() { BasicPanel panel = new BasicPanel("div"); panel.setStyleName("division"); String content = "<H2>SimpleHyperLink</H2>" + "A hyperlink based on an anchor. No pesky DIV messing up your text flow. No history tokens in the location bar."; HTML header = new HTML(content); header.addStyleName("header"); panel.add(header);//from w w w . ja v a 2 s . c o m BasicPanel example = new BasicPanel(); example.addStyleName("example"); example.add(new SimpleHyperLink("SpongeBob says...", new ClickListener() { public void onClick(Widget sender) { Window.alert("I'm a goofy goober!"); } })); panel.add(example); return panel; }