This page is from the outdated yFiles for Java 2.13 documentation. You can find the most up-to-date documentation for all yFiles products on the yFiles documentation overview page.
Please see the following links for more information about the yFiles product family of diagramming programming libraries and corresponding yFiles products for modern web apps, for cross-platform Java(FX) applications, and for applications for the Microsoft .NET environment.
Table of Contents
This chapter discusses GUI utility functionality that provides means to quickly create property editors for items of diverse types.
The classes from package y.option constitute a framework to conveniently handle property management and manipulation. It offers support for internationalization and localization of dialogs (i18n/l10n for short), as well as (de)serialization of settings. The framework separates responsibilities applying a Model-Delegate pattern, which facilitates, for example, different styles of settings presentations and manipulation. Figure 10.1, “Dialog-based and table-based settings presentation” shows the alternative presentation styles.
Figure 10.1. Dialog-based and table-based settings presentation
Dialog-based and... | table-based settings presentation. |
The separation also permits the use of multiple dialogs (in other words, multiple views) to present and modify settings that are managed by a common model. Synchronization of model and view(s) is covered by different policies, following "push" and "pull" semantics.
The classes from package y.option reflect a modification of the Model-View-Controller (MVC) paradigm, dubbed Model-Delegate pattern. Two of the three responsibilities from MVC, namely the view and controller part, are brought together in a so-called User Interface (UI) Delegate. Hence classes with the following roles can be distinguished:
In terms of MVC then, class OptionHandler together with classes OptionItem and OptionSection make up the model which holds the data. The view/controller part is in the implementations of interface Editor.
Figure 10.2, “Settings framework core classes” shows the essential classes of the settings framework.
Copyright ©2004-2016, yWorks GmbH. All rights reserved. |