Package ghidra.app.util.viewer.field
Class OpenCloseField
java.lang.Object
ghidra.app.util.viewer.field.AbstractOpenCloseField
ghidra.app.util.viewer.field.OpenCloseField
- All Implemented Interfaces:
Field,ListingField
FactoryField class for displaying the open/close field.
-
Field Summary
Fields inherited from class ghidra.app.util.viewer.field.AbstractOpenCloseField
CLOSED_ICON, fieldWidth, heightAbove, heightBelow, isOpen, OPEN_ICON, proxy, startX, startY, toggleHandleSize -
Constructor Summary
ConstructorsConstructorDescriptionOpenCloseField(FieldFactory factory, ProxyObj<?> proxy, int indentLevel, FontMetrics metrics, int x, int width, boolean isLast) Constructor -
Method Summary
Modifier and TypeMethodDescriptionintgetWidth()Returns the current width of this fieldvoidpaint(JComponent c, Graphics g, PaintContext context, Rectangle clip, FieldBackgroundColorManager map, RowColLocation cursorLoc, int rowHeight) Paints this fieldvoidToggles the open state of this field.Methods inherited from class ghidra.app.util.viewer.field.AbstractOpenCloseField
contains, getClickedObject, getCol, getCursorBounds, getFieldFactory, getHeight, getHeightAbove, getHeightBelow, getNumCols, getNumDataRows, getNumRows, getPreferredWidth, getProxy, getRow, getScrollableUnitIncrement, getStartX, getStartY, getText, getTextWithLineSeparators, getX, getY, isPrimary, isValid, paintCursor, rowHeightChanged, screenLocationToTextOffset, setStartY, setYPos, textOffsetToScreenLocation
-
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:FieldReturns 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:FieldPaints this field- Parameters:
c- the component to paint ontog- the graphics contextcontext- common paint parametersclip- the clipping region to paint intomap- contains background color information for the fieldcursorLoc- the row,column cursor location within the field or null if the field does not contain the cursorrowHeight- 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:
toggleOpenCloseStatein classAbstractOpenCloseField
-