public interface IlvObjectWithSelection
IlvObjectWithSelection
defines an interface for
graphic objects that can contain inner graphic subobjects that can
be selected.
All operations that change the selection must be safe: for instance,
if selection operations change bounding boxes, the operations must
use IlvGraphicBag.applyToObject(ilog.views.IlvGraphic, ilog.views.IlvApplyObject, java.lang.Object, boolean)
implicitely and not require
the caller to use IlvGraphicBag.applyToObject(ilog.views.IlvGraphic, ilog.views.IlvApplyObject, java.lang.Object, boolean)
.Modifier and Type | Method and Description |
---|---|
void |
deSelectAll(boolean traverse,
boolean redraw)
Deselects all the subobjects of this object.
|
IlvGraphicVector |
getAllSelectableObjects(IlvPoint p,
IlvManagerView view,
IlvTransformer t,
boolean traverse,
boolean includeParentsIfInnerFound)
Returns all selectable object at the given point.
|
IlvObjectWithSelection |
getCollapseExpandObject(IlvPoint p,
IlvManagerView view,
IlvTransformer t,
boolean traverse)
Returns the first object that should change its collapsed state
when clicking at the input point.
|
IlvGraphic |
getSelectableObject(IlvPoint p,
IlvManagerView view,
IlvTransformer t,
boolean traverse)
Returns the first selectable object at the given point.
|
IlvGraphicEnumeration |
getSelectedObjects()
Returns an enumeration of all the selected objects.
|
int |
getSelectedObjectsCount()
Returns the number of selected objects.
|
boolean |
isCollapsed()
Returns the collapsed/expanded status of the object.
|
boolean |
isCollapsible()
Returns whether the object can be collapsed or expanded.
|
boolean |
isSelected(IlvGraphic obj)
Returns
true if the specified graphic object is selected. |
boolean |
isSelectionAdjusting()
Returns whether we are currently selecting or deselecting a series of
objects.
|
void |
selectAll(boolean traverse,
boolean redraw)
Selects all the subobject of this object.
|
void |
setCollapsed(boolean collapsed)
Collapses or expands the object.
|
void |
setSelected(IlvGraphic object,
boolean select,
boolean redraw)
Selects or deselects the specified object.
|
void |
setSelected(IlvGraphic obj,
IlvPoint p,
IlvManagerView view)
Selects the specified graphic object.
|
void |
setSelectionAdjusting(boolean set)
Starts a series of selection events.
|
void |
setSelectionEventSource(Object source)
Changes the source for selection events.
|
void setSelected(IlvGraphic object, boolean select, boolean redraw)
object
- The graphic object to select or deselect.select
- If true
the object will be selected,
and deselected otherwise.redraw
- Whether the object must be redrawn.void setSelected(IlvGraphic obj, IlvPoint p, IlvManagerView view)
setSelected(obj, true, true)
, but it can also be
implemented to select subparts of the input object located on the
input point.
obj
- The object to be selected.p
- The point in the manager view where the mouse click occurred.view
- The view currently handled by the select interactor.setSelected(IlvGraphic, boolean, boolean)
void selectAll(boolean traverse, boolean redraw)
traverse
- If true
, the method
will also select recursively the subobjects contained in
subobjects of this object.redraw
- Whether the object must be redrawn.void deSelectAll(boolean traverse, boolean redraw)
traverse
- If true
, the method will also deselect
recursively the subobjects contained in
subobjects of this object.redraw
- Whether the object must be redrawn.boolean isSelected(IlvGraphic obj)
true
if the specified graphic object is selected.obj
- The graphic object.IlvGraphicEnumeration getSelectedObjects()
IlvBufferedGraphicEnumeration
if it is necessary to select, deselect, remove or add objects while
using the enumeration.int getSelectedObjectsCount()
boolean isCollapsible()
true
if calling setCollapsed(boolean)
has any effect.boolean isCollapsed()
selectAll(boolean, boolean)
will not traverse into the interior of this object.void setCollapsed(boolean collapsed)
collapsed
- When set to true
, the object is collapsed.
Otherwise, the object is expanded.IlvObjectWithSelection getCollapseExpandObject(IlvPoint p, IlvManagerView view, IlvTransformer t, boolean traverse)
p
- The point in the view coordinates system.view
- The view. Can be null
.t
- The transformer to draw this object.traverse
- If true
, the method
will also search recursively the subobjects contained in
subobjects of this object, unless they are collapsed.void setSelectionAdjusting(boolean set)
boolean isSelectionAdjusting()
IlvGraphic getSelectableObject(IlvPoint p, IlvManagerView view, IlvTransformer t, boolean traverse)
p
- The point in the view coordinates system.view
- The view. Can be null
.t
- The transformer to draw this object.traverse
- If true
, the method
will also search recursively the subobjects contained in
subobjects of this object, unless they are collapsed.IlvGraphicVector getAllSelectableObjects(IlvPoint p, IlvManagerView view, IlvTransformer t, boolean traverse, boolean includeParentsIfInnerFound)
p
- The point in the view coordinates system.view
- The view. Can be null
.t
- The transformer to draw this object.traverse
- If true
, the method
will also search recursively the subobjects contained in
subobjects of this object, unless they are collapsed.includeParentsIfInnerFound
- If false
, the
result will contain an object of type IlvObjectWithSelection
located at the input point only if it does not contain any subobjects
of the object. If true
, the result will contain an object
of type IlvObjectWithSelection
at the input point even if
it also contains subobjects of the object.void setSelectionEventSource(Object source)
© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.