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

[Zest 2.0] Refactor Layouts example to Zest 2.0 API #571

Merged
merged 1 commit into from
Sep 28, 2024

Conversation

ptziegler
Copy link
Contributor

This adapts the SimpleNode, SimpleConnection and SimpleGraph classes of the example project to implement the NodeLayout, ConnectionLayout and LayoutContext interface, respectively, replacing the old Zest 1.0 interfaces.

Those classes are used by the SimpleSwingExample and SimpleSWTExample snippets to layout randomly generated graphs. Both examples have been updated to support the new layouts. Most noticeably, the nodes and connections are now exclusively stored in the layout context.

Furthermore, those classes have been cleaned up, including:

  • Removal of empty stub methods in favor of using the adapter classes for listeners. Example: SelectionListener -> SelectionAdapter
  • Layout reacts to changes to the shell/frame size.
  • Typification of generic fields.
  • Internationalization of UI-specific strings.

@ptziegler ptziegler added this to the 3.22.0 milestone Sep 27, 2024
@ptziegler
Copy link
Contributor Author

image
image

@ptziegler ptziegler force-pushed the layout-examples branch 2 times, most recently from cfd6102 to c5fdc0b Compare September 27, 2024 21:33
This adapts the SimpleNode, SimpleConnection and SimpleGraph classes of
the example project to implement the NodeLayout, ConnectionLayout and
LayoutContext interface, respectively, replacing the old Zest 1.0
interfaces.

Those classes are used by the SimpleSwingExample and SimpleSWTExample
snippets to layout randomly generated graphs. Both examples have been
updated to support the new layouts. Most noticeably, the nodes and
connections are now exclusively stored in the layout context.

Furthermore, those classes have been cleaned up, including:
- Removal of empty stub methods in favor of using the adapter classes
for listeners. Example: SelectionListener -> SelectionAdapter
- Layout reacts to changes to the shell/frame size.
- Typification of generic fields.
- Internationalization of UI-specific strings.
Copy link
Contributor

@azoitl azoitl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great as it can help our users to better understand how to use the new Zest2 api

@azoitl azoitl merged commit b324b39 into eclipse:master Sep 28, 2024
9 checks passed
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.

2 participants