| Summary: | Make setting of selection width of connections public | ||
|---|---|---|---|
| Product: | [Modeling] Graphiti | Reporter: | Christian B <buschcobolt> |
| Component: | Core | Assignee: | Michael Wenz <michael.wenz> |
| Status: | CLOSED FIXED | QA Contact: | |
| Severity: | enhancement | ||
| Priority: | P3 | CC: | matthias.gorning, michael.wenz |
| Version: | 0.8.0 | Flags: | michael.wenz:
juno+
|
| Target Milestone: | 0.9.0 | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | Juno M5 Theme_round_offs | ||
The selection width is not only relevant for connections but also for shapes being represented as line (e.g. Polyline); clients may want to influence the selection width for those objects as well. ISelectionInfo and the according method targets something a little different than what we have here: it is called _after_ the selection has taken place. I have added a method getLineSelectionWidth(Polyline polyline) to the tool behavior provider that is called the when the line shape is drawn (on creation of a new Polyline or on opening the diagram), where clients can return an individual selection width. Default return value is 5 as before. Checked-in to head and pushed to Eclipse: commit 30ef7ca66f8b1751bdbeeacd4b700477ea2c4c74 Author: mwenz <michael.wenz@sap.com> 2011-12-30 15:36:48 Committer: mwenz <michael.wenz@sap.com> 2011-12-30 15:36:48 Parent: a4dc363edfbadb61ea8897069fe9683ab3af0289 (Bug 324556 - Hide Shapes - enable simple collapse/expand by preventing an IllegalStateException when trying to select an invisible shape) Branches: origin/master, master Bookkeeping: Set target release Part of Graphiti 0.9.0 (Eclipse Juno) |
Build Identifier: The minimum selection width is set to 5 per default in org.eclipse.graphiti.ui.internal.figures.GFPolyline. There is a public setter for this attribute: /** * Sets the selection tolerance. This is the minimum line-width, which is * still considered to be a selection of the polyline, independent from the * real line-width. For a small line-width this makes it easier to select * the polyline. * * @param minimumSelectionLineWidth * The new minimum selection line-width to set. */ public void setMinimumSelectionLineWidth(int minimumSelectionLineWidth) { this.minimumSelectionLineWidth = minimumSelectionLineWidth; } This setter is never used. The minimum selection width should be settable by the user in the OTXToolBehaviourProvider. This should either be in a separate method (all connections have the same settable minimum selection width) or it could be included to the method "public ISelectionInfo getSelectionInfoForConnection(Connection connection)". The minimum selection width could be added to SelectionInfoImpl, then connections could have different minum selection widths. This is the forum thread, where this this topic arised: http://www.eclipse.org/forums/index.php/t/242502/ Reproducible: Always