Chapter 9. Styling Eclipse 4 Applications

One of the biggest changes with the Eclipse 4 model is the separation of content from presentation. This allows the style of an Eclipse application to be configured separately from how the user interface is built and designed. This chapter shows how to style an Eclipse 4 application using styles and themes, similar to the way CSS is used to style HTML.

In this chapter, we shall:

  • Style the UI with CSS
  • Use the CSS Spy to debug stylesheet rules
  • Create custom CSS styles and use them in code
  • Use the dark style in a standalone application
  • Create multiple themes and switch between them

Styling Eclipse with CSS

Eclipse 4 provides a model of the user interface (represented by classes such as MApplication, MPart, and MWindow) and allows a separate renderer to be able to display the content. This allows for different rendering engines to present the user interface, such as HTML (with RAP) or JavaFX (with e(fx)clipse). To separate content from presentation, the style can be applied in an external stylesheet, based on CSS.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.136.18.48