Class AbstractScreenShotGenerator
- java.lang.Object
-
- generic.test.AbstractGTest
-
- generic.test.AbstractGenericTest
-
- docking.test.AbstractDockingTest
-
- ghidra.test.AbstractGhidraHeadlessIntegrationTest
-
- ghidra.test.AbstractGhidraHeadedIntegrationTest
-
- help.screenshot.AbstractScreenShotGenerator
-
- Direct Known Subclasses:
GhidraScreenShotGenerator
,TutorialScreenShotGenerator
public abstract class AbstractScreenShotGenerator extends AbstractGhidraHeadedIntegrationTest
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class generic.test.AbstractGenericTest
AbstractGenericTest.ExceptionHandlingRunner
-
-
Field Summary
Fields Modifier and Type Field Description protected static java.lang.String
DEFAULT_FILENAME_SUFFIX
protected static int
DIALOG_HEADER_HEIGHT
TestEnv
env
java.awt.Image
image
protected static java.lang.String
NEW_FILENAME_SUFFIX
protected static java.lang.String
NEW_FILENAME_SUFFIX_KEY
Program
program
protected static boolean
SAVE_CREATED_IMAGE_FILE
protected static java.lang.String
SAVE_CREATED_IMAGE_FILE_KEY
PluginTool
tool
-
Fields inherited from class ghidra.test.AbstractGhidraHeadlessIntegrationTest
PROJECT_NAME
-
Fields inherited from class generic.test.AbstractGenericTest
concurrentTestExceptionRule, DEFAULT_TEST_TOOL_NAME, DEFAULT_TOOL_NAME, ruleChain, TESTDATA_DIRECTORY_NAME, watchman
-
Fields inherited from class generic.test.AbstractGTest
BATCH_MODE, DEFAULT_WAIT_DELAY, DEFAULT_WAIT_TIMEOUT, DEFAULT_WINDOW_TIMEOUT, PARALLEL_MODE, PRIVATE_LONG_WAIT_TIMEOUT, testName
-
-
Constructor Summary
Constructors Constructor Description AbstractScreenShotGenerator()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description Address
addr(long value)
Address
address(long value)
Deprecated.useaddr(long)
insteadvoid
addSelection(long start, long end)
java.awt.Image
captureComponent(java.awt.Component component)
void
captureComponents(java.util.List<java.awt.Component> comps)
void
captureDialog()
void
captureDialog(int width, int height)
void
captureDialog(DialogComponentProvider provider)
void
captureDialog(java.awt.Dialog dialog)
void
captureDialog(java.awt.Dialog dialog, int width, int height)
void
captureDialog(java.lang.Class<? extends DialogComponentProvider> clazz)
void
captureDialog(java.lang.Class<? extends DialogComponentProvider> clazz, int width, int height)
void
captureDialog(java.lang.String title)
void
captureIsolatedComponent(javax.swing.JComponent component, int width, int height)
void
captureIsolatedProvider(ComponentProvider provider, int width, int height)
void
captureIsolatedProvider(java.lang.Class<? extends ComponentProvider> clazz, int width, int height)
void
captureIsolatedProviderWindow(java.lang.Class<? extends ComponentProvider> clazz, int width, int height)
The same ascaptureIsolatedProvider(Class, int, int)
except this method will also capture the containing window.void
captureListingField(long address, java.lang.String fieldName, int padding)
void
captureListingRange(long start, long end, int width)
void
captureMenu()
void
captureMenuBarMenu(java.lang.String menuName, java.lang.String... subMenuNames)
void
captureMenuBarMenuHierachy(java.lang.String menuName, java.lang.String... subMenuNames)
void
captureProvider(ComponentProvider provider)
void
captureProvider(java.lang.Class<? extends ComponentProvider> clazz)
void
captureProvider(java.lang.String name)
void
captureProviderWindow(ComponentProvider provider)
Captures the window, including decorations.void
captureProviderWindow(ComponentProvider provider, int width, int height)
Captures the window, including decorations.void
captureProviderWindow(java.lang.Class<? extends ComponentProvider> clazz)
Captures the window, including decorations.void
captureProviderWindow(java.lang.String name)
Captures the window, including decorations.void
captureProviderWindow(java.lang.String name, int width, int height)
Captures the window, including decorations.void
captureProviderWithScreenShot(ComponentProvider provider)
Captures the provider by using a screen shot and not by painting the provider directly (as doescaptureProvider(ComponentProvider)
).void
captureToolWindow(int width, int height)
void
captureWindow()
void
captureWindow(java.awt.Window window)
void
captureWindow(java.awt.Window window, int width, int height)
void
closeNonProgramArchives()
void
closeProvider(java.lang.Class<? extends ComponentProvider> clazz)
void
createBookmark(long address)
java.awt.image.BufferedImage
createEmptyImage(int width, int height)
java.awt.Image
crop(java.awt.Rectangle bounds)
void
doubleClickCursor()
void
drawArrow(java.awt.Color c, int thickness, java.awt.Point start, java.awt.Point end, int arrowSize)
void
drawArrow(java.awt.Color c, java.awt.Point start, java.awt.Point end)
void
drawBorder(java.awt.Color c)
void
drawLine(java.awt.Color c, int thickness, java.awt.Point start, java.awt.Point end)
void
drawOval(java.awt.Color c, java.awt.Rectangle rect, int thickness)
void
drawRectangle(java.awt.Color c, java.awt.Rectangle rect, int thickness)
java.awt.Rectangle
drawRectangle(java.awt.Color c, java.awt.Rectangle r, int padding, int thickness)
java.awt.Rectangle
drawRectangleAround(javax.swing.JComponent component, java.awt.Color color, int padding)
java.awt.Rectangle
drawRectangleAround(javax.swing.JComponent component, javax.swing.JComponent root, java.awt.Color color, int padding)
Draws a rectangle around the given component.void
drawRectangleWithDropShadowAround(javax.swing.JComponent component, java.awt.Color color, int padding)
void
drawText(java.lang.String text, java.awt.Color color, java.awt.Point start, float size)
void
drawText(java.lang.String text, java.awt.Color color, java.awt.Point start, java.awt.Font font)
void
error(java.lang.Exception e)
void
exit()
void
fillRectangle(java.awt.Color c, java.awt.Rectangle rect)
<T extends javax.swing.JComponent>
TfindChildWithType(java.awt.Container node, java.lang.Class<T> cls, java.util.function.Predicate<T> pred)
<T extends javax.swing.JComponent>
TfindComponent(java.lang.Class<T> cls, java.util.function.Predicate<T> pred)
javax.swing.JButton
findProviderToolBarButton(ComponentProvider provider, java.lang.String actionName)
int
findRowByPartialText(javax.swing.JTable table, java.lang.String searchString)
void
generateImage(java.awt.Component c)
java.awt.Rectangle
getBounds(javax.swing.JComponent component)
java.awt.Rectangle
getCursorBounds()
DialogComponentProvider
getDialog()
DialogComponentProvider
getDialog(java.lang.Class<? extends DialogComponentProvider> clazz)
DockableComponent
getDockableComponent(ComponentProvider provider)
DockableComponent
getDockableComponent(java.lang.Class<? extends ComponentProvider> clazz)
Field
getField(java.awt.Point point)
javax.swing.JPopupMenu
getPopupMenu()
<T extends ComponentProvider>
TgetProvider(java.lang.Class<T> clazz)
ComponentProvider
getProvider(java.lang.String name)
void
go(long address)
void
goToListing(long address)
void
goToListing(long address, boolean scrollToMiddle)
void
goToListing(long address, java.lang.String fieldName, boolean scrollToMiddle)
void
hideTableColumn(GTable table, java.lang.String columnName)
void
leftClickCursor()
Plugin
loadPlugin(java.lang.Class<? extends Plugin> clazz)
Plugin
loadPlugin(java.lang.String className)
void
loadProgram()
Program
loadProgram(java.lang.String programName)
void
makeSelection(long start, long end)
void
makeSelection(AddressSet addrSet)
void
middleClickCursor()
void
moveProvider(ComponentProvider movee, ComponentProvider relativeTo, WindowPosition position)
void
moveProviderToFront(ComponentProvider provider)
void
moveProviderToFront(ComponentProvider provider, int width, int height)
java.awt.Window
moveProviderToItsOwnWindow(ComponentProvider provider)
java.awt.Window
moveProviderToItsOwnWindow(ComponentProvider provider, int width, int height)
void
moveWindowUp(java.awt.Window window, int yOffset)
java.awt.Image
padImage(java.awt.Color c, int top, int left, int right, int bottom)
protected void
paintFix(java.awt.Window window)
void
performAction(java.lang.String actionName, java.lang.String owner, boolean wait)
void
performAction(java.lang.String actionName, java.lang.String owner, ComponentProvider contextProvider, boolean wait)
void
performDialogAction(java.lang.String actionName, boolean wait)
void
performMemorySearch(java.lang.String searchString)
java.awt.Image
placeImagesSideBySide(java.awt.Image left, java.awt.Image right)
void
positionCursor(long address)
void
positionCursor(long address, java.lang.String fieldName)
void
positionListingCenter(long address)
void
positionListingTop(long address)
void
prepareCommentsDialog(ghidra.app.plugin.core.comments.CommentsDialog dialog, java.lang.String annotationText)
void
prepareTool()
void
pressButtonOnDialog(java.lang.String buttonText)
void
pressOkOnDialog()
protected java.awt.image.BufferedImage
readImage(java.io.File imageFile)
void
removeField(java.lang.String fieldName)
void
removeFlowArrows()
void
rightClickCursor()
void
scrollToRow(javax.swing.JTable table, int row)
void
selectRow(javax.swing.JTable table, int rowIndex)
void
selectRow(javax.swing.JTable table, java.lang.String searchString)
void
setDividerPercentage(java.lang.Class<? extends ComponentProvider> provider1, java.lang.Class<? extends ComponentProvider> provider2, float percentage)
protected void
setDockIcon()
void
setListingFieldWidth(java.lang.String fieldName, int width)
void
setSelected(javax.swing.JToggleButton button, boolean select)
void
setSelectedAnayzer(java.lang.Object analysisPanel, java.lang.String analyzerName)
void
setToolSize(int width, int height)
void
setUp()
void
setUser(java.lang.String userName)
void
setWindowSize(java.awt.Window window, int width, int height)
void
showAnalysisOptions(java.lang.String selectedAnalyzerName)
void
showColumnSettings(GTable table, java.lang.String colName)
void
showCommentDialog(java.lang.String text)
java.util.List<java.awt.Component>
showMenuBarMenu(java.lang.String menuName, java.lang.String... submenuNames)
void
showOptions(java.lang.String optionsCategoryName)
void
showProgramOptions(java.lang.String optionsCategoryName)
<T extends ComponentProvider>
TshowProvider(java.lang.Class<T> clazz)
java.awt.Component
showTab(java.lang.String title)
void
showTableColumn(GTable table, java.lang.String columnName)
java.awt.Image
takeSnippet(java.awt.Rectangle bounds)
Crops a part of the current image, keeping what is inside the given bounds.void
tearDown()
void
topOfListing(long address)
Deprecated.protected void
writeFile(java.io.File imageFile)
-
Methods inherited from class ghidra.test.AbstractGhidraHeadedIntegrationTest
addPlugin, click, click, click, createApplicationConfiguration, createApplicationLayout, getAction, getPluginByName, saveTool, showDialogWithoutBlocking, showTool, waitForBusyTool, waitForProgram
-
Methods inherited from class ghidra.test.AbstractGhidraHeadlessIntegrationTest
applyCmd, createDefaultProgram, createDefaultProgram, createInProgram, debugProgramInTool, deleteProject, getLanguageCompilerSpecPair, getLanguageService, getPlugin, getSLEIGH_8051_LANGUAGE, getSLEIGH_X86_64_LANGUAGE, getSLEIGH_X86_LANGUAGE, getUniqueSymbol, getUniqueSymbol, getZ80_LANGUAGE, goTo, goTo, initializeSystemProperties, makeSelection, makeSelection, makeSelection, makeSelection, makeSelection, modifyProgram, redo, redo, redo, replaceService, toAddressSet, toAddressSet, toAddressSet, tx, undo, undo, undo, waitForScriptCompletion
-
Methods inherited from class docking.test.AbstractDockingTest
assertEnabled, assertToggleButtonSelected, capture, checkMessageDisplay, clickComponentProvider, clickComponentProvider, close, close, closeAllWindows, closeAllWindows, closeAllWindowsAndFrames, closeProvider, closeSaveChangesDialog, createContext, createContext, createRenderedImage, createScreenImage, disposeErrorGUI, dockingSetUp, dockingTearDown, expandPath, expandTree, findButtonByActionName, findButtonByIcon, findButtonByText, findComponent, findComponentByName, getAction, getAction, getAction, getActionsByName, getActionsByOwner, getActionsByOwnerAndName, getClipboardText, getComponentProvider, getDialogComponent, getDialogComponentProvider, getDockableComponent, getLocalAction, getNode, getOpenWindowsAsString, getStatusText, getTitleForWindow, getWindow, getWindowByTitle, getWindowByTitleContaining, getWindows, isEnabled, isEnabled, isSelected, isUseErrorGUI, performAction, performAction, performAction, performAction, performDialogAction, pressButtonByText, pressButtonByText, printOpenWindows, selectPath, selectTabIfAvailable, setErrorGUIEnabled, setErrorsExpected, setToggleActionSelected, setToggleActionSelected, setToggleButtonSelected, setToggleButtonSelected, showProvider, triggerActionKey, triggerActionKey, triggerBackspaceKey, triggerEnter, triggerEscapeKey, triggerKey, triggerKey, triggerText, triggerText, waitForComponentProvider, waitForComponentProvider, waitForDialogComponent, waitForDialogComponent, waitForDialogComponent, waitForJDialog, waitForJDialog, waitForTableModel, waitForTree, waitForUpdateOnChooser, waitForWindow, waitForWindow, waitForWindow, waitForWindow, waitForWindowByName, waitForWindowByTitleContaining, waitForWindowByTitleContaining, writeImage, writeImage
-
Methods inherited from class generic.test.AbstractGenericTest
clickMouse, clickMouse, clickTableCell, createStackTraceForAllThreads, createTempDirectory, createTempFile, createTempFile, createTempFileForTest, createTempFileForTest, createTempFilePath, createTempFilePath, deleteMatchingTempFiles, deleteSimilarTempFiles, doubleClick, dragMouse, editCell, executeOnSwingWithoutBlocking, findAbstractButtonByName, findAbstractButtonByText, findButtonByIcon, findButtonByText, findComponent, findComponent, findComponentByName, findComponentByName, findComponentsByName, findOwnedWindows, findPathToText, findTestDataFile, findTreePathToText, fixupGUI, getAllWindows, getDebugFileDirectory, getInstanceField, getInstanceFieldByClassType, getLocalResourceFile, getTestDataDir, getTestDataDirectory, getTestDataFile, getText, hasTestFailed, initializeLayout, invokeConstructor, invokeInstanceMethod, invokeInstanceMethod, leftClick, loadTextResource, loadTextResource, middleClick, moveMouse, postEvent, pressButton, pressButton, pressButtonByName, pressButtonByName, pressButtonByText, pressButtonByText, printMemory, privateWaitForPostedSwingRunnables_SwingSafe, rightClick, runSwing, runSwing, runSwing, runSwingWithExceptions, setComboBoxSelection, setInstanceField, setText, testFailed, toString, waitForPostedSwingRunnables, waitForSwing, waitForTasks, windowForComponent, yieldToSwing
-
Methods inherited from class generic.test.AbstractGTest
assertArraysEqualOrdered, assertArraysEqualUnordered, assertArraysEqualUnordered, assertContainsExactly, assertContainsExactly, assertListEqualOrdered, assertListEqualOrdered, assertListEqualsArrayOrdered, assertListEqualsArrayUnordered, assertListEqualUnordered, failWithException, getName, getRandomInt, getRandomInt, getRandomString, getRandomString, getTestDirectoryPath, sleep, waitFor, waitFor, waitFor, waitFor, waitForCondition, waitForCondition, waitForCondition, waitForConditionWithoutFailing, waitForValue, waitForValueWithoutFailing
-
-
-
-
Field Detail
-
SAVE_CREATED_IMAGE_FILE_KEY
protected static final java.lang.String SAVE_CREATED_IMAGE_FILE_KEY
- See Also:
- Constant Field Values
-
SAVE_CREATED_IMAGE_FILE
protected static final boolean SAVE_CREATED_IMAGE_FILE
-
NEW_FILENAME_SUFFIX_KEY
protected static final java.lang.String NEW_FILENAME_SUFFIX_KEY
- See Also:
- Constant Field Values
-
DEFAULT_FILENAME_SUFFIX
protected static final java.lang.String DEFAULT_FILENAME_SUFFIX
- See Also:
- Constant Field Values
-
NEW_FILENAME_SUFFIX
protected static final java.lang.String NEW_FILENAME_SUFFIX
-
DIALOG_HEADER_HEIGHT
protected static final int DIALOG_HEADER_HEIGHT
- See Also:
- Constant Field Values
-
tool
public PluginTool tool
-
env
public TestEnv env
-
program
public Program program
-
image
public java.awt.Image image
-
-
Method Detail
-
setUp
public void setUp() throws java.lang.Exception
- Throws:
java.lang.Exception
-
tearDown
public void tearDown() throws java.lang.Exception
- Throws:
java.lang.Exception
-
prepareTool
public void prepareTool()
-
loadProgram
public void loadProgram() throws java.lang.Exception
- Throws:
java.lang.Exception
-
closeNonProgramArchives
public void closeNonProgramArchives()
-
loadProgram
public Program loadProgram(java.lang.String programName)
-
exit
public void exit()
-
setUser
public void setUser(java.lang.String userName)
-
setDockIcon
protected void setDockIcon()
-
addr
public Address addr(long value)
-
setToolSize
public void setToolSize(int width, int height)
-
setWindowSize
public void setWindowSize(java.awt.Window window, int width, int height)
-
performAction
public void performAction(java.lang.String actionName, java.lang.String owner, boolean wait)
-
performDialogAction
public void performDialogAction(java.lang.String actionName, boolean wait)
-
performAction
public void performAction(java.lang.String actionName, java.lang.String owner, ComponentProvider contextProvider, boolean wait)
-
showOptions
public void showOptions(java.lang.String optionsCategoryName)
-
showProgramOptions
public void showProgramOptions(java.lang.String optionsCategoryName)
-
getCursorBounds
public java.awt.Rectangle getCursorBounds()
-
pressOkOnDialog
public void pressOkOnDialog()
-
pressButtonOnDialog
public void pressButtonOnDialog(java.lang.String buttonText)
-
captureIsolatedComponent
public void captureIsolatedComponent(javax.swing.JComponent component, int width, int height)
-
captureComponent
public java.awt.Image captureComponent(java.awt.Component component)
-
captureIsolatedProviderWindow
public void captureIsolatedProviderWindow(java.lang.Class<? extends ComponentProvider> clazz, int width, int height)
The same ascaptureIsolatedProvider(Class, int, int)
except this method will also capture the containing window.- Parameters:
clazz
- the provider classwidth
- the width of the captureheight
- the height of the capture
-
captureIsolatedProvider
public void captureIsolatedProvider(java.lang.Class<? extends ComponentProvider> clazz, int width, int height)
-
captureIsolatedProvider
public void captureIsolatedProvider(ComponentProvider provider, int width, int height)
-
moveProviderToFront
public void moveProviderToFront(ComponentProvider provider, int width, int height)
-
moveProviderToFront
public void moveProviderToFront(ComponentProvider provider)
-
moveWindowUp
public void moveWindowUp(java.awt.Window window, int yOffset)
-
moveProviderToItsOwnWindow
public java.awt.Window moveProviderToItsOwnWindow(ComponentProvider provider)
-
moveProviderToItsOwnWindow
public java.awt.Window moveProviderToItsOwnWindow(ComponentProvider provider, int width, int height)
-
getDockableComponent
public DockableComponent getDockableComponent(ComponentProvider provider)
-
moveProvider
public void moveProvider(ComponentProvider movee, ComponentProvider relativeTo, WindowPosition position)
-
captureMenu
public void captureMenu()
-
getPopupMenu
public javax.swing.JPopupMenu getPopupMenu()
-
captureProvider
public void captureProvider(java.lang.Class<? extends ComponentProvider> clazz)
-
captureProvider
public void captureProvider(ComponentProvider provider)
-
captureProvider
public void captureProvider(java.lang.String name)
-
captureProviderWithScreenShot
public void captureProviderWithScreenShot(ComponentProvider provider)
Captures the provider by using a screen shot and not by painting the provider directly (as doescaptureProvider(ComponentProvider)
). Use this method if you need to capture the provider along with any popup windows.- Parameters:
provider
- the provider
-
captureProviderWindow
public void captureProviderWindow(java.lang.String name)
Captures the window, including decorations. This will use aRobot
to create a screen capture, which has the effect of getting all items within the window bounds. This method is needed if you wish to capture child windows, like popups/hovers.Other capture methods will not use the screen capture mechanism, but rather will directly render the given component. In this case, subordinate windows will not be captured. For example, see
captureProvider(Class)
.- Parameters:
name
- the provider's name
-
captureProviderWindow
public void captureProviderWindow(java.lang.Class<? extends ComponentProvider> clazz)
Captures the window, including decorations. This will use aRobot
to create a screen capture, which has the effect of getting all items within the window bounds. This method is needed if you wish to capture child windows, like popups/hovers.Other capture methods will not use the screen capture mechanism, but rather will directly render the given component. In this case, subordinate windows will not be captured. For example, see
captureProvider(Class)
.- Parameters:
clazz
- the provider's class
-
captureProviderWindow
public void captureProviderWindow(ComponentProvider provider)
Captures the window, including decorations. This will use aRobot
to create a screen capture, which has the effect of getting all items within the window bounds. This method is needed if you wish to capture child windows, like popups/hovers.Other capture methods will not use the screen capture mechanism, but rather will directly render the given component. In this case, subordinate windows will not be captured. For example, see
captureProvider(Class)
.- Parameters:
provider
- the provider
-
captureProviderWindow
public void captureProviderWindow(java.lang.String name, int width, int height)
Captures the window, including decorations. This will use aRobot
to create a screen capture, which has the effect of getting all items within the window bounds. This method is needed if you wish to capture child windows, like popups/hovers.Other capture methods will not use the screen capture mechanism, but rather will directly render the given component. In this case, subordinate windows will not be captured. For example, see
captureProvider(Class)
.- Parameters:
name
- the provider's namewidth
- the desired widthheight
- the desired height
-
captureProviderWindow
public void captureProviderWindow(ComponentProvider provider, int width, int height)
Captures the window, including decorations. This will use aRobot
to create a screen capture, which has the effect of getting all items within the window bounds. This method is needed if you wish to capture child windows, like popups/hovers.Other capture methods will not use the screen capture mechanism, but rather will directly render the given component. In this case, subordinate windows will not be captured. For example, see
captureProvider(Class)
.- Parameters:
provider
- the provider's namewidth
- the desired widthheight
- the desired height
-
showProvider
public <T extends ComponentProvider> T showProvider(java.lang.Class<T> clazz)
-
closeProvider
public void closeProvider(java.lang.Class<? extends ComponentProvider> clazz)
-
captureDialog
public void captureDialog()
-
getDialog
public DialogComponentProvider getDialog()
-
getDialog
public DialogComponentProvider getDialog(java.lang.Class<? extends DialogComponentProvider> clazz)
-
captureDialog
public void captureDialog(int width, int height)
-
paintFix
protected void paintFix(java.awt.Window window)
-
captureDialog
public void captureDialog(java.lang.String title)
-
captureDialog
public void captureDialog(java.lang.Class<? extends DialogComponentProvider> clazz)
-
captureDialog
public void captureDialog(DialogComponentProvider provider)
-
captureDialog
public void captureDialog(java.lang.Class<? extends DialogComponentProvider> clazz, int width, int height)
-
captureWindow
public void captureWindow()
-
captureWindow
public void captureWindow(java.awt.Window window)
-
captureWindow
public void captureWindow(java.awt.Window window, int width, int height)
-
captureToolWindow
public void captureToolWindow(int width, int height)
-
captureDialog
public void captureDialog(java.awt.Dialog dialog)
-
captureDialog
public void captureDialog(java.awt.Dialog dialog, int width, int height)
-
captureListingField
public void captureListingField(long address, java.lang.String fieldName, int padding)
-
generateImage
public void generateImage(java.awt.Component c)
-
captureComponents
public void captureComponents(java.util.List<java.awt.Component> comps)
-
captureMenuBarMenu
public void captureMenuBarMenu(java.lang.String menuName, java.lang.String... subMenuNames)
-
captureMenuBarMenuHierachy
public void captureMenuBarMenuHierachy(java.lang.String menuName, java.lang.String... subMenuNames)
-
captureListingRange
public void captureListingRange(long start, long end, int width)
-
error
public void error(java.lang.Exception e)
-
setListingFieldWidth
public void setListingFieldWidth(java.lang.String fieldName, int width)
-
getField
public Field getField(java.awt.Point point)
-
leftClickCursor
public void leftClickCursor()
-
rightClickCursor
public void rightClickCursor()
-
middleClickCursor
public void middleClickCursor()
-
doubleClickCursor
public void doubleClickCursor()
-
selectRow
public void selectRow(javax.swing.JTable table, int rowIndex)
-
setSelected
public void setSelected(javax.swing.JToggleButton button, boolean select)
-
hideTableColumn
public void hideTableColumn(GTable table, java.lang.String columnName)
-
showMenuBarMenu
public java.util.List<java.awt.Component> showMenuBarMenu(java.lang.String menuName, java.lang.String... submenuNames)
-
showColumnSettings
public void showColumnSettings(GTable table, java.lang.String colName)
-
showTableColumn
public void showTableColumn(GTable table, java.lang.String columnName)
-
setSelectedAnayzer
public void setSelectedAnayzer(java.lang.Object analysisPanel, java.lang.String analyzerName)
-
showCommentDialog
public void showCommentDialog(java.lang.String text)
-
prepareCommentsDialog
public void prepareCommentsDialog(ghidra.app.plugin.core.comments.CommentsDialog dialog, java.lang.String annotationText)
-
createBookmark
public void createBookmark(long address)
-
selectRow
public void selectRow(javax.swing.JTable table, java.lang.String searchString)
-
scrollToRow
public void scrollToRow(javax.swing.JTable table, int row)
-
findRowByPartialText
public int findRowByPartialText(javax.swing.JTable table, java.lang.String searchString)
-
performMemorySearch
public void performMemorySearch(java.lang.String searchString)
-
removeField
public void removeField(java.lang.String fieldName)
-
showAnalysisOptions
public void showAnalysisOptions(java.lang.String selectedAnalyzerName)
-
removeFlowArrows
public void removeFlowArrows()
-
makeSelection
public void makeSelection(AddressSet addrSet)
-
addSelection
public void addSelection(long start, long end)
-
makeSelection
public void makeSelection(long start, long end)
-
go
public void go(long address)
-
goToListing
public void goToListing(long address)
-
goToListing
public void goToListing(long address, boolean scrollToMiddle)
-
goToListing
public void goToListing(long address, java.lang.String fieldName, boolean scrollToMiddle)
-
positionCursor
public void positionCursor(long address)
-
positionCursor
public void positionCursor(long address, java.lang.String fieldName)
-
positionListingTop
public void positionListingTop(long address)
-
positionListingCenter
public void positionListingCenter(long address)
-
topOfListing
@Deprecated public void topOfListing(long address)
Deprecated.
-
loadPlugin
public Plugin loadPlugin(java.lang.String className)
-
getProvider
public ComponentProvider getProvider(java.lang.String name)
-
getProvider
public <T extends ComponentProvider> T getProvider(java.lang.Class<T> clazz)
-
getDockableComponent
public DockableComponent getDockableComponent(java.lang.Class<? extends ComponentProvider> clazz)
-
findProviderToolBarButton
public javax.swing.JButton findProviderToolBarButton(ComponentProvider provider, java.lang.String actionName)
-
address
@Deprecated public Address address(long value)
Deprecated.useaddr(long)
instead- Parameters:
value
- the address's long value- Returns:
- the new address
-
getBounds
public java.awt.Rectangle getBounds(javax.swing.JComponent component)
-
drawRectangleWithDropShadowAround
public void drawRectangleWithDropShadowAround(javax.swing.JComponent component, java.awt.Color color, int padding)
-
drawRectangleAround
public java.awt.Rectangle drawRectangleAround(javax.swing.JComponent component, java.awt.Color color, int padding)
-
drawRectangleAround
public java.awt.Rectangle drawRectangleAround(javax.swing.JComponent component, javax.swing.JComponent root, java.awt.Color color, int padding)
Draws a rectangle around the given component. The root parameter is used to calculate screen coordinates. This allows you to capture a sub-component of a UI, drawing rectangles around children of said sub-component.If you are unsure of what to pass for root, the call
drawRectangleAround(JComponent, Color, int)
instead.- Parameters:
component
- the component to be en-rectangledroot
- the outermost container widget being displayed; null implies a top-level parentcolor
- the rectangle colorpadding
- the space between the rectangle and the component; more space makes the component more visible- Returns:
- the bounds of the drawn rectangle
-
drawRectangle
public java.awt.Rectangle drawRectangle(java.awt.Color c, java.awt.Rectangle r, int padding, int thickness)
-
drawBorder
public void drawBorder(java.awt.Color c)
-
drawRectangle
public void drawRectangle(java.awt.Color c, java.awt.Rectangle rect, int thickness)
-
fillRectangle
public void fillRectangle(java.awt.Color c, java.awt.Rectangle rect)
-
drawOval
public void drawOval(java.awt.Color c, java.awt.Rectangle rect, int thickness)
-
drawText
public void drawText(java.lang.String text, java.awt.Color color, java.awt.Point start, float size)
-
drawText
public void drawText(java.lang.String text, java.awt.Color color, java.awt.Point start, java.awt.Font font)
-
drawLine
public void drawLine(java.awt.Color c, int thickness, java.awt.Point start, java.awt.Point end)
-
drawArrow
public void drawArrow(java.awt.Color c, java.awt.Point start, java.awt.Point end)
-
drawArrow
public void drawArrow(java.awt.Color c, int thickness, java.awt.Point start, java.awt.Point end, int arrowSize)
-
writeFile
protected void writeFile(java.io.File imageFile)
-
readImage
protected java.awt.image.BufferedImage readImage(java.io.File imageFile)
-
crop
public java.awt.Image crop(java.awt.Rectangle bounds)
-
padImage
public java.awt.Image padImage(java.awt.Color c, int top, int left, int right, int bottom)
-
placeImagesSideBySide
public java.awt.Image placeImagesSideBySide(java.awt.Image left, java.awt.Image right)
-
createEmptyImage
public java.awt.image.BufferedImage createEmptyImage(int width, int height)
-
takeSnippet
public java.awt.Image takeSnippet(java.awt.Rectangle bounds)
Crops a part of the current image, keeping what is inside the given bounds. This method creates a shape such that the top and bottom of the cropped image have a jagged line, looking somewhat like a sideways lightening bolt.- Parameters:
bounds
- the bounds to keep- Returns:
- the snippet
-
setDividerPercentage
public void setDividerPercentage(java.lang.Class<? extends ComponentProvider> provider1, java.lang.Class<? extends ComponentProvider> provider2, float percentage)
-
findChildWithType
public <T extends javax.swing.JComponent> T findChildWithType(java.awt.Container node, java.lang.Class<T> cls, java.util.function.Predicate<T> pred)
-
findComponent
public <T extends javax.swing.JComponent> T findComponent(java.lang.Class<T> cls, java.util.function.Predicate<T> pred)
-
showTab
public java.awt.Component showTab(java.lang.String title)
-
-