List of usage examples for com.google.gwt.user.client.ui UIObject getElement
public Element getElement()
From source file:gwtBlocks.client.PrintManager.java
License:Apache License
public static void print(String[] styles, UIObject obj) { print(styles, obj.getElement().getInnerHTML()); }
From source file:nz.co.doltech.gwtjui.core.client.JuiQuery.java
License:Apache License
public static JuiQuery $(UIObject uiObject) { return new JuiQuery(uiObject.getElement()); }
From source file:nz.co.doltech.gwtjui.interactions.client.options.AlsoResize.java
License:Apache License
public AlsoResize(UIObject uiObject) { this(uiObject.getElement()); }
From source file:nz.co.doltech.gwtjui.interactions.client.options.Containment.java
License:Apache License
public Containment(UIObject uiObject) { this(uiObject.getElement()); }
From source file:nz.co.doltech.gwtjui.interactions.client.options.Handle.java
License:Apache License
public Handle(UIObject uiObject) { this(uiObject.getElement()); }
From source file:org.bioversityinternational.cisf.client.tools.Elements.java
License:Apache License
/** * Causes an element to "fade in" via opacity. Make sure that element to fade is not visible before calling this method. * When the callback is invoked with onFadeStart, the element can be set to visible as it is entirely transparent. * When onFadeComplete is called, the element will be entirely opaque. * @param target the UIObject to be faded in * @param milliseconds how long the fade effect should take to process * @param callback the callback to be invoked on fade progress *///from w w w . j av a 2s . c o m public static void fadeIn(final UIObject target, final int milliseconds, final FadeCallback callback) { final Element e = target.getElement(); final int interval = milliseconds / 50; setOpacity(e, 0); DeferredCommand.addCommand(new Command() { public void execute() { callback.onFadeStart(); final Timer t = new Timer() { int pct = 0; @Override public void run() { pct += 2; setOpacity(e, pct); if (pct == 100) { this.cancel(); callback.onFadeComplete(); } } }; t.scheduleRepeating(interval); } }); }
From source file:org.bioversityinternational.cisf.client.tools.Elements.java
License:Apache License
/** * Causes an element to "fade out" via opacity. * When onFadeComplete is called, the element will be entirely transparent. * @param target the UIObject to be faded out * @param milliseconds how long the fade effect should take to process * @param callback the callback to be invoked on fade progress *///from w ww . java2 s .com public static void fadeOut(final UIObject target, final int milliseconds, final FadeCallback callback) { final Element e = target.getElement(); final int interval = milliseconds / 50; DeferredCommand.addCommand(new Command() { public void execute() { callback.onFadeStart(); final Timer t = new Timer() { int pct = 100; @Override public void run() { pct -= 2; setOpacity(e, pct); if (pct == 0) { this.cancel(); callback.onFadeComplete(); } } }; t.scheduleRepeating(interval); } }); }
From source file:org.dashbuilder.client.metrics.widgets.vertical.VerticalServerMetrics.java
License:Apache License
private void setPointerCursor(UIObject object) { object.getElement().getStyle().setCursor(Style.Cursor.POINTER); }
From source file:org.ednovo.gooru.client.mvp.assessments.play.resource.add.AddResourceAssessmentsView.java
License:Open Source License
private void adjustTreeItemStyle(final UIObject uiObject) { if (uiObject instanceof TreeItem) { if (uiObject != null && uiObject.getElement() != null) { Element element = uiObject.getElement(); element.getStyle().setPadding(0, Unit.PX); element.getStyle().setMarginLeft(0, Unit.PX); }//w w w . j av a 2 s . co m } else { if (uiObject != null && uiObject.getElement() != null && uiObject.getElement().getParentElement() != null && uiObject.getElement().getParentElement().getParentElement() != null && uiObject.getElement().getParentElement().getParentElement().getStyle() != null) { Element element = uiObject.getElement().getParentElement().getParentElement(); element.getStyle().setPadding(0, Unit.PX); element.getStyle().setMarginLeft(0, Unit.PX); } } }
From source file:org.ednovo.gooru.client.mvp.folder.toc.FolderTocView.java
License:Open Source License
/** * @function adjustTreeItemStyle //from w w w. j a v a 2 s .co m * * @created_date : 10-02-2015 * * @description * * @parm(s) : @param uiObject * * @return : void * * @throws : <Mentioned if any exceptions> * */ private void adjustTreeItemStyle(final UIObject uiObject, String itemType, int folderLevel) { if (uiObject instanceof TreeItem) { if (uiObject != null && uiObject.getElement() != null) { Element element = uiObject.getElement(); if (FOLDER.equalsIgnoreCase(itemType)) { if (folderLevel >= 2) { element.getStyle().setPaddingLeft(28, Unit.PX); element.getStyle().setMarginLeft(0, Unit.PX); if (folderLevel > 2) { Element element1 = uiObject.getElement().getParentElement().getParentElement(); element1.getStyle().setPaddingLeft(28, Unit.PX); element1.getStyle().setMarginLeft(0, Unit.PX); } } else { if (folderLevel == 1) { element.getStyle().setPaddingLeft(0, Unit.PX); element.getStyle().setMarginLeft(-10, Unit.PX); } else { element.getStyle().setPaddingLeft(0, Unit.PX); element.getStyle().setMarginLeft(0, Unit.PX); } } } else if (COLLECTION.equalsIgnoreCase(itemType) || SCOLLECTION.equalsIgnoreCase(itemType)) { if (folderLevel >= 2) { element.getStyle().setPaddingLeft(69, Unit.PX); element.getStyle().setMarginLeft(0, Unit.PX); Element element1 = uiObject.getElement().getParentElement().getParentElement(); element1.getStyle().setPaddingLeft(28, Unit.PX); element1.getStyle().setMarginLeft(0, Unit.PX); } else { element.getStyle().setPaddingLeft(28, Unit.PX); element.getStyle().setMarginLeft(0, Unit.PX); } if (folderLevel == 2) { Element element1 = uiObject.getElement().getParentElement().getParentElement(); element1.getStyle().setPaddingLeft(0, Unit.PX); element1.getStyle().setMarginLeft(-12, Unit.PX); } } } } else { if (uiObject != null && uiObject.getElement() != null && uiObject.getElement().getParentElement() != null && uiObject.getElement().getParentElement().getParentElement() != null && uiObject.getElement().getParentElement().getParentElement().getStyle() != null) { Element element = uiObject.getElement().getParentElement().getParentElement(); element.getStyle().setPadding(0, Unit.PX); element.getStyle().setMarginLeft(1, Unit.PX); } } }