Selection Behavior like Marquee behavior [message #245399] |
Tue, 09 September 2008 07:23  |
Eclipse User |
|
|
|
Originally posted by: ardiangunawan.yahoo.com
Hello,
for the shape editor,
for the ease of use, I am trying to
"eliminate" marquee tool, and trying to merge its functionalities with
selection tool.
Is it possible to have the similar "BEHAVIOR_NODES_AND_CONNECTIONS" of
the MarqueeSelectionTool applied to SelectionTool when dragging mouse,
so that both shape(s) and connection(s) are selected?
thank you for any help....
regards,
Ardian
|
|
|
Re: Selection Behavior like Marquee behavior [message #245405 is a reply to message #245399] |
Tue, 09 September 2008 09:04  |
Eclipse User |
|
|
|
Originally posted by: ardiangunawan.yahoo.com
Hello,
It works by extending SelectionTool:
public class ExtendedSelectionTool extends SelectionTool{
@Override
protected DragTracker getDragTracker() {
DragTracker dt = super.getDragTracker();
if(dt instanceof MarqueeDragTracker)
((MarqueeDragTracker)dt).setMarqueeBehavior(
MarqueeSelectionTool.BEHAVIOR_NODES_AND_CONNECTIONS);
return dt;
}
}
and to call the above class:
.....
PaletteToolbar toolbar = new PaletteToolbar("Tools");
ToolEntry tool = new SelectionToolEntry() ;
SelectionTool st = new ExtendedSelectionTool();
tool.setToolClass(st.getClass());
toolbar.add(tool);
palette.setDefaultEntry(tool);
....
regards,
Ardian
Ardian Eko schrieb:
> Hello,
> for the shape editor,
> for the ease of use, I am trying to
> "eliminate" marquee tool, and trying to merge its functionalities with
> selection tool.
>
> Is it possible to have the similar "BEHAVIOR_NODES_AND_CONNECTIONS" of
> the MarqueeSelectionTool applied to SelectionTool when dragging mouse,
> so that both shape(s) and connection(s) are selected?
>
> thank you for any help....
>
> regards,
> Ardian
|
|
|
Powered by
FUDForum. Page generated in 0.11793 seconds