forked from eclipse-windowbuilder/windowbuilder
-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[GEF] Convert PropertyTable to GEF GraphicalViewer #17
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ptziegler
force-pushed
the
gef-property-table-win
branch
6 times, most recently
from
April 30, 2024 10:34
53affba
to
f7afbdf
Compare
ptziegler
force-pushed
the
gef-property-table-win
branch
7 times, most recently
from
April 30, 2024 16:22
1234a65
to
8224d57
Compare
Handles the deprecated usage of a buffered image inside the FigureCanvas class. In GEF, painting is done exclusively inside the UpdateManager. By doing so, we break convention which has unpleasant side effects where e.g. a paint event is processed, even though the "draw cached" flag is set.
With this change, the PropertyTable extends GraphicalViewerImpl rather than Canvas. Note that the viewer doesn't use any figures yet and paints directly on the underlying FigureCanvas. Because we manage scrolling on our own, for the time being, we can't extends ScrollingGraphicalViewer.
The location and bounds of the button only needs to be updated when they have actually changed. Otherwise this causes an unnecessary UI update, which can lead to ugly flickering.
The Draw2D and SWT points share the same name. Because Draw2D is the expected type to be used in this table, the fully qualified name has to be used for the SWT points instead.
Follow-up to 64ddfe9. By using Draw2D points instead of SWT points, we don't have to use the fully qualified name.
This way the listeners don't have to be added to the widget directly but rather use the mechanism intended by GEF. Note that dragging the splitter is no longer handled by mouse movement, but rather mouse dragging. The latter is only used when the mouse button is pressed.
The methods for adding and removing ISelectionChangedListener is already implemented by the GEF viewer. No need for us to re-implement them.
Instead of painting the table directly onto the Canvas, we define edit parts and figures. Each row has its own edit part and consists of a single figure.
ptziegler
force-pushed
the
gef-property-table-win
branch
from
April 30, 2024 16:48
8224d57
to
be816b6
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
With this change, the PropertyTable extends GraphicalViewerImpl rather than Canvas. Note that the viewer doesn't use any figures yet and paints directly on the underlying FigureCanvas.
Because we manage scrolling on our own, for the time being, we can't extends ScrollingGraphicalViewer.