IlvObject | +--IlvAbstractSelectionManager
IlvAbstractSelectionManager
class manages the selection of
objects with or without querying an image update.
The selection is rendered as an updated image or by a rectangle that encloses the selected object on top of the view.
Additional information on selection is available in the
properties
property of each selection rectangle.
Constructor Attributes | Constructor Name and Description |
---|---|
IlvAbstractSelectionManager(init, moveActionName, selectionActionName, deleteActionName)
|
Method Attributes | Method Name and Description |
---|---|
Abort dragging of the selection.
|
|
addSelectionChangedListener(listener)
Add a listener which is called when the selection has changed.
|
|
applyToAll(f)
Applies a function to all rectangles.
|
|
Applies a function to all selection link.
|
|
clipAll()
Reset the clip rectangle of all selection rectangles to match the new size of
the view.
|
|
commitSelectionProperties(updateImage, oncompleted, onfailed)
Commits potential modifications of the selection objects properties to the
server.
|
|
Activates an action that manages deleting the selected objects.
|
|
Queries a deselection of all the selected objects.
|
|
doSelect(e)
Performs a selection at the specified mouse click.
|
|
findById(id)
Returns the selection rectangle that corresponds to the selected object with
the given
id , null if none is found. |
|
Returns the current color of the selection rectangles.
|
|
Returns the line width of the selection rectangles.
|
|
Returns the modifier key used to perform multiple selections.
|
|
Returns the scroll position of this
IlvRectangle . |
|
Returns the current selection.
|
|
Returns the position of the attached view.
|
|
hideAll()
Hides all the selection rectangles.
|
|
Hides the selection for objects that cannot be moved.
|
|
isFillOn()
Returns whether the selection rectangles are filled or hollow.
|
|
Returns whether a selection rectangle should be hidden while the current
selection is dragged.
|
|
Returns
true when the selection manager is in image mode,
false otherwise. |
|
isMovable(r)
Returns
true |
|
Returns
true when the elements in the view can be moved. |
|
Returns
true if the event is a multiple selection event, false
otherwise. |
|
Returns
true if the current selection contains at least one
movable object, false otherwise. |
|
onSelectionLoaded(context)
Callback to process the response of the server after an update of the
selection.
|
|
Query a new image.
|
|
Updates the server with the new image mode value.
|
|
recycle(id)
Recycles the rectangle identified by the ID passed as parameter.
|
|
Recycles all the selection rectangles.
|
|
removeSelectionChangedListener(listener)
Removes a listener that was installed with
addSelectionChangedListener . |
|
Queries a selection of all the objects.
|
|
selectById(id, extend)
Queries an update of the selection for a simple selection.
|
|
selectMulti(x, y)
Queries an update of the selection for an extension of the selection.
|
|
selectOne(x, y, mouseUp)
Queries an update of the selection for a simple selection.
|
|
sendRequest(request)
Sends a selection request to the server.
|
|
setFillOn(fillOn)
Defines whether the selection rectangles are filled or hollow.
|
|
setForceUpdateProperties(force)
Sets whether the selection manager should query the server for the current
selection and the properties of the selected objects.
|
|
setImageMode(imageMode)
Activates or deactivates the image selection mode.
|
|
setLineColor(color)
Sets the color of the rectangles representing the current selection.
|
|
setLineWidth(lineWidth)
Sets the line width of the selection rectangles.
|
|
setMoveAllowed(moveAllowed)
Allows or forbids movement of elements in the view.
|
|
Sets the modifier key used to perform multiple selections.
|
|
setScrollPosition(x, y)
Sets the scroll position of the selection rectangles.
|
|
showAll()
Shows all the selection rectangles.
|
|
Shows the selection rectangles for objects that are moveable, and hides the
others.
|
|
Initializes the dragging of the selection.
|
|
stopDragging(e)
Complete dragging of the selection and performs a server action if needed.
|
|
Queries a full selection update.
|
|
updateCapabilities(context, view)
Updates capabilities that have changed.
|
|
Queries the server for the selected objects and their properties.
|
|
Drags the selection.
|
dispose, getClassName, hashCode, instanceOf, invoke, registerDispose, registerDisposeByClientId, removeHTML, setClassName, superConstructor, superInvoke, toString, updateVisibility |
superConstructor method with
true
.
moveNode
.
selectNode
.
deleteObject
.
rectangleList
: The list of rectangles
representing the current selection.selectionManager
: The selection manager.rectangle
: The current rectangle.selectionManager
: The selection manager.rectangle
: The current link.IlvSelectionSupport
handles
such requests.
true
update the view image once the properties
have been updated.
IlvSelectionPropertiesError
objects. The this
value is the
IlvAbstractSelectionManager
. No error is send if the
model is not editable.
this
value is the
IlvAbstractSelectionManager
.
To use this method, the server side selection support must support this selection type.
This methods handles multiple selections (using multiple selection key).
id
, null
if none is found.
IlvRectangle
. Note: You
are not allowed to modify the object returned by this method. To modify the
scroll position of a panel, use the setScrollPosition
method.
x
and y
.IlvSelectionRectangle
instances. When additional
properties are defined they can be retrieved using the
getProperties()
method. The selection could be
null
.true
when the selection rectangles are filled.false
,
redefine this method when necessary.
true
when the selection manager is in image mode,
false
otherwise.
See setImageMode
for more details on image mode.
true if the rectangle is movable,
false otherwise.
true
when the elements in the view can be moved.
true
if the event is a multiple selection event, false
otherwise.
true
if the current selection contains at least one
movable object, false
otherwise.
addSelectionChangedListener
.
To use this method, the server side selection support must support this selection type.
extend
parameter value:
false
(default value): the current selection is cleared
and the object specified by the id
identifier is selected,
if found.true
: the current selection is kept and
id
identifier is already
selected, it is removed from the current selection.To use this method, the server side selection support must support this selection type.
The default value is false
if this parameter is
omitted.
true
-- the selection rectangles are filled. The fill
color is the line color with an transparency of 50%.
true
when the selection rectangles are filled.
true
to have the selection objects and their
properties uploaded from the server in image mode.
false
, the default, to reduce the number of requests
to the server when you don't need to manipulate the selection or the
properties of the selected objects on the client.
When the image selection mode is active, the selection is rendered by the server as an updated image. Each change in the selection results in a query for an updated image. Additional information and selection listener are disabled until updateAll() is invoked.
When the image selection mode is inactive, the selection is rendered as rectangles around the selected objects. Changes in the selection result in queries for the bounding box of objects and additional informations.
The image selection mode is active by default.
true
to activate the image selection mode;
false
to deactivate it.
black
.
moveNodeAction to handle moving elements.
'ctrl'
and 'shift'
.
The selection listener will be triggered when the information is available.
This method should be used in image mode
.