This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 126515

Summary: The Align with move should also suggest center alignment
Product: platform Reporter: Trey Spiva <tspiva>
Component: GraphAssignee: Jaroslav Havlin <jhavlin>
Status: RESOLVED FIXED    
Severity: blocker CC: anebuzelsky, jkovalsky
Priority: P2 Keywords: NETFIX
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: ENHANCEMENT Exception Reporter:
Bug Depends on:    
Bug Blocks: 105060    
Attachments: Patch for visaul library AlignWith Support adding snap to center
proper diff file
Edited patch

Description Trey Spiva 2008-02-01 19:20:26 UTC
Since most edges originate from the center of a node it would be really helpful to have the align with move to also suggest a center alignment.
Comment 1 richard_woodward 2010-12-04 14:11:51 UTC
Created attachment 103592 [details]
Patch for visaul library AlignWith Support adding snap to center

This is a proposed patch to the org.netbeans.api.modules.visual.action.AlignWithSupport class, adding the ability to snap when two widgets are centrally aligned (either vertically or horizontally), see my NetBeans Visual Database Designer plugin for demonstration of result.
Comment 2 Jiri Kovalsky 2010-12-06 15:55:59 UTC
Richard, you probably attached wrong file. At least I can only open the attachment as PDF file with some workflow analysis. Can you please clarify what you meant by that? Thanks!
Comment 3 richard_woodward 2010-12-07 08:19:12 UTC
Created attachment 103656 [details]
proper diff file

Replaces the previous patch file (which was completely wrong file, my mistake).  Should provide vertical and horizontal snapping to middle.
Comment 4 Jiri Kovalsky 2010-12-07 08:52:40 UTC
Thanks Richard!

Tondo, can you please review this patch for org.netbeans.api.modules.visual.action.AlignWithSupport class yourself or reassign it to someone? Thanks!
Comment 5 Antonin Nebuzelsky 2011-12-29 14:21:14 UTC
Jardo, have a look at this one. Thanks.
Comment 6 Jaroslav Havlin 2012-01-02 14:13:40 UTC
Created attachment 114552 [details]
Edited patch

Thank you very much for your idea and your patch.

I have edited the patch slightly. The guide is now shown in the middle of the widgets - I think it is more intuitive.
What do you think?
Comment 7 Jaroslav Havlin 2012-02-02 15:15:41 UTC
core-main/rev/78cecac25235

Patch applied.
Thank you, Richard.
Comment 8 Antonin Nebuzelsky 2012-02-03 11:11:21 UTC
TM = 7.2
Comment 9 Jiri Kovalsky 2012-02-16 10:22:05 UTC
This is a community contribution. Marking with NETFIX keyword.