Time for action – using layouts
Now that the
ClockWidget has been created, multiple instances can be added into the
- Modify the
createPartControlmethod in the
ClockViewclass to create three
ClockWidgetinstances, and assign them to local variables:
final ClockWidget clock1 = new ClockWidget(parent, SWT.NONE); final ClockWidget clock2 = new ClockWidget(parent, SWT.NONE); final ClockWidget clock3 = new ClockWidget(parent, SWT.NONE);
- Run the target Eclipse instance, and show the Clock View. Three clocks will be shown, counting in seconds:
- At the start of the
createPartControlmethod, create a new
Get Eclipse Plug-in Development Beginner's Guide - Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.