Java Code Examples for docking.action.DockingAction#setToolBarData()
The following examples show how to use
docking.action.DockingAction#setToolBarData() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: DiffDetailsProvider.java From ghidra with Apache License 2.0 | 6 votes |
public void addActions() { DockingAction refreshDetailsAction = new DockingAction("Refresh Diff Details", plugin.getName()) { @Override public void actionPerformed(ActionContext context) { refreshDetails(plugin.getCurrentLocation()); } }; refreshDetailsAction.setDescription( "Refresh the details to show any differences at the current location."); refreshDetailsAction.setEnabled(true); refreshDetailsAction.setToolBarData(new ToolBarData(REFRESH_ICON, "Diff")); refreshDetailsAction.setHelpLocation( new HelpLocation(HelpTopics.DIFF, "Refresh Diff Details")); plugin.getTool().addLocalAction(this, refreshDetailsAction); // plugin.getTool().addLocalAction(this, new DiffIgnoreAllAction(this)); }
Example 2
Source File: InterpreterComponentProvider.java From ghidra with Apache License 2.0 | 6 votes |
/** * Overridden so that we can add our custom actions for transient tools. */ @Override public void setTransient() { DockingAction disposeAction = new DockingAction("Remove Interpreter", getName()) { @Override public void actionPerformed(ActionContext context) { int choice = OptionDialog.showYesNoDialog(panel, "Remove Interpreter?", "Are you sure you want to permanently close the interpreter?"); if (choice == OptionDialog.NO_OPTION) { return; } InterpreterComponentProvider.this.dispose(); } }; disposeAction.setDescription("Remove interpreter from tool"); disposeAction.setToolBarData(new ToolBarData(Icons.STOP_ICON, null)); disposeAction.setEnabled(true); addLocalAction(disposeAction); }
Example 3
Source File: GhidraX64DbgPlugin.java From GhidraX64Dbg with MIT License | 5 votes |
private void createActions() { action = new DockingAction("My Action", getName()) { @Override public void actionPerformed(ActionContext context) { Msg.showInfo(getClass(), panel, "Custom Action", "Hello!"); } }; action.setToolBarData(new ToolBarData(Icons.ADD_ICON, null)); action.setEnabled(true); action.markHelpUnnecessary(); dockingTool.addLocalAction(this, action); }
Example 4
Source File: EventDisplayComponentProvider.java From ghidra with Apache License 2.0 | 5 votes |
private void createAction() { clearAction = new DockingAction("Clear Display", getName()) { @Override public void actionPerformed(ActionContext context) { clear(); } }; clearAction.markHelpUnnecessary(); clearAction.setEnabled(true); ImageIcon icon = ResourceManager.loadImage("images/erase16.png"); clearAction.setToolBarData(new ToolBarData(icon)); addLocalAction(clearAction); }
Example 5
Source File: DomainEventComponentProvider.java From ghidra with Apache License 2.0 | 5 votes |
private void createAction() { clearAction = new DockingAction("Clear Display", getName()) { @Override public void actionPerformed(ActionContext context) { clear(); } }; clearAction.markHelpUnnecessary(); clearAction.setEnabled(true); ImageIcon icon = ResourceManager.loadImage("images/erase16.png"); clearAction.setToolBarData(new ToolBarData(icon)); addLocalAction(clearAction); }
Example 6
Source File: DbViewerPlugin.java From ghidra with Apache License 2.0 | 5 votes |
private void setupActions() { refreshAction = new DockingAction("Refresh", getName()) { @Override public void actionPerformed(ActionContext context) { if (viewer != null) { viewer.refresh(); } } }; refreshAction.setEnabled(false); ImageIcon icon = Icons.REFRESH_ICON; refreshAction.setToolBarData(new ToolBarData(icon)); }
Example 7
Source File: DomainFolderChangesDisplayComponentProvider.java From ghidra with Apache License 2.0 | 5 votes |
private void createAction() { clearAction = new DockingAction("Clear Display", getName()) { @Override public void actionPerformed(ActionContext context) { clear(); } }; clearAction.setEnabled(true); ImageIcon icon = ResourceManager.loadImage("images/erase16.png"); clearAction.setToolBarData(new ToolBarData(icon)); addLocalAction(clearAction); }
Example 8
Source File: InterpreterComponentProvider.java From ghidra with Apache License 2.0 | 5 votes |
private void createActions() { DockingAction clearAction = new DockingAction("Clear Interpreter", getName()) { @Override public void actionPerformed(ActionContext context) { clear(); } }; clearAction.setDescription("Clear Interpreter"); clearAction.setToolBarData(new ToolBarData(ResourceManager.loadImage(CLEAR_GIF), null)); clearAction.setEnabled(true); addLocalAction(clearAction); }
Example 9
Source File: ShowInfoComponentProvider.java From ghidra with Apache License 2.0 | 5 votes |
private void createActions() { clearAction = new DockingAction("Clear Text Area", getName()) { @Override public void actionPerformed(ActionContext context) { textArea.setText(""); } }; clearAction.setToolBarData(new ToolBarData(CLEAR_ICON, null)); clearAction.setEnabled(true); tool.addLocalAction(this, clearAction); }
Example 10
Source File: SampleGraphPlugin.java From ghidra with Apache License 2.0 | 5 votes |
private void createActions() { DockingAction showProviderAction = new DockingAction(SHOW_PROVIDER_ACTION_NAME, getName()) { @Override public void actionPerformed(ActionContext context) { showProvider(); } }; ImageIcon icon = ResourceManager.loadImage("images/applications-development.png"); showProviderAction.setToolBarData(new ToolBarData(icon, "View")); showProviderAction.setHelpLocation(DEFAULT_HELP); tool.addAction(showProviderAction); }
Example 11
Source File: SkeletonPlugin.java From ghidra with Apache License 2.0 | 5 votes |
private void createActions() { action = new DockingAction("My Action", getName()) { @Override public void actionPerformed(ActionContext context) { Msg.showInfo(getClass(), panel, "Custom Action", "Hello!"); } }; action.setToolBarData(new ToolBarData(Icons.ADD_ICON, null)); action.setEnabled(true); action.markHelpUnnecessary(); dockingTool.addLocalAction(this, action); }