VR - The visual root node of the UI toolkit used, e.g.
javafx.scene.Node in case of JavaFX.public abstract class AbstractViewer<VR> extends java.lang.Object implements IViewer<VR>
| Type | Property and Description |
|---|---|
javafx.beans.property.ReadOnlyBooleanProperty |
active |
javafx.beans.property.ReadOnlyObjectProperty<IDomain<VR>> |
adaptable |
javafx.beans.property.ReadOnlyMapProperty<AdapterKey<?>,java.lang.Object> |
adapters |
viewerFocusedIAdaptable.Bound<A extends IAdaptable>IAdaptable.Bound.Impl<T extends IAdaptable>ADAPTERS_PROPERTYACTIVE_PROPERTY| Constructor and Description |
|---|
AbstractViewer()
Creates a new
AbstractViewer instance, setting the
AdaptableScope for each of its IAdaptable-compliant types
(super classes implementing IAdaptable and super-interfaces
extending IAdaptable) to the newly created instance (see
AdaptableScopes#scopeTo(IAdaptable)). |
| Modifier and Type | Method and Description |
|---|---|
void |
activate() |
javafx.beans.property.ReadOnlyBooleanProperty |
activeProperty() |
javafx.beans.property.ReadOnlyObjectProperty<IDomain<VR>> |
adaptableProperty() |
javafx.beans.property.ReadOnlyMapProperty<AdapterKey<?>,java.lang.Object> |
adaptersProperty() |
void |
deactivate() |
void |
dispose() |
IDomain<VR> |
getAdaptable()
Gets the value of the property adaptable.
|
<T> T |
getAdapter(AdapterKey<T> key) |
<T> T |
getAdapter(java.lang.Class<T> classKey) |
<T> T |
getAdapter(com.google.common.reflect.TypeToken<T> key) |
<T> AdapterKey<T> |
getAdapterKey(T adapter) |
javafx.collections.ObservableMap<AdapterKey<?>,java.lang.Object> |
getAdapters()
Gets the value of the property adapters.
|
<T> java.util.Map<AdapterKey<? extends T>,T> |
getAdapters(java.lang.Class<? super T> classKey) |
<T> java.util.Map<AdapterKey<? extends T>,T> |
getAdapters(com.google.common.reflect.TypeToken<? super T> key) |
java.util.Map<java.lang.Object,IContentPart<VR,? extends VR>> |
getContentPartMap()
Returns the
Map for registering IContentParts by their
content. |
IDomain<VR> |
getDomain()
|
IRootPart<VR,? extends VR> |
getRootPart()
Returns the
IRootPart of this viewer. |
java.util.Map<VR,IVisualPart<VR,? extends VR>> |
getVisualPartMap()
Returns the
Map for registering IVisualParts by their
visual. |
boolean |
isActive()
Gets the value of the property active.
|
void |
setAdaptable(IDomain<VR> domain)
Sets the value of the property adaptable.
|
<T> void |
setAdapter(T adapter) |
<T> void |
setAdapter(T adapter,
java.lang.String role) |
<T> void |
setAdapter(com.google.common.reflect.TypeToken<T> adapterType,
T adapter) |
<T> void |
setAdapter(com.google.common.reflect.TypeToken<T> adapterType,
T adapter,
java.lang.String role) |
<T> void |
unsetAdapter(T adapter) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitisViewerFocused, isViewerVisual, reveal, viewerFocusedPropertypublic javafx.beans.property.ReadOnlyBooleanProperty activeProperty
activeProperty in interface IActivatableisActive()public javafx.beans.property.ReadOnlyObjectProperty<IDomain<VR>> adaptableProperty
adaptableProperty in interface IAdaptable.Bound<IDomain<VR>>getAdaptable(),
setAdaptable(IDomain)public javafx.beans.property.ReadOnlyMapProperty<AdapterKey<?>,java.lang.Object> adaptersProperty
adaptersProperty in interface IAdaptablegetAdapters()public AbstractViewer()
AbstractViewer instance, setting the
AdaptableScope for each of its IAdaptable-compliant types
(super classes implementing IAdaptable and super-interfaces
extending IAdaptable) to the newly created instance (see
AdaptableScopes#scopeTo(IAdaptable)).public void activate()
activate in interface IActivatablepublic javafx.beans.property.ReadOnlyBooleanProperty activeProperty()
activeProperty in interface IActivatableisActive()public javafx.beans.property.ReadOnlyObjectProperty<IDomain<VR>> adaptableProperty()
adaptableProperty in interface IAdaptable.Bound<IDomain<VR>>getAdaptable(),
setAdaptable(IDomain)public javafx.beans.property.ReadOnlyMapProperty<AdapterKey<?>,java.lang.Object> adaptersProperty()
adaptersProperty in interface IAdaptablegetAdapters()public void deactivate()
deactivate in interface IActivatablepublic void dispose()
dispose in interface IDisposablepublic IDomain<VR> getAdaptable()
getAdaptable in interface IAdaptable.Bound<IDomain<VR>>public <T> T getAdapter(AdapterKey<T> key)
getAdapter in interface IAdaptablepublic <T> T getAdapter(java.lang.Class<T> classKey)
getAdapter in interface IAdaptablepublic <T> T getAdapter(com.google.common.reflect.TypeToken<T> key)
getAdapter in interface IAdaptablepublic <T> AdapterKey<T> getAdapterKey(T adapter)
getAdapterKey in interface IAdaptablepublic javafx.collections.ObservableMap<AdapterKey<?>,java.lang.Object> getAdapters()
getAdapters in interface IAdaptablepublic <T> java.util.Map<AdapterKey<? extends T>,T> getAdapters(java.lang.Class<? super T> classKey)
getAdapters in interface IAdaptablepublic <T> java.util.Map<AdapterKey<? extends T>,T> getAdapters(com.google.common.reflect.TypeToken<? super T> key)
getAdapters in interface IAdaptablepublic java.util.Map<java.lang.Object,IContentPart<VR,? extends VR>> getContentPartMap()
IViewerMap for registering IContentParts by their
content.getContentPartMap in interface IViewer<VR>IViewer.getContentPartMap()public IRootPart<VR,? extends VR> getRootPart()
IViewerIRootPart of this viewer. The IRootPart is a
special IVisualPart that serves as the parent to all contained
IContentParts, IHandleParts, and IFeedbackParts.getRootPart in interface IViewer<VR>IRootPart of this viewer.public java.util.Map<VR,IVisualPart<VR,? extends VR>> getVisualPartMap()
IViewerMap for registering IVisualParts by their
visual. This map is used for hit-testing. Hit testing is performed
by first determining which visual is hit, and then mapping that to an
IVisualPart.
Note, that when looking up an IVisualPart for a given visual in
the map, it is required to walk up the visual hierarchy until a
registered visual is found, because an IVisualPart only has to
register its "main" visual (i.e. the one returned by
IVisualPart.getVisual()) at the visual-part-map, but potential
children visuals do not have to be registered.
getVisualPartMap in interface IViewer<VR>IViewer.getVisualPartMap()public boolean isActive()
isActive in interface IActivatablepublic void setAdaptable(IDomain<VR> domain)
setAdaptable in interface IAdaptable.Bound<IDomain<VR>>public <T> void setAdapter(T adapter)
setAdapter in interface IAdaptablepublic <T> void setAdapter(T adapter,
java.lang.String role)
setAdapter in interface IAdaptablepublic <T> void setAdapter(com.google.common.reflect.TypeToken<T> adapterType,
T adapter)
setAdapter in interface IAdaptable@InjectAdapters public <T> void setAdapter(com.google.common.reflect.TypeToken<T> adapterType, T adapter, java.lang.String role)
setAdapter in interface IAdaptablepublic <T> void unsetAdapter(T adapter)
unsetAdapter in interface IAdaptableCopyright (c) 2014 itemis AG and others. All rights reserved.