/** Create and display the context menu */ private void displayContextMenu() { ContextMenu menu = ScilabContextMenu.createContextMenu(); ModifyAction modify = new ModifyAction(SwingScilabVariableBrowser.this); menu.add(modify.createMenuItem()); DeleteAction delete = new DeleteAction(SwingScilabVariableBrowser.this); menu.add(delete.createMenuItem()); ExportToCsvAction csvExport = new ExportToCsvAction( (SwingScilabTab) SwingScilabVariableBrowser.this, UiDataMessages.EXPORTCSV); menu.add(csvExport.createMenuItem(SwingScilabVariableBrowser.this, UiDataMessages.EXPORTCSV)); Menu menuPlot = ScilabMenu.createMenu(); menuPlot.setText(UiDataMessages.PLOTALL); menuPlot.add( PlotAction.createMenuItem( (SwingScilabTab) SwingScilabVariableBrowser.this, "plot2d", false)); menuPlot.add( PlotAction.createMenuItem( (SwingScilabTab) SwingScilabVariableBrowser.this, "Matplot", false)); menuPlot.add( PlotAction.createMenuItem( (SwingScilabTab) SwingScilabVariableBrowser.this, "grayplot", false)); menuPlot.add( PlotAction.createMenuItem( (SwingScilabTab) SwingScilabVariableBrowser.this, "Sgrayplot", false)); menuPlot.add( PlotAction.createMenuItem( (SwingScilabTab) SwingScilabVariableBrowser.this, "champ", false)); menuPlot.add( PlotAction.createMenuItem( (SwingScilabTab) SwingScilabVariableBrowser.this, "histplot", false)); menuPlot.add( PlotAction.createMenuItem( (SwingScilabTab) SwingScilabVariableBrowser.this, "mesh", false)); menuPlot.add( PlotAction.createMenuItem( (SwingScilabTab) SwingScilabVariableBrowser.this, "surf", false)); menuPlot.add( PlotAction.createMenuItem( (SwingScilabTab) SwingScilabVariableBrowser.this, "hist3d", false)); menuPlot.add( PlotAction.createMenuItem( (SwingScilabTab) SwingScilabVariableBrowser.this, "contour2d", false)); menuPlot.add( PlotAction.createMenuItem( (SwingScilabTab) SwingScilabVariableBrowser.this, "pie", false)); menu.add(menuPlot); menu.setVisible(true); ((SwingScilabContextMenu) menu.getAsSimpleContextMenu()) .setLocation( MouseInfo.getPointerInfo().getLocation().x, MouseInfo.getPointerInfo().getLocation().y); }