Home | Examples 


 

What is StyleManager all about?

StyleManager makes it possible to change the look-and-feel of any DynLayer component by just simply changing the style of the component. Styles can also be used to change or enhance the behavior of a component without having to create or load a different class or library.

For example: The Button component provides a set of basic input/output functions which in and of themselves do not generate any user interface. For the Button to be of any use to the user a style must be applied that will render a user interface.

In times past if the user wants to use a FlatButton, an ImageButton and a normal PushButton, he/she would have to load and create three different objects:

var btn1 = new FlatButton();
var btn2 = new ImageButton();
var btn3 =  new PushButton();

With Style Manager only one Button Class is required and the necessary styles:

var btn1 = new Button(null,10,10,100,100);
var btn2 = new Button(null,110,10,100,100,'ButtonFlat');
var btn3 =  newButton(null,220,10,100,100,'ButtonImage');