Class OpenCloseField

java.lang.Object
ghidra.app.util.viewer.field.AbstractOpenCloseField
ghidra.app.util.viewer.field.OpenCloseField
All Implemented Interfaces:
Field, ListingField

public class OpenCloseField extends AbstractOpenCloseField
FactoryField class for displaying the open/close field.
  • Constructor Details

    • OpenCloseField

      public OpenCloseField(FieldFactory factory, ProxyObj<?> proxy, int indentLevel, FontMetrics metrics, int x, int width, boolean isLast)
      Constructor
      Parameters:
      factory - the FieldFactory that created this field.
      proxy - the object associated with this field.
      indentLevel - the indentation level of the data object.
      metrics - the FontMetrics used to render this field.
      x - the starting x position of this field.
      width - the width of this field.
      isLast - true if the data object is the last subcomponent at its level.
  • Method Details

    • getWidth

      public int getWidth()
      Description copied from interface: Field
      Returns the current width of this field
      Returns:
      the current width of this field
    • paint

      public void paint(JComponent c, Graphics g, PaintContext context, Rectangle clip, FieldBackgroundColorManager map, RowColLocation cursorLoc, int rowHeight)
      Description copied from interface: Field
      Paints this field
      Parameters:
      c - the component to paint onto
      g - the graphics context
      context - common paint parameters
      clip - the clipping region to paint into
      map - contains background color information for the field
      cursorLoc - the row,column cursor location within the field or null if the field does not contain the cursor
      rowHeight - the number of pixels in each row of text in the field
    • toggleOpenCloseState

      public void toggleOpenCloseState()
      Toggles the open state of this field.
      Specified by:
      toggleOpenCloseState in class AbstractOpenCloseField