Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [ve-dev] Is there someplace to store orphan constraints?





So, the scenario is that a design-time user may freely switch focus in VE between all valid visual components, including multiple JPanels, each with a FormLayout  and each having an associated List of not-yet-used constraint objects.  I have no problem figuring out if the currently selected JPanel has a FormLayout.  Just need to fetch back the right List at component drop-time.

--- Another place to store the data is in the LayoutEditpolicy, if you created one, for the Formlayout on the JPanel. That is what we do for swt Gridlayout. We store it  with there. I presume you have an LayoutEditPolicy, otherwise graphically dropping components on the JPanel would be hard. They could only be dropped and added at a default location (i.e. with no constraint) if you weren't using an LayoutEditPolicy. The LayoutEditPolicy is around as long as the EditPart for the JPanel is active, and as long as the JPanel has a FormLayout. As soon as it no longer has a FormLayout the LayoutEditPolicy will be deactivated and thrown away.

Thanks,
Gerald


----
Gerald B. Rosenberg
Certiv Analytics

www.certiv.net_______________________________________________
ve-dev mailing list
ve-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/ve-dev


Back to the top