Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Grid is allways visible - how to bee in sync with PROPERTY_GRID_ENABLED?
Grid is allways visible - how to bee in sync with PROPERTY_GRID_ENABLED? [message #190786] Fri, 05 August 2005 20:35 Go to next message
Andreas Herz is currently offline Andreas HerzFriend
Messages: 196
Registered: July 2009
Senior Member
Hi

I have impemented the SnapToGrid/SnapToGeometry feature
and added two enable/disable buttons in the toolbar for
my GEF Editor....it works fine.

I can enable/disable the <snap to ...> feature - but
the grid is always visible.

My top level Figure.

-----------------------
/**
*
*/
public class FormFigure extends LayeredPane implements ObjectFigure
{
/**
*
*/
public FormFigure()
{
FreeformLayer mainLayer=new FreeformLayer();
mainLayer.setLayoutManager(new FreeformLayout());

add(new GridLayer() , LayerConstants.GRID_LAYER);
add(mainLayer, LayerConstants.PRIMARY_LAYER);
}
.
..
..

----------------------

I have had a close look in the GridLayer class. They always paint the grid
(not in relation of the state of the GRID_VISIBILTY flag)

Which type of Layer should I use to be in sync with the PROPERTY_GRID_ENABLED
PROPERTY_GRID_VISIBLE flag?


Greetings

Andreas
Re: Grid is allways visible - how to bee in sync with PROPERTY_GRID_ENABLED? [message #190819 is a reply to message #190786] Sat, 06 August 2005 04:02 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.unknown.com

Have you looked at the logic example?

"FreeGroup" <a.herz@FreeGroup.de> wrote in message
news:dd0ip6$3hu$1@news.eclipse.org...
> Hi
>
> I have impemented the SnapToGrid/SnapToGeometry feature
> and added two enable/disable buttons in the toolbar for
> my GEF Editor....it works fine.
>
> I can enable/disable the <snap to ...> feature - but
> the grid is always visible.
>
> My top level Figure.
>
> -----------------------
> /**
> *
> */
> public class FormFigure extends LayeredPane implements ObjectFigure
> {
> /**
> *
> */
> public FormFigure()
> {
> FreeformLayer mainLayer=new FreeformLayer();
> mainLayer.setLayoutManager(new FreeformLayout());
>
> add(new GridLayer() , LayerConstants.GRID_LAYER);
> add(mainLayer, LayerConstants.PRIMARY_LAYER);
> }
> .
> .
> .
>
> ----------------------
>
> I have had a close look in the GridLayer class. They always paint the grid
> (not in relation of the state of the GRID_VISIBILTY flag)
>
> Which type of Layer should I use to be in sync with the
PROPERTY_GRID_ENABLED
> PROPERTY_GRID_VISIBLE flag?
>
>
> Greetings
>
> Andreas
Re: Grid is allways visible - how to bee in sync with PROPERTY_GRID_ENABLED? [message #190856 is a reply to message #190819] Sat, 06 August 2005 19:07 Go to previous messageGo to next message
Andreas Herz is currently offline Andreas HerzFriend
Messages: 196
Registered: July 2009
Senior Member
Hi,

Yes...

I can remove the grid from my 'FormFigure'. In that case
the grid is never displayed.


greetings

Andreas

Pratik Shah wrote:
> Have you looked at the logic example?
>
> "FreeGroup" <a.herz@FreeGroup.de> wrote in message
> news:dd0ip6$3hu$1@news.eclipse.org...
>
>>Hi
>>
>>I have impemented the SnapToGrid/SnapToGeometry feature
>>and added two enable/disable buttons in the toolbar for
>>my GEF Editor....it works fine.
>>
>>I can enable/disable the <snap to ...> feature - but
>>the grid is always visible.
>>
>>My top level Figure.
>>
>>-----------------------
>>/**
>> *
>> */
>>public class FormFigure extends LayeredPane implements ObjectFigure
>>{
>> /**
>> *
>> */
>> public FormFigure()
>> {
>> FreeformLayer mainLayer=new FreeformLayer();
>> mainLayer.setLayoutManager(new FreeformLayout());
>>
>> add(new GridLayer() , LayerConstants.GRID_LAYER);
>> add(mainLayer, LayerConstants.PRIMARY_LAYER);
>> }
>> .
>>.
>>.
>>
>>----------------------
>>
>>I have had a close look in the GridLayer class. They always paint the grid
>>(not in relation of the state of the GRID_VISIBILTY flag)
>>
>>Which type of Layer should I use to be in sync with the
>
> PROPERTY_GRID_ENABLED
>
>>PROPERTY_GRID_VISIBLE flag?
>>
>>
>>Greetings
>>
>> Andreas
>
>
>
Re: Grid is allways visible - how to bee in sync with PROPERTY_GRID_ENABLED? [message #190864 is a reply to message #190856] Sat, 06 August 2005 19:29 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.unknown.com

That's not what the logic example does. Obviously, you haven't looked at it
then. Set a breakpoint in ToggleGridAction#run() and step into the code.


"FreeGroup" <a.herz@FreeGroup.de> wrote in message
news:dd31vd$7pk$1@news.eclipse.org...
> Hi,
>
> Yes...
>
> I can remove the grid from my 'FormFigure'. In that case
> the grid is never displayed.
>
>
> greetings
>
> Andreas
>
> Pratik Shah wrote:
> > Have you looked at the logic example?
> >
> > "FreeGroup" <a.herz@FreeGroup.de> wrote in message
> > news:dd0ip6$3hu$1@news.eclipse.org...
> >
> >>Hi
> >>
> >>I have impemented the SnapToGrid/SnapToGeometry feature
> >>and added two enable/disable buttons in the toolbar for
> >>my GEF Editor....it works fine.
> >>
> >>I can enable/disable the <snap to ...> feature - but
> >>the grid is always visible.
> >>
> >>My top level Figure.
> >>
> >>-----------------------
> >>/**
> >> *
> >> */
> >>public class FormFigure extends LayeredPane implements ObjectFigure
> >>{
> >> /**
> >> *
> >> */
> >> public FormFigure()
> >> {
> >> FreeformLayer mainLayer=new FreeformLayer();
> >> mainLayer.setLayoutManager(new FreeformLayout());
> >>
> >> add(new GridLayer() , LayerConstants.GRID_LAYER);
> >> add(mainLayer, LayerConstants.PRIMARY_LAYER);
> >> }
> >> .
> >>.
> >>.
> >>
> >>----------------------
> >>
> >>I have had a close look in the GridLayer class. They always paint the
grid
> >>(not in relation of the state of the GRID_VISIBILTY flag)
> >>
> >>Which type of Layer should I use to be in sync with the
> >
> > PROPERTY_GRID_ENABLED
> >
> >>PROPERTY_GRID_VISIBLE flag?
> >>
> >>
> >>Greetings
> >>
> >> Andreas
> >
> >
> >
Re: Grid is allways visible - how to bee in sync with PROPERTY_GRID_ENABLED? [message #190964 is a reply to message #190864] Mon, 08 August 2005 05:33 Go to previous message
Eclipse UserFriend
Originally posted by: gautamn.iitk.ac.in

my snap to geometry not working...how can I implement this property.....
Regards,
Nitin.
Previous Topic:Drawing lines between tree items
Next Topic:Grid without ScalableFreeformRootEditPart
Goto Forum:
  


Current Time: Thu Apr 25 07:55:10 GMT 2024

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

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

Back to the top