Skip to content
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
wants to merge 9 commits into from

Conversation

ptziegler
Copy link
Owner

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.

@ptziegler ptziegler force-pushed the gef-property-table-win branch 6 times, most recently from 53affba to f7afbdf Compare April 30, 2024 10:34
Copy link

github-actions bot commented Apr 30, 2024

Unit Test Results

         4 files           4 suites   1h 21m 40s ⏱️
  7 076 tests   6 887 ✔️ 189 💤 0
28 304 runs  27 544 ✔️ 760 💤 0

Results for commit be816b6.

♻️ This comment has been updated with latest results.

@ptziegler ptziegler force-pushed the gef-property-table-win branch 7 times, most recently from 1234a65 to 8224d57 Compare April 30, 2024 16:22
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 ptziegler closed this May 11, 2024
@ptziegler ptziegler deleted the gef-property-table-win branch May 11, 2024 20:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant