Package | com.yworks.canvas.model |
Class | public class HighlightPaintManager |
Inheritance | HighlightPaintManager ModelManager Object |
ModelManager
implementation that manages the
visual decorations of highlighted elements in a canvas.
For each item that should be highlighted this class uses the lookup
mechanism of
the items to lookup an IHighlightPaintableInstaller
implementation which will do the actual installation of the decoration in the canvas.
See also
Property | Defined By | ||
---|---|---|---|
canvas : CanvasComponent [read-only]
Gets the canvas instance this instance is managing. | ModelManager | ||
groupProvider : ICanvasGroupProvider
Gets or sets the group provider that will be used in install
to determine the canvas group where the selection paint should be installed into. | HighlightPaintManager | ||
inputModeContext : IInputModeContext
Gets or sets the IInputModeContext to use for this instance. | HighlightPaintManager | ||
selectionModel : ISelectionModel
Gets or sets the selection model that determines which items are highlighted. | HighlightPaintManager |
Method | Defined By | ||
---|---|---|---|
Creates an instance that for all selected items in the model dynamically
installs a selection paint decoration. | HighlightPaintManager | ||
add(item:Object):IModelItemDescriptor
Adds an item to the canvas. | ModelManager | ||
addHighlight(item:IModelItem):void
Adds another highlight. | HighlightPaintManager | ||
Adds an item to the current highlight selection. | HighlightPaintManager | ||
clearHighlights():void
Removes all highlights. | HighlightPaintManager | ||
containsDescriptor(descriptor:IModelItemDescriptor):Boolean
Checks whether this descriptor is currently being managed by this instance. | ModelManager | ||
[static]
Creates a manager for the given input mode, reusing it's canvas an input mode context. | HighlightPaintManager | ||
remove(item:IModelItem):void
Removes the provided item from this managers set of managed items. | HighlightPaintManager | ||
removeDescriptor(descriptor:IModelItemDescriptor):void
Removes the canvas objects associated with the given descriptor handle. | ModelManager | ||
removeHighlight(item:IModelItem):void
Removes an item from the current highlight selection. | HighlightPaintManager | ||
updateDescriptor(descriptor:IModelItemDescriptor):Boolean
Updates the item in the canvas by uninstalling and reinstalling it
into the canvas. | ModelManager |
Method | Defined By | ||
---|---|---|---|
Callback used by install to retrieve the installer for the IDisplayObjectCreator
that renders the highlighting for a given item. | HighlightPaintManager | ||
install(member:Object):Array [override]
Installs the display object creator to highlight the given member. | HighlightPaintManager | ||
uninstall(descriptor:IModelItemDescriptor, canvasObjects:Array):void
Simple implementation that removes all of the given canvasObjects. | ModelManager |
groupProvider | property |
groupProvider:ICanvasGroupProvider
Gets or sets the group provider that will be used in install
to determine the canvas group where the selection paint should be installed into.
By default this is an instance of DefaultCanvasGroupProvider.createTopGroupProvider()
.
public function get groupProvider():ICanvasGroupProvider
public function set groupProvider(value:ICanvasGroupProvider):void
See also
inputModeContext | property |
inputModeContext:IInputModeContext
Gets or sets the IInputModeContext
to use for this instance.
The value returned will be passed to the
IHighlightPaintableInstaller.installHighlightPaintables
method.
public function get inputModeContext():IInputModeContext
public function set inputModeContext(value:IInputModeContext):void
See also
selectionModel | property |
selectionModel:ISelectionModel
Gets or sets the selection model that determines which items are highlighted.
May be null
, in which case no elements are considered highlighted.
public function get selectionModel():ISelectionModel
public function set selectionModel(value:ISelectionModel):void
HighlightPaintManager | () | Constructor |
public function HighlightPaintManager(canvas:CanvasComponent, selectionModel:ISelectionModel = null)
Creates an instance that for all selected items in the model dynamically installs a selection paint decoration.
Parameterscanvas:CanvasComponent — The canvas to add the selection marks to.
| |
selectionModel:ISelectionModel (default = null ) — The model that determines which items are highlighted. If null ,
a DefaultSelectionModel is used.
|
addHighlight | () | method |
public function addHighlight(item:IModelItem):void
Adds another highlight.
Parameters
item:IModelItem — The item to highlight.
|
addSelection | () | method |
public function addSelection(item:IModelItem):IModelItemDescriptor
Adds an item to the current highlight selection.
Parameters
item:IModelItem — The item whose highlight decorator will added.
|
IModelItemDescriptor — the corresponding descriptor, or null if the
item was already contained in the highlight selection.
|
clearHighlights | () | method |
public function clearHighlights():void
Removes all highlights.
create | () | method |
public static function create(inputMode:AbstractInputMode):HighlightPaintManager
Creates a manager for the given input mode, reusing it's canvas an input mode context.
Parameters
inputMode:AbstractInputMode — The input mode to use.
|
HighlightPaintManager |
getHighlightPaintInstaller | () | method |
protected function getHighlightPaintInstaller(item:IModelItem):IHighlightPaintableInstaller
Callback used by install
to retrieve the installer for the IDisplayObjectCreator
that renders the highlighting for a given item.
This implementation uses the
lookup
of the item.
Parameters
item:IModelItem — The item to find a display object creator installer for.
|
IHighlightPaintableInstaller — An installer or null
|
install | () | method |
override protected function install(member:Object):Array
Installs the display object creator to highlight the given member.
Parameters
member:Object — The member to install the display object creator for highlighting for.
|
Array — The canvas objects used.
|
remove | () | method |
public function remove(item:IModelItem):void
Removes the provided item from this managers set of managed items.
Parameters
item:IModelItem — The item to remove.
|
See also
removeHighlight | () | method |
public function removeHighlight(item:IModelItem):void
Removes an item from the current highlight selection.
Parameters
item:IModelItem — The item whose highlight decorator will be removed.
|