Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » How to remove the selection box when the figure is hidden?
How to remove the selection box when the figure is hidden? [message #199059] Thu, 13 October 2005 17:37 Go to next message
Eclipse UserFriend
Originally posted by: jsk_lam.hotmail.com

Hi,

I called the
((DiagramNodeEditPart)nodeEditPart).getFigure().setVisible(v isibleFlag)
to hide the selected figure. However, it works fine except for the
selection box that
surrounds the figure is still shown even the figure has been hidden.

Could someone please help on how to also remove the selection box?

Thanks
skl
Re: How to remove the selection box when the figure is hidden? [message #199075 is a reply to message #199059] Thu, 13 October 2005 18:07 Go to previous messageGo to next message
Felix L J Mayer is currently offline Felix L J MayerFriend
Messages: 202
Registered: July 2009
Senior Member
Maybe you could just deselect the Figure?

"sl" <jsk_lam@hotmail.com> wrote in message
news:dim61m$lr4$1@news.eclipse.org...
> Hi,
>
> I called the
> ((DiagramNodeEditPart)nodeEditPart).getFigure().setVisible(v isibleFlag)
> to hide the selected figure. However, it works fine except for the
> selection box that
> surrounds the figure is still shown even the figure has been hidden.
>
> Could someone please help on how to also remove the selection box?
>
> Thanks
> skl
>
>
>
Re: How to remove the selection box when the figure is hidden? [message #199094 is a reply to message #199075] Thu, 13 October 2005 18:38 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: jsk_lam.hotmail.com

Yes, the selection boxes will go away when clicking on the other figures
or the canvas. However, I would like to hide/remove those boxes once
the figures are hidden. Otherwise, it looks weird to have those empty
boxes laying around on the canvas.

Thanks
skl

"Felix L J Mayer" <felix.mayer@objectaid.com> wrote in message
news:dim7pn$oeb$1@news.eclipse.org...
> Maybe you could just deselect the Figure?
>
> "sl" <jsk_lam@hotmail.com> wrote in message
> news:dim61m$lr4$1@news.eclipse.org...
> > Hi,
> >
> > I called the
> > ((DiagramNodeEditPart)nodeEditPart).getFigure().setVisible(v isibleFlag)
> > to hide the selected figure. However, it works fine except for the
> > selection box that
> > surrounds the figure is still shown even the figure has been hidden.
> >
> > Could someone please help on how to also remove the selection box?
> >
> > Thanks
> > skl
> >
> >
> >
>
>
Re: How to remove the selection box when the figure is hidden? [message #199118 is a reply to message #199094] Thu, 13 October 2005 19:29 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: gslade.no.spam.us.ibm.com

Hiding a figure using setVisible() is probably not the right way to
filter (or hide) something on the canvas. Doing it this way means that
they are there, but you just can't see them. Accessibility gets screwed
up as you can still navigate to those 'hidden' figures using the keyboard.

To truely hide them you should make you model aware of what ought to be
hidden and when the model returns its children it should return only
those it wants to be shown on the canvas.

There have been other threads discussing this so I have not explained
this method in depth...... I can if need be

Guy

sl wrote:
> Yes, the selection boxes will go away when clicking on the other figures
> or the canvas. However, I would like to hide/remove those boxes once
> the figures are hidden. Otherwise, it looks weird to have those empty
> boxes laying around on the canvas.
>
> Thanks
> skl
>
> "Felix L J Mayer" <felix.mayer@objectaid.com> wrote in message
> news:dim7pn$oeb$1@news.eclipse.org...
>
>>Maybe you could just deselect the Figure?
>>
>>"sl" <jsk_lam@hotmail.com> wrote in message
>>news:dim61m$lr4$1@news.eclipse.org...
>>
>>>Hi,
>>>
>>>I called the
>>> ((DiagramNodeEditPart)nodeEditPart).getFigure().setVisible(v isibleFlag)
>>>to hide the selected figure. However, it works fine except for the
>>>selection box that
>>>surrounds the figure is still shown even the figure has been hidden.
>>>
>>>Could someone please help on how to also remove the selection box?
>>>
>>>Thanks
>>>skl
>>>
>>>
>>>
>>
>>
>
>
Re: How to remove the selection box when the figure is hidden? [message #199122 is a reply to message #199094] Thu, 13 October 2005 19:39 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: jsk_lam.hotmail.com

Well, I got it to work as following::

if (visibleFlag == true) {
nodeEditPart.activate();
} else {
nodeEditPart.deactivate();
}

"sl" <jsk_lam@hotmail.com> wrote in message
news:dim9js$r5k$1@news.eclipse.org...
> Yes, the selection boxes will go away when clicking on the other figures
> or the canvas. However, I would like to hide/remove those boxes once
> the figures are hidden. Otherwise, it looks weird to have those empty
> boxes laying around on the canvas.
>
> Thanks
> skl
>
> "Felix L J Mayer" <felix.mayer@objectaid.com> wrote in message
> news:dim7pn$oeb$1@news.eclipse.org...
> > Maybe you could just deselect the Figure?
> >
> > "sl" <jsk_lam@hotmail.com> wrote in message
> > news:dim61m$lr4$1@news.eclipse.org...
> > > Hi,
> > >
> > > I called the
> > >
((DiagramNodeEditPart)nodeEditPart).getFigure().setVisible(v isibleFlag)
> > > to hide the selected figure. However, it works fine except for the
> > > selection box that
> > > surrounds the figure is still shown even the figure has been hidden.
> > >
> > > Could someone please help on how to also remove the selection box?
> > >
> > > Thanks
> > > skl
> > >
> > >
> > >
> >
> >
>
>
Re: How to remove the selection box when the figure is hidden? [message #199294 is a reply to message #199059] Fri, 14 October 2005 14:28 Go to previous message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

part.getViewer().deselect(part)

As Guy pointed out, we have not extensively tested graphical editparts with
hidden figures. There may be several bugs which we would happy to fix or
accept patches from the community. Just open report bugs as you find them.

"sl" <jsk_lam@hotmail.com> wrote in message
news:dim61m$lr4$1@news.eclipse.org...
> Hi,
>
> I called the
> ((DiagramNodeEditPart)nodeEditPart).getFigure().setVisible(v isibleFlag)
> to hide the selected figure. However, it works fine except for the
> selection box that
> surrounds the figure is still shown even the figure has been hidden.
>
> Could someone please help on how to also remove the selection box?
>
> Thanks
> skl
>
>
>
Previous Topic:Workbench Start Error!
Next Topic:Example projects in CVS don't compile with GEF 3.1.1
Goto Forum:
  


Current Time: Fri Apr 26 17:18:34 GMT 2024

Powered by FUDForum. Page generated in 0.02941 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top