

![]() | Start a set with this search |
![]() | Include this search in one of my sets |
![]() | Exclude this search from one of my sets |
![]() | Permalink to these results Paste this link in email or IM: |
| Atom feed for tracking future search results Paste this URL into your reader: |
8 messages in org.netbeans.graph.usersRe: Grid with Dots| From | Sent On | Attachments |
|---|---|---|
| Chris Palmer | May 20, 2007 4:29 pm | |
| David Kaspar | May 20, 2007 9:54 pm | |
| Chris Palmer | May 21, 2007 5:12 am | |
| David Kaspar | May 21, 2007 8:14 am | |
| Chris Palmer | May 22, 2007 5:43 am | |
| Joelle Lam | May 22, 2007 11:36 am | |
| Chris Palmer | May 27, 2007 9:52 pm | |
| David Kaspar | May 28, 2007 8:07 am |

![]() | Permalink for this message Paste this link in email or IM: |
![]() | Permalink for this thread Paste this link in email or IM: |
| Atom feed for this thread Paste this URL into your reader: |
| Subject: | Re: Grid with Dots | Actions... |
|---|---|---|
| From: | Chris Palmer (cpal...@kcctech.com.au) | |
| Date: | May 21, 2007 5:12:08 am | |
| List: | org.netbeans.graph.users | |
Hi David!
All this helps a lot thank you! Besides the move strategies outlined. Visually drawing the dots on the scene is quite important as well. I was wondering if there was an example or if I should look at the visual web pack code.....
Chris
David Kaspar wrote:
Hi Chris,
It really depends on what exactly should be the behaviour of "grid-with-dots" functionality.
1) If you want to have widgets to align to a grid during their movement then: a) use a MoveAction created with your own MoveStrategy where you calculate with your grid-size. For example see: graph/lib/src/org/netbeans/modules/visual/action/SnapToGridMoveStrategy.java
2) If you want Widgets to be instantly aligned to a grid, then you should implement an Layout interface and assign it to the scene or layer widget. This makes the children Widgets to be alligned instantly.
3) If you want to allow users to move Widgets on a scene freely within a grid then: a) implement the 1. case, b) when you add a new Widget to a scene, check/calculate correct preferred location of the new Widget based on the grid-size, c) when an user changes the grid height or width, then change/recalculate new correct preferred locations of all Widgets.
Regards, David
Chris Palmer wrote:
Hello!
I would like to implement a simple Grid Layout where the user can change the width and height of the grid and the widgets could snap to this grid. So a grid 60 X 60 would reflect 60 little grid boxes.
Would the visual web pack be the best example to look at?
Chris







