mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-05 10:49:34 +02:00
Merge branch 'GT-3362_ryanmkurtz_PR-1287_astrelsky_DocumentationFixes'
Conflicts: Ghidra/Framework/Docking/src/main/java/docking/action/DockingAction.java
This commit is contained in:
commit
6e6bdffe86
659 changed files with 1740 additions and 4136 deletions
|
@ -532,7 +532,7 @@ public abstract class ComponentProvider implements HelpDescriptor, ActionContext
|
|||
* text returned from {@link #getTitle()} will be used by default.
|
||||
*
|
||||
* @return the optionally set text to display in the tab for a component provider.
|
||||
* @set {@link #setTabText(String)}
|
||||
* @see #setTabText(String)
|
||||
*/
|
||||
|
||||
public String getTabText() {
|
||||
|
|
|
@ -22,7 +22,7 @@ import javax.swing.*;
|
|||
import javax.swing.plaf.LayerUI;
|
||||
|
||||
/**
|
||||
* A factory to create JLayer instances to provide the L&F and functionality of a
|
||||
* A factory to create JLayer instances to provide the L&F and functionality of a
|
||||
* disabled panel -- the component assumes a disabled color, and selection via mouse and
|
||||
* keyboard is prevented. As this is simply a layer in the UI stack, previous states of
|
||||
* components is maintained and unmodified.
|
||||
|
|
|
@ -42,7 +42,7 @@ import ghidra.util.HTMLUtilities;
|
|||
import resources.ResourceManager;
|
||||
|
||||
/**
|
||||
* <h1>Notes about how to use HTML safely:</h1>
|
||||
* <h2>Notes about how to use HTML safely:</h2>
|
||||
* Java's built-in HTML rendering in UI components is very useful, but can also introduce security
|
||||
* issues when a hostile actor is providing the text strings that are being rendered.
|
||||
* <p>
|
||||
|
@ -77,9 +77,9 @@ import resources.ResourceManager;
|
|||
* value at the start of the string, but instead put a quote or some other delimiter to prevent
|
||||
* html mode).
|
||||
* <p>
|
||||
* <h1>Recommended Ghidra UI Components:</h1>
|
||||
* <h3>Recommended Ghidra UI Components:</h3>
|
||||
* <p>
|
||||
* <table border=1>
|
||||
* <table border=1><caption></caption>
|
||||
* <tr><th>Native Component</th><th>Recommended Component</th></tr>
|
||||
* <tr><td>{@link JLabel}</td><td>{@link GLabel}<br>{@link GDLabel}<br>{@link GHtmlLabel}<br>{@link GDHtmlLabel}<br>{@link GIconLabel}</td></tr>
|
||||
* <tr><td>{@link JCheckBox}</td><td>{@link GCheckBox}<br>{@link GHtmlCheckBox}</td></tr>
|
||||
|
|
|
@ -87,7 +87,7 @@ public class KeyBindingOverrideKeyEventDispatcher implements KeyEventDispatcher
|
|||
* <li><b>Reserved keybinding actions</b>
|
||||
* <li>KeyListeners on the focused Component</li>
|
||||
* <li>InputMap and ActionMap actions for the Component</li>
|
||||
* <b><li>Ghidra tool-level actions</li></b>
|
||||
* <li><b>Ghidra tool-level actions</b></li>
|
||||
* <li>InputMap and ActionMap actions for the Component's parent, and so on up the
|
||||
* Swing hierarchy</li>
|
||||
* </ol>
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
/* ###
|
||||
* IP: GHIDRA
|
||||
* REVIEWED: YES
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -28,7 +27,7 @@ public enum WindowPosition {
|
|||
* be placed into their own window.
|
||||
* <p>
|
||||
* <b>This position is ignored when used with components that share the same group (a.k.a.,
|
||||
* when used as an intragroup positioning item).
|
||||
* when used as an intragroup positioning item).</b>
|
||||
*/
|
||||
WINDOW,
|
||||
|
||||
|
|
|
@ -92,6 +92,10 @@ public abstract class DockingAction implements DockingActionIf {
|
|||
supportsKeyBindings ? KeyBindingType.INDIVIDUAL : KeyBindingType.UNSUPPORTED;
|
||||
}
|
||||
|
||||
protected KeyBindingType getPreferredKeyBindingType() {
|
||||
return KeyBindingType.INDIVIDUAL;
|
||||
}
|
||||
|
||||
@Override
|
||||
public abstract void actionPerformed(ActionContext context);
|
||||
|
||||
|
|
|
@ -633,7 +633,7 @@ public class KeyBindingUtils {
|
|||
|
||||
/**
|
||||
* Convert the toString() form of the keyStroke.
|
||||
* <br>In Java 1.4.2 & earlier, Ctrl-M is returned as "keyCode CtrlM-P"
|
||||
* <br>In Java 1.4.2 and earlier, Ctrl-M is returned as "keyCode CtrlM-P"
|
||||
* and we want it to look like: "Ctrl-M".
|
||||
* <br>In Java 1.5.0, Ctrl-M is returned as "ctrl pressed M"
|
||||
* and we want it to look like: "Ctrl-M".
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
/* ###
|
||||
* IP: GHIDRA
|
||||
* REVIEWED: YES
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -62,7 +61,7 @@ public interface Draggable {
|
|||
* <li>DnDConstants.ACTION_MOVE
|
||||
* <li>DnDConstants.ACTION_COPY
|
||||
* <li>DnDConstants.ACTION_COPY_OR_MOVE
|
||||
* </li>
|
||||
* </UL>
|
||||
*
|
||||
* @return the drag actions
|
||||
*/
|
||||
|
|
|
@ -59,9 +59,9 @@ public class GenericDataFlavor extends DataFlavor {
|
|||
/**
|
||||
* Construct a GenericDataFlavor that represents a MimeType
|
||||
* If the mimeType is
|
||||
* "application/x-java-serialized-object; class=<representation class>",
|
||||
* {@code "application/x-java-serialized-object; class=<representation class>",
|
||||
* the result is the same as calling
|
||||
* new GenericDataFlavor(Class:forName(<representation class>)
|
||||
* new GenericDataFlavor(Class:forName(<representation class>)}
|
||||
* @param mimeType the string used to identify the MIME type for
|
||||
* this flavor
|
||||
* @param humanPresentableName the human-readable string used to
|
||||
|
@ -77,9 +77,9 @@ public class GenericDataFlavor extends DataFlavor {
|
|||
/**
|
||||
* Construct a GenericDataFlavor that represents a MimeType
|
||||
* If the mimeType is
|
||||
* "application/x-java-serialized-object; class=<representation class>",
|
||||
* {@code "application/x-java-serialized-object; class=<representation class>",
|
||||
* the result is the same as calling
|
||||
* new GenericDataFlavor(Class:forName(<representation class>).
|
||||
* new GenericDataFlavor(Class:forName(<representation class>).}
|
||||
*
|
||||
* @param mimeType the string used to identify the MIME type for this flavor
|
||||
* @param humanPresentableName the human-readable string used to
|
||||
|
|
|
@ -40,9 +40,9 @@ import ghidra.util.SystemUtilities;
|
|||
* The HelpSet class uses a javax.help.Map object to locate HTML files by javax.help.map.ID objects.
|
||||
* This class has overridden that basic usage of the Map object to allow ID lookups to take
|
||||
* place across GHelpSet objects. We need to do this due to how we merge help set content
|
||||
* across modules. More specifically, in order to merge, we have to make all <tocitem> xml tags
|
||||
* across modules. More specifically, in order to merge, we have to make all {@code <tocitem>} xml tags
|
||||
* the same, including the target HTML file they may reference. Well, when a module uses a
|
||||
* <tocitem> tag that references an HTML file <b>not inside of it's module</b>, then JavaHelp
|
||||
* {@code <tocitem>} tag that references an HTML file <b>not inside of it's module</b>, then JavaHelp
|
||||
* considers this an error and does not correctly merge the HelpSets that share the reference.
|
||||
* Further, it does not properly locate the shared HTML file reference. This class allows lookups
|
||||
* across modules by overridden the lookup functionality done by the map object. More specifically,
|
||||
|
|
|
@ -80,7 +80,6 @@ public class HelpManager implements HelpService {
|
|||
* Constructor.
|
||||
*
|
||||
* @param url url for the main HelpSet file for the application.
|
||||
* @param helpActionManager The HelpActionManager with which help location will be registered
|
||||
* @throws HelpSetException if HelpSet could not be created
|
||||
*/
|
||||
protected HelpManager(URL url) throws HelpSetException {
|
||||
|
|
|
@ -202,7 +202,7 @@ public class MenuManager implements ManagedMenuItem {
|
|||
}
|
||||
|
||||
/***
|
||||
* Removes the Mnemonic indicator character (&) from the text
|
||||
* Removes the Mnemonic indicator character (&) from the text
|
||||
* @param text the text to strip
|
||||
* @return the stripped mnemonic
|
||||
*/
|
||||
|
|
|
@ -43,8 +43,7 @@ public class ToolBarItemManager implements PropertyChangeListener, ActionListene
|
|||
/**
|
||||
* Constructs a new ToolBarItemManager
|
||||
* @param action the action to be managed on the toolbar.
|
||||
* @param iconSize the iconSize to scale to.
|
||||
* @param buttonListener listener for button state changes.
|
||||
* @param windowManager the window manager.
|
||||
*/
|
||||
public ToolBarItemManager(DockingActionIf action, DockingWindowManager windowManager) {
|
||||
this.toolBarAction = action;
|
||||
|
|
|
@ -49,7 +49,9 @@ public class OptionsEditorPanel extends JPanel implements OptionsEditor {
|
|||
/**
|
||||
* Creates a panel for editing the given options.
|
||||
* @param title The title of the options panel
|
||||
* @param optionsList The list of options to display
|
||||
* @param options The options to display
|
||||
* @param optionNames The list of option names
|
||||
* @param editorStateFactory The EditorStateFactory
|
||||
*/
|
||||
public OptionsEditorPanel(String title, Options options, List<String> optionNames,
|
||||
EditorStateFactory editorStateFactory) {
|
||||
|
@ -118,10 +120,6 @@ public class OptionsEditorPanel extends JPanel implements OptionsEditor {
|
|||
// OptionsEditor Interface Methods
|
||||
//==================================================================================================
|
||||
|
||||
/**
|
||||
* @throws InvalidInputException
|
||||
* @see ghidra.framework.options.OptionsEditor#apply()
|
||||
*/
|
||||
@Override
|
||||
public void apply() throws InvalidInputException {
|
||||
for (EditorState state : editorInfoList) {
|
||||
|
@ -129,9 +127,6 @@ public class OptionsEditorPanel extends JPanel implements OptionsEditor {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @see ghidra.framework.options.OptionsEditor#cancel()
|
||||
*/
|
||||
@Override
|
||||
public void cancel() {
|
||||
// nothing to do
|
||||
|
@ -142,17 +137,11 @@ public class OptionsEditorPanel extends JPanel implements OptionsEditor {
|
|||
// nothing to do, as this component is reloaded when options are changed
|
||||
}
|
||||
|
||||
/**
|
||||
* @see ghidra.framework.options.OptionsEditor#getEditorComponent()
|
||||
*/
|
||||
@Override
|
||||
public JComponent getEditorComponent(Options o, EditorStateFactory factory) {
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see OptionsEditor#setOptionsPropertyChangeListener(PropertyChangeListener)
|
||||
*/
|
||||
@Override
|
||||
public void setOptionsPropertyChangeListener(PropertyChangeListener listener) {
|
||||
this.propertyChangeListener = listener;
|
||||
|
|
|
@ -1564,7 +1564,7 @@ public abstract class AbstractDockingTest extends AbstractGenericTest {
|
|||
* <br>ABCDEFGHIJKLMNOPQRSTUVWXYZ
|
||||
* <br>abcdefghijklmnopqrstuvwxyz
|
||||
* <br>`1234567890-=[]\;',./
|
||||
* <br>~!@#$%^&*()_+{}|:"<>?
|
||||
* <br>{@literal ~!@#$%^&*()_+{}|:"<>?}
|
||||
* <br>
|
||||
* <br>It also handles '\n', '\t', and '\b'.
|
||||
*
|
||||
|
@ -1588,7 +1588,7 @@ public abstract class AbstractDockingTest extends AbstractGenericTest {
|
|||
* <br>ABCDEFGHIJKLMNOPQRSTUVWXYZ
|
||||
* <br>abcdefghijklmnopqrstuvwxyz
|
||||
* <br>`1234567890-=[]\;',./
|
||||
* <br>~!@#$%^&*()_+{}|:"<>?
|
||||
* <br>{@literal ~!@#$%^&*()_+{}|:"<>?}
|
||||
* <br>
|
||||
* <br>It also handles '\n', '\t', and '\b'.
|
||||
*
|
||||
|
|
|
@ -230,7 +230,7 @@ public class BadgedIcon implements Icon {
|
|||
/**
|
||||
* Get the visibility status of the badge at the specified location
|
||||
* @param position Which icon to enquire about
|
||||
* @Return True if the badge is visible, false otherwise
|
||||
* @return True if the badge is visible, false otherwise
|
||||
* @see #setBadgeVisisble(BadgePosition, boolean)
|
||||
*/
|
||||
public boolean isBadgeVisible(BadgePosition position) {
|
||||
|
|
|
@ -243,7 +243,7 @@ public class ToolIconURL implements Comparable<ToolIconURL> {
|
|||
}
|
||||
|
||||
/**
|
||||
* Return the icon as {@link ToolConstants#ICON_SIZE} pixel size.
|
||||
* Return the icon as {@link ToolConstants#LARGE_ICON_SIZE} pixel size.
|
||||
*/
|
||||
public ImageIcon getIcon() {
|
||||
if (largeIcon == null) {
|
||||
|
|
|
@ -34,7 +34,7 @@ public abstract class AbstractGCellRenderer extends GDHtmlLabel {
|
|||
|
||||
private static final Color ALTERNATE_BACKGROUND_COLOR = new Color(237, 243, 254);
|
||||
|
||||
/** Allows the user to disable alternating row colors on JLists & JTables */
|
||||
/** Allows the user to disable alternating row colors on JLists and JTables */
|
||||
private static final String DISABLE_ALTERNATING_ROW_COLORS_PROPERTY =
|
||||
"disable.alternating.row.colors";
|
||||
|
||||
|
|
|
@ -30,9 +30,9 @@ public interface GComponent {
|
|||
/**
|
||||
* Enables and disables the rendering of HTML content in this component. If enabled, this
|
||||
* component will interpret HTML content when the text this component is showing begins with
|
||||
* <tt><html></tt>
|
||||
* {@code <html>}
|
||||
*
|
||||
* @param enable true to enable HTML rendering; false to disable it
|
||||
* @param enabled true to enable HTML rendering; false to disable it
|
||||
*/
|
||||
public default void setHTMLRenderingEnabled(boolean enabled) {
|
||||
setHTMLRenderingFlag((JComponent) this, enabled);
|
||||
|
|
|
@ -35,7 +35,7 @@ import ghidra.util.exception.AssertException;
|
|||
* A utility class to easily show dialogs that require input from the user.
|
||||
*
|
||||
*
|
||||
* <h3>Option Dialogs</h3><br>
|
||||
* <h2>Option Dialogs</h2><br>
|
||||
* <blockquote>
|
||||
* <p>
|
||||
* The primary type of
|
||||
|
|
|
@ -93,7 +93,7 @@ public class VariableHeightPanel extends JPanel implements Scrollable {
|
|||
* This method is in place because the clients of this panel are not the ones that
|
||||
* construct this panel and thus cannot create the desired type of layout at construction time.
|
||||
* <b>This method has no effect if this panel was constructed with <code>pack</code> set to
|
||||
* false, which makes this panel use a grid style layout.
|
||||
* false, which makes this panel use a grid style layout.</b>
|
||||
*
|
||||
* @param singleLineLayout True signals to put all children on a single row; false will use
|
||||
* as many rows as are needed to layout all of the children.
|
||||
|
|
|
@ -28,7 +28,7 @@ public interface AutocompletionModel<T> {
|
|||
* @param text the prefix, i.e., the text to the left of the user's caret.
|
||||
* @return a (possibly null or empty) list of suggested completions.
|
||||
*
|
||||
* @note there is no requirement that the returned items actually start with the given prefix;
|
||||
* NOTE: there is no requirement that the returned items actually start with the given prefix;
|
||||
* however, by default, the displayed text for the suggested item is inserted at the caret,
|
||||
* without changing the surrounding text.
|
||||
*/
|
||||
|
|
|
@ -58,7 +58,7 @@ import ghidra.util.task.SwingUpdateManager;
|
|||
* completion is possible, it is automatically activated. This logic is applied again and again,
|
||||
* until either no suggestions are given, or more than one suggestion is given (or until the
|
||||
* autocompleter detects an infinite loop). This behavior can by modified on an item-by-item basis
|
||||
* by overriding the {@link #getCompletionCanDefault(T)} method. This same behavior can be
|
||||
* by overriding the {@link #getCompletionCanDefault(Object) getCompletionCanDefault(T)} method. This same behavior can be
|
||||
* activated by calling the {@link #startCompletion(JTextField)} method, which may be useful, e.g.,
|
||||
* to bind a different key sequence to start autocompletion.
|
||||
*
|
||||
|
@ -70,21 +70,20 @@ import ghidra.util.task.SwingUpdateManager;
|
|||
* The simplest use case is to create a text field, create an autocompleter with a custom model,
|
||||
* and then attach and show.
|
||||
*
|
||||
* {@code
|
||||
*
|
||||
* <pre>
|
||||
* JTextField field = new JTextField();
|
||||
*
|
||||
* AutocompletionModel<String> model = new AutocompletionModel<String>() {
|
||||
* @Override
|
||||
* public Collection<String> computeCompletions(String text) {
|
||||
* {@code AutocompletionModel<String> model = new AutocompletionModel<String>() }{
|
||||
* @Override
|
||||
* {@code public Collection<String> computeCompletions(String text)} {
|
||||
* ... // Populate the completion list based on the given prefix.
|
||||
* }
|
||||
* }
|
||||
* TextFieldAutocompleter<String> completer = new TextFieldAutocompleter<String>(model);
|
||||
* {@code TextFieldAutocompleter<String> completer = new TextFieldAutocompleter<String>(model);
|
||||
* completer.attachTo(field);
|
||||
* ... // Add the field to, e.g., a dialog, and show.
|
||||
* </pre>
|
||||
* }
|
||||
* }</pre>
|
||||
*
|
||||
* @param <T> the type of suggestions presented by this autocompleter.
|
||||
*/
|
||||
|
@ -447,7 +446,7 @@ public class TextFieldAutocompleter<T> {
|
|||
*
|
||||
* A programmer may override this if the various {@code getCompletion...} methods prove
|
||||
* insufficient for customizing the display of the suggestions. Please remember that
|
||||
* {@link JLabels} can render HTML, so {@link #getCompletionDisplay(T)} is quite powerful
|
||||
* {@link JLabel}s can render HTML, so {@link #getCompletionDisplay(Object) getCompletionDisplay(T)} is quite powerful
|
||||
* with the default {@link AutocompletionCellRenderer}.
|
||||
* @return a list cell renderer for the completion list.
|
||||
*/
|
||||
|
@ -679,12 +678,12 @@ public class TextFieldAutocompleter<T> {
|
|||
* Starts the autocompleter on the given text field.
|
||||
*
|
||||
* First, this repeatedly attempts auto-activation. When there are many suggestions, or when
|
||||
* auto-activation is prevented (see {@link #getCompletionCanDefault(T)}), a list is displayed
|
||||
* auto-activation is prevented (see {@link #getCompletionCanDefault(Object) getCompletionCanDefault(T)}), a list is displayed
|
||||
* (usually below the caret) containing the suggestions given the fields current contents. The
|
||||
* list remains open until either the user cancels it (usually via ESC) or the user activates
|
||||
* a suggestion.
|
||||
*
|
||||
* @note The text field must already be attached.
|
||||
* NOTE: The text field must already be attached.
|
||||
* @param field the field on which to start autocompletion.
|
||||
*/
|
||||
public void startCompletion(JTextField field) {
|
||||
|
|
|
@ -23,7 +23,7 @@ import docking.widgets.GComponent;
|
|||
* A {@link JCheckBox} that has HTML rendering disabled.
|
||||
* <p>
|
||||
* See also:
|
||||
* <table border=1>
|
||||
* <table border=1><caption></caption>
|
||||
* <tr><th>Class</th><th>HTML rendering</th><th>Description</th></tr>
|
||||
* <tr><td>{@link GCheckBox}</td><td>NO</td><td>HTML disabled JCheckBox</td></tr>
|
||||
* <tr><td>{@link GHtmlCheckBox}</td><td>YES</td><td>HTML allowed JCheckBox</td></tr>
|
||||
|
|
|
@ -23,7 +23,7 @@ import docking.widgets.GComponent;
|
|||
* A {@link JCheckBox} that allows HTML rendering.
|
||||
* <p>
|
||||
* See also:
|
||||
* <table border=1>
|
||||
* <table border=1><caption></caption>
|
||||
* <tr><th>Class</th><th>HTML rendering</th><th>Description</th></tr>
|
||||
* <tr><td>{@link GCheckBox}</td><td>NO</td><td>HTML disabled JCheckBox</td></tr>
|
||||
* <tr><td>{@link GHtmlCheckBox}</td><td>YES</td><td>HTML allowed JCheckBox</td></tr>
|
||||
|
|
|
@ -46,8 +46,8 @@ public class InputWithChoicesDialog extends DialogComponentProvider {
|
|||
*
|
||||
* @param dialogTitle used as the name of the dialog's title bar
|
||||
* @param label value to use for the label of the text field
|
||||
* @param String[] optionValues to populate the combo box
|
||||
* @param String initial value - can be null
|
||||
* @param optionValues values to populate the combo box
|
||||
* @param initialValue the initial value - can be null
|
||||
* @param messageIcon the icon to display on the dialog--can be null
|
||||
*/
|
||||
public InputWithChoicesDialog(String dialogTitle, String label, String[] optionValues,
|
||||
|
@ -75,9 +75,9 @@ public class InputWithChoicesDialog extends DialogComponentProvider {
|
|||
*
|
||||
* @param dialogTitle used as the name of the dialog's title bar
|
||||
* @param label value to use for the label of the text field
|
||||
* @param String[] optionValues to populate the combo box
|
||||
* @param String initial value - can be null
|
||||
* @param boolean allowEdits true allows the user to add custom entries to the combo box by entering text
|
||||
* @param optionValues values to populate the combo box
|
||||
* @param initialValue the initial value - can be null
|
||||
* @param allowEdits true allows the user to add custom entries to the combo box by entering text
|
||||
* @param messageIcon the icon to display on the dialog--can be null
|
||||
*/
|
||||
public InputWithChoicesDialog(String dialogTitle, String label, String[] optionValues,
|
||||
|
|
|
@ -133,7 +133,7 @@ public class NumberInputDialog extends DialogComponentProvider {
|
|||
/**
|
||||
* Define the Main panel for the dialog here.
|
||||
* @param showAsHex
|
||||
* @return JPanel the completed <CODE>Main Panel<\CODE>
|
||||
* @return JPanel the completed <CODE>Main Panel</CODE>
|
||||
*/
|
||||
protected JPanel buildMainPanel(String prompt, boolean showAsHex) {
|
||||
JPanel panel = createPanel(prompt);
|
||||
|
|
|
@ -578,10 +578,10 @@ public class FieldPanel extends JPanel
|
|||
}
|
||||
|
||||
/**
|
||||
* Add a new hover service to be managed.
|
||||
* Add a new hover provider to be managed.
|
||||
*
|
||||
* @param hoverService
|
||||
* the new hover service to be managed.
|
||||
* @param hoverProvider
|
||||
* the new hover provider to be managed.
|
||||
*/
|
||||
public void setHoverProvider(HoverProvider hoverProvider) {
|
||||
hoverHandler.setHoverProvider(hoverProvider);
|
||||
|
@ -864,7 +864,7 @@ public class FieldPanel extends JPanel
|
|||
/**
|
||||
* Scrolls the display to show the layout specified by index at the vertical
|
||||
* position specified by yPos. Generally, the index will be layout at the
|
||||
* top of the screen and the yPos will be <= 0, meaning the layout may be
|
||||
* top of the screen and the yPos will be <= 0, meaning the layout may be
|
||||
* partially off the top of the screen.
|
||||
*
|
||||
* @param index
|
||||
|
|
|
@ -36,7 +36,7 @@ import docking.widgets.fieldpanel.support.FieldLocation;
|
|||
|
||||
/**
|
||||
* A {@link LayoutManager} that can be applied to a {@link FieldPanel}, allowing
|
||||
* {@link Components} to be placed over a given field location.
|
||||
* {@link Component}s to be placed over a given field location.
|
||||
*
|
||||
* To apply it, use {@link Container#setLayout(LayoutManager)} to install it. In this case, the
|
||||
* {@link Container} must be a {@link FieldPanel}. Then, use
|
||||
|
|
|
@ -98,8 +98,6 @@ public interface LayoutModel {
|
|||
/**
|
||||
* Returns true if the model knows about changes that haven't yet been told to the
|
||||
* LayoutModelListeners.
|
||||
* @return true if changes have occurred, but no one has been notified. False if no changes
|
||||
* since last listener notification.
|
||||
*/
|
||||
public void flushChanges();
|
||||
}
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
/* ###
|
||||
* IP: GHIDRA
|
||||
* REVIEWED: YES
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -48,25 +47,16 @@ abstract public class AbstractTextFieldElement implements FieldElement {
|
|||
this.column = column;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see docking.widgets.fieldpanel.field.FieldElement#getText()
|
||||
*/
|
||||
@Override
|
||||
public String getText() {
|
||||
return attributedString.getText();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see docking.widgets.fieldpanel.field.FieldElement#charAt(int)
|
||||
*/
|
||||
@Override
|
||||
public char charAt(int index) {
|
||||
return attributedString.getText().charAt(index);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see docking.widgets.fieldpanel.field.FieldElement#length()
|
||||
*/
|
||||
@Override
|
||||
public int length() {
|
||||
return getText().length();
|
||||
|
@ -76,57 +66,36 @@ abstract public class AbstractTextFieldElement implements FieldElement {
|
|||
// font metrics methods
|
||||
//==================================================================================================
|
||||
|
||||
/**
|
||||
* @see docking.widgets.fieldpanel.field.FieldElement#getStringWidth()
|
||||
*/
|
||||
@Override
|
||||
public int getStringWidth() {
|
||||
return attributedString.getStringWidth();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see docking.widgets.fieldpanel.field.FieldElement#getHeightAbove()
|
||||
*/
|
||||
@Override
|
||||
public int getHeightAbove() {
|
||||
return attributedString.getHeightAbove();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see docking.widgets.fieldpanel.field.FieldElement#getHeightBelow()
|
||||
*/
|
||||
@Override
|
||||
public int getHeightBelow() {
|
||||
return attributedString.getHeightBelow();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see docking.widgets.fieldpanel.field.FieldElement#getMaxCharactersForWidth(int)
|
||||
*/
|
||||
@Override
|
||||
public int getMaxCharactersForWidth(int width) {
|
||||
return attributedString.getColumnPosition(width);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see docking.widgets.fieldpanel.field.FieldElement#getColor(int)
|
||||
*/
|
||||
@Override
|
||||
public Color getColor(int charIndex) {
|
||||
return attributedString.getColor(charIndex);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see docking.widgets.fieldpanel.field.FieldElement#getFieldElement(int)
|
||||
*/
|
||||
@Override
|
||||
public FieldElement getFieldElement(int characterOffset) {
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see docking.widgets.fieldpanel.field.FieldElement#substring(int)
|
||||
*/
|
||||
@Override
|
||||
public FieldElement substring(int start) {
|
||||
return substring(start, attributedString.length());
|
||||
|
@ -140,9 +109,6 @@ abstract public class AbstractTextFieldElement implements FieldElement {
|
|||
//==================================================================================================
|
||||
// location info
|
||||
//==================================================================================================
|
||||
/**
|
||||
* @see docking.widgets.fieldpanel.field.FieldElement#getDataLocationForCharacterIndex(int)
|
||||
*/
|
||||
@Override
|
||||
public RowColLocation getDataLocationForCharacterIndex(int characterIndex) {
|
||||
if (characterIndex < 0 || characterIndex > attributedString.getText().length()) {
|
||||
|
@ -151,9 +117,6 @@ abstract public class AbstractTextFieldElement implements FieldElement {
|
|||
return new RowColLocation(row, column + characterIndex);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see docking.widgets.fieldpanel.field.FieldElement#getCharacterIndexForDataLocation(int, int)
|
||||
*/
|
||||
@Override
|
||||
public int getCharacterIndexForDataLocation(int dataRow, int dataColumn) {
|
||||
if (dataRow == row && (dataColumn >= column) && (dataColumn <= column + length())) {
|
||||
|
@ -167,9 +130,6 @@ abstract public class AbstractTextFieldElement implements FieldElement {
|
|||
// paint methods
|
||||
//==================================================================================================
|
||||
|
||||
/**
|
||||
* @see docking.widgets.fieldpanel.field.FieldElement#paint(java.awt.Graphics, int, int)
|
||||
*/
|
||||
@Override
|
||||
public void paint(JComponent c, Graphics g, int x, int y) {
|
||||
attributedString.paint(c, g, x, y);
|
||||
|
|
|
@ -95,9 +95,6 @@ public class ClippingTextField implements TextField {
|
|||
textElement = textElement.substring(0, length);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see docking.widgets.fieldpanel.field.Field#contains(int, int)
|
||||
*/
|
||||
@Override
|
||||
public boolean contains(int x, int y) {
|
||||
if ((x >= startX) && (x < startX + width) && (y >= -textElement.getHeightAbove()) &&
|
||||
|
@ -107,9 +104,6 @@ public class ClippingTextField implements TextField {
|
|||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see docking.widgets.fieldpanel.field.Field#getCol(int, int)
|
||||
*/
|
||||
@Override
|
||||
public int getCol(int row, int x) {
|
||||
int xPos = Math.max(x - startX, 0); // make x relative to this fields
|
||||
|
@ -117,9 +111,6 @@ public class ClippingTextField implements TextField {
|
|||
return textElement.getMaxCharactersForWidth(xPos);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see docking.widgets.fieldpanel.field.Field#getCursorBounds(int, int)
|
||||
*/
|
||||
@Override
|
||||
public Rectangle getCursorBounds(int row, int col) {
|
||||
if (row != 0) {
|
||||
|
@ -132,17 +123,11 @@ public class ClippingTextField implements TextField {
|
|||
textElement.getHeightAbove() + textElement.getHeightBelow());
|
||||
}
|
||||
|
||||
/**
|
||||
* @see docking.widgets.fieldpanel.field.Field#getHeight()
|
||||
*/
|
||||
@Override
|
||||
public int getHeight() {
|
||||
return textElement.getHeightAbove() + textElement.getHeightBelow();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see docking.widgets.fieldpanel.field.Field#getNumCols(int)
|
||||
*/
|
||||
@Override
|
||||
public int getNumCols(int row) {
|
||||
return getNumCols();
|
||||
|
@ -152,26 +137,16 @@ public class ClippingTextField implements TextField {
|
|||
return textElement.length() + 1; // allow one column past the end of the text
|
||||
}
|
||||
|
||||
/**
|
||||
* @see docking.widgets.fieldpanel.field.Field#getNumRows()
|
||||
*/
|
||||
@Override
|
||||
public int getNumRows() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see docking.widgets.fieldpanel.field.Field#getRow(int)
|
||||
*/
|
||||
@Override
|
||||
public int getRow(int y) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see docking.widgets.fieldpanel.field.Field#getScrollableUnitIncrement(int, int,
|
||||
* int)
|
||||
*/
|
||||
@Override
|
||||
public int getScrollableUnitIncrement(int topOfScreen, int direction, int max) {
|
||||
|
||||
|
@ -186,17 +161,11 @@ public class ClippingTextField implements TextField {
|
|||
return -getHeightAbove() - topOfScreen;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see docking.widgets.fieldpanel.field.Field#getStartX()
|
||||
*/
|
||||
@Override
|
||||
public int getStartX() {
|
||||
return startX;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see docking.widgets.fieldpanel.field.Field#getWidth()
|
||||
*/
|
||||
@Override
|
||||
public int getWidth() {
|
||||
return width;
|
||||
|
@ -207,9 +176,6 @@ public class ClippingTextField implements TextField {
|
|||
return preferredWidth;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see docking.widgets.fieldpanel.field.Field#getX(int, int)
|
||||
*/
|
||||
@Override
|
||||
public int getX(int row, int col) {
|
||||
if (col >= getNumCols()) {
|
||||
|
@ -218,33 +184,21 @@ public class ClippingTextField implements TextField {
|
|||
return findX(col) + startX;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see docking.widgets.fieldpanel.field.Field#getY(int)
|
||||
*/
|
||||
@Override
|
||||
public int getY(int row) {
|
||||
return -getHeightAbove();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see docking.widgets.fieldpanel.field.Field#isPrimary()
|
||||
*/
|
||||
@Override
|
||||
public boolean isPrimary() {
|
||||
return isPrimary;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see docking.widgets.fieldpanel.field.TextField#setPrimary(boolean)
|
||||
*/
|
||||
@Override
|
||||
public void setPrimary(boolean b) {
|
||||
isPrimary = b;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see docking.widgets.fieldpanel.field.Field#isValid(int, int)
|
||||
*/
|
||||
@Override
|
||||
public boolean isValid(int row, int col) {
|
||||
if (row != 0) {
|
||||
|
@ -261,11 +215,6 @@ public class ClippingTextField implements TextField {
|
|||
return fullText;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see docking.widgets.fieldpanel.field.Field#paint(java.awt.Graphics,
|
||||
* docking.widgets.fieldpanel.internal.PaintContext, boolean,
|
||||
* docking.widgets.fieldpanel.support.RowColLocation)
|
||||
*/
|
||||
@Override
|
||||
public void paint(JComponent c, Graphics g, PaintContext context,
|
||||
FieldBackgroundColorManager colorManager, RowColLocation cursorLoc, int rowHeight) {
|
||||
|
@ -384,9 +333,6 @@ public class ClippingTextField implements TextField {
|
|||
|
||||
}
|
||||
|
||||
/**
|
||||
* @see docking.widgets.fieldpanel.field.TextField#dataToScreenLocation(int, int)
|
||||
*/
|
||||
@Override
|
||||
public RowColLocation dataToScreenLocation(int dataRow, int dataColumn) {
|
||||
int column = textElement.getCharacterIndexForDataLocation(dataRow, dataColumn);
|
||||
|
@ -408,33 +354,21 @@ public class ClippingTextField implements TextField {
|
|||
return isClipped;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see docking.widgets.fieldpanel.field.Field#getHeightAbove()
|
||||
*/
|
||||
@Override
|
||||
public int getHeightAbove() {
|
||||
return textElement.getHeightAbove();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see docking.widgets.fieldpanel.field.Field#getHeightBelow()
|
||||
*/
|
||||
@Override
|
||||
public int getHeightBelow() {
|
||||
return textElement.getHeightBelow();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see docking.widgets.fieldpanel.field.Field#rowHeightChanged(int, int)
|
||||
*/
|
||||
@Override
|
||||
public void rowHeightChanged(int heightAbove, int heightBelow) {
|
||||
// Don't care
|
||||
}
|
||||
|
||||
/**
|
||||
* @see docking.widgets.fieldpanel.field.Field#getText()
|
||||
*/
|
||||
@Override
|
||||
public String getText() {
|
||||
return getString();
|
||||
|
@ -445,25 +379,16 @@ public class ClippingTextField implements TextField {
|
|||
return getString();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see docking.widgets.fieldpanel.field.Field#textOffsetToScreenLocation(int)
|
||||
*/
|
||||
@Override
|
||||
public RowColLocation textOffsetToScreenLocation(int textOffset) {
|
||||
return new RowColLocation(0, Math.min(textOffset, textElement.getText().length() - 1));
|
||||
}
|
||||
|
||||
/**
|
||||
* @see docking.widgets.fieldpanel.field.Field#screenLocationToTextOffset(int, int)
|
||||
*/
|
||||
@Override
|
||||
public int screenLocationToTextOffset(int row, int col) {
|
||||
return Math.min(textElement.getText().length(), col);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see ghidra.app.util.viewer.field.ListingField#getClickedObject(FieldLocation)
|
||||
*/
|
||||
public Object getClickedObject(FieldLocation fieldLocation) {
|
||||
return getFieldElement(fieldLocation.row, fieldLocation.col);
|
||||
}
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
/* ###
|
||||
* IP: GHIDRA
|
||||
* REVIEWED: YES
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -60,10 +59,6 @@ public class EmptyTextField implements Field {
|
|||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @see docking.widgets.fieldpanel.field.Field#getWidth()
|
||||
*/
|
||||
@Override
|
||||
public int getWidth() {
|
||||
return width;
|
||||
|
@ -74,82 +69,46 @@ public class EmptyTextField implements Field {
|
|||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @see docking.widgets.fieldpanel.field.Field#getHeight()
|
||||
*/
|
||||
@Override
|
||||
public int getHeight() {
|
||||
return height;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @see docking.widgets.fieldpanel.field.Field#getStartX()
|
||||
*/
|
||||
@Override
|
||||
public int getStartX() {
|
||||
return startX;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @see docking.widgets.fieldpanel.field.Field#getNumRows()
|
||||
*/
|
||||
@Override
|
||||
public int getNumRows() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @see docking.widgets.fieldpanel.field.Field#getNumCols(int)
|
||||
*/
|
||||
@Override
|
||||
public int getNumCols(int row) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @see docking.widgets.fieldpanel.field.Field#getRow(int)
|
||||
*/
|
||||
@Override
|
||||
public int getRow(int y) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @see docking.widgets.fieldpanel.field.Field#getCol(int, int)
|
||||
*/
|
||||
@Override
|
||||
public int getCol(int row, int x) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @see docking.widgets.fieldpanel.field.Field#getY(int)
|
||||
*/
|
||||
@Override
|
||||
public int getY(int row) {
|
||||
return -heightAbove;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @see docking.widgets.fieldpanel.field.Field#getX(int, int)
|
||||
*/
|
||||
@Override
|
||||
public int getX(int row, int col) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @see docking.widgets.fieldpanel.field.Field#isValid(int, int)
|
||||
*/
|
||||
@Override
|
||||
public boolean isValid(int row, int col) {
|
||||
|
||||
|
@ -162,9 +121,6 @@ public class EmptyTextField implements Field {
|
|||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see docking.widgets.fieldpanel.field.Field#paint(java.awt.Graphics, docking.widgets.fieldpanel.internal.PaintContext, boolean, docking.widgets.fieldpanel.support.RowColLocation)
|
||||
*/
|
||||
@Override
|
||||
public void paint(JComponent c, Graphics g, PaintContext context,
|
||||
FieldBackgroundColorManager map, RowColLocation cursorLoc, int rowHeight) {
|
||||
|
@ -182,10 +138,6 @@ public class EmptyTextField implements Field {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @see docking.widgets.fieldpanel.field.Field#getCursorBounds(int, int)
|
||||
*/
|
||||
@Override
|
||||
public Rectangle getCursorBounds(int row, int col) {
|
||||
if (row != 0) {
|
||||
|
@ -195,10 +147,6 @@ public class EmptyTextField implements Field {
|
|||
return new Rectangle(x, -heightAbove, 2, height);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @see docking.widgets.fieldpanel.field.Field#contains(int, int)
|
||||
*/
|
||||
@Override
|
||||
public boolean contains(int x, int y) {
|
||||
if ((x >= startX) && (x < startX + width) && (y >= -heightAbove) &&
|
||||
|
@ -226,10 +174,6 @@ public class EmptyTextField implements Field {
|
|||
return Color.WHITE;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @see docking.widgets.fieldpanel.field.Field#getScrollableUnitIncrement(int, int, int)
|
||||
*/
|
||||
@Override
|
||||
public int getScrollableUnitIncrement(int topOfScreen, int direction, int max) {
|
||||
if ((topOfScreen < -heightAbove) || (topOfScreen > height - heightAbove)) {
|
||||
|
@ -242,9 +186,6 @@ public class EmptyTextField implements Field {
|
|||
return heightAbove - topOfScreen;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see docking.widgets.fieldpanel.field.Field#isPrimary()
|
||||
*/
|
||||
@Override
|
||||
public boolean isPrimary() {
|
||||
return isPrimary;
|
||||
|
@ -258,34 +199,22 @@ public class EmptyTextField implements Field {
|
|||
isPrimary = state;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see docking.widgets.fieldpanel.field.Field#getHeightAbove()
|
||||
*/
|
||||
@Override
|
||||
public int getHeightAbove() {
|
||||
return heightAbove;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see docking.widgets.fieldpanel.field.Field#getHeightBelow()
|
||||
*/
|
||||
@Override
|
||||
public int getHeightBelow() {
|
||||
return height - heightAbove;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see docking.widgets.fieldpanel.field.Field#rowHeightChanged(int, int)
|
||||
*/
|
||||
@Override
|
||||
public void rowHeightChanged(int newHeightAbove, int newHeightBelow) {
|
||||
// don't care
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @see docking.widgets.fieldpanel.field.Field#getText()
|
||||
*/
|
||||
@Override
|
||||
public String getText() {
|
||||
return "";
|
||||
|
@ -296,17 +225,11 @@ public class EmptyTextField implements Field {
|
|||
return "";
|
||||
}
|
||||
|
||||
/**
|
||||
* @see docking.widgets.fieldpanel.field.Field#textOffsetToScreenLocation(int)
|
||||
*/
|
||||
@Override
|
||||
public RowColLocation textOffsetToScreenLocation(int textOffset) {
|
||||
return new RowColLocation(0, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see docking.widgets.fieldpanel.field.Field#screenLocationToTextOffset(int, int)
|
||||
*/
|
||||
@Override
|
||||
public int screenLocationToTextOffset(int row, int col) {
|
||||
return 0;
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
/* ###
|
||||
* IP: GHIDRA
|
||||
* REVIEWED: YES
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -30,7 +29,7 @@ public class FlowLayoutTextField extends VerticalLayoutTextField {
|
|||
|
||||
/**
|
||||
* This constructor will create a text field that will render one line of
|
||||
* text. If <code>metrics.stringWidth(text) > width</code>, then the text
|
||||
* text. If <code>metrics.stringWidth(text) > width</code>, then the text
|
||||
* will be clipped. No wrapping will be performed. If <code>text</code>
|
||||
* contains the highlight string, then it will be highlighted using the
|
||||
* highlight color.
|
||||
|
|
|
@ -108,9 +108,6 @@ public class ReverseClippingTextField implements TextField {
|
|||
textStartX = startX + DOT_DOT_DOT_WIDTH + margin;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see docking.widgets.fieldpanel.field.Field#contains(int, int)
|
||||
*/
|
||||
@Override
|
||||
public boolean contains(int x, int y) {
|
||||
if ((x >= startX) && (x < startX + width) && (y >= -textElement.getHeightAbove()) &&
|
||||
|
@ -120,9 +117,6 @@ public class ReverseClippingTextField implements TextField {
|
|||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see docking.widgets.fieldpanel.field.Field#getCol(int, int)
|
||||
*/
|
||||
@Override
|
||||
public int getCol(int row, int x) {
|
||||
int xPos = Math.max(x - textStartX, 0); // make x relative to this fields
|
||||
|
@ -130,9 +124,6 @@ public class ReverseClippingTextField implements TextField {
|
|||
return textElement.getMaxCharactersForWidth(xPos);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see docking.widgets.fieldpanel.field.Field#getCursorBounds(int, int)
|
||||
*/
|
||||
@Override
|
||||
public Rectangle getCursorBounds(int row, int col) {
|
||||
if (row != 0) {
|
||||
|
@ -145,17 +136,11 @@ public class ReverseClippingTextField implements TextField {
|
|||
textElement.getHeightAbove() + textElement.getHeightBelow());
|
||||
}
|
||||
|
||||
/**
|
||||
* @see docking.widgets.fieldpanel.field.Field#getHeight()
|
||||
*/
|
||||
@Override
|
||||
public int getHeight() {
|
||||
return textElement.getHeightAbove() + textElement.getHeightBelow();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see docking.widgets.fieldpanel.field.Field#getNumCols(int)
|
||||
*/
|
||||
@Override
|
||||
public int getNumCols(int row) {
|
||||
return getNumCols();
|
||||
|
@ -165,26 +150,16 @@ public class ReverseClippingTextField implements TextField {
|
|||
return textElement.length() + 1; // allow one column past the end of the text
|
||||
}
|
||||
|
||||
/**
|
||||
* @see docking.widgets.fieldpanel.field.Field#getNumRows()
|
||||
*/
|
||||
@Override
|
||||
public int getNumRows() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see docking.widgets.fieldpanel.field.Field#getRow(int)
|
||||
*/
|
||||
@Override
|
||||
public int getRow(int y) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see docking.widgets.fieldpanel.field.Field#getScrollableUnitIncrement(int, int,
|
||||
* int)
|
||||
*/
|
||||
@Override
|
||||
public int getScrollableUnitIncrement(int topOfScreen, int direction, int max) {
|
||||
|
||||
|
@ -199,17 +174,11 @@ public class ReverseClippingTextField implements TextField {
|
|||
return -getHeightAbove() - topOfScreen;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see docking.widgets.fieldpanel.field.Field#getStartX()
|
||||
*/
|
||||
@Override
|
||||
public int getStartX() {
|
||||
return startX;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see docking.widgets.fieldpanel.field.Field#getWidth()
|
||||
*/
|
||||
@Override
|
||||
public int getWidth() {
|
||||
return width;
|
||||
|
@ -220,9 +189,6 @@ public class ReverseClippingTextField implements TextField {
|
|||
return preferredWidth;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see docking.widgets.fieldpanel.field.Field#getX(int, int)
|
||||
*/
|
||||
@Override
|
||||
public int getX(int row, int col) {
|
||||
if (col >= getNumCols()) {
|
||||
|
@ -231,33 +197,21 @@ public class ReverseClippingTextField implements TextField {
|
|||
return findX(col) + textStartX;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see docking.widgets.fieldpanel.field.Field#getY(int)
|
||||
*/
|
||||
@Override
|
||||
public int getY(int row) {
|
||||
return -getHeightAbove();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see docking.widgets.fieldpanel.field.Field#isPrimary()
|
||||
*/
|
||||
@Override
|
||||
public boolean isPrimary() {
|
||||
return isPrimary;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see docking.widgets.fieldpanel.field.TextField#setPrimary(boolean)
|
||||
*/
|
||||
@Override
|
||||
public void setPrimary(boolean b) {
|
||||
isPrimary = b;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see docking.widgets.fieldpanel.field.Field#isValid(int, int)
|
||||
*/
|
||||
@Override
|
||||
public boolean isValid(int row, int col) {
|
||||
if (row != 0) {
|
||||
|
@ -274,11 +228,6 @@ public class ReverseClippingTextField implements TextField {
|
|||
return fullText;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see docking.widgets.fieldpanel.field.Field#paint(java.awt.Graphics,
|
||||
* docking.widgets.fieldpanel.internal.PaintContext, boolean,
|
||||
* docking.widgets.fieldpanel.support.RowColLocation)
|
||||
*/
|
||||
@Override
|
||||
public void paint(JComponent c, Graphics g, PaintContext context,
|
||||
FieldBackgroundColorManager colorManager, RowColLocation cursorLoc, int rowHeight) {
|
||||
|
@ -389,9 +338,6 @@ public class ReverseClippingTextField implements TextField {
|
|||
|
||||
}
|
||||
|
||||
/**
|
||||
* @see docking.widgets.fieldpanel.field.TextField#dataToScreenLocation(int, int)
|
||||
*/
|
||||
@Override
|
||||
public RowColLocation dataToScreenLocation(int dataRow, int dataColumn) {
|
||||
int column = textElement.getCharacterIndexForDataLocation(dataRow, dataColumn);
|
||||
|
@ -413,33 +359,21 @@ public class ReverseClippingTextField implements TextField {
|
|||
return isClipped;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see docking.widgets.fieldpanel.field.Field#getHeightAbove()
|
||||
*/
|
||||
@Override
|
||||
public int getHeightAbove() {
|
||||
return textElement.getHeightAbove();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see docking.widgets.fieldpanel.field.Field#getHeightBelow()
|
||||
*/
|
||||
@Override
|
||||
public int getHeightBelow() {
|
||||
return textElement.getHeightBelow();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see docking.widgets.fieldpanel.field.Field#rowHeightChanged(int, int)
|
||||
*/
|
||||
@Override
|
||||
public void rowHeightChanged(int heightAbove, int heightBelow) {
|
||||
// Don't care
|
||||
}
|
||||
|
||||
/**
|
||||
* @see docking.widgets.fieldpanel.field.Field#getText()
|
||||
*/
|
||||
@Override
|
||||
public String getText() {
|
||||
// TODO: this gets the full string and not the clipped version--we want
|
||||
|
@ -452,9 +386,6 @@ public class ReverseClippingTextField implements TextField {
|
|||
return getString();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see docking.widgets.fieldpanel.field.Field#textOffsetToScreenLocation(int)
|
||||
*/
|
||||
@Override
|
||||
public RowColLocation textOffsetToScreenLocation(int textOffset) {
|
||||
int col = textOffset + startingCharIndex;
|
||||
|
@ -462,9 +393,6 @@ public class ReverseClippingTextField implements TextField {
|
|||
return new RowColLocation(0, Math.min(col, textElement.getText().length() - 1));
|
||||
}
|
||||
|
||||
/**
|
||||
* @see docking.widgets.fieldpanel.field.Field#screenLocationToTextOffset(int, int)
|
||||
*/
|
||||
@Override
|
||||
public int screenLocationToTextOffset(int row, int col) {
|
||||
return col + startingCharIndex;
|
||||
|
|
|
@ -88,10 +88,6 @@ public class SimpleImageField implements Field {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @see docking.widgets.fieldpanel.field.Field#contains(int, int)
|
||||
*/
|
||||
@Override
|
||||
public boolean contains(int x, int y) {
|
||||
if ((x >= startX) && (x < startX + width) && (y >= -heightAbove) &&
|
||||
|
@ -101,19 +97,11 @@ public class SimpleImageField implements Field {
|
|||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @see docking.widgets.fieldpanel.field.Field#getCol(int, int)
|
||||
*/
|
||||
@Override
|
||||
public int getCol(int row, int x) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @see docking.widgets.fieldpanel.field.Field#getCursorBounds(int, int)
|
||||
*/
|
||||
@Override
|
||||
public Rectangle getCursorBounds(int row, int col) {
|
||||
if (row != 0) {
|
||||
|
@ -122,46 +110,26 @@ public class SimpleImageField implements Field {
|
|||
return new Rectangle(startX, -heightAbove, width, height);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @see docking.widgets.fieldpanel.field.Field#getHeight()
|
||||
*/
|
||||
@Override
|
||||
public int getHeight() {
|
||||
return height;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @see docking.widgets.fieldpanel.field.Field#getNumRows()
|
||||
*/
|
||||
@Override
|
||||
public int getNumRows() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @see docking.widgets.fieldpanel.field.Field#getNumCols(int)
|
||||
*/
|
||||
@Override
|
||||
public int getNumCols(int row) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @see docking.widgets.fieldpanel.field.Field#getRow(int)
|
||||
*/
|
||||
@Override
|
||||
public int getRow(int y) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @see docking.widgets.fieldpanel.field.Field#getScrollableUnitIncrement(int, int, int)
|
||||
*/
|
||||
@Override
|
||||
public int getScrollableUnitIncrement(int topOfScreen, int direction, int max) {
|
||||
if ((topOfScreen < -heightAbove) || (topOfScreen > height - heightAbove)) {
|
||||
|
@ -174,19 +142,11 @@ public class SimpleImageField implements Field {
|
|||
return -heightAbove - topOfScreen;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @see docking.widgets.fieldpanel.field.Field#getStartX()
|
||||
*/
|
||||
@Override
|
||||
public int getStartX() {
|
||||
return startX;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @see docking.widgets.fieldpanel.field.Field#getWidth()
|
||||
*/
|
||||
@Override
|
||||
public int getWidth() {
|
||||
return width;
|
||||
|
@ -197,28 +157,16 @@ public class SimpleImageField implements Field {
|
|||
return icon.getIconWidth();
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @see docking.widgets.fieldpanel.field.Field#getX(int, int)
|
||||
*/
|
||||
@Override
|
||||
public int getX(int row, int col) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @see docking.widgets.fieldpanel.field.Field#getY(int)
|
||||
*/
|
||||
@Override
|
||||
public int getY(int row) {
|
||||
return -heightAbove;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @see docking.widgets.fieldpanel.field.Field#isValid(int, int)
|
||||
*/
|
||||
@Override
|
||||
public boolean isValid(int row, int col) {
|
||||
if (row != 0) {
|
||||
|
@ -230,9 +178,6 @@ public class SimpleImageField implements Field {
|
|||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see docking.widgets.fieldpanel.field.Field#paint(java.awt.Graphics, docking.widgets.fieldpanel.internal.PaintContext, boolean, docking.widgets.fieldpanel.support.RowColLocation)
|
||||
*/
|
||||
@Override
|
||||
public void paint(JComponent c, Graphics g, PaintContext context,
|
||||
FieldBackgroundColorManager map, RowColLocation cursorLoc, int rowHeight) {
|
||||
|
@ -278,10 +223,6 @@ public class SimpleImageField implements Field {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @see docking.widgets.fieldpanel.field.Field#isPrimary()
|
||||
*/
|
||||
@Override
|
||||
public boolean isPrimary() {
|
||||
return isPrimary;
|
||||
|
@ -295,33 +236,21 @@ public class SimpleImageField implements Field {
|
|||
isPrimary = state;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see docking.widgets.fieldpanel.field.Field#getHeightAbove()
|
||||
*/
|
||||
@Override
|
||||
public int getHeightAbove() {
|
||||
return heightAbove;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see docking.widgets.fieldpanel.field.Field#getHeightBelow()
|
||||
*/
|
||||
@Override
|
||||
public int getHeightBelow() {
|
||||
return height - heightAbove;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see docking.widgets.fieldpanel.field.Field#rowHeightChanged(int, int)
|
||||
*/
|
||||
@Override
|
||||
public void rowHeightChanged(int newHeightAbove, int newHeightBelow) {
|
||||
// don't care
|
||||
}
|
||||
|
||||
/**
|
||||
* @see docking.widgets.fieldpanel.field.Field#getText()
|
||||
*/
|
||||
@Override
|
||||
public String getText() {
|
||||
return "";
|
||||
|
@ -332,17 +261,11 @@ public class SimpleImageField implements Field {
|
|||
return "";
|
||||
}
|
||||
|
||||
/**
|
||||
* @see docking.widgets.fieldpanel.field.Field#textOffsetToScreenLocation(int)
|
||||
*/
|
||||
@Override
|
||||
public RowColLocation textOffsetToScreenLocation(int textOffset) {
|
||||
return new RowColLocation(0, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see docking.widgets.fieldpanel.field.Field#screenLocationToTextOffset(int, int)
|
||||
*/
|
||||
@Override
|
||||
public int screenLocationToTextOffset(int row, int col) {
|
||||
return 0;
|
||||
|
|
|
@ -106,9 +106,6 @@ public class VerticalLayoutTextField implements TextField {
|
|||
return widest;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see docking.widgets.fieldpanel.field.Field#getText()
|
||||
*/
|
||||
@Override
|
||||
public String getText() {
|
||||
if (text == null) {
|
||||
|
@ -122,18 +119,11 @@ public class VerticalLayoutTextField implements TextField {
|
|||
return generateText("\n");
|
||||
}
|
||||
|
||||
/**
|
||||
* @see java.lang.Object#toString()
|
||||
*/
|
||||
@Override
|
||||
public String toString() {
|
||||
return getText();
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @see docking.widgets.fieldpanel.field.Field#getWidth()
|
||||
*/
|
||||
@Override
|
||||
public int getWidth() {
|
||||
return width;
|
||||
|
@ -144,45 +134,27 @@ public class VerticalLayoutTextField implements TextField {
|
|||
return preferredWidth;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @see docking.widgets.fieldpanel.field.Field#getHeight()
|
||||
*/
|
||||
@Override
|
||||
public int getHeight() {
|
||||
return height;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @see docking.widgets.fieldpanel.field.Field#getStartX()
|
||||
*/
|
||||
@Override
|
||||
public int getStartX() {
|
||||
return startX;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @see docking.widgets.fieldpanel.field.Field#getNumRows()
|
||||
*/
|
||||
@Override
|
||||
public int getNumRows() {
|
||||
return subFields.size();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see docking.widgets.fieldpanel.field.Field#getNumCols(int)
|
||||
*/
|
||||
@Override
|
||||
public int getNumCols(int row) {
|
||||
Field f = subFields.get(row);
|
||||
return f.getNumCols(0);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see docking.widgets.fieldpanel.field.Field#getRow(int)
|
||||
*/
|
||||
@Override
|
||||
public int getRow(int y) {
|
||||
if (y < -heightAbove) {
|
||||
|
@ -201,20 +173,12 @@ public class VerticalLayoutTextField implements TextField {
|
|||
return n - 1;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @see docking.widgets.fieldpanel.field.Field#getCol(int, int)
|
||||
*/
|
||||
@Override
|
||||
public int getCol(int row, int x) {
|
||||
Field f = subFields.get(row);
|
||||
return f.getCol(0, x);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @see docking.widgets.fieldpanel.field.Field#getY(int)
|
||||
*/
|
||||
@Override
|
||||
public int getY(int row) {
|
||||
|
||||
|
@ -226,20 +190,12 @@ public class VerticalLayoutTextField implements TextField {
|
|||
return y;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @see docking.widgets.fieldpanel.field.Field#getX(int, int)
|
||||
*/
|
||||
@Override
|
||||
public int getX(int row, int col) {
|
||||
Field f = subFields.get(row);
|
||||
return f.getX(0, col);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @see docking.widgets.fieldpanel.field.Field#isValid(int, int)
|
||||
*/
|
||||
@Override
|
||||
public boolean isValid(int row, int col) {
|
||||
|
||||
|
@ -250,9 +206,6 @@ public class VerticalLayoutTextField implements TextField {
|
|||
return f.isValid(0, col);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see docking.widgets.fieldpanel.field.Field#paint(java.awt.Graphics, docking.widgets.fieldpanel.internal.PaintContext, boolean, docking.widgets.fieldpanel.support.RowColLocation)
|
||||
*/
|
||||
@Override
|
||||
public void paint(JComponent c, Graphics g, PaintContext context,
|
||||
FieldBackgroundColorManager colorManager, RowColLocation cursorLoc, int rowHeight) {
|
||||
|
@ -308,10 +261,6 @@ public class VerticalLayoutTextField implements TextField {
|
|||
g.translate(0, -height);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @see docking.widgets.fieldpanel.field.Field#getCursorBounds(int, int)
|
||||
*/
|
||||
@Override
|
||||
public Rectangle getCursorBounds(int row, int col) {
|
||||
if ((row < 0) || (row >= subFields.size())) {
|
||||
|
@ -326,10 +275,6 @@ public class VerticalLayoutTextField implements TextField {
|
|||
return r;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @see docking.widgets.fieldpanel.field.Field#contains(int, int)
|
||||
*/
|
||||
@Override
|
||||
public boolean contains(int x, int y) {
|
||||
if ((x >= startX) && (x < startX + width) && (y >= -heightAbove) &&
|
||||
|
@ -339,10 +284,6 @@ public class VerticalLayoutTextField implements TextField {
|
|||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @see docking.widgets.fieldpanel.field.Field#getScrollableUnitIncrement(int, int, int)
|
||||
*/
|
||||
@Override
|
||||
public int getScrollableUnitIncrement(int topOfScreen, int direction, int max) {
|
||||
|
||||
|
@ -364,9 +305,6 @@ public class VerticalLayoutTextField implements TextField {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @see docking.widgets.fieldpanel.field.Field#isPrimary()
|
||||
*/
|
||||
@Override
|
||||
public boolean isPrimary() {
|
||||
return isPrimary;
|
||||
|
@ -388,25 +326,16 @@ public class VerticalLayoutTextField implements TextField {
|
|||
return Collections.unmodifiableList(subFields);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see docking.widgets.fieldpanel.field.Field#getHeightAbove()
|
||||
*/
|
||||
@Override
|
||||
public int getHeightAbove() {
|
||||
return heightAbove;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see docking.widgets.fieldpanel.field.Field#getHeightBelow()
|
||||
*/
|
||||
@Override
|
||||
public int getHeightBelow() {
|
||||
return height - heightAbove;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see docking.widgets.fieldpanel.field.Field#rowHeightChanged(int, int)
|
||||
*/
|
||||
@Override
|
||||
public void rowHeightChanged(int heightAbove1, int heightBelow) {
|
||||
// most fields don't care
|
||||
|
@ -494,9 +423,6 @@ public class VerticalLayoutTextField implements TextField {
|
|||
return buf.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see docking.widgets.fieldpanel.field.Field#screenLocationToTextOffset(int, int)
|
||||
*/
|
||||
@Override
|
||||
public int screenLocationToTextOffset(int row, int col) {
|
||||
if (row >= textElements.length) {
|
||||
|
@ -511,9 +437,6 @@ public class VerticalLayoutTextField implements TextField {
|
|||
return len;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see docking.widgets.fieldpanel.field.Field#textOffsetToScreenLocation(int)
|
||||
*/
|
||||
@Override
|
||||
public RowColLocation textOffsetToScreenLocation(int textOffset) {
|
||||
int extraSpace = lineDelimiter.length();
|
||||
|
@ -528,9 +451,6 @@ public class VerticalLayoutTextField implements TextField {
|
|||
return new RowColLocation(n - 1, textElements[n - 1].getText().length());
|
||||
}
|
||||
|
||||
/**
|
||||
* @see docking.widgets.fieldpanel.field.TextField#isClipped()
|
||||
*/
|
||||
@Override
|
||||
public boolean isClipped() {
|
||||
return isClipped;
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
/* ###
|
||||
* IP: GHIDRA
|
||||
* REVIEWED: YES
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -80,9 +79,7 @@ public class FieldPanelCoordinator implements ViewListener {
|
|||
panels = newPanels;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see docking.widgets.fieldpanel.listener.ViewListener#viewChanged(docking.widgets.fieldpanel.FieldPanel, int, int)
|
||||
*/
|
||||
@Override
|
||||
public void viewChanged(FieldPanel fp, BigInteger index, int xPos, int yPos) {
|
||||
if (valuesChanging) return;
|
||||
valuesChanging = true;
|
||||
|
|
|
@ -113,9 +113,6 @@ public class LineLockedFieldPanelCoordinator extends FieldPanelCoordinator {
|
|||
super.remove(fp);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see docking.widgets.fieldpanel.listener.ViewListener#viewChanged(docking.widgets.fieldpanel.FieldPanel, int, int)
|
||||
*/
|
||||
@Override
|
||||
public void viewChanged(FieldPanel fp, BigInteger index, int xPos, int yPos) {
|
||||
if (valuesChanging)
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
/* ###
|
||||
* IP: GHIDRA
|
||||
* REVIEWED: YES
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -27,8 +26,10 @@ public interface ViewListener {
|
|||
/**
|
||||
* Notifies the listener that the top of the screen has changed position.
|
||||
* @param fp the field panel whose view changed.
|
||||
* @param index the index of the layout at the top of the screen
|
||||
* @param offset the y coordinate of the layout displayed at the top of the
|
||||
* @param index the index of the layout at the top of the screen.
|
||||
* @param xOffset the x coordinate of the layout displayed at the left of the
|
||||
* screen.
|
||||
* @param yOffset the y coordinate of the layout displayed at the top of the
|
||||
* screen.
|
||||
*/
|
||||
public void viewChanged(FieldPanel fp, BigInteger index, int xOffset, int yOffset);
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
/* ###
|
||||
* IP: GHIDRA
|
||||
* REVIEWED: YES
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -82,9 +81,8 @@ public class FieldRange implements Comparable<FieldRange> {
|
|||
|
||||
/**
|
||||
* checks if the given location is contained in the range.
|
||||
* @param row
|
||||
* @param column
|
||||
* @return
|
||||
* @param loc the field location.
|
||||
* @return true if the field range contains the specified location.
|
||||
*/
|
||||
public boolean contains(FieldLocation loc) {
|
||||
return (loc.compareTo(start) >= 0) && (loc.compareTo(end) < 0);
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
/* ###
|
||||
* IP: GHIDRA
|
||||
* REVIEWED: YES
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -59,8 +58,8 @@ public class FieldSelection implements Iterable<FieldRange> {
|
|||
|
||||
/**
|
||||
* Returns true if the given Field at the given index is in the selection.
|
||||
* @param index the index of the layout to check if in the selection
|
||||
* @param field the index of the field in the layout to check if in the selection.
|
||||
* @param loc the field location.
|
||||
* @return true if the field selection contains the specified location.
|
||||
*/
|
||||
public boolean contains(FieldLocation loc) {
|
||||
return getRangeContaining(loc) != null;
|
||||
|
@ -69,7 +68,7 @@ public class FieldSelection implements Iterable<FieldRange> {
|
|||
/**
|
||||
* Returns the range if the given Field at the given index is in the selection.
|
||||
* Otherwise returns null.
|
||||
* @param fieldLocation location to find the range for.
|
||||
* @param loc location to find the range for.
|
||||
*/
|
||||
public FieldRange getRangeContaining(FieldLocation loc) {
|
||||
int insertIndex = Collections.binarySearch(ranges, new FieldRange(loc, FieldLocation.MAX));
|
||||
|
@ -140,10 +139,8 @@ public class FieldSelection implements Iterable<FieldRange> {
|
|||
|
||||
/**
|
||||
* Adds a field range to this selection.
|
||||
* @param startIndex the layout index of the start field
|
||||
* @param startField the index of the field in the start layout.
|
||||
* @param endIndex the layout index of the end field.
|
||||
* @param endField the index of the field in the end layout.
|
||||
* @param start the starting field location.
|
||||
* @param end the ending field location.
|
||||
*/
|
||||
public void addRange(FieldLocation start, FieldLocation end) {
|
||||
if (start.equals(end)) {
|
||||
|
@ -204,10 +201,8 @@ public class FieldSelection implements Iterable<FieldRange> {
|
|||
|
||||
/**
|
||||
* Removes the given field range from the current selection.
|
||||
* @param startIndex the layout index of the startField to remove from the selection
|
||||
* @param startField the field index of first field to remove from the selection
|
||||
* @param endIndex the layout index of the endField to remove from the selection.
|
||||
* @param endField the field index of the last field to remove from the selection.
|
||||
* @param start the starting field location.
|
||||
* @param end the ending field location.
|
||||
*/
|
||||
public void removeRange(FieldLocation start, FieldLocation end) {
|
||||
FieldRange deleteRange = new FieldRange(start, end);
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
/* ###
|
||||
* IP: GHIDRA
|
||||
* REVIEWED: YES
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -40,7 +39,6 @@ public interface HoverProvider {
|
|||
* @param field the field over which the mouse is hovering
|
||||
* @param fieldBounds the rectangle containing the bounds of the given field.
|
||||
* @param event the last mouse motion event over the field viewer component (i.e., FieldPanel).
|
||||
* @return true if a popup window has been displayed adjacent to the mouse location.
|
||||
*/
|
||||
public void mouseHovered(FieldLocation fieldLocation, Field field, Rectangle fieldBounds,
|
||||
MouseEvent event);
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
/* ###
|
||||
* IP: GHIDRA
|
||||
* REVIEWED: YES
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -74,10 +73,6 @@ public class MultiRowLayout implements Layout {
|
|||
offsets[layouts.length] = soFar;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @see docking.widgets.fieldpanel.Layout#getHeight()
|
||||
*/
|
||||
@Override
|
||||
public int getHeight() {
|
||||
return heightAbove + heightBelow;
|
||||
|
@ -96,19 +91,11 @@ public class MultiRowLayout implements Layout {
|
|||
return max;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @see docking.widgets.fieldpanel.Layout#getNumFields()
|
||||
*/
|
||||
@Override
|
||||
public int getNumFields() {
|
||||
return numFields;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @see docking.widgets.fieldpanel.Layout#getField(int)
|
||||
*/
|
||||
@Override
|
||||
public Field getField(int index) {
|
||||
for (int i = 0; i < layouts.length; i++) {
|
||||
|
@ -119,9 +106,6 @@ public class MultiRowLayout implements Layout {
|
|||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see docking.widgets.fieldpanel.Layout#paint(java.awt.Graphics, docking.widgets.fieldpanel.internal.PaintContext, java.awt.Rectangle, ghidra.util.bean.field.LayoutSelection, ghidra.util.bean.field.LayoutSelection, int, int, int)
|
||||
*/
|
||||
@Override
|
||||
public void paint(JComponent c, Graphics g, PaintContext context, Rectangle rect,
|
||||
LayoutBackgroundColorManager colorManager, FieldLocation cursorLocation) {
|
||||
|
@ -151,10 +135,6 @@ public class MultiRowLayout implements Layout {
|
|||
rect.y += totalShift;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @see docking.widgets.fieldpanel.Layout#setCursor(docking.widgets.fieldpanel.support.FieldLocation, int, int)
|
||||
*/
|
||||
@Override
|
||||
public int setCursor(FieldLocation cursorLoc, int x, int y) {
|
||||
int offset = 0;
|
||||
|
@ -169,10 +149,6 @@ public class MultiRowLayout implements Layout {
|
|||
return layouts[0].setCursor(cursorLoc, x, y);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @see docking.widgets.fieldpanel.Layout#getCursorRect(int, int, int)
|
||||
*/
|
||||
@Override
|
||||
public Rectangle getCursorRect(int fieldNum, int row, int col) {
|
||||
int offset = 0;
|
||||
|
@ -189,10 +165,6 @@ public class MultiRowLayout implements Layout {
|
|||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @see docking.widgets.fieldpanel.Layout#cursorUp(docking.widgets.fieldpanel.support.FieldLocation, int)
|
||||
*/
|
||||
@Override
|
||||
public boolean cursorUp(FieldLocation cursorLoc, int lastX) {
|
||||
int row = findRow(cursorLoc);
|
||||
|
@ -210,10 +182,6 @@ public class MultiRowLayout implements Layout {
|
|||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @see docking.widgets.fieldpanel.Layout#cursorDown(docking.widgets.fieldpanel.support.FieldLocation, int)
|
||||
*/
|
||||
@Override
|
||||
public boolean cursorDown(FieldLocation cursorLoc, int lastX) {
|
||||
int row = findRow(cursorLoc);
|
||||
|
@ -232,10 +200,6 @@ public class MultiRowLayout implements Layout {
|
|||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @see docking.widgets.fieldpanel.Layout#cursorBeginning(docking.widgets.fieldpanel.support.FieldLocation)
|
||||
*/
|
||||
@Override
|
||||
public int cursorBeginning(FieldLocation cursorLoc) {
|
||||
int row = findRow(cursorLoc);
|
||||
|
@ -245,10 +209,6 @@ public class MultiRowLayout implements Layout {
|
|||
return lastX;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @see docking.widgets.fieldpanel.Layout#cursorEnd(docking.widgets.fieldpanel.support.FieldLocation)
|
||||
*/
|
||||
@Override
|
||||
public int cursorEnd(FieldLocation cursorLoc) {
|
||||
int row = findRow(cursorLoc);
|
||||
|
@ -258,10 +218,6 @@ public class MultiRowLayout implements Layout {
|
|||
return lastX;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @see docking.widgets.fieldpanel.Layout#cursorLeft(docking.widgets.fieldpanel.support.FieldLocation)
|
||||
*/
|
||||
@Override
|
||||
public int cursorLeft(FieldLocation cursorLoc) {
|
||||
int row = findRow(cursorLoc);
|
||||
|
@ -279,10 +235,6 @@ public class MultiRowLayout implements Layout {
|
|||
return returnVal;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @see docking.widgets.fieldpanel.Layout#cursorRight(docking.widgets.fieldpanel.support.FieldLocation)
|
||||
*/
|
||||
@Override
|
||||
public int cursorRight(FieldLocation cursorLoc) {
|
||||
int row = findRow(cursorLoc);
|
||||
|
@ -300,10 +252,6 @@ public class MultiRowLayout implements Layout {
|
|||
return returnVal;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @see docking.widgets.fieldpanel.Layout#enterLayout(docking.widgets.fieldpanel.support.FieldLocation, int, boolean)
|
||||
*/
|
||||
@Override
|
||||
public boolean enterLayout(FieldLocation cursorLoc, int lastX, boolean fromTop) {
|
||||
if (fromTop) {
|
||||
|
@ -315,10 +263,6 @@ public class MultiRowLayout implements Layout {
|
|||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @see docking.widgets.fieldpanel.Layout#getScrollableUnitIncrement(int, int)
|
||||
*/
|
||||
@Override
|
||||
public int getScrollableUnitIncrement(int topOfScreen, int direction) {
|
||||
int searchPoint = topOfScreen;
|
||||
|
@ -337,10 +281,6 @@ public class MultiRowLayout implements Layout {
|
|||
direction);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @see docking.widgets.fieldpanel.Layout#contains(int)
|
||||
*/
|
||||
@Override
|
||||
public boolean contains(int yPos) {
|
||||
if ((yPos >= 0) && (yPos < heightAbove + heightBelow)) {
|
||||
|
@ -420,9 +360,6 @@ public class MultiRowLayout implements Layout {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @see docking.widgets.fieldpanel.Layout#getPrimaryOffset()
|
||||
*/
|
||||
@Override
|
||||
public int getPrimaryOffset() {
|
||||
if (primaryOffset == -1) {
|
||||
|
@ -442,9 +379,6 @@ public class MultiRowLayout implements Layout {
|
|||
primaryOffset = 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see docking.widgets.fieldpanel.Layout#getFieldBounds(int)
|
||||
*/
|
||||
@Override
|
||||
public Rectangle getFieldBounds(int index) {
|
||||
int offset = 0;
|
||||
|
@ -460,18 +394,12 @@ public class MultiRowLayout implements Layout {
|
|||
|
||||
}
|
||||
|
||||
/**
|
||||
* @see docking.widgets.fieldpanel.Layout#insertSpaceAbove(int)
|
||||
*/
|
||||
@Override
|
||||
public void insertSpaceAbove(int size) {
|
||||
layouts[0].insertSpaceAbove(size);
|
||||
heightAbove += size;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see docking.widgets.fieldpanel.Layout#insertSpaceBelow(int)
|
||||
*/
|
||||
@Override
|
||||
public void insertSpaceBelow(int size) {
|
||||
layouts[layouts.length - 1].insertSpaceBelow(size);
|
||||
|
|
|
@ -61,10 +61,6 @@ public class RowLayout implements Layout {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @see docking.widgets.fieldpanel.Layout#getHeight()
|
||||
*/
|
||||
@Override
|
||||
public int getHeight() {
|
||||
return heightAbove + heightBelow;
|
||||
|
@ -116,43 +112,26 @@ public class RowLayout implements Layout {
|
|||
return rowID;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see docking.widgets.fieldpanel.Layout#insertSpaceAbove(int)
|
||||
*/
|
||||
@Override
|
||||
public void insertSpaceAbove(int size) {
|
||||
heightAbove += size;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see docking.widgets.fieldpanel.Layout#insertSpaceBelow(int)
|
||||
*/
|
||||
@Override
|
||||
public void insertSpaceBelow(int size) {
|
||||
heightBelow += size;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @see docking.widgets.fieldpanel.Layout#getNumFields()
|
||||
*/
|
||||
@Override
|
||||
public int getNumFields() {
|
||||
return fields.length;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @see docking.widgets.fieldpanel.Layout#getField(int)
|
||||
*/
|
||||
@Override
|
||||
public Field getField(int index) {
|
||||
return fields[index];
|
||||
}
|
||||
|
||||
/**
|
||||
* @see docking.widgets.fieldpanel.Layout#paint(java.awt.Graphics, docking.widgets.fieldpanel.internal.PaintContext, java.awt.Rectangle, docking.widgets.fieldpanel.support.field.LayoutSelection, docking.widgets.fieldpanel.support.field.LayoutSelection, int, int, int)
|
||||
*/
|
||||
@Override
|
||||
public void paint(JComponent c, Graphics g, PaintContext context, Rectangle rect,
|
||||
LayoutBackgroundColorManager colorManager, FieldLocation cursorLocation) {
|
||||
|
@ -209,10 +188,6 @@ public class RowLayout implements Layout {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @see docking.widgets.fieldpanel.Layout#setCursor(docking.widgets.fieldpanel.support.FieldLocation, int, int)
|
||||
*/
|
||||
@Override
|
||||
public int setCursor(FieldLocation cursorLoc, int x, int y) {
|
||||
|
||||
|
@ -229,10 +204,6 @@ public class RowLayout implements Layout {
|
|||
return field.getX(cursorLoc.row, cursorLoc.col);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @see docking.widgets.fieldpanel.Layout#getCursorRect(int, int, int)
|
||||
*/
|
||||
@Override
|
||||
public Rectangle getCursorRect(int fieldNum, int row, int col) {
|
||||
if (fieldNum >= fields.length) { // somehow we got a call where this happened
|
||||
|
@ -247,10 +218,6 @@ public class RowLayout implements Layout {
|
|||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @see docking.widgets.fieldpanel.Layout#cursorUp(docking.widgets.fieldpanel.support.FieldLocation, int)
|
||||
*/
|
||||
@Override
|
||||
public boolean cursorUp(FieldLocation cursorLoc, int lastX) {
|
||||
if (cursorLoc.row > 0) {
|
||||
|
@ -261,10 +228,6 @@ public class RowLayout implements Layout {
|
|||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @see docking.widgets.fieldpanel.Layout#cursorDown(docking.widgets.fieldpanel.support.FieldLocation, int)
|
||||
*/
|
||||
@Override
|
||||
public boolean cursorDown(FieldLocation cursorLoc, int lastX) {
|
||||
if (cursorLoc.row < fields[cursorLoc.fieldNum].getNumRows() - 1) {
|
||||
|
@ -275,10 +238,6 @@ public class RowLayout implements Layout {
|
|||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @see docking.widgets.fieldpanel.Layout#cursorBeginning(docking.widgets.fieldpanel.support.FieldLocation)
|
||||
*/
|
||||
@Override
|
||||
public int cursorBeginning(FieldLocation cursorLoc) {
|
||||
|
||||
|
@ -290,10 +249,6 @@ public class RowLayout implements Layout {
|
|||
return field.getX(cursorLoc.row, cursorLoc.col);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @see docking.widgets.fieldpanel.Layout#cursorEnd(docking.widgets.fieldpanel.support.FieldLocation)
|
||||
*/
|
||||
@Override
|
||||
public int cursorEnd(FieldLocation cursorLoc) {
|
||||
Field field = fields[fields.length - 1];
|
||||
|
@ -304,10 +259,6 @@ public class RowLayout implements Layout {
|
|||
return field.getX(cursorLoc.row, cursorLoc.col);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @see docking.widgets.fieldpanel.Layout#cursorLeft(docking.widgets.fieldpanel.support.FieldLocation)
|
||||
*/
|
||||
@Override
|
||||
public int cursorLeft(FieldLocation cursorLoc) {
|
||||
if (cursorLoc.col > 0) {
|
||||
|
@ -334,10 +285,6 @@ public class RowLayout implements Layout {
|
|||
return fields[cursorLoc.fieldNum].getX(cursorLoc.row, cursorLoc.col);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @see docking.widgets.fieldpanel.Layout#cursorRight(docking.widgets.fieldpanel.support.FieldLocation)
|
||||
*/
|
||||
@Override
|
||||
public int cursorRight(FieldLocation cursorLoc) {
|
||||
if (cursorLoc.col < fields[cursorLoc.fieldNum].getNumCols(cursorLoc.row) - 1) {
|
||||
|
@ -362,10 +309,6 @@ public class RowLayout implements Layout {
|
|||
return fields[cursorLoc.fieldNum].getX(cursorLoc.row, cursorLoc.col);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @see docking.widgets.fieldpanel.Layout#enterLayout(docking.widgets.fieldpanel.support.FieldLocation, int, boolean)
|
||||
*/
|
||||
@Override
|
||||
public boolean enterLayout(FieldLocation cursorLoc, int lastX, boolean fromTop) {
|
||||
// locate the field that the cursor will enter
|
||||
|
@ -387,10 +330,6 @@ public class RowLayout implements Layout {
|
|||
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @see docking.widgets.fieldpanel.Layout#getScrollableUnitIncrement(int, int)
|
||||
*/
|
||||
@Override
|
||||
public int getScrollableUnitIncrement(int topOfScreen, int direction) {
|
||||
int max = 0;
|
||||
|
@ -420,10 +359,6 @@ public class RowLayout implements Layout {
|
|||
return max;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @see docking.widgets.fieldpanel.Layout#contains(int)
|
||||
*/
|
||||
@Override
|
||||
public boolean contains(int yPos) {
|
||||
if ((yPos >= 0) && (yPos < heightAbove + heightBelow)) {
|
||||
|
@ -487,9 +422,7 @@ public class RowLayout implements Layout {
|
|||
// int width = end-start;
|
||||
// g.fillRect(start,0,width,heightAbove+heightBelow);
|
||||
// }
|
||||
/**
|
||||
* @see docking.widgets.fieldpanel.Layout#getPrimaryOffset()
|
||||
*/
|
||||
|
||||
@Override
|
||||
public int getPrimaryOffset() {
|
||||
return 0;
|
||||
|
@ -499,9 +432,6 @@ public class RowLayout implements Layout {
|
|||
return isPrimary;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see docking.widgets.fieldpanel.Layout#getFieldBounds(int)
|
||||
*/
|
||||
@Override
|
||||
public Rectangle getFieldBounds(int index) {
|
||||
Field f = fields[index];
|
||||
|
@ -511,9 +441,6 @@ public class RowLayout implements Layout {
|
|||
return rect;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see docking.widgets.fieldpanel.Layout#getIndexSize()
|
||||
*/
|
||||
@Override
|
||||
public int getIndexSize() {
|
||||
return 1;
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
/* ###
|
||||
* IP: GHIDRA
|
||||
* REVIEWED: YES
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -37,7 +36,7 @@ public class ViewerPosition implements Serializable {
|
|||
* @param xOffset The horizontal scroll position (NOT CURRENTLY USED)
|
||||
* @param yOffset the vertical position of the layout at the top of the screen.
|
||||
* If the the layout is totally visible, then the yOffset will be 0. Otherwise,
|
||||
* it will be < 0 indicating that it begins above the top of the screen.
|
||||
* it will be < 0 indicating that it begins above the top of the screen.
|
||||
*/
|
||||
public ViewerPosition(BigInteger index, int xOffset, int yOffset) {
|
||||
this.index = index;
|
||||
|
|
|
@ -25,7 +25,7 @@ import docking.widgets.checkbox.GHtmlCheckBox;
|
|||
* A 'dynamic' label (the text can be changed), with HTML rendering allowed.
|
||||
* <p>
|
||||
* See also:
|
||||
* <table border=1>
|
||||
* <table border=1><caption></caption>
|
||||
* <tr><th>Class</th><th>Mutable text</th><th>HTML rendering</th><th>Description</th></tr>
|
||||
* <tr><td>{@link GLabel}</td><td>Immutable</td><td>NO</td><td>Non-html unchangeable label</td></tr>
|
||||
* <tr><td>{@link GDLabel}</td><td>Mutable</td><td>NO</td><td>Non-html changeable label</td></tr>
|
||||
|
|
|
@ -25,7 +25,7 @@ import docking.widgets.checkbox.GHtmlCheckBox;
|
|||
* A 'dynamic' label (the text can be changed), with HTML rendering disabled.
|
||||
* <p>
|
||||
* See also:
|
||||
* <table border=1>
|
||||
* <table border=1><caption></caption>
|
||||
* <tr><th>Class</th><th>Mutable text</th><th>HTML rendering</th><th>Description</th></tr>
|
||||
* <tr><td>{@link GLabel}</td><td>Immutable</td><td>NO</td><td>Non-html unchangeable label</td></tr>
|
||||
* <tr><td>{@link GDLabel}</td><td>Mutable</td><td>NO</td><td>Non-html changeable label</td></tr>
|
||||
|
|
|
@ -29,7 +29,7 @@ import utilities.util.reflection.ReflectionUtilities;
|
|||
* An immutable label (the text can NOT be changed), with HTML rendering allowed.
|
||||
* <p>
|
||||
* See also:
|
||||
* <table border=1>
|
||||
* <table border=1><caption></caption>
|
||||
* <tr><th>Class</th><th>Mutable text</th><th>HTML rendering</th><th>Description</th></tr>
|
||||
* <tr><td>{@link GLabel}</td><td>Immutable</td><td>NO</td><td>Non-html unchangeable label</td></tr>
|
||||
* <tr><td>{@link GDLabel}</td><td>Mutable</td><td>NO</td><td>Non-html changeable label</td></tr>
|
||||
|
|
|
@ -29,7 +29,7 @@ import utilities.util.reflection.ReflectionUtilities;
|
|||
* A label that only contains an image and no text.
|
||||
* <p>
|
||||
* See also:
|
||||
* <table border=1>
|
||||
* <table border=1><caption></caption>
|
||||
* <tr><th>Class</th><th>Mutable text</th><th>HTML rendering</th><th>Description</th></tr>
|
||||
* <tr><td>{@link GLabel}</td><td>Immutable</td><td>NO</td><td>Non-html unchangeable label</td></tr>
|
||||
* <tr><td>{@link GDLabel}</td><td>Mutable</td><td>NO</td><td>Non-html changeable label</td></tr>
|
||||
|
|
|
@ -29,7 +29,7 @@ import utilities.util.reflection.ReflectionUtilities;
|
|||
* An immutable label (the text can NOT be changed), with HTML rendering disabled.
|
||||
* <p>
|
||||
* See also:
|
||||
* <table border=1>
|
||||
* <table border=1><caption></caption>
|
||||
* <tr><th>Class</th><th>Mutable text</th><th>HTML rendering</th><th>Description</th></tr>
|
||||
* <tr><td>{@link GLabel}</td><td>Immutable</td><td>NO</td><td>Non-html unchangeable label</td></tr>
|
||||
* <tr><td>{@link GDLabel}</td><td>Mutable</td><td>NO</td><td>Non-html changeable label</td></tr>
|
||||
|
|
|
@ -110,7 +110,7 @@ public class PathManager {
|
|||
* Add a new file path and set its enablement
|
||||
* @param file
|
||||
* @param enabled
|
||||
* @returns true if the enabled path did not already exist
|
||||
* @return true if the enabled path did not already exist
|
||||
*/
|
||||
public boolean addPath(ResourceFile file, boolean enabled) {
|
||||
ResourceFile dir = file.isDirectory() ? file : file.getParentFile();
|
||||
|
|
|
@ -37,7 +37,7 @@ public class DefaultTableCellRendererWrapper extends GTableCellRenderer {
|
|||
/**
|
||||
* Enables and disables the rendering of HTML content in this renderer. If enabled, this
|
||||
* renderer will interpret HTML content when the text this renderer is showing begins with
|
||||
* <tt><html></tt>
|
||||
* {@code <html>}
|
||||
*
|
||||
* @param enable true to enable HTML rendering; false to disable it
|
||||
*/
|
||||
|
|
|
@ -22,9 +22,6 @@ import ghidra.docking.settings.Settings;
|
|||
* and convert it to the specified type. This class is meant to be used when the dynamic
|
||||
* filtering mechanism is not correctly filtering a column, usually because the default filter
|
||||
* for the column type does not match what the renderer is displaying in the table.
|
||||
*
|
||||
* <P>Columns create one of these classes to be returned from
|
||||
* {@link DynamicTableColumn#getFilterConverter()}.
|
||||
*
|
||||
* @param <COLUMN_TYPE> the column type
|
||||
* @param <FILTER_TYPE> the new type to be used during filter operations
|
||||
|
|
|
@ -241,7 +241,7 @@ public abstract class GDynamicColumnTableModel<ROW_TYPE, DATA_SOURCE>
|
|||
* implementations to add custom column objects, rather than relying on generic, discovered
|
||||
* DynamicTableColumn implementations.
|
||||
*
|
||||
* <p><b>Note: this method assumes that the columns have already been sorted
|
||||
* <p><b>Note: this method assumes that the columns have already been sorted</b>
|
||||
* @param column The field to add
|
||||
*/
|
||||
protected void addTableColumn(DynamicTableColumn<ROW_TYPE, ?, ?> column) {
|
||||
|
@ -269,7 +269,7 @@ public abstract class GDynamicColumnTableModel<ROW_TYPE, DATA_SOURCE>
|
|||
* This method is intended for implementations to add custom column objects, rather than
|
||||
* relying on generic, discovered DynamicTableColumn implementations.
|
||||
* <p>
|
||||
* <b>Note: this method assumes that the columns have already been sorted.
|
||||
* <b>Note: this method assumes that the columns have already been sorted.</b>
|
||||
* @param column The field to add.
|
||||
* @param index The index at which to add the field. If the index value is invalid (negative
|
||||
* or greater than the number of columns), then the column will be added to the
|
||||
|
|
|
@ -22,7 +22,7 @@ import ghidra.util.SystemUtilities;
|
|||
/**
|
||||
* Class that maps one type of column constraint into another. Typically, these are created
|
||||
* automatically based on {@link ColumnTypeMapper} that are discovered by the system. For example,
|
||||
* if you have a column type of "Foo", and you create a ColumnTypeMapper<Foo,String>, then all the
|
||||
*{@literal if you have a column type of "Foo", and you create a ColumnTypeMapper<Foo, String>, then all the}
|
||||
* string constraints would now be available that column.
|
||||
*
|
||||
* @param <T> The column type.
|
||||
|
@ -94,7 +94,7 @@ public class MappedColumnConstraint<T, M> implements ColumnConstraint<T> {
|
|||
|
||||
/**
|
||||
* Returns the delegate constraint (current value for this mapped constraint)
|
||||
* @return the delegate constraint.
|
||||
* @return the delegate constraint.
|
||||
*/
|
||||
public ColumnConstraint<M> getDelegate() {
|
||||
return delegate;
|
||||
|
@ -129,8 +129,8 @@ public class MappedColumnConstraint<T, M> implements ColumnConstraint<T> {
|
|||
}
|
||||
|
||||
/**
|
||||
* Class for converting a ColumnDataSource<T> to a ColumnDataSource<W> to be used when
|
||||
* getting the editor for the delegate ColumnConstraint<W>.
|
||||
* {@literal Class for converting a ColumnDataSource<T> to a ColumnDataSource<W> to be used when}
|
||||
* getting the editor for the delegate{@literal ColumnConstraint<W>.}
|
||||
*/
|
||||
protected class DelegateColumnData implements ColumnData<M> {
|
||||
|
||||
|
@ -138,7 +138,7 @@ public class MappedColumnConstraint<T, M> implements ColumnConstraint<T> {
|
|||
|
||||
/**
|
||||
* Constructor
|
||||
* @param columnDataSource the ColumnDataSource<T> whose T data will be converted to
|
||||
* @param columnDataSource the{@literal ColumnDataSource<T>} whose T data will be converted to
|
||||
* W data for the delegate editor.
|
||||
*/
|
||||
public DelegateColumnData(ColumnData<T> columnDataSource) {
|
||||
|
|
|
@ -26,7 +26,7 @@ public class StringEndsWithColumnConstraint extends StringColumnConstraint {
|
|||
|
||||
/**
|
||||
* Constructor
|
||||
* @param spec the string to use to create an "ends with" pattern.
|
||||
* @param patternString the string to use to create an "ends with" pattern.
|
||||
*/
|
||||
public StringEndsWithColumnConstraint(String patternString) {
|
||||
super(patternString);
|
||||
|
|
|
@ -34,7 +34,7 @@ import ghidra.util.HTMLUtilities;
|
|||
|
||||
/**
|
||||
* An editor that provides suggestions of values that, according to
|
||||
* {@linkplain StringMatchStrategy}, match a user-supplied
|
||||
* {@linkplain StringColumnConstraint}, match a user-supplied
|
||||
* pattern.
|
||||
*/
|
||||
public class AutocompletingStringConstraintEditor extends DataLoadingConstraintEditor<String> {
|
||||
|
|
|
@ -96,7 +96,7 @@ public class EnumConstraintEditor<T extends Enum<T>> extends AbstractColumnConst
|
|||
* <tt>getName()</tt>, <tt>getDisplayName()</tt>, or <tt>getDisplayString()</tt>
|
||||
* before falling back to <tt>toString()</tt>.
|
||||
*
|
||||
* @returns a more user-friendly name for the value
|
||||
* @return a more user-friendly name for the value
|
||||
*/
|
||||
public String getElementDisplayName(T value) {
|
||||
String displayName = getDisplayNameUsingMethodNamed("getName", value);
|
||||
|
|
|
@ -401,7 +401,7 @@ public class TableUpdateJob<T> {
|
|||
|
||||
/**
|
||||
* Gets any existing data that matches the current filter, if any.
|
||||
* @returns data that should be the start point for the next filter state; null if there
|
||||
* @return data that should be the start point for the next filter state; null if there
|
||||
* is no filter set or if the current data's filter does not match the pending filter
|
||||
*/
|
||||
private TableData<T> getReusableFilteredData() {
|
||||
|
|
|
@ -20,8 +20,7 @@ import ghidra.framework.plugintool.ServiceProviderStub;
|
|||
import ghidra.util.task.TaskMonitor;
|
||||
|
||||
/**
|
||||
* A version of {@link ThreadedTableModel} for clients that do not need a
|
||||
* {@link ThreadedTableModel#DATA_SOURCE}.
|
||||
* A version of {@link ThreadedTableModel} for clients that do not need a DATA_SOURCE.
|
||||
* <p>
|
||||
* <b>
|
||||
* Note: this class will change a <tt>null</tt> value for the {@link ServiceProvider} parameter
|
||||
|
|
|
@ -36,7 +36,7 @@ import org.apache.commons.lang3.StringUtils;
|
|||
*
|
||||
* This fulfills a similar purpose to formatted text fields, except the individual parts may be
|
||||
* placed independent of the other components. Granted, they ought to appear in an intuitive order.
|
||||
* The input string is split among a collection of {@link JTextFields} each according to a given
|
||||
* The input string is split among a collection of {@link JTextField}s each according to a given
|
||||
* pattern -- excluding the final field. Cursor navigation, insertion, deletion, etc. are all
|
||||
* applied as if the linked text fields were part of a single composite text field.
|
||||
*
|
||||
|
@ -492,7 +492,7 @@ public class TextFieldLinker {
|
|||
* {@link #linkLastField(JTextField)}. Thus, before linking is actually activated, at least one
|
||||
* field must be present. To be meaningful, at least two fields should be linked.
|
||||
*
|
||||
* @note {@code exp} must match {@code sep}.
|
||||
* NOTE: {@code exp} must match {@code sep}.
|
||||
*
|
||||
* @param field the field to link
|
||||
* @param exp the separator following the field
|
||||
|
|
|
@ -54,7 +54,7 @@ import util.CollectionUtils;
|
|||
* i.e., new nodes are created), then, by default, the expanded and selected state
|
||||
* feature will be unable to find the correct nodes, since the default <tt>equals()</tt>
|
||||
* method on <tt>GTreeNode</tt> performs a comparison based upon instances. To fix this problem,
|
||||
* the {@link #equals()} method has been implemented such that nodes are considered equal if they have
|
||||
* the {@link #equals(Object)} method has been implemented such that nodes are considered equal if they have
|
||||
* the same name. The {@link #hashCode()} method will return the hash of the name. The name
|
||||
* attribute was chosen because it should be the most unique and descriptive piece of information
|
||||
* available in a generic GTreeNode.
|
||||
|
|
|
@ -53,7 +53,6 @@ public abstract class GTreeTask extends PriorityJob {
|
|||
* values on later calls to getSelectedPaths(). So, to handle that 'feature' of the JTree, we
|
||||
* need to translate the given path to the equivalent path in the current tree (this code may
|
||||
* not be needed in all uses of this task, but it protects us from the aforementioned case).
|
||||
* @throws CancelledException
|
||||
*/
|
||||
protected TreePath translatePath(TreePath path, TaskMonitor monitor) {
|
||||
|
||||
|
|
|
@ -39,8 +39,6 @@ public class GTreeModel implements TreeModel {
|
|||
* Constructs a GTreeModel with the given root node.
|
||||
*
|
||||
* @param root The root of the tree.
|
||||
* @param isThreaded True signals to perform all tree tasks in a threaded environment to
|
||||
* avoid hanging the swing thread.
|
||||
*/
|
||||
public GTreeModel(GTreeNode root) {
|
||||
this.root = root;
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
/* ###
|
||||
* IP: GHIDRA
|
||||
* REVIEWED: YES
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -25,9 +24,6 @@ public interface MagePanel<T> extends WizardPanel {
|
|||
* whether you must, can, or should not be displayed.
|
||||
* @param state the state object
|
||||
* @return displayability
|
||||
* @throws IllegalPanelStateException indicates that something bad has happened and we should
|
||||
* return to the very first panel - unless we are the first panel in which case we
|
||||
* should abort the wizard.
|
||||
*/
|
||||
public WizardPanelDisplayability getPanelDisplayabilityAndUpdateState(WizardState<T> state);
|
||||
|
||||
|
|
|
@ -155,7 +155,6 @@ public class WizardManager extends DialogComponentProvider implements WizardPane
|
|||
/**
|
||||
* Notification that the wizard process is complete.
|
||||
* @param success status of the process
|
||||
* @param msg message to display in the dialog's status area
|
||||
*/
|
||||
public void completed(boolean success) {
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
/* ###
|
||||
* IP: GHIDRA
|
||||
* REVIEWED: YES
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -31,7 +30,7 @@ public class WizardStateDependencyValidator<T> {
|
|||
* the dependent is registered such that a call to {@link #findAffectedDependants(WizardState)}
|
||||
* will include that property key only if its cached value is null. (i.e. the first time it
|
||||
* is called.)
|
||||
* @param dependant the property key that depends on a previous property being set.
|
||||
* @param dependent the property key that depends on a previous property being set.
|
||||
* @param predecessor the property key of the property that affects the dependent property.
|
||||
*/
|
||||
public void addDependency(T dependent, T predecessor) {
|
||||
|
|
|
@ -19,9 +19,7 @@ import ghidra.util.SignednessFormatMode;
|
|||
|
||||
/**
|
||||
* The settings definition for the numeric display format for handling signed values.
|
||||
* <b>
|
||||
*
|
||||
*
|
||||
* <br>
|
||||
*/
|
||||
public class IntegerSignednessFormattingModeSettingsDefinition implements EnumSettingsDefinition {
|
||||
|
||||
|
|
|
@ -102,7 +102,7 @@ public abstract class CachingSwingWorker<T> implements CachingLoader<T> {
|
|||
*
|
||||
* @param monitor the monitor (may be null)
|
||||
* @return the object that this class is managing/caching
|
||||
* @see #get()
|
||||
* @see #getCachedValue()
|
||||
*/
|
||||
@Override
|
||||
public T get(TaskMonitor monitor) {
|
||||
|
|
|
@ -45,9 +45,9 @@ import ghidra.util.worker.Worker;
|
|||
* If the given runnable has Swing work to perform after the main Runnable.run() method completes
|
||||
* (e.g., updating Swing components),
|
||||
* the runnable should implement the {@link SwingRunnable} interface and perform this work in
|
||||
* {@link SwingRunnable#swingRun()}.
|
||||
* {@link SwingRunnable#swingRun(boolean)}.
|
||||
* <p>
|
||||
* The progress monitor component, retrieved via {@link #getTaskMonitorComponent()}, can be placed
|
||||
* The progress monitor component, retrieved via {@link #getMonitorComponent()}, can be placed
|
||||
* into a Swing widget. This RunManager will show and hide this progress component as necessary
|
||||
* when runnables are being run.
|
||||
*
|
||||
|
@ -220,7 +220,7 @@ public class RunManager {
|
|||
/**
|
||||
* Schedules this runnable to be run after all runnables currently queued.
|
||||
* <P>
|
||||
* This method differs from the {@link #runNow(Runnable, String, int)} methods in that it will
|
||||
* This method differs from the {@link #runNow(MonitoredRunnable, String, int)} methods in that it will
|
||||
* not cancel any currently running jobs. This allows you to add new jobs to this run
|
||||
* manager, which lets them queue up. See header docs for details.
|
||||
*
|
||||
|
|
|
@ -33,7 +33,7 @@ import util.CollectionUtils;
|
|||
* the {@link Task} interface, which means less boiler-plate code.
|
||||
*
|
||||
* <P>An example of usage:
|
||||
* <pre>
|
||||
* <pre>{@literal
|
||||
* MonitoredRunnable r =
|
||||
* monitor -> doWork(parameter, monitor);
|
||||
* new TaskBuilder("Task Title", r)
|
||||
|
@ -41,18 +41,18 @@ import util.CollectionUtils;
|
|||
* .setCanCancel(true)
|
||||
* .setStatusTextAlignment(SwingConstants.LEADING)
|
||||
* .launchModal();
|
||||
* </pre>
|
||||
* }</pre>
|
||||
*
|
||||
* Or,
|
||||
*
|
||||
* <pre>
|
||||
* <pre>{@literal
|
||||
* TaskBuilder.withRunnable(monitor -> doWork(parameter, monitor))
|
||||
* .setTitle("Task Title")
|
||||
* .setHasProgress(true)
|
||||
* .setCanCancel(true)
|
||||
* .setStatusTextAlignment(SwingConstants.LEADING)
|
||||
* .launchModal();
|
||||
* </pre>
|
||||
* }</pre>
|
||||
*
|
||||
* Or,
|
||||
*
|
||||
|
|
|
@ -69,7 +69,7 @@ public class TaskLauncher {
|
|||
* <code>
|
||||
* TaskLauncher.launchNonModal( "My task", <br>
|
||||
* null, // parent<br>
|
||||
* monitor -> { while ( !monitor.isCanceled() ) { longRunningWork(); } }<br>
|
||||
* monitor -> { while ( !monitor.isCanceled() ) { longRunningWork(); } }<br>
|
||||
* );
|
||||
* </code>
|
||||
*
|
||||
|
@ -99,7 +99,7 @@ public class TaskLauncher {
|
|||
* <code>
|
||||
* TaskLauncher.launchModal( "My task", <br>
|
||||
* null, // parent<br>
|
||||
* monitor -> { while ( !monitor.isCanceled() ) { longRunningWork(); } }<br>
|
||||
* monitor -> { while ( !monitor.isCanceled() ) { longRunningWork(); } }<br>
|
||||
* );
|
||||
* </code>
|
||||
*
|
||||
|
@ -132,7 +132,7 @@ public class TaskLauncher {
|
|||
*
|
||||
* <p><code>
|
||||
* TaskLauncher.launchModal( "My task", <br>
|
||||
* monitor -> { { foo(); }<br>
|
||||
* monitor -> { { foo(); }<br>
|
||||
* );
|
||||
* </code>
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue