Package it.tidalwave.ui.core.role
Interface PresentationModel
- 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
Modifier and TypeFieldDescriptionstatic final Class
<PresentationModel> static final it.tidalwave.util.As.Type
<it.tidalwave.role.SimpleComposite<PresentationModel>> static final String
This is an undocumented feature.static final String
-
Method Summary
Modifier and TypeMethodDescriptionvoid
dispose()
Disposes this object.static PresentationModel
empty()
Returns an empty instance (no roles, with the exception of a dummyDisplayable
).static PresentationModel
Returns a new instance given an owner and no roles.static PresentationModel
Returns a new instance given an owner and a single role.static PresentationModel
of
(Object owner, Collection<Object> roles) Returns a new instance given an owner and multiple roles.static PresentationModel
ofMaybePresentable
(it.tidalwave.util.As owner) Returns a new instance from an owner which might have thePresentable
role.static PresentationModel
ofMaybePresentable
(it.tidalwave.util.As owner, Collection<Object> roles) Returns a new instance from an owner which might have thePresentable
role.Methods inherited from interface it.tidalwave.util.As
as, as, asMany, asMany, maybeAs, maybeAs
Methods inherited from interface it.tidalwave.ui.core.Mutable
addListener, addListener1, addListener2, addPropertyChangeListener, addPropertyChangeListener, getPropertyChangeListeners, getPropertyChangeListeners, hasListeners, removeListener, removePropertyChangeListener, removePropertyChangeListener
-
Field Details
-
_PresentationModel_
-
_SimpleCompositeOfPresentationModel_
static final it.tidalwave.util.As.Type<it.tidalwave.role.SimpleComposite<PresentationModel>> _SimpleCompositeOfPresentationModel_ -
PROPERTY_CHILDREN
- See Also:
-
CALLBACK_DISPOSE
This is an undocumented feature. If you add aNamedCallback
with this name as a role in this object, it will be called back whendispose()
is called.- 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 orRoleFactory
instances- 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 thePresentable
role.. 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 orRoleFactory
instances- Returns:
- a new instance from an owner which might have the
Presentable
role - 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 thePresentable
role.. 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
Presentable
role - Since:
- 3.2-ALPHA-8
-