File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes GWT and the fly likes Retreive widget Style Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Frameworks » GWT
Bookmark "Retreive widget Style" Watch "Retreive widget Style" New topic

Retreive widget Style

chockbal chockbalc

Joined: Oct 13, 2011
Posts: 1
At run time, is it possible to retrieve style detail such as font size of a widget? For instance if I've the setup as below:

css class is:

.labelfont {

font-size: 12px;


Resource class is:

public interface XyzCss extends CssResource {

String labelfont();


Code snippet in the container class is:

public class container() extends Composite{

static XyzCss css;

static {
//inject style here


public container() {
Label widget = new Label("testlabel");
//initialize ui binder

public void getFontsize() {

...what is the code snippet here that would fetch me the font size from style labelfont()?



I agree. Here's the link:
subject: Retreive widget Style
It's not a secret anymore!