Tabnine Logo
Element.getOffsetLeft
Code IndexAdd Tabnine to your IDE (free)

How to use
getOffsetLeft
method
in
com.google.gwt.user.client.Element

Best Java code snippets using com.google.gwt.user.client.Element.getOffsetLeft (Showing top 2 results out of 315)

origin: com.extjs/gxt

public Point translatePoints(Point p) {
 List<String> list = new ArrayList<String>(3);
 list.add("position");
 list.add("left");
 list.add("top");
 Map<String, String> map = getStyleAttribute(list);
 boolean relative = "relative".equals(map.get("position"));
 int l = Util.parseInt(map.get("left"), -11234);
 int t = Util.parseInt(map.get("top"), -11234);
 l = l != -11234 ? l : (relative ? 0 : dom.getOffsetLeft());
 t = t != -11234 ? t : (relative ? 0 : dom.getOffsetTop());
 Point o = getXY();
 return new Point(p.x - o.x + l, p.y - o.y + t);
}
origin: de.esoco/gewt

/***************************************
 * Scrolls to a certain tab bar widget.
 *
 * @param rTab The widget to scroll to
 */
void scrollTo(Widget rTab)
{
  if (isTabScrollingNecessary())
  {
    int nTabBarLeft  = parsePosition(rTabBar.getElement());
    int nTabBarWidth = getTabBarWidth();
    int nWidgetLeft  = rTab.getElement().getOffsetLeft() + nTabBarLeft;
    int nWidgetRight = getRightOfWidget(rTab) + nTabBarLeft;
    int nScrollDiff  = 0;
    if (nWidgetRight > nTabBarWidth)
    {
      nScrollDiff =  nTabBarWidth - nWidgetRight;
      nWidgetLeft += nScrollDiff;
    }
    if (nWidgetLeft < 0)
    {
      nScrollDiff = -nWidgetLeft;
    }
    scrollTabBar(nScrollDiff);
  }
}
com.google.gwt.user.clientElementgetOffsetLeft

Popular methods of Element

  • getStyle
  • setAttribute
  • appendChild
  • setId
  • getParentElement
  • cast
  • setInnerText
  • getId
  • setInnerHTML
  • addClassName
  • getAttribute
  • getInnerHTML
  • getAttribute,
  • getInnerHTML,
  • getFirstChildElement,
  • getInnerText,
  • getClientWidth,
  • removeChild,
  • getChildCount,
  • getOffsetHeight,
  • removeAttribute,
  • removeClassName

Popular in Java

  • Making http requests using okhttp
  • notifyDataSetChanged (ArrayAdapter)
  • getSupportFragmentManager (FragmentActivity)
  • runOnUiThread (Activity)
  • Container (java.awt)
    A generic Abstract Window Toolkit(AWT) container object is a component that can contain other AWT co
  • KeyStore (java.security)
    KeyStore is responsible for maintaining cryptographic keys and their owners. The type of the syste
  • HashMap (java.util)
    HashMap is an implementation of Map. All optional operations are supported.All elements are permitte
  • Set (java.util)
    A Set is a data structure which does not allow duplicate elements.
  • ReentrantLock (java.util.concurrent.locks)
    A reentrant mutual exclusion Lock with the same basic behavior and semantics as the implicit monitor
  • ImageIO (javax.imageio)
  • Sublime Text for Python
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now