Package ca.corbett.extras.properties
package ca.corbett.extras.properties
Contains a custom Properties implementation to augment the one provided by java.
In particular, the FileBasedProperties class contains handy methods to abstract
the saving and loading of properties to and from disk. In general, the advantage
of this Properties class over Java's is the addition of convenience methods
for setting objects of various types other than String, and abstracting away
the logic of converting them to/from String values.
Additionally, the PropertiesManager class provides a very easy way to specify groups of related properties, and provides a tight coupling with the Forms API to give a very easy way to generate a UI for interacting with these properties. Client code generally just needs to instantiate a list of properties (using AbstractProperty's descendant classes), tie them to a Properties or FileBasedProperties instance, and then PropertiesManager does the rest.
-
ClassDescriptionA generic abstract base class for property fields, to be used with PropertiesManager.Represents a property that can either be on or off.Represents a property that can either be a solid colour, a gradient, or both.Represents a single-select chooser field that allows selection from a list of items.Represents a property that can store some floating point value.Represents a field that contains a directory name.EnumProperty<T extends Enum<?>>Represents a multi-choice property, very similar to a ComboProperty, except that the options come from a supplied enum instead of a List of String values.Extends the Properties class to provide for saving and loading of properties to and from a flat file on disk.Represents a property field that contains a file name.Represents a property field that allows storing a Font, along with associated style and optional color attributes.Represents a property that can store some integer value.An extremely simple property which represents a static label.ListProperty<T>Wraps a ListField to allow for a multi-select property.Represents a property that can store a long text (multi-line) value.Provides a wrapper around java's Properties class, with convenience methods that abstract away the type conversions that callers would otherwise have to worry about.Generated by the generateDialog() method in PropertiesManager.Provides a highly configurable wrapper around a set of related properties, along with ways to manage them and present them to the user for viewing and modification.Can be used for sorting of AbstractProperty instances by their fully qualified names.Can be used with AbstractProperty and all of its implementations to listen for live changes on the FormField that was created by and is managed by that property.Used by PropertyFormFieldChangeListener to indicate that a change has been made in a FormField that was created and is managed by some AbstractProperty instance.