org.gwtwidgets.client.ui.canvas.impl
Class Utils

java.lang.Object
  extended by org.gwtwidgets.client.ui.canvas.impl.Utils

public class Utils
extends java.lang.Object

Support functions for canvas

Author:
George Georgovassilis g.georgovassilis[at]gmail.com

Constructor Summary
Utils()
           
 
Method Summary
static void applySize(com.google.gwt.user.client.Element e, int width, int height)
          Applies the specified dimensions as style, element attributes and clipping on the provided element.
static double[] copy(double[] array)
          Clones an array of doubles
static com.google.gwt.user.client.Element createImage(java.lang.String src)
          Creates an image element and assigns the specified source
static int getHeight(com.google.gwt.user.client.Element e)
          Return the height in pixels of an element
static int getWidth(com.google.gwt.user.client.Element e)
          Return the width in pixels of an element
static int readInt(java.lang.String value)
          Converts a radix 26 representation of a string to an integer
static java.lang.String[] split(java.lang.String text, java.lang.String delimiter)
          Faster version of String.split(String) suitable for large strings.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Utils

public Utils()
Method Detail

getWidth

public static int getWidth(com.google.gwt.user.client.Element e)
Return the width in pixels of an element

Parameters:
e -
Returns:

getHeight

public static int getHeight(com.google.gwt.user.client.Element e)
Return the height in pixels of an element

Parameters:
e -
Returns:

split

public static java.lang.String[] split(java.lang.String text,
                                       java.lang.String delimiter)
Faster version of String.split(String) suitable for large strings.

Parameters:
text -
delimiter -
Returns:

readInt

public static int readInt(java.lang.String value)
Converts a radix 26 representation of a string to an integer

Parameters:
value -
Returns:

applySize

public static void applySize(com.google.gwt.user.client.Element e,
                             int width,
                             int height)
Applies the specified dimensions as style, element attributes and clipping on the provided element.

Parameters:
e -
width -
height -

copy

public static double[] copy(double[] array)
Clones an array of doubles

Parameters:
array -
Returns:

createImage

public static com.google.gwt.user.client.Element createImage(java.lang.String src)
Creates an image element and assigns the specified source

Parameters:
src -
Returns:


Copyright © 2009. All Rights Reserved.