List of usage examples for com.google.gwt.user.client.ui Widget getElement
public Element getElement()
From source file:ar.com.kyol.jet.client.JetPaginatedTable.java
License:Open Source License
private void addNewest() { String label = Jet.constants.newest() + " >>"; int newest = (int) Math.ceil(Float.valueOf(total) / qty); Widget last; if (useHyperlinks) { last = new Hyperlink(label, this.getPlainToken() + "/p" + newest); last.getElement().getStyle().setMarginLeft(5, Unit.PX); } else {/* ww w. ja v a 2s .c o m*/ last = createAnchor(label, newest); } navigationPanel.add(last); }
From source file:ar.com.kyol.jet.client.JetPaginatedTable.java
License:Open Source License
private void addNewer() { String label = Jet.constants.newer() + " >"; Widget next; if (useHyperlinks) { next = new Hyperlink(label, this.getPlainToken() + "/p" + (page + 1)); next.getElement().getStyle().setMarginLeft(5, Unit.PX); } else {//from w ww . j av a2 s. c o m next = createAnchor(label, page + 1); } navigationPanel.add(next); }
From source file:ar.com.kyol.jet.client.JetPaginatedTable.java
License:Open Source License
private void addOlder() { String label = "< " + Jet.constants.older(); Widget previous; if (useHyperlinks) { previous = new Hyperlink(label, this.getPlainToken() + "/p" + (page - 1)); previous.getElement().getStyle().setMarginRight(5, Unit.PX); } else {// w w w . jav a 2s . c o m previous = createAnchor(label, page - 1); } navigationPanel.add(previous); }
From source file:ar.com.kyol.jet.client.JetPaginatedTable.java
License:Open Source License
private void addOldest() { String label = "<< " + Jet.constants.oldest(); Widget first; if (useHyperlinks) { first = new Hyperlink(label, this.getPlainToken() + "/p1"); first.getElement().getStyle().setMarginRight(5, Unit.PX); } else {// w w w . java 2 s. c o m first = createAnchor(label, 1); } navigationPanel.add(first); }
From source file:ar.com.macsgroup.graphics.gwtraphael.client.charts.pie.PieChart.java
License:Open Source License
public void drawInside(Widget widget, Integer[] values, LegendPosition legendPosition, String[] legends, String[] colors) {//from w ww . j a v a 2s . c o m /** * Converting numbers */ JsArrayNumber valuesJs = (JsArrayNumber) JavaScriptObject.createArray(); for (int value : values) { valuesJs.push(value); } /** * Converting legends */ JsArrayString legendsJs = (JsArrayString) JavaScriptObject.createArray(); for (String value : legends) { legendsJs.push(value); } /** * Converting colors */ JsArrayString colorJs = (JsArrayString) JavaScriptObject.createArray(); if (colors != null) { for (String value : colors) { colorJs.push(value); } } draw(widget.getElement(), this.width, this.height, this.font, this.title, valuesJs, legendPosition.getRaphaelString(), legendsJs, colorJs); }
From source file:asquare.gwt.sb.client.fw.HoverControllerBase.java
License:Apache License
@Override public void onMouseOver(MouseEvent e) { Widget source = e.getSourceWidget(); CellId targetCell = getCellId(source, e.getTarget()); Element fromElement = e.getFrom(); CellId fromCell = null;//w w w. ja v a 2s .c o m if (fromElement != null && DOM.isOrHasChild(source.getElement(), fromElement)) { fromCell = getCellId(source, fromElement); } // Ignore "over" events generated within the same view cell if (!GwtUtil.equals(targetCell, fromCell)) { onHoverChanged(source, targetCell); } }
From source file:asquare.gwt.sb.client.fw.HoverControllerBase.java
License:Apache License
@Override public void onMouseOut(MouseEvent e) { Widget source = e.getSourceWidget(); CellId targetCell = getCellId(source, e.getTarget()); Element toElement = e.getTo(); CellId toCell = null;/* w ww . j av a 2 s. c o m*/ if (toElement != null && DOM.isOrHasChild(source.getElement(), toElement)) { toCell = getCellId(source, toElement); } // Ignore "out" events generated within the same view cell if (!GwtUtil.equals(targetCell, toCell)) { /* * Performance: ignore "out" events if the cursor is moving to * another cell in the same view. (The over event will set * the active index anyway, resulting in a 2nd update). */ if (toCell == null) { onHoverChanged(source, null); } } }
From source file:asquare.gwt.sb.client.ui.StreamPanel.java
License:Apache License
public Widget widget(Widget w) { if (m_display != null) DOM.setStyleAttribute(w.getElement(), "display", m_display); add(w, m_elementTreePath.peek());/* w w w . j a va 2 s .co m*/ return w; }
From source file:asquare.gwt.sb.client.ui.StreamPanel.java
License:Apache License
public Widget widgetOpen(Widget w) { widget(w); m_elementTreePath.push(w.getElement()); m_widgetTreePath.push(w); return w; }
From source file:asquare.gwt.tk.client.ui.behavior.impl.PreventSelectionControllerIE6.java
License:Apache License
@Override public void plugIn(Widget widget) { installHook(widget.getElement()); }