|
GWT 2.0.3 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.google.gwt.dom.client.StyleInjector
public class StyleInjector
Used to add stylesheets to the document. The one-argument versions of
inject(java.lang.String)
, injectAtEnd(java.lang.String)
, and injectAtStart(java.lang.String)
use
Scheduler.scheduleFinally(com.google.gwt.core.client.Scheduler.ScheduledCommand)
to minimize the number of individual style
elements created.
Nested Class Summary | |
---|---|
static class |
StyleInjector.StyleInjectorImpl
The DOM-compatible way of adding stylesheets. |
static class |
StyleInjector.StyleInjectorImplIE
IE doesn't allow manipulation of a style element through DOM methods. |
Method Summary | |
---|---|
static void |
inject(java.lang.String css)
Add a stylesheet to the document. |
static void |
inject(java.lang.String css,
boolean immediate)
Add a stylesheet to the document. |
static void |
injectAtEnd(java.lang.String css)
Add stylesheet data to the document as though it were declared after all stylesheets previously created by inject(String) . |
static void |
injectAtEnd(java.lang.String css,
boolean immediate)
Add stylesheet data to the document as though it were declared after all stylesheets previously created by inject(String) . |
static void |
injectAtStart(java.lang.String css)
Add stylesheet data to the document as though it were declared before all stylesheets previously created by inject(String) . |
static void |
injectAtStart(java.lang.String css,
boolean immediate)
Add stylesheet data to the document as though it were declared before all stylesheets previously created by inject(String) . |
static StyleElement |
injectStylesheet(java.lang.String contents)
Deprecated. The returned StyleElement cannot be implemented consistently across all browsers |
static StyleElement |
injectStylesheetAtEnd(java.lang.String contents)
Deprecated. The returned StyleElement cannot be implemented consistently across all browsers |
static StyleElement |
injectStylesheetAtStart(java.lang.String contents)
Deprecated. The returned StyleElement cannot be implemented consistently across all browsers |
static void |
setContents(StyleElement style,
java.lang.String contents)
Deprecated. The associated StyleElement cannot be implemented consistently across all browsers |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static void inject(java.lang.String css)
css
- the CSS contents of the stylesheetpublic static void inject(java.lang.String css, boolean immediate)
css
- the CSS contents of the stylesheetimmediate
- if true
the DOM will be updated immediately
instead of just before returning to the event loop. Using this
option excessively will decrease performance, especially if used
with an inject-css-on-init coding patternpublic static void injectAtEnd(java.lang.String css)
inject(String)
.
css
- the CSS contents of the stylesheetpublic static void injectAtEnd(java.lang.String css, boolean immediate)
inject(String)
.
css
- the CSS contents of the stylesheetimmediate
- if true
the DOM will be updated immediately
instead of just before returning to the event loop. Using this
option excessively will decrease performance, especially if used
with an inject-css-on-init coding patternpublic static void injectAtStart(java.lang.String css)
inject(String)
.
css
- the CSS contents of the stylesheetpublic static void injectAtStart(java.lang.String css, boolean immediate)
inject(String)
.
css
- the CSS contents of the stylesheetimmediate
- if true
the DOM will be updated immediately
instead of just before returning to the event loop. Using this
option excessively will decrease performance, especially if used
with an inject-css-on-init coding pattern@Deprecated public static StyleElement injectStylesheet(java.lang.String contents)
contents
- the CSS contents of the stylesheet
@Deprecated public static StyleElement injectStylesheetAtEnd(java.lang.String contents)
injectStylesheet(String)
. The
StyleElement returned by this method is not guaranteed to be unique.
contents
- the CSS contents of the stylesheet
@Deprecated public static StyleElement injectStylesheetAtStart(java.lang.String contents)
injectStylesheet(String)
. The
StyleElement returned by this method is not guaranteed to be unique.
contents
- the CSS contents of the stylesheet
@Deprecated public static void setContents(StyleElement style, java.lang.String contents)
style
- a StyleElement previously-returned from
injectStylesheet(String)
.contents
- the new contents of the stylesheet.
|
GWT 2.0.3 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |