//endregion
//region Layer ComboBox
cvLayers = new ComboViewer(composite, SWT.READ_ONLY);
cvLayers.setContentProvider(new ArrayContentProvider());
cvLayers.setLabelProvider(new LabelProvider() {
@Override
public String getText(Object element) {
if (element instanceof ILayer) {
return ((ILayer) element).getName();
} else {
return super.getText(element);
}
}
});
cvLayers.addSelectionChangedListener(new ISelectionChangedListener() {
public void selectionChanged( SelectionChangedEvent event ) {
updateZoomLevels();
updateGUIFromScale();
}
});
//endregion
//region Label "Zoom-Level"
Label lblZoomLevel = new Label (composite, SWT.HORIZONTAL);
lblZoomLevel.setText(Messages.ZoomLevelSwitcher_ZoomLevel);
//endregion
//region Zoom-Level ComboBox
cvZoomLevels = new ComboViewer(composite, SWT.READ_ONLY);
cvZoomLevels.setContentProvider(new ArrayContentProvider());
cvZoomLevels.setLabelProvider(new LabelProvider());
//endregion
//region Zoom-In/Zoom-Out Buttons
// load icons