- Harmonized behavior of
dispose()
methods for properties: see below for potential breaking behavior changes AbstractReadableProperty
now implements theDisposable
interface: sub-classes should callsuper.dispose()
AbstractReadableSetProperty
now implements theDisposable
interface: sub-classes should callsuper.dispose()
AbstractReadableListProperty
now implements theDisposable
interface: sub-classes should callsuper.dispose()
AbstractReadableMapProperty
now implements theDisposable
interface: sub-classes should callsuper.dispose()
ChainedTransformer
now implementsDeepDisposable
and disposes the chained transformers by defaultNegateBooleanPropertyWrapper
now implementsDeepDisposable
and disposes the wrapped property by defaultReadOnlyPropertyWrapper
now implementsDeepDisposable
and disposes the wrapped property by defaultReadOnlySetPropertyWrapper
now implementsDeepDisposable
and disposes the wrapped set property by defaultReadOnlyListPropertyWrapper
now implementsDeepDisposable
and disposes the wrapped list property by defaultReadOnlyMapPropertyWrapper
now implementsDeepDisposable
and disposes the wrapped map property by defaultCompositeReadableProperty
now implementsDeepDisposable
and disposes the compound property by defaultInvokeLaterPropertyWrapper
now implementsDeepDisposable
and disposes the compound property by defaultInvokeLaterPropertyWrapper
'sgetValue()
method is not consistent with its value change events- Added
AbstractReadablePropertyWrapper
which can be disposed to release all listeners and deep dispose the wrapped property - Added
CompositeDisposable
to dispose multiple entities at once - Added
ConstantProperty
to hold a constant reference to a typically constant object/value - Deprecated the
ResultCollector
in favor of theReadableWritableProperty
(e.g.SimpleProperty
) - Deprecated the
ResultCollectorValidator
in favor of theGeneralValidator
- Deprecated the experimental
ResultCollectorValidatorBuilder
in favor of theGeneralValidatorBuilder
- Removed experimental duplicate of
PropertyResultHandler
- Removed experimental duplicate of
JFormattedTextFieldValueProperty
- Added
PseudoClassResultHandler
to JavaFX support
TODO
In this release, the dispose()
methods of the triggers, data providers, rules, result handlers, validators,
transformers and properties have been harmonized with the following principles:
- Objects referring to other objects should typically clear their references: this idea is that disposed objects should not prevent garbage collection of other objects. This is typically handy and needed for objects having listeners (e.g. triggers and readable properties), referring to GUI components (such as the properties from the validationframework-swing module) or wrapping other objects (e.g. NegateBooleanPropertyWrapper and ReadOnlyPropertyWrapper).
- Objects acting as wrappers around other objects (e.g. NegateBooleanPropertyWrapper and ReadOnlyPropertyWrapper) may
optionally dispose the wrapped objects. This gives better control over what needs to be disposed and when. For that
purpose, the
DeepDisposable
interface has been introduced.
This means that you probably need to verify all the places where you call or override the dispose()
method and check
what you do with the disposed objects afterwards.
In particular, you should check:
- What the
dispose()
method should actually do: should it dispose other (referenced) objects as well? Should the other objects be disposed manually? - Whether you use the disposed objects: disposed objects cannot be re-used and calling their methods leads to unspecified behavior, which may differ in other versions of the framework.
- Where you override the
dispose()
method: shouldsuper.dispose()
be called as well? - Where you implemented the
Disposable
interface: should theDeepDisposable
interface also be implemented? Should a deep or shallow disposed be done? Should it be configurable?
For example, the dispose()
method of properties relating to Swing components now removes all references to these
components. So calling the getComponent()
method of these properties after disposal will return null
.
Furthermore, some classes now implement the DeepDisposable
. This is typically the case for wrapper classes (e.g.
NegateBooleanPropertyWrapper class with wraps a ReadableProperty). Some of the DeepDisposable
classes dispose
the wrapped objects by default. So you may want to check whether it does not dispose too much (depending on your
use-case). You may then call there setDeepDispose()
method to reach the desired behavior.
- Fixed
IconComponentDecoration
tooltip not always hiding on some systems when made visible and invisible too quickly.
- Fixed incorrect new values passed to
ListValueChangeListener
s when callingSimpleListProperty#set(int, Object)
.
- Added a few property bindings in the experimental module until release 4.0.0
- Updated a few dependency versions (see main POM file)
- Deprecated the
SimpleValidatorBuilder
andResultCollectorValidatorBuilder
in favor of theGeneralValidatorBuilder
- Updated javadoc to satisfy JDK 8 doclint
- JavaFX Support module now requires Java 8
- Prevented concurrent modification of property value change listeners while notifying them
- Changed copyright holder to "ValidationFramework Authors"
- Added loading of default icons to
IconUtils
- Added convenient constructor to the
AbstractComponentDecoration
- Added convenient constructor to the
FormatWrapper
- Added
JTableEditingProperty
stating whether a JTable is in the editing state - Added
JTableRolloverCellProperty
holding the position of a table cell under the mouse pointer - Added
IsParsableRule
to check whether aString
can be parsed using a Format object - Added convenient constructors to the
CompositeWritableProperty
- Added write-only wrapper for readable/writable properties
- Added read-only wrappers for readable/writable set properties, list properties and map properties
- Added write-only wrappers for readable/writable set properties, list properties and map properties
- Removed inconvenient warning in case the clipping component of a decoration is not showing
- Fixed a potential NullPointerException in
AbstractColorFeedback
- Fixed UnsupportedOperationExceptions in the
TransparentToolTipDialog
in case thesun.java2d.noddraw
property is not set to true on Windows (issue #9)
- Added
contains()
andcontainsAll()
methods to theReadableListProperty
interface - Added
retainAll()
method to theWritableListProperty
interface - Added
asUnmodifiableList()
method to theReadableListProperty
interface - Added
asUnmodifiableMap()
method to theReadableMapProperty
interface - Added convenient constructors to the
ReadableMapProperty
,ReadableListProperty
andReadableSetProperty
implementations - Fixed
SimpleMapProperty
,SimpleListProperty
andSimpleSetProperty
to avoid direct re-use of initial collection/map - Made sure that the
ListValueChangeListeners
andMapValueChangeListeners
get notified with unmodifiable lists and maps - Added interfaces and abstract implementations of a set property
- Fixed type erasure problem of the
remove()
method in theSimpleListProperty
- Fixed a possible
IllegalStateException
in theAbstractComponentDecoration
when calculating the clipping bounds - Fixed anchored positioning of the decoration in the
AbstractCellIconFeedback
- Added
JButtonMnemonicProperty
andJLabelDisplayedMnemonicProperty
- Added
ActionProperty
- Added convenient getter and clear methods in the
CompositeReadableProperty
andCompositeWritable
properties - Added convenient predefined
Anchor
s (CENTER_TOP
,CENTER_BOTTOM
,CENTER_LEFT
andCENTER_RIGHT
) - Added
TrimTransformer
- Added interfaces for readable/writable list properties and map properties
- Added
SimpleListProperty
andSimpleMapProperty
- Added
EqualsTransformer
andNotEqualsTransformer
- Added
NumberEqualToTransformer
- Added
NumberGreaterThanOrEqualToTransformer
- Added
NumberGreaterThanTransformer
- Added
NumberLessThanOrEqualToTransformer
- Added
NumberLessThanTransformer
- Added
JListSelectedItemCountProperty
- Added
JTableRowCountProperty
- Added
JTableSelectedRowCountProperty
- Added
JTableSelectedRowIndexProperty
- Added
JTableRowIndexToModelTransformer
- Added
JTableRowIndexToViewTransformer
- Added
JTableColumnIndexToModelTransformer
- Added
JTableColumnIndexToViewTransformer
- Moved
CollectionElementTransformer
tocollection
sub-package for consistency - Added
GetCollectionSizeTransformer
- Added
GetMapSizeTransformer
- Added
JDialogTitleProperty
- Added
JFrameTitleProperty
- Fixed issue where the value of the
JTextComponentTextProperty
was not immediately updated upon replacement of the document
- Fixed bug #7: tooltip on
IconComponentDecoration
now shows again
- Fixed JT
oggleButtonSelectedProperty
value - Fixed initial value for
ButtonPressedProperty
andJTextComponentTextProperty
- Made the
JTextComponentTextProperty
fire less events when setting its value - Added
PropertyValueChangeTrigger
to trigger validation when the value of aReadableProperty
changes - Added
PropertyValueProvider
to retrieve the value from aReadableProperty
- Added
PropertyResultHandler
to set the validation result into aWritableProperty
- Added
ResultHandlerProperty
to set the property value in to aResultHandler
- Added
InvokeLaterPropertyWrapper
to notify the value change listeners later on the EDT - Added possibility to use readable/writable properties in the GeneralValidator builder (deprecates use of
ResultCollector
) - Made
IconComponentDecoration
create aToolTipDialog
window only if there is a text to show - Updated to SLF4J 1.7.7
- Prevented recursion when setting the value of readable writable properties
- Added tooltip text property for
JComponent
- Added foreground color and background color properties for
Component
- Added value property for
JFormattedTextField
- Added convenient comparison method in
ValueUtils
- Added
ConstantTransformer
to always return a specific value
- Made the
FormatTransformer
return thetoString()
of the input when no format is specified - Added convenience method in the
FormatTransformer
to get the format property - Added method to the
FormatWrapper
to get the delegate format - Improved implementation of the
SimpleProperty
- Fixed useless firing of value change events when binding properties
- Added
PrintStreamValueChangeAdapter
to help debugging - Added method in
AbstractReadableProperty
to get the value change listeners - Added editable property for
JTextComponent
- Added text and icon related properties for
JLabel
andJButton
- Added component size and location related properties
- Added component minimum/preferred/maximum size related properties
- Added window/dialog/frame related properties
- Added pressed property for buttons, toggle buttons and menu items
- Added
JComboBoxSelectedIndexProperty
andJComboBoxSelectedValueProperty
in theswing
module - Moved the
SimpleFormatProperty
tocore
- Made the
FormatTransformer
andParseTransformer
use a format property to allow binding on the usedFormat
object - Added simple
NumberTo*Transformers
in core - Made it possible to inhibit firing of value change events of readable properties
- Moved the
Transformer
andAggregator
interfaces from thebase
package to theapi
package (reason for the major release) - Added simple property binding in
core
and for Swing to allow binding and transformation of properties (see wiki) - Added convenient
FormatWrapper
incore
to allow stricter parsing, parsing of null/empty text, and formatting null values - Added
ChainedTransformer
incore
- Fixed possible memory leak by removing decoration from layered pane when decorated component no longer in the component hierarchy tree
- Fixed bug where
IconComponentDecoration
tooltip was constantly remaining on screen - Added
ParseTransformer
in core - Added
FormatTransformer
in core - Added
CompositeTrigger
in core - Added convenience getters to the
AbstractSimpleValidator
- Minor fixes to avoid a
NullPointerException
in theJTableTextEditorModelChangedTrigger
andJTableComboBoxEditorModelChangedTrigger
- Added initial support for JavaFX 2
- Added
EqualsBooleanRule
incore
- Added convenient
BooleanResultCollector
incore
- Added
IsTrueRule
andIsFalseRule
incore
- Added
InvokeLaterResultHandler
wrapper - Fixed logic issue in
InvokeLaterTrigger
wrapper - Added convenient constructor to
IconComponentDecoration
- Added convenient constructor to
ComponentKeyStrokeTrigger
- Fixed
NullPointerException
when callingdispose()
multiple times on some triggers - Added experimental property binding mainly meant for Swing (not JavaFX)
- Added
NegateBooleanTransformer
in core - Removed ambiguous constructor in
AndBooleanAggregator
andOrBooleanAggregator
- Added the
_nouses
instruction for the Maven bundle plugin - Fixed
NullPointerException
inAbstractComponentDecoration
sometimes occurring depending on the window hierarchy
- Added
SimpleResultCollector
for convenience over theResultCollector
- Made the
GeneralValidatorBuilder
collect from other simple validators - Added
StringNotEmptyRule
as a simpler alternative toStringLengthGreaterThanRule
andStringLengthGreaterThanOrEqualToRule
- Added convenience
trigger()
method in theGeneralValidatorBuilder
DSL after adding the first result handler to the validator under construction - Fixed visibility of
AbstractComponentDecoration
when set manually and the component goes to showing state - Fixed tracking of decorated table cells while dragging a column
- Added
ToStringTransformer
incore
- Added
PropertyChangeTrigger
incore
that can be used asPropertyChangeListener
to trigger the validation - Added
ActionTrigger
in Swing support that can be used as anAction
orActionListener
to trigger the validation - Added
CollectionElementTransformer
incore
- Added
ComponentKeyStrokeTrigger
and convenience derivates - Fixed compilation warning when adding rule input transformer using the
GeneralValidatorBuilder
- Reversed flag in the
InvokeLateTrigger
wrapper - Undeprecated old validators to allow smoother transition from version 1.x.x to 2.x.x
- Simplified mapping strategy names between data providers and rules, and between rules and result handlers in the
GeneralValidator
- Added comments
- Changed groupid from
validationframework
tocom.google.code.validationframework
for future availability in Maven Central - Added all-purpose
GeneralValidator
andGeneralValidatorBuilder
that can replace all the previously existing validators - Improved javadoc
- Migrated to JNA 3.5.2, MigLayout 4.2 and SLF4J 1.7.5
- Added transformers data providers based on the Swing components that use
Object
in their interface - Updated names of generic types for better consistency and understanding
- Added convenience constructor to
IconBooleanFeedback
andListCompositeDataProvider
- Added convenience in
AndBooleanAggregator
andOrBooleanAggregator
to better support null values - Added convenience
getComponent()
method to Swing triggers, data providers and rules - Added
InvokeLaterTrigger
wrapper to re-schedule a trigger later on the Event Dispatch Thread - Added
IllegalCharacterBooleanRule
as a simple alternative to theStringRegexRule
- Added
TransformedDataProvider
to adapt the type handled by data providers when added to validators handling another type - Added
TransformedResultHandler
to adapt the type handled by result handler when added to validators handling another type - Fixed size of tab title renderer in tabbed panes to avoid the contents to move up and down when the icon is shown and hidden
- Renamed
ManualTrigger
's trigger method for simplicity - Renamed
ButtonGroup
-related data providers for consistency - Made triggers, data providers, rules, result handlers and transformers from core
Disposable
where applicable - Other minor bugs and code quality fixes
- Made
validationframework-core
,validationframework-swing
andvalidationframework-experimental
modules OSGI-compliant - Extracted demo files from
validationframework-experimental
module to reduce dependencies - Introduced the
ResultAggregationValidator
that will be soon used in builders
- Migrated to TimingFramework 5.5.0, SLF4J 1.7.2, JUnit 4.11, Mockito 1.9.5
- Updated class diagrams
- Made base classes consistent in terms of naming and behavior
- Fixed position of icon tip decoration on edited table cell after column re-sorting
- Migrated to JNA 3.5.1
- Tooltip of icon decoration now in a
JWindow
instead of aJDialog
to avoid positioning issues in some window managers
- Improved javadoc
- Fixed exception when validation elements are disposed multiple times
- Added convenience constructors in some result handlers
- Added
ManualTrigger
- Fixed minor issues (mainly clipping issues) in the icon decorator
- Fixed Sonar issues
- Improved javadoc
- Improved data provider interface
- Made number-related rules more consistent and logical
- Fixed
NullPointerException
inStringRegexRule
when data isnull
- Changed log level in the
AbstractCellIconFeedback
- Minor fixes for future deployment in central repository
- Initial release