Package | Description |
---|---|
net.sf.cuf.model |
This package and its sub-packages contains a Java port of the "original" MVC Framework (Smalltalk ValueModel).
|
net.sf.cuf.model.converter |
This package contains various classes that can be used in a ValueModel chain as value converters.
|
net.sf.cuf.model.state |
This package contains a bridge between the ValueModel domain to the State/Stateadapter domain.
|
net.sf.cuf.model.ui |
This package contains various bi-directional adapters from a ValueModel to Swing widgets.
|
Modifier and Type | Class and Description |
---|---|
class |
AbstractValueModel<T>
Abstract base class for a ValueModel, does the listener handling.
|
class |
AspectAdapter<T,S>
A AspectAdapter is a ValueModel that takes a part (=an aspect) of an
other object (called the source) as its value.
To detect changes of the aspect, the source must be the value of a ValueModel. |
class |
BufferedValueHolder<T>
A BufferedValueHolder is a ValueModel that buffers the value
of a value model.
The value model being bufferd is called subject, the value model triggering the write-back of the buffered value to the subject is called trigger. The value of the trigger must either be a Boolean, the String "true" or "false" or null. If the trigger value changes to false, we read the value from our subject, if it changes to true, we write the value to our subject and if it changes to null, we do nothing. We also support the notion of an external update. A BufferedValueHolder can also deep-copy it's subjects value if the value has a (working) copy constructor. |
class |
IndexedAdapter<T>
A IndexedAdapter is a ValueModel that takes an entry of
a List as its value.
A IndexedAdapter is simular to an AspectAdapter, it provides one item of a list as its own value. |
class |
LOVMapper
A LOVMapper is a value model that maps between a display list-of-values (LOV)
and their corresponding domain list-of-values.
|
class |
MultiSelectionInList<T>
A MultiSelectionInList holds both a list and a selection.
|
class |
PropertiesAdapter
PropertiesAdapter is a ValueModel that uses a Properties object
as its backing store.
|
class |
SelectionInList<T>
A SelectionInList holds both the data as well as the selection
as a ValueModel.
|
class |
UnmodifiableValueHolder<T>
A ValueHolder object holds a value (any Object) determined
by the constructor.
|
class |
ValueHolder<T>
A ValueHolder object holds a value (any Object).
|
Modifier and Type | Method and Description |
---|---|
ValueModel<? extends SortedSet<Integer>> |
MultiSelectionInList.getSelectedIndexSetValueModel() |
ValueModel<? extends List<T>> |
MultiSelectionInList.getSelectedValuesHolder()
Returns the value model that contains the
List
with the selected values from the base list. |
ValueModel<List<T>> |
IndexedAdapter.getTrigger()
Return the Trigger or null if there is no trigger.
|
ValueModel<? extends S> |
AspectAdapter.getTrigger()
Returns null or the trigger ValueModel of this aspect adapter.
|
ValueModel<Boolean> |
SelectionInList.isIndexInList()
The provided ValueModel can be used to monitor if this IndexedAdapter
holds a "valid" value (index is not NO_SELECTION).
|
ValueModel<Boolean> |
IndexedAdapter.isIndexInList()
The provided ValueModel can be used to monitor if this IndexedAdapter
holds a "valid" value (index is not NO_SELECTION).
|
ValueModel<List<T>> |
SelectionInList.listHolder()
Provides the ValueModel of the ListHolder for our List.
|
ValueModel<Integer> |
SelectionInList.selectionHolder()
The provided ValueModel can be used to monitor and change
the selection in our list.
|
Modifier and Type | Method and Description |
---|---|
static AspectAdapter<?,?> |
AspectAdapter.getShared(ValueModel<?> pTrigger,
String pAspectName)
Create a new AspectAdapter or re-use an existing one.
|
Constructor and Description |
---|
AspectAdapter(ValueModel<S> pTrigger,
Class<S> pSourceClass,
AspectAccessAdapter pAccessAdapter,
String pAspectName)
Creates a new AspectAdapter.
|
AspectAdapter(ValueModel<S> pTrigger,
Class<S> pSourceClass,
AspectAccessAdapter pAccessAdapter,
String pAspectName,
String pGetterPrefix,
String pSetterPrefix)
Creates a new AspectAdapter.
|
AspectAdapter(ValueModel<S> pTrigger,
Class<S> pSourceClass,
String pAspectName)
Creates a new AspectAdapter.
|
AspectAdapter(ValueModel<S> pTrigger,
Class<S> pSourceClass,
String pAspectName,
String pGetterPrefix,
String pSetterPrefix)
Creates a new AspectAdapter.
|
AspectAdapter(ValueModel<S> pTrigger,
String pAspectName)
Creates a new AspectAdapter.
|
AspectAdapter(ValueModel<S> pTrigger,
String pAspectName,
String pGetterPrefix,
String pSetterPrefix)
Creates a new AspectAdapter.
|
BufferedValueHolder(ValueModel<T> pSubject,
ValueModel<?> pTrigger)
Create a new BufferedValueHolder.
|
BufferedValueHolder(ValueModel<T> pSubject,
ValueModel<?> pTrigger)
Create a new BufferedValueHolder.
|
BufferedValueHolder(ValueModel<T> pSubject,
ValueModel<?> pTrigger,
boolean pCopySubjectValue)
Create a new BufferedValueHolder.
|
BufferedValueHolder(ValueModel<T> pSubject,
ValueModel<?> pTrigger,
boolean pCopySubjectValue)
Create a new BufferedValueHolder.
|
IndexedAdapter(ValueModel<List<T>> pTrigger)
Creates a new IndexedAdapter that does not select an entry in the list.
|
IndexedAdapter(ValueModel<List<T>> pTrigger,
int pIndex)
Creates a new IndexedAdapter.
|
LOVMapper(ValueModel<List<?>[]> pLOVsHolder,
ValueModel<?> pSelectedDomainValue)
Creates a new value model that maps between domain and display list-of-values.
|
LOVMapper(ValueModel<List<?>[]> pLOVsHolder,
ValueModel<?> pSelectedDomainValue)
Creates a new value model that maps between domain and display list-of-values.
|
MultiSelectionInList(ValueModel<List<? extends T>> pListHolder)
Creates a new MultiSelectionInList with the given value model
as our base.
|
SelectionInList(ValueModel<List<T>> pListHolder)
Creates a new SelectionInList that does not select an entry in the list.
|
SelectionInList(ValueModel<List<T>> pListHolder,
int pIndex)
Creates a new SelectionInList that does not select an entry in the list.
|
Modifier and Type | Interface and Description |
---|---|
interface |
TypeConverter<OwnT,SubjectT>
A TypeConverter is a ValueModel modelled after the Adapter-Pattern:
it monitors a value model (called the subject) and converts the
type of the subject's value to its own value type.
|
Modifier and Type | Class and Description |
---|---|
class |
AbstractNumberStringConverter<T extends Number>
A base class for converters that take a Number as it's subject value and converting
it to an String as its own value.
|
class |
AbstractTypeConverter<OwnT,SubjectT>
The AbstractTypeConverter class provides common code for classes providing
the TypeConverter inferface.
|
class |
BigDecimalStringConverter
A BigDecimalStringConverter is taking a BigDecimal as it's subject value and converting
it to an String as its own value.
|
class |
Collection2ListConverter
Converts a
Collection to List using the default order of the
collection as provided by the iterator. |
class |
DoubleStringConverter
A DoubleStringConverter is taking a Double as it's subject value and converting
it to an String as its own value.
|
class |
FormatConverter<OwnT,SubjectT>
A FormatConverter uses the java.text.Format framework for doing
the type conversion.
|
class |
IntegerStringConverter
A IntegerStringConverter is taking an Long as it's subject value and converting
it to an String as its own value.
|
class |
ListFilterConverter<T>
|
class |
LongStringConverter
A LongStringConverter is taking an Long as it's subject value and converting
it to an String as its own value.
|
class |
RegExpConverter
A RegExpConverter uses a regular expression for a string-to-string conversion.
|
Modifier and Type | Method and Description |
---|---|
ValueModel<SubjectT> |
AbstractTypeConverter.getSubject()
Return our subject ValueModel.
|
ValueModel<Boolean> |
TypeConverter.getSyncState()
Return a ValueModel containing a Boolean that shows if the last
conversion in setValue() or getValue() was sucessfull.
|
ValueModel<Boolean> |
AbstractTypeConverter.getSyncState()
Return a ValueModel containing a Boolean that shows if the last
conversion in setValue() or getValue() was sucessfull.
|
Constructor and Description |
---|
AbstractNumberStringConverter(ValueModel<T> pSubject)
Create a new Number-to-String converter where null is a valid value.
|
AbstractNumberStringConverter(ValueModel<T> pSubject,
boolean pNullIsValid)
Create a new Number-to-String converter.
|
AbstractTypeConverter(ValueModel<SubjectT> pSubject)
Create a new converter with the handed subject.
|
AbstractTypeConverter(ValueModel<SubjectT> pSubject,
boolean pPropagateFailedConversions)
Create a new converter with the handed subject and remember how conversion
failures are propagated.
|
BigDecimalStringConverter(ValueModel<BigDecimal> pSubject)
Create a new BigDecimal-to-String converter where null is a valid value.
|
BigDecimalStringConverter(ValueModel<BigDecimal> pSubject,
boolean pNullIsValid)
Create a new BigDecimal-to-String converter.
|
BigDecimalStringConverter(ValueModel<BigDecimal> pSubject,
NumberFormat pFormat)
Create a new BigDecimal-to-String converter where null is a valid value.
|
BigDecimalStringConverter(ValueModel<BigDecimal> pSubject,
NumberFormat pFormat,
boolean pNullIsValid)
Create a new BigDecimal-to-String converter.
|
Collection2ListConverter(ValueModel<Collection<?>> pSubject)
Constructor
|
DoubleStringConverter(ValueModel<Double> pSubject)
Create a new Double-to-String converter where null is a valid value.
|
DoubleStringConverter(ValueModel<Double> pSubject,
boolean pNullIsValid)
Create a new Double-to-String converter.
|
DoubleStringConverter(ValueModel<Double> pSubject,
NumberFormat pFormat)
Create a new Double-to-String converter where null is a valid value.
|
DoubleStringConverter(ValueModel<Double> pSubject,
NumberFormat pFormat,
boolean pNullIsValid)
Create a new Double-to-String converter.
|
FormatConverter(ValueModel<SubjectT> pSubject,
Format pFormat)
Create a new converter with the handed subject.
|
FormatConverter(ValueModel<SubjectT> pSubject,
Format pFormat,
boolean pInvert)
Create a new converter with the handed subject.
|
IntegerStringConverter(ValueModel<Integer> pSubject)
Create a new Integer-to-String converter where null is a valid value.
|
IntegerStringConverter(ValueModel<Integer> pSubject,
boolean pNullIsValid)
Create a new Integer-to-String converter.
|
ListFilterConverter(ValueModel<List<T>> pSubject)
Constructor that initializes with no filter
|
ListFilterConverter(ValueModel<List<T>> pSubject,
ListFilterConverter.Filter<T> pFilter)
Constructor that initializes with the given filter
|
LongStringConverter(ValueModel<Long> pSubject)
Create a new Long-to-String converter where null is a valid value.
|
LongStringConverter(ValueModel<Long> pSubject,
boolean pNullIsValid)
Create a new Long-to-String converter.
|
RegExpConverter(ValueModel<String> pSubject,
String pRegExp)
Create a new converter with the handed subject.
|
RegExpConverter(ValueModel<String> pSubject,
String pRegExp,
boolean pBlockValue)
Create a new converter with the handed subject.
|
Modifier and Type | Class and Description |
---|---|
class |
StateValue
A StateValue object wraps a State object as a ValueModel.
|
Constructor and Description |
---|
CollectionFilledState(ValueModel<Collection<?>> pTrigger)
Create a new CollectionFilledState, the given ValueModel serves as a
trigger for this state.
|
EqualsState(ValueModel<?> pTrigger,
Object pReferenceValue)
Constructor
|
EqualsState(ValueModel<?> pTrigger1,
ValueModel<?> pTrigger2)
Constructor
|
EqualsState(ValueModel<?> pTrigger1,
ValueModel<?> pTrigger2)
Constructor
|
MinMaxState(ValueModel<?> pTrigger,
Integer pMinValue,
Integer pMaxValue,
boolean pInvert)
Creates a new RegExpState for the given value model and
the given regular expression pattern
|
NullState(ValueModel<?> pTrigger)
Create a new NullState, the given ValueModel serves as a
trigger for this state.
|
RegExpState(ValueModel<?> pTrigger,
String pRegExpr)
Creates a new RegExpState for the given value model and
the given regular expression pattern
|
ValueState(ValueModel<?> pModel)
We wrap a ValueModel as a MutableState object.
|
Constructor and Description |
---|
ButtonModelAdapter(ValueModel<?> pValueModel,
ButtonModel pButtonModel)
Creates a new adapter between a ValueModel and a ButtonModel .
|
ButtonModelAdapter(ValueModel<?> pValueModel,
ButtonModel pButtonModel,
boolean pInvert)
Creates a new adapter between a ValueModel and a ButtonModel .
|
ComboBoxModelAdapter(ValueModel<Integer> pSelectionHolder,
ComboBoxModel pComboBoxModel)
Creates a new adapter between a ValueModel holding an Integer
and a list of ButtonModels
Whenever one of the models changes, the other is adjusted accordingly.
|
DocumentAdapter(ValueModel<String> pValueModel,
Document pDocument)
Creates a new adapter between a ValueModel and a Document.
|
DocumentAdapter(ValueModel<String> pValueModel,
JTextComponent pTextField)
Creates a new adapter between a ValueModel and the Document of a
JTextComponent.
|
LabelAdapter(ValueModel<?> pValueModel,
JLabel pLabel)
Creates a new adapter between a ValueModel and a JLabel.
|
LOVAdapter(ButtonGroup pButtonGroup,
List<?> pDisplayedItems,
List<?> pKeys,
ValueModel<?> pSelectedKeyVM,
Object pUnselectedKey)
Create a new adapter between the buttong group, the keys and the selected key.
|
LOVAdapter(ButtonGroup pButtonGroup,
ValueModel<List<?>> pDisplayedItemsVM,
ValueModel<List<?>> pKeysVM,
ValueModel<?> pSelectedKeyVM,
Object pUnselectedKey)
Create a new adapter between the buttong group, the keys and the selected key.
|
LOVAdapter(ButtonGroup pButtonGroup,
ValueModel<List<?>> pDisplayedItemsVM,
ValueModel<List<?>> pKeysVM,
ValueModel<?> pSelectedKeyVM,
Object pUnselectedKey)
Create a new adapter between the buttong group, the keys and the selected key.
|
LOVAdapter(ButtonGroup pButtonGroup,
ValueModel<List<?>> pDisplayedItemsVM,
ValueModel<List<?>> pKeysVM,
ValueModel<?> pSelectedKeyVM,
Object pUnselectedKey)
Create a new adapter between the buttong group, the keys and the selected key.
|
LOVAdapter(JComboBox pComboBox,
List<?> pDisplayedItems,
List<?> pKeys,
ValueModel<?> pSelectedKeyVM)
Create a new adapter between the displayed itams and the keys.
|
LOVAdapter(JComboBox pComboBox,
List<?> pDisplayedItems,
List<?> pKeys,
ValueModel<?> pSelectedKeyVM,
Object pUnselectedKey)
Create a new adapter between the displayed itams, the keys and a magic "null"
key value.
|
LOVAdapter(JComboBox pComboBox,
ValueModel<List<?>> pDisplayedItemsVM,
ValueModel<List<?>> pKeysVM,
ValueModel<?> pSelectedKeyVM)
Create a new adapter between the displayed itams and the keys.
|
LOVAdapter(JComboBox pComboBox,
ValueModel<List<?>> pDisplayedItemsVM,
ValueModel<List<?>> pKeysVM,
ValueModel<?> pSelectedKeyVM)
Create a new adapter between the displayed itams and the keys.
|
LOVAdapter(JComboBox pComboBox,
ValueModel<List<?>> pDisplayedItemsVM,
ValueModel<List<?>> pKeysVM,
ValueModel<?> pSelectedKeyVM)
Create a new adapter between the displayed itams and the keys.
|
LOVAdapter(JComboBox pComboBox,
ValueModel<List<?>> pDisplayedItemsVM,
ValueModel<List<?>> pKeysVM,
ValueModel<?> pSelectedKeyVM,
Object pUnselectedKey)
Create a new adapter between the displayed itams, the keys and a magic "null"
key value.
|
LOVAdapter(JComboBox pComboBox,
ValueModel<List<?>> pDisplayedItemsVM,
ValueModel<List<?>> pKeysVM,
ValueModel<?> pSelectedKeyVM,
Object pUnselectedKey)
Create a new adapter between the displayed itams, the keys and a magic "null"
key value.
|
LOVAdapter(JComboBox pComboBox,
ValueModel<List<?>> pDisplayedItemsVM,
ValueModel<List<?>> pKeysVM,
ValueModel<?> pSelectedKeyVM,
Object pUnselectedKey)
Create a new adapter between the displayed itams, the keys and a magic "null"
key value.
|
LOVAdapter(JList pList,
List<?> pDisplayedItems,
List<?> pKeys,
ValueModel<?> pSelectedKeyVM)
Create a new adapter between the displayed itams and the keys.
|
LOVAdapter(JList pList,
List<?> pDisplayedItems,
List<?> pKeys,
ValueModel<?> pSelectedKeyVM,
Object pUnselectedKey)
Create a new adapter between the displayed itams, the keys and a magic "null"
key value.
|
LOVAdapter(JList pList,
ValueModel<List<?>> pDisplayedItemsVM,
ValueModel<List<?>> pKeysVM,
ValueModel<?> pSelectedKeyVM)
Create a new adapter between the displayed itams and the keys.
|
LOVAdapter(JList pList,
ValueModel<List<?>> pDisplayedItemsVM,
ValueModel<List<?>> pKeysVM,
ValueModel<?> pSelectedKeyVM)
Create a new adapter between the displayed itams and the keys.
|
LOVAdapter(JList pList,
ValueModel<List<?>> pDisplayedItemsVM,
ValueModel<List<?>> pKeysVM,
ValueModel<?> pSelectedKeyVM)
Create a new adapter between the displayed itams and the keys.
|
LOVAdapter(JList pList,
ValueModel<List<?>> pDisplayedItemsVM,
ValueModel<List<?>> pKeysVM,
ValueModel<?> pSelectedKeyVM,
Object pUnselectedKey)
Create a new adapter between the displayed itams, the keys and a magic "null"
key value.
|
LOVAdapter(JList pList,
ValueModel<List<?>> pDisplayedItemsVM,
ValueModel<List<?>> pKeysVM,
ValueModel<?> pSelectedKeyVM,
Object pUnselectedKey)
Create a new adapter between the displayed itams, the keys and a magic "null"
key value.
|
LOVAdapter(JList pList,
ValueModel<List<?>> pDisplayedItemsVM,
ValueModel<List<?>> pKeysVM,
ValueModel<?> pSelectedKeyVM,
Object pUnselectedKey)
Create a new adapter between the displayed itams, the keys and a magic "null"
key value.
|
RadioButtonAdapter(ValueModel pSelectionHolder,
List<ButtonModel> pButtonModels)
Creates a new adapter between a ValueModel holding an Integer
and a list of ButtonModels
Whenever one of the models changes, the other is adjusted accordingly.
|
SpinnerModelAdapter(ValueModel pValueModel,
SpinnerModel pSpinnerModel)
Creates a new adapter between a ValueModel and a SpinnerModel.
|
ToolTipAdapter(ValueModel<?> pValueModel,
JComponent pComponent)
Creates a new adapter between a ValueModel and a JComponent .
|
Copyright © 2017 Jürgen Zeller (privat). All rights reserved.