Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Grids in Canvas!!!!
Grids in Canvas!!!! [message #188955] Mon, 25 July 2005 06:52 Go to next message
Eclipse UserFriend
Originally posted by: gautamn.iitk.ac.in

Hi,
I want to have a option for canvas with ShowGrid/ HideGrid. what should
I do???
Regards,
Nitin.
Re: Grids in Canvas!!!! [message #188980 is a reply to message #188955] Mon, 25 July 2005 12:44 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: gslade.no.spam.us.ibm.com

Create and Action!!!! that shows or hides the grid and give the user
access to the action through a menu option or a smart button in the
button bar


Nitin Gautam wrote:
>
> Hi,
> I want to have a option for canvas with ShowGrid/ HideGrid. what should
> I do???
> Regards,
> Nitin.
>
Re: Grids in Canvas!!!! [message #188994 is a reply to message #188955] Mon, 25 July 2005 13:45 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

See the logic example.

"Nitin Gautam" <gautamn@iitk.ac.in> wrote in message
news:e0624f860622bac4c1df1f7d3d6967d8$1@www.eclipse.org...
>
> Hi,
> I want to have a option for canvas with ShowGrid/ HideGrid. what should I
> do???
> Regards,
> Nitin.
>
Re: Grids in Canvas!!!! [message #189418 is a reply to message #188994] Wed, 27 July 2005 09:23 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: gautamn.iitk.ac.in

I have made the following changes code:
1.IActions in configuregraphical viewer.
2.Build Actions
3.Contribute to Menu
4.save & load properties.
but i am unable to see any grid.
from the logic example i am not able to configure which are necessary
parts of code for grid availability.Kindly help me.
Regards,
Nitin.
Re: Grids in Canvas!!!! [message #189536 is a reply to message #189418] Wed, 27 July 2005 17:17 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.unknown.com

If you don't see the grid, it could be because one of your layers above the
grid layer is opaque or something. If you can't snap to the grid, it could
be because your editpart is not returning SnapToGrid helper from its
getAdapter() method. I believe the steps to create the grid have been
discussed on this newsgroup before, so just search for it. Post again if
you're still having problems.

"Nitin Gautam" <gautamn@iitk.ac.in> wrote in message
news:f3f2adc2a95550ddad7ac2e94bdfb23c$1@www.eclipse.org...
>
> I have made the following changes code:
> 1.IActions in configuregraphical viewer.
> 2.Build Actions
> 3.Contribute to Menu
> 4.save & load properties.
> but i am unable to see any grid.
> from the logic example i am not able to configure which are necessary
> parts of code for grid availability.Kindly help me.
> Regards,
> Nitin.
>
>
>
Re: Grids in Canvas!!!! [message #189653 is a reply to message #189536] Thu, 28 July 2005 07:44 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: gautamn.iitk.ac.in

I do not know how to find the layers above grid layer, and how to set
them opaque. I am confused if I missed something. I searched the mails in
the newsgroup but it didn't help me. Plz suggest something or provide some
steps.
Regards,
Nitin.
Re: Grids in Canvas!!!! [message #189676 is a reply to message #189653] Thu, 28 July 2005 11:26 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: gautamn.iitk.ac.in

I have tested my program with the following code in contributeToToolBar

toolBarManager.add(getAction(GEFActionConstants.TOGGLE_GRID_ VISIBILITY));

Selecting/ unselecting the button is not showing the grid. Moreover it
also not worked with blank canvas (i think that no layers are there in a
blank canvas, so no question of opaque).

Kindly help...
Regards,
Nitin.
Re: Grids in Canvas!!!! [message #190052 is a reply to message #189653] Mon, 01 August 2005 19:07 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.unknown.com

The layers above the gird layer need to be transparent, not opaque, for the
grid to be visible. And by default, they are. You just need to make sure
you're not setting anything to opaque. Any opaque figures will also cover
up parts of the grid.

Are your EditParts returning SnapToGrid from their getAdapter() method? Is
the snapping happening when you drag your editparts around (it can happen
even if the grid is not visible)?

"Nitin Gautam" <gautamn@iitk.ac.in> wrote in message
news:285483fe8c2d7a47432260fc019f6998$1@www.eclipse.org...
>
> I do not know how to find the layers above grid layer, and how to set
> them opaque. I am confused if I missed something. I searched the mails in
> the newsgroup but it didn't help me. Plz suggest something or provide some
> steps.
> Regards,
> Nitin.
>
Re: Grids in Canvas!!!! [message #190289 is a reply to message #190052] Wed, 03 August 2005 07:11 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: gautamn.iitk.ac.in

Now I am able to see the grid but Snap to geometry code not working...I
have added Adapter code in my DiagramEditor part.Plz give some suggestions.
Regards,
Nitin Gautam.
Re: Grids in Canvas!!!! [message #190384 is a reply to message #190289] Wed, 03 August 2005 17:59 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.unknown.com

So, why was the grid not visible earlier?

SnapToGeometry is not the same as SnapToGrid.

"Nitin Gautam" <gautamn@iitk.ac.in> wrote in message
news:f87116b52bf59159d75908409de0e8f7$1@www.eclipse.org...
>
>
> Now I am able to see the grid but Snap to geometry code not working...I
> have added Adapter code in my DiagramEditor part.Plz give some
suggestions.
> Regards,
> Nitin Gautam.
>
>
Re: Grids in Canvas!!!! [message #190475 is a reply to message #190384] Thu, 04 August 2005 05:03 Go to previous message
Eclipse UserFriend
Originally posted by: gautamn.iitk.ac.in

the problem was in layering...I had set setOpaque to be true, in my
DiagramEditPart.
Regards,
Nitin.
Previous Topic:ShortestPathConnectionRouter overlaying connections
Next Topic:How to make PolylineConnection line look smoother
Goto Forum:
  


Current Time: Fri Dec 27 02:10:13 GMT 2024

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

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

Back to the top