Package org.eclipse.gef.mvc.fx.viewer
Interface IViewer
- All Superinterfaces:
IActivatable,IAdaptable,IAdaptable.Bound<IDomain>,IDisposable
- All Known Implementing Classes:
InfiniteCanvasViewer
The
IViewer interface specifies all services that a viewer needs to
provide. One application (within one IDomain) can be consisting of
multiple viewers. Each viewer maintains its own getContentPartMap()
and getVisualPartMap() that can be used to navigate from/to content,
controller, and visual objects.- Noimplement:
- This interface is not intended to be implemented by clients.
Instead,
InfiniteCanvasViewershould be subclassed.
-
Property Summary
PropertiesTypePropertyDescriptionjavafx.beans.property.ReadOnlyMapProperty<Object,IContentPart<? extends javafx.scene.Node>> Returns an unmodifiable read-only map property that contains the registeredIContentParts mapped to their respective content.javafx.beans.property.ReadOnlyListProperty<Object>A read-only property containing the current content objects.javafx.beans.property.ReadOnlyBooleanPropertyReturns aReadOnlyBooleanPropertythat represents the "focused" state of thisIViewer.javafx.beans.property.ReadOnlyMapProperty<javafx.scene.Node,IVisualPart<? extends javafx.scene.Node>> Returns an unmodifiable read-only map property that contains the registeredIVisualParts mapped to their respective visual.Properties inherited from interface org.eclipse.gef.common.activate.IActivatable
activeProperties inherited from interface org.eclipse.gef.common.adapt.IAdaptable
adaptersProperties inherited from interface org.eclipse.gef.common.adapt.IAdaptable.Bound
adaptable -
Nested Class Summary
Nested classes/interfaces inherited from interface org.eclipse.gef.common.adapt.IAdaptable
IAdaptable.Bound<A extends IAdaptable>Nested classes/interfaces inherited from interface org.eclipse.gef.common.adapt.IAdaptable.Bound
IAdaptable.Bound.Impl<T extends IAdaptable> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringName of thecontentPartMapProperty().static final StringName of thecontentsProperty().static final StringName of thevisualPartMapProperty().Fields inherited from interface org.eclipse.gef.common.activate.IActivatable
ACTIVE_PROPERTYFields inherited from interface org.eclipse.gef.common.adapt.IAdaptable
ADAPTERS_PROPERTY -
Method Summary
Modifier and TypeMethodDescriptionjavafx.beans.property.ReadOnlyMapProperty<Object,IContentPart<? extends javafx.scene.Node>> Returns an unmodifiable read-only map property that contains the registeredIContentParts mapped to their respective content.javafx.beans.property.ReadOnlyListProperty<Object>A read-only property containing the current content objects.javafx.scene.ParentMap<Object,IContentPart<? extends javafx.scene.Node>> Returns theMapfor registeringIContentParts by their content.javafx.collections.ObservableList<Object>Returns anObservableListcontaining the content objects.IRootPart<? extends javafx.scene.Node>Returns theIRootPartof this viewer.Map<javafx.scene.Node,IVisualPart<? extends javafx.scene.Node>> Returns theMapfor registeringIVisualParts by their visual.booleanReturns the value of the propertyviewerFocusedProperty().voidreveal(IVisualPart<? extends javafx.scene.Node> visualPart) Ensure that the visual of the givenIVisualPartis visible in this viewer.javafx.beans.property.ReadOnlyBooleanPropertyReturns aReadOnlyBooleanPropertythat represents the "focused" state of thisIViewer.javafx.beans.property.ReadOnlyMapProperty<javafx.scene.Node,IVisualPart<? extends javafx.scene.Node>> Returns an unmodifiable read-only map property that contains the registeredIVisualParts mapped to their respective visual.Methods inherited from interface org.eclipse.gef.common.activate.IActivatable
activate, activeProperty, deactivate, isActiveMethods inherited from interface org.eclipse.gef.common.adapt.IAdaptable
adaptersProperty, getAdapter, getAdapter, getAdapter, getAdapterKey, getAdapters, getAdapters, getAdapters, setAdapter, setAdapter, setAdapter, setAdapter, unsetAdapterMethods inherited from interface org.eclipse.gef.common.adapt.IAdaptable.Bound
adaptableProperty, getAdaptable, setAdaptableMethods inherited from interface org.eclipse.gef.common.dispose.IDisposable
dispose
-
Property Details
-
contentPartMap
javafx.beans.property.ReadOnlyMapProperty<Object,IContentPart<? extends javafx.scene.Node>> contentPartMapPropertyReturns an unmodifiable read-only map property that contains the registeredIContentParts mapped to their respective content.- See Also:
-
contents
javafx.beans.property.ReadOnlyListProperty<Object> contentsPropertyA read-only property containing the current content objects.- See Also:
-
viewerFocused
javafx.beans.property.ReadOnlyBooleanProperty viewerFocusedPropertyReturns aReadOnlyBooleanPropertythat represents the "focused" state of thisIViewer. AnIVieweris focused when its visualization has keyboard focus and its window is active, i.e. it is focused if it will receive keyboard events.- See Also:
-
visualPartMap
javafx.beans.property.ReadOnlyMapProperty<javafx.scene.Node,IVisualPart<? extends javafx.scene.Node>> visualPartMapPropertyReturns an unmodifiable read-only map property that contains the registeredIVisualParts mapped to their respective visual.- See Also:
-
-
Field Details
-
CONTENTS_PROPERTY
Name of thecontentsProperty().- See Also:
-
CONTENT_PART_MAP_PROPERTY
Name of thecontentPartMapProperty().- See Also:
-
VISUAL_PART_MAP_PROPERTY
Name of thevisualPartMapProperty().- See Also:
-
-
Method Details
-
contentPartMapProperty
javafx.beans.property.ReadOnlyMapProperty<Object,IContentPart<? extends javafx.scene.Node>> contentPartMapProperty()Returns an unmodifiable read-only map property that contains the registeredIContentParts mapped to their respective content.- See Also:
-
contentsProperty
javafx.beans.property.ReadOnlyListProperty<Object> contentsProperty()A read-only property containing the current content objects.- See Also:
-
getCanvas
javafx.scene.Parent getCanvas() -
getContentPartMap
Map<Object,IContentPart<? extends javafx.scene.Node>> getContentPartMap()Returns theMapfor registeringIContentParts by their content.- Returns:
- The content part map
-
getContents
javafx.collections.ObservableList<Object> getContents()Returns anObservableListcontaining the content objects.- Returns:
- An
ObservableList.
-
getDomain
IDomain getDomain() -
getRootPart
IRootPart<? extends javafx.scene.Node> getRootPart()Returns theIRootPartof this viewer. TheIRootPartis a specialIVisualPartthat serves as the parent to all containedIContentParts,IHandleParts, andIFeedbackParts.- Returns:
- The
IRootPartof this viewer.
-
getVisualPartMap
Map<javafx.scene.Node,IVisualPart<? extends javafx.scene.Node>> getVisualPartMap()Returns theMapfor registeringIVisualParts 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 anIVisualPart.Note, that when looking up an
IVisualPartfor a given visual in the map, it is required to walk up the visual hierarchy until a registered visual is found, because anIVisualPartonly has to register its "main" visual (i.e. the one returned byIVisualPart.getVisual()) at the visual-part-map, but potential children visuals do not have to be registered.- Returns:
- The visual-to-visual-part map.
-
isViewerFocused
boolean isViewerFocused()Returns the value of the propertyviewerFocusedProperty().- Returns:
- The value of the property
viewerFocusedProperty().
-
reveal
Ensure that the visual of the givenIVisualPartis visible in this viewer.- Parameters:
visualPart- TheIVisualPartthat is to be revealed.
-
viewerFocusedProperty
javafx.beans.property.ReadOnlyBooleanProperty viewerFocusedProperty()Returns aReadOnlyBooleanPropertythat represents the "focused" state of thisIViewer. AnIVieweris focused when its visualization has keyboard focus and its window is active, i.e. it is focused if it will receive keyboard events.- See Also:
-
visualPartMapProperty
javafx.beans.property.ReadOnlyMapProperty<javafx.scene.Node,IVisualPart<? extends javafx.scene.Node>> visualPartMapProperty()Returns an unmodifiable read-only map property that contains the registeredIVisualParts mapped to their respective visual.- See Also:
-