org.utgenome.gwt.widget.client
Class Style

java.lang.Object
  extended by org.utgenome.gwt.widget.client.Style

public class Style
extends Object

Style is a helper class to edit CSS (Cascading Style Sheet) design of widgets by setting their DOM properties.

Author:
leo

Field Summary
static String BORDER_DASHED
           
static String BORDER_INSET
           
static String BORDER_OUTSET
           
static String BORDER_SOLID
           
static int BOTTOM
           
static String COLOR_BLACK
           
static String COLOR_GRAY
           
static String COLOR_RED
           
static String COLOR_SKYBLUE
           
static String COLOR_WHITE
           
static String CSS_BACKGROUND_COLOR
           
static String CSS_BACKGROUND_IMAGE
           
static String CSS_BACKGROUND_POSITION
           
static String CSS_BACKGROUND_REPEAT
           
static String CSS_BORDER
           
static String CSS_BORDER_COLLAPSE
           
static String CSS_CURSOR
           
static String CSS_DISPLAY
           
static String CSS_FONT_COLOR
           
static String CSS_FONT_FAMILY
           
static String CSS_FONT_SIZE
           
static String CSS_FONT_WEIGHT
           
static String CSS_MARGIN
           
static String CSS_NOWRAP
           
static String CSS_OVERFLOW_X
           
static String CSS_OVERFLOW_Y
           
static String CSS_PADDING
           
static String CSS_VERTICAL_ALIGN
           
static String CSS_WHITESPACE
           
static String CSS_Z_INDEX
           
static String CURSOR_AUTO
           
static String CURSOR_CROSSHAIR
           
static String CURSOR_HELP
           
static String CURSOR_MOVE
           
static String CURSOR_POINTER
           
static String CURSOR_RESIZE_E
           
static String CURSOR_RESIZE_N
           
static String CURSOR_RESIZE_SE
           
static String CURSOR_TEXT
           
static String DISPLAY_BLOCK
           
static int LEFT
           
static String OVERFLOW_AUTO
           
static String OVERFLOW_HIDDEN
           
static int RIGHT
           
static int TOP
           
 
Method Summary
static void backgroundColor(com.google.gwt.user.client.ui.Widget w, String color)
           
static void backgroundImage(com.google.gwt.user.client.ui.Widget w, String imageURL)
           
static void backgroundNoRepeat(com.google.gwt.user.client.ui.Widget w)
           
static void backgroundPosition(com.google.gwt.user.client.ui.Widget w, String value)
           
static void backgroundRepeat(com.google.gwt.user.client.ui.Widget w)
           
static void backgroundRepeatX(com.google.gwt.user.client.ui.Widget w)
           
static void backgroundRepeatY(com.google.gwt.user.client.ui.Widget w)
           
static void bold(com.google.gwt.user.client.ui.Widget w)
           
static void border(com.google.gwt.user.client.ui.Widget w, int NEWSflag, int borderWidth, String borderType, String color)
           
static void border(com.google.gwt.user.client.ui.Widget w, int borderWidth, String borderType, String color)
           
static void borderCollapse(com.google.gwt.user.client.ui.Widget w)
           
static void cursor(com.google.gwt.user.client.ui.Widget w, String cursorType)
           
static void disableScroll(com.google.gwt.user.client.ui.Widget w)
           
static void fontColor(com.google.gwt.user.client.ui.Widget w, String color)
           
static void fontFamily(com.google.gwt.user.client.ui.Widget w, String fontFamily)
           
static void fontFamily(com.google.gwt.user.client.ui.Widget w, String[] fontFamily)
           
static void fontSize(com.google.gwt.user.client.ui.Widget w, int pixelFontSize)
           
static void fullBlock(com.google.gwt.user.client.ui.Widget w)
           
static void fullHeight(com.google.gwt.user.client.ui.Widget w)
           
static void fullSize(com.google.gwt.user.client.ui.Widget w)
           
static void fullWidth(com.google.gwt.user.client.ui.Widget w)
           
static String getCSS3DOMprefix()
           
static String getCSS3prefix()
           
static void hideHorizontalScrollBar(com.google.gwt.user.client.ui.Widget w)
           
static void hideVerticalScrollBar(com.google.gwt.user.client.ui.Widget w)
           
static void italic(com.google.gwt.user.client.ui.Widget w)
           
static void margin(com.google.gwt.user.client.ui.Widget w, int marginSize)
           
static void margin(com.google.gwt.user.client.ui.Widget w, int NEWSflag, int marginSize)
           
static void normal(com.google.gwt.user.client.ui.Widget w)
           
static void nowrap(com.google.gwt.user.client.ui.Widget w)
           
static void opacity(com.google.gwt.user.client.ui.Widget w, double alpha)
          Set the opacity of the Widget
static void overflowAuto(com.google.gwt.user.client.ui.Widget w)
           
static void overflowHidden(com.google.gwt.user.client.ui.Widget w)
           
static void padding(com.google.gwt.user.client.ui.Widget w, int paddingSize)
           
static void padding(com.google.gwt.user.client.ui.Widget w, int NEWSflag, int paddingSize)
           
static void position(com.google.gwt.user.client.ui.Widget w, String value)
           
static void preserveWhiteSpace(com.google.gwt.user.client.ui.Widget w)
           
static void right(com.google.gwt.user.client.ui.Widget w, String value)
          Set the position of the widget from the right border
static void scale(com.google.gwt.user.client.ui.Widget w, double scale)
           
static void scale(com.google.gwt.user.client.ui.Widget w, double scaleX, double scaleY)
           
static void scaleX(com.google.gwt.user.client.ui.Widget w, double scaleX)
           
static void scaleXwithAnimation(com.google.gwt.user.client.ui.Widget w, double scaleX, double durationInSec)
           
static void scaleXwithAnimation(com.google.gwt.user.client.ui.Widget w, double scaleX, int newPixelX, double durationInSec)
           
static void scaleY(com.google.gwt.user.client.ui.Widget w, double scaleY)
           
static void scrollX(com.google.gwt.user.client.ui.Widget w, int destX, double sec)
           
static void scrollY(com.google.gwt.user.client.ui.Widget w, int destY, double sec)
           
static void semiTransparentBackground(com.google.gwt.user.client.ui.Widget w, String colorCode, float alpha)
          Make the background of the widget semi-transparent color
static void set(com.google.gwt.user.client.ui.Widget w, String cssPropertyName, String value)
          Set CSS style
static void setExt(com.google.gwt.user.client.ui.Widget w, String property, String value)
          Set a CSS3 property with a browser-specific prefix.
static void textAlign(com.google.gwt.user.client.ui.Widget w, String value)
          Set the text alignment of the widget
static void transform(com.google.gwt.user.client.ui.Widget w, String transformCommand)
           
static void translate(com.google.gwt.user.client.ui.Widget w, String translateCommand)
           
static void translateX(com.google.gwt.user.client.ui.Widget w, int x)
           
static void translateY(com.google.gwt.user.client.ui.Widget w, int y)
           
static void trimOverflowedText(com.google.gwt.user.client.ui.Widget w)
           
static void verticalAlign(com.google.gwt.user.client.ui.Widget w, String value)
           
static void visibilityHidden(com.google.gwt.user.client.ui.Widget w)
           
static void zIndex(com.google.gwt.user.client.ui.Widget w, int zIndex)
          set the overlap position of the widget.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CSS_BORDER

public static final String CSS_BORDER
See Also:
Constant Field Values

CSS_PADDING

public static final String CSS_PADDING
See Also:
Constant Field Values

CSS_MARGIN

public static final String CSS_MARGIN
See Also:
Constant Field Values

CSS_FONT_COLOR

public static final String CSS_FONT_COLOR
See Also:
Constant Field Values

CSS_FONT_WEIGHT

public static final String CSS_FONT_WEIGHT
See Also:
Constant Field Values

CSS_FONT_SIZE

public static final String CSS_FONT_SIZE
See Also:
Constant Field Values

CSS_FONT_FAMILY

public static final String CSS_FONT_FAMILY
See Also:
Constant Field Values

CSS_WHITESPACE

public static final String CSS_WHITESPACE
See Also:
Constant Field Values

CSS_NOWRAP

public static final String CSS_NOWRAP
See Also:
Constant Field Values

CSS_BACKGROUND_IMAGE

public static final String CSS_BACKGROUND_IMAGE
See Also:
Constant Field Values

CSS_BACKGROUND_REPEAT

public static final String CSS_BACKGROUND_REPEAT
See Also:
Constant Field Values

CSS_BACKGROUND_POSITION

public static final String CSS_BACKGROUND_POSITION
See Also:
Constant Field Values

CSS_BACKGROUND_COLOR

public static final String CSS_BACKGROUND_COLOR
See Also:
Constant Field Values

CSS_OVERFLOW_X

public static final String CSS_OVERFLOW_X
See Also:
Constant Field Values

CSS_OVERFLOW_Y

public static final String CSS_OVERFLOW_Y
See Also:
Constant Field Values

OVERFLOW_AUTO

public static final String OVERFLOW_AUTO
See Also:
Constant Field Values

OVERFLOW_HIDDEN

public static final String OVERFLOW_HIDDEN
See Also:
Constant Field Values

CSS_Z_INDEX

public static final String CSS_Z_INDEX
See Also:
Constant Field Values

BORDER_SOLID

public static final String BORDER_SOLID
See Also:
Constant Field Values

BORDER_DASHED

public static final String BORDER_DASHED
See Also:
Constant Field Values

BORDER_INSET

public static final String BORDER_INSET
See Also:
Constant Field Values

BORDER_OUTSET

public static final String BORDER_OUTSET
See Also:
Constant Field Values

COLOR_WHITE

public static final String COLOR_WHITE
See Also:
Constant Field Values

COLOR_RED

public static final String COLOR_RED
See Also:
Constant Field Values

COLOR_BLACK

public static final String COLOR_BLACK
See Also:
Constant Field Values

COLOR_GRAY

public static final String COLOR_GRAY
See Also:
Constant Field Values

COLOR_SKYBLUE

public static final String COLOR_SKYBLUE
See Also:
Constant Field Values

TOP

public static int TOP

BOTTOM

public static int BOTTOM

LEFT

public static int LEFT

RIGHT

public static int RIGHT

CSS_BORDER_COLLAPSE

public static final String CSS_BORDER_COLLAPSE
See Also:
Constant Field Values

CSS_CURSOR

public static final String CSS_CURSOR
See Also:
Constant Field Values

CURSOR_MOVE

public static final String CURSOR_MOVE
See Also:
Constant Field Values

CURSOR_AUTO

public static final String CURSOR_AUTO
See Also:
Constant Field Values

CURSOR_POINTER

public static final String CURSOR_POINTER
See Also:
Constant Field Values

CURSOR_CROSSHAIR

public static final String CURSOR_CROSSHAIR
See Also:
Constant Field Values

CURSOR_RESIZE_E

public static final String CURSOR_RESIZE_E
See Also:
Constant Field Values

CURSOR_RESIZE_N

public static final String CURSOR_RESIZE_N
See Also:
Constant Field Values

CURSOR_RESIZE_SE

public static final String CURSOR_RESIZE_SE
See Also:
Constant Field Values

CURSOR_TEXT

public static final String CURSOR_TEXT
See Also:
Constant Field Values

CURSOR_HELP

public static final String CURSOR_HELP
See Also:
Constant Field Values

CSS_DISPLAY

public static final String CSS_DISPLAY
See Also:
Constant Field Values

DISPLAY_BLOCK

public static final String DISPLAY_BLOCK
See Also:
Constant Field Values

CSS_VERTICAL_ALIGN

public static final String CSS_VERTICAL_ALIGN
See Also:
Constant Field Values
Method Detail

visibilityHidden

public static void visibilityHidden(com.google.gwt.user.client.ui.Widget w)

zIndex

public static void zIndex(com.google.gwt.user.client.ui.Widget w,
                          int zIndex)
set the overlap position of the widget. Widgets with the higher z-index will be front on the display

Parameters:
w - the widget
zIndex -

bold

public static void bold(com.google.gwt.user.client.ui.Widget w)

normal

public static void normal(com.google.gwt.user.client.ui.Widget w)

italic

public static void italic(com.google.gwt.user.client.ui.Widget w)

fontSize

public static void fontSize(com.google.gwt.user.client.ui.Widget w,
                            int pixelFontSize)

fontFamily

public static void fontFamily(com.google.gwt.user.client.ui.Widget w,
                              String[] fontFamily)

fontFamily

public static void fontFamily(com.google.gwt.user.client.ui.Widget w,
                              String fontFamily)

nowrap

public static void nowrap(com.google.gwt.user.client.ui.Widget w)

preserveWhiteSpace

public static void preserveWhiteSpace(com.google.gwt.user.client.ui.Widget w)

overflowHidden

public static void overflowHidden(com.google.gwt.user.client.ui.Widget w)

disableScroll

public static void disableScroll(com.google.gwt.user.client.ui.Widget w)

hideHorizontalScrollBar

public static void hideHorizontalScrollBar(com.google.gwt.user.client.ui.Widget w)

hideVerticalScrollBar

public static void hideVerticalScrollBar(com.google.gwt.user.client.ui.Widget w)

backgroundImage

public static void backgroundImage(com.google.gwt.user.client.ui.Widget w,
                                   String imageURL)
Parameters:
w -
imageURL - background image url relative to the GWT module base URL

backgroundNoRepeat

public static void backgroundNoRepeat(com.google.gwt.user.client.ui.Widget w)

backgroundPosition

public static void backgroundPosition(com.google.gwt.user.client.ui.Widget w,
                                      String value)

backgroundRepeat

public static void backgroundRepeat(com.google.gwt.user.client.ui.Widget w)

backgroundRepeatY

public static void backgroundRepeatY(com.google.gwt.user.client.ui.Widget w)

backgroundRepeatX

public static void backgroundRepeatX(com.google.gwt.user.client.ui.Widget w)

backgroundColor

public static void backgroundColor(com.google.gwt.user.client.ui.Widget w,
                                   String color)

fullWidth

public static void fullWidth(com.google.gwt.user.client.ui.Widget w)

fullHeight

public static void fullHeight(com.google.gwt.user.client.ui.Widget w)

fullSize

public static void fullSize(com.google.gwt.user.client.ui.Widget w)

border

public static void border(com.google.gwt.user.client.ui.Widget w,
                          int borderWidth,
                          String borderType,
                          String color)
Parameters:
w -
borderWidth - pixel width
borderType -
color -

border

public static void border(com.google.gwt.user.client.ui.Widget w,
                          int NEWSflag,
                          int borderWidth,
                          String borderType,
                          String color)
Parameters:
w -
NEWSflag -
borderWidth - pixel width
borderType -
color -

borderCollapse

public static void borderCollapse(com.google.gwt.user.client.ui.Widget w)

padding

public static void padding(com.google.gwt.user.client.ui.Widget w,
                           int paddingSize)
Parameters:
w -
paddingSize -

padding

public static void padding(com.google.gwt.user.client.ui.Widget w,
                           int NEWSflag,
                           int paddingSize)

margin

public static void margin(com.google.gwt.user.client.ui.Widget w,
                          int marginSize)

margin

public static void margin(com.google.gwt.user.client.ui.Widget w,
                          int NEWSflag,
                          int marginSize)

cursor

public static void cursor(com.google.gwt.user.client.ui.Widget w,
                          String cursorType)

fullBlock

public static void fullBlock(com.google.gwt.user.client.ui.Widget w)

verticalAlign

public static void verticalAlign(com.google.gwt.user.client.ui.Widget w,
                                 String value)

right

public static void right(com.google.gwt.user.client.ui.Widget w,
                         String value)
Set the position of the widget from the right border

Parameters:
w -
value -

textAlign

public static void textAlign(com.google.gwt.user.client.ui.Widget w,
                             String value)
Set the text alignment of the widget

Parameters:
w -
value -

trimOverflowedText

public static void trimOverflowedText(com.google.gwt.user.client.ui.Widget w)

semiTransparentBackground

public static void semiTransparentBackground(com.google.gwt.user.client.ui.Widget w,
                                             String colorCode,
                                             float alpha)
Make the background of the widget semi-transparent color

Parameters:
colorCode - Hex RGB color code

set

public static void set(com.google.gwt.user.client.ui.Widget w,
                       String cssPropertyName,
                       String value)
Set CSS style

Parameters:
w -
cssPropertyName -
value -

position

public static void position(com.google.gwt.user.client.ui.Widget w,
                            String value)

overflowAuto

public static void overflowAuto(com.google.gwt.user.client.ui.Widget w)

fontColor

public static void fontColor(com.google.gwt.user.client.ui.Widget w,
                             String color)

transform

public static void transform(com.google.gwt.user.client.ui.Widget w,
                             String transformCommand)

scale

public static void scale(com.google.gwt.user.client.ui.Widget w,
                         double scale)

scale

public static void scale(com.google.gwt.user.client.ui.Widget w,
                         double scaleX,
                         double scaleY)

scaleX

public static void scaleX(com.google.gwt.user.client.ui.Widget w,
                          double scaleX)

scaleXwithAnimation

public static void scaleXwithAnimation(com.google.gwt.user.client.ui.Widget w,
                                       double scaleX,
                                       double durationInSec)

scaleXwithAnimation

public static void scaleXwithAnimation(com.google.gwt.user.client.ui.Widget w,
                                       double scaleX,
                                       int newPixelX,
                                       double durationInSec)

scaleY

public static void scaleY(com.google.gwt.user.client.ui.Widget w,
                          double scaleY)

translate

public static void translate(com.google.gwt.user.client.ui.Widget w,
                             String translateCommand)

translateX

public static void translateX(com.google.gwt.user.client.ui.Widget w,
                              int x)

translateY

public static void translateY(com.google.gwt.user.client.ui.Widget w,
                              int y)

getCSS3prefix

public static String getCSS3prefix()

getCSS3DOMprefix

public static String getCSS3DOMprefix()

setExt

public static void setExt(com.google.gwt.user.client.ui.Widget w,
                          String property,
                          String value)
Set a CSS3 property with a browser-specific prefix.

Parameters:
w -
property -
value -

scrollX

public static void scrollX(com.google.gwt.user.client.ui.Widget w,
                           int destX,
                           double sec)

scrollY

public static void scrollY(com.google.gwt.user.client.ui.Widget w,
                           int destY,
                           double sec)

opacity

public static void opacity(com.google.gwt.user.client.ui.Widget w,
                           double alpha)
Set the opacity of the Widget

Parameters:
w -
alpha -


Copyright © 2007-2012 utgenome.org. All Rights Reserved.