/** * Initializes the plugin. * * @param info Context information about the plugin. */ public ElevationProfilePlugin(PluginInformation info) { super(info); createColorMaps(); // TODO: Disable this view as long as it is not stable MainMenu.add(Main.main.menu.imagerySubMenu, new AddElevationLayerAction(), false, 0); }
public ReverterPlugin(PluginInformation info) { super(info); JMenu historyMenu = Main.main.menu.addMenu( marktr("History"), KeyEvent.VK_S, Main.main.menu.defaultMenuPos, ht("/Plugin/Reverter")); // MainMenu.add(historyMenu, new ObjectsHistoryAction()); MainMenu.add(historyMenu, new RevertChangesetAction()); UploadAction.registerUploadHook(new ReverterUploadHook(this)); }
public DownloadPlugin(PluginInformation info) { super(info); // Create a new executor to run our downloads in int max_threads = Main.pref.getInteger("plugin.continuos_download.max_threads", 2); worker = new ThreadPoolExecutor( 1, max_threads, 1, TimeUnit.SECONDS, new LinkedBlockingQueue<Runnable>()); active = Main.pref.getBoolean("plugin.continuos_download.active_default", true); strats = new HashMap<String, DownloadStrategy>(); registerStrat(new SimpleStrategy()); registerStrat(new BoxStrategy()); timer = new Timer(); NavigatableComponent.addZoomChangeListener(this); MainMenu.add(Main.main.menu.fileMenu, new ToggleAction()); }
@Override public void setVisible(boolean visible) { if (visible) { new WindowGeometry( getClass().getName() + ".geometry", WindowGeometry.centerInWindow(getParent(), new Dimension(600, 400))) .applySafe(this); } else if (isShowing()) { // Avoid IllegalComponentStateException like in #8775 new WindowGeometry(this).remember(getClass().getName() + ".geometry"); } if (windowMenuItem != null && !visible) { Main.main.menu.windowMenu.remove(windowMenuItem); windowMenuItem = null; } if (windowMenuItem == null && visible) { windowMenuItem = MainMenu.add(Main.main.menu.windowMenu, focusAction, MainMenu.WINDOW_MENU_GROUP.VOLATILE); } super.setVisible(visible); }
public LakewalkerPlugin(PluginInformation info) { super(info); MainMenu.add(Main.main.menu.moreToolsMenu, new LakewalkerAction(tr("Lake Walker"))); }
public Smed2(PluginInformation info) { super(info); MainMenu.add(Main.main.menu.toolsMenu, new Smed2Action()); }
public UtilsPlugin2(PluginInformation info) { super(info); JMenu toolsMenu = Main.main.menu.moreToolsMenu; JMenu dataMenu = Main.main.menu.dataMenu; JMenu selectionMenu = Main.main.menu.selectionMenu; addIntersections = MainMenu.add(toolsMenu, new AddIntersectionsAction()); splitObject = MainMenu.add(toolsMenu, new SplitObjectAction()); alignWayNodes = MainMenu.add(toolsMenu, new AlignWayNodesAction()); symmetry = MainMenu.add(toolsMenu, new SymmetryAction()); splitOnIntersections = MainMenu.add(toolsMenu, new SplitOnIntersectionsAction()); unglueRelation = MainMenu.add(toolsMenu, new UnGlueRelationAction()); toolsMenu.addSeparator(); replaceGeometry = MainMenu.add(toolsMenu, new ReplaceGeometryAction()); extractPoint = MainMenu.add(toolsMenu, new ExtractPointAction()); tagBuffer = MainMenu.add(toolsMenu, new TagBufferAction()); sourceTag = MainMenu.add(toolsMenu, new TagSourceAction()); pasteRelations = MainMenu.add(toolsMenu, new PasteRelationsAction()); wiki = MainMenu.add(dataMenu, new OpenPageAction()); latlon = MainMenu.add(toolsMenu, new LatLonAction()); drawArc = MainMenu.add(toolsMenu, new CurveAction()); selectionMenu.addSeparator(); selectWayNodes = MainMenu.add(selectionMenu, new SelectWayNodesAction()); adjNodes = MainMenu.add(selectionMenu, new AdjacentNodesAction()); unsNodes = MainMenu.add(selectionMenu, new UnselectNodesAction()); midNodes = MainMenu.add(selectionMenu, new MiddleNodesAction()); adjWays = MainMenu.add(selectionMenu, new AdjacentWaysAction()); adjWaysAll = MainMenu.add(selectionMenu, new ConnectedWaysAction()); intWays = MainMenu.add(selectionMenu, new IntersectedWaysAction()); intWaysR = MainMenu.add(selectionMenu, new IntersectedWaysRecursiveAction()); allInside = MainMenu.add(selectionMenu, new SelectAllInsideAction()); selModifiedNodes = MainMenu.add(selectionMenu, new SelectModNodesAction()); selModifiedWays = MainMenu.add(selectionMenu, new SelectModWaysAction()); undoSelection = MainMenu.add(selectionMenu, new UndoSelectionAction()); selectHighway = MainMenu.add(selectionMenu, new SelectHighwayAction()); selectAreaBoundary = MainMenu.add(selectionMenu, new SelectBoundaryAction()); selectURL = MainMenu.add(dataMenu, new ChooseURLAction()); // register search operators SearchCompiler.addMatchFactory(new UtilsUnaryMatchFactory()); }