- All Superinterfaces:
it.tidalwave.util.As,Mutable
TODO: As the NetBeans Node, it should allow children, have event listeners for children added/removed/changed.
This class so becomes the true M in MVC.
- Since:
- 2.0-ALPHA-1
- Author:
- Fabrizio Giudici
- Stereotype:
- Role
-
Nested Class Summary
Nested classes/interfaces inherited from interface it.tidalwave.util.As
it.tidalwave.util.As.Type<T> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final it.tidalwave.util.As.Type<it.tidalwave.role.Aggregate<PresentationModel>> Shortcut forAs.static final it.tidalwave.util.As.Type<it.tidalwave.role.SimpleComposite<PresentationModel>> Shortcut forAs.static final Class<PresentationModel> Shortcut forAs.static final StringThis is an undocumented feature.static final Stringstatic final Stringstatic final Stringstatic final String -
Method Summary
Modifier and TypeMethodDescriptionvoiddispose()Disposes this object.static PresentationModelempty()Returns an empty instance (no roles, with the exception of a dummyDisplayable).static booleanReturns the verbose mode forObject.toString()implementations ofPresentationModel.static PresentationModelReturns a new instance given an owner and no roles.static PresentationModelReturns a new instance given an owner and a single role.static PresentationModelof(Object owner, Collection<Object> roles) Returns a new instance given an owner and multiple roles.static PresentationModelofMaybePresentable(it.tidalwave.util.As owner) Returns a new instance from an owner which might have thePresentablerole.static PresentationModelofMaybePresentable(it.tidalwave.util.As owner, Collection<Object> roles) Returns a new instance from an owner which might have thePresentablerole.static voidsetVerboseToString(boolean verbose) Sets the verbose mode forObject.toString()implementations ofPresentationModel.Methods inherited from interface it.tidalwave.util.As
as, as, asMany, asMany, maybeAs, maybeAsMethods inherited from interface it.tidalwave.ui.core.Mutable
addListener, addListener1, addListener2, addPropertyChangeListener, addPropertyChangeListener, getPropertyChangeListeners, getPropertyChangeListeners, hasListeners, removeListener, removePropertyChangeListener, removePropertyChangeListener
-
Field Details
-
_PresentationModel_
Shortcut forAs. -
_CompositeOfPresentationModel_
static final it.tidalwave.util.As.Type<it.tidalwave.role.SimpleComposite<PresentationModel>> _CompositeOfPresentationModel_Shortcut forAs. -
_AggregateOfPresentationModel_
static final it.tidalwave.util.As.Type<it.tidalwave.role.Aggregate<PresentationModel>> _AggregateOfPresentationModel_Shortcut forAs. -
PROPERTY_CHILDREN
- See Also:
-
CALLBACK_DISPOSE
This is an undocumented feature. If you add aNamedCallbackwith this name as a role in this object, it will be called back whendispose()is called.- See Also:
-
P_VERBOSE_TOSTRING
-
PARAM_OWNER
- See Also:
-
PARAM_ROLE
- See Also:
-
-
Method Details
-
dispose
void dispose()Disposes this object. -
of
Returns a new instance given an owner and no roles..- Parameters:
owner- the owner- Returns:
- a new instance given an owner and no roles
- Since:
- 3.2-ALPHA-3
-
of
Returns a new instance given an owner and a single role..- Parameters:
owner- the ownerrole- the role (or aRoleFactory)- Returns:
- a new instance given an owner and a single role
- Since:
- 3.2-ALPHA-3
-
of
Returns a new instance given an owner and multiple roles..- Parameters:
owner- the ownerroles- roles orRoleFactoryinstances- Returns:
- a new instance given an owner and multiple roles
- Since:
- 3.2-ALPHA-1, 3.2-ALPHA-3 (refactored)
-
empty
Returns an empty instance (no roles, with the exception of a dummyDisplayable)..- Returns:
- an empty instance (no roles, with the exception of a dummy
Displayable) - Since:
- 3.2-ALPHA-3
-
ofMaybePresentable
@API(status=EXPERIMENTAL) @Nonnull static PresentationModel ofMaybePresentable(@Nonnull it.tidalwave.util.As owner, @Nonnull Collection<Object> roles) Returns a new instance from an owner which might have thePresentablerole.. If it is present, it is called to create thePresentationModel; otherwise a default one is created. Additional roles are added.- Parameters:
owner- the ownerroles- roles orRoleFactoryinstances- Returns:
- a new instance from an owner which might have the
Presentablerole - Since:
- 3.2-ALPHA-8
-
ofMaybePresentable
@API(status=EXPERIMENTAL) @Nonnull static PresentationModel ofMaybePresentable(@Nonnull it.tidalwave.util.As owner) Returns a new instance from an owner which might have thePresentablerole.. If it is present, it is called to create thePresentationModel; otherwise a default one is created.- Parameters:
owner- the owner- Returns:
- a new instance from an owner which might have the
Presentablerole - Since:
- 3.2-ALPHA-8
-
setVerboseToString
static void setVerboseToString(boolean verbose) Sets the verbose mode forObject.toString()implementations ofPresentationModel. Looking at the implementation ofjavafx.scene.control.cell.DefaultTreeCell<T>, the code always callstoString()during an update, even though the text value is later overridden; hence, this method should be as fast as possible. By default, the shortened class name and system id of the owner object is returned; set verbosity to have the owner objecttoString()called instead. It is also possible to set system the propertyit.tidalwave.ui.core.role.PresentationModel.verboseToString.- Parameters:
verbose- the verbosity- Since:
- 2.0-ALPHA-4
- See Also:
-
isVerboseToString
static boolean isVerboseToString()Returns the verbose mode forObject.toString()implementations ofPresentationModel..- Returns:
- the verbose mode for
Object.toString()implementations ofPresentationModel - Since:
- 2.0-ALPHA-4
- See Also:
-