• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • paul wheaton
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Tim Holloway
  • Carey Brown
  • salvin francis

Retreive widget Style

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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

}

//constructor
public container() {
Label widget = new Label("testlabel");
widget.addStyleName(css.labelfont());
//initialize ui binder
.........
}

//method
public void getFontsize() {

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

}


}





 
You can thank my dental hygienist for my untimely aliveness. So tiny:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!