| an Assistent not limited to conversion of VDR-recordings to DVD-images |
VdrAssistant | |
build your own Theme-libraryThe Themeneditor and the Skineditor are designed to assist you at creating a DVD-menue template. All these templates refer to a library of menue elements. So if both editors don't suit your needs, you'll probably want to create your own library of menue elements. The library of menue elments may be considered the most complex part of VDRAssistant. Every theme should be skinnable and each template will be saved in a database. So it is vital to save the library of used theme elements. But don't fear - most part of complexity will be hidden by the base classes of the framework. So, the next paragraphs are for your understanding only. A DVD menue consist of a bunch of pages, each of the containing different menue elements. Menuepages are typed by Saving a menue element to database, the properties of one menue element are divided into themebased properties and skinbased properties - and will be saved to different places (tables). All menue-elements are saved to the same table, which means, that we need to find a way to construct the right java class from a database tables row. Storing and restoring java classes happens anonymously - so the theme-class is used as container for all theme elements, as well as factory to create each theme element: Saying restoring java classes happens anonymously means, that the parent class of the theme class will create all the real classes. To be able to do the factory job right, each theme class has to provide a table, which serves as decisionbase for the base class at creation time. Take a look at method Sounds a bit complicated, but it is quite easy now for you to create your classes - and that was my primary design goal. Now your theme class only needs three entries:
The creation of a menue template starts with an empty and transparent canvas. Everything you like to become visible must be painted by a menue element. Keep in mind, that the properties of a single element class are divided into what and where should be painted (the themebased properties) and how the element should look (the skinbased properties). Position, size, rotation angle are themebased properties. Font, color, line-thickness or radius of the corners of a frame are skinbased properties. The base class The base class If you're interested on the usage of the menue elements, take a look at
Happy coding! |