Search in sources :

Example 1 with LeafletTilesDescriptor

use of org.jkiss.dbeaver.ui.gis.registry.LeafletTilesDescriptor in project dbeaver by serge-rider.

the class SelectTilesAction method getMenuCreator.

@Override
public IMenuCreator getMenuCreator() {
    return new MenuCreator(control -> {
        MenuManager menuManager = new MenuManager();
        menuManager.setRemoveAllWhenShown(true);
        menuManager.addMenuListener(manager -> {
            if (valueEditor.getValueSRID() != 0) {
                for (LeafletTilesDescriptor ld : GeometryViewerRegistry.getInstance().getLeafletTiles()) {
                    menuManager.add(new SetTilesAction(valueEditor, ld));
                }
            }
        });
        return menuManager;
    });
}
Also used : MenuCreator(org.jkiss.dbeaver.ui.MenuCreator) IMenuCreator(org.eclipse.jface.action.IMenuCreator) LeafletTilesDescriptor(org.jkiss.dbeaver.ui.gis.registry.LeafletTilesDescriptor) MenuManager(org.eclipse.jface.action.MenuManager)

Aggregations

IMenuCreator (org.eclipse.jface.action.IMenuCreator)1 MenuManager (org.eclipse.jface.action.MenuManager)1 MenuCreator (org.jkiss.dbeaver.ui.MenuCreator)1 LeafletTilesDescriptor (org.jkiss.dbeaver.ui.gis.registry.LeafletTilesDescriptor)1