Package ghidra.app.decompiler.component
Class ClangTextField
- java.lang.Object
-
- docking.widgets.fieldpanel.field.VerticalLayoutTextField
-
- docking.widgets.fieldpanel.field.WrappingVerticalLayoutTextField
-
- ghidra.app.decompiler.component.ClangTextField
-
public class ClangTextField extends WrappingVerticalLayoutTextField
-
-
Field Summary
-
Fields inherited from class docking.widgets.fieldpanel.field.VerticalLayoutTextField
hlFactory, isClipped, preferredWidth, startX, subFields, width
-
-
Constructor Summary
Constructors Constructor Description ClangTextField(java.util.List<ClangToken> tokenList, FieldElement[] fieldElements, FieldElement lineNumberFieldElement, int x, int width, HighlightFactory hlFactory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getLineNumber()
int
getLineNumberWidth()
ClangToken
getToken(FieldLocation loc)
Gets the C language token at the indicated location.void
paint(javax.swing.JComponent c, java.awt.Graphics g, PaintContext context, java.awt.Rectangle clip, FieldBackgroundColorManager selectionMap, RowColLocation cursorLoc, int rowHeight)
Paints this field-
Methods inherited from class docking.widgets.fieldpanel.field.WrappingVerticalLayoutTextField
dataToScreenLocation
-
Methods inherited from class docking.widgets.fieldpanel.field.VerticalLayoutTextField
calculateHeight, contains, createFieldForLine, getCol, getCursorBounds, getFieldElement, getHeight, getHeightAbove, getHeightBelow, getLines, getNumCols, getNumDataRows, getNumRows, getPreferredWidth, getRow, getScrollableUnitIncrement, getStartX, getText, getTextWithLineSeparators, getWidth, getX, getY, isClipped, isPrimary, isValid, layoutElements, rowHeightChanged, screenLocationToTextOffset, screenToDataLocation, setPrimary, textOffsetToScreenLocation, toString
-
-
-
-
Constructor Detail
-
ClangTextField
public ClangTextField(java.util.List<ClangToken> tokenList, FieldElement[] fieldElements, FieldElement lineNumberFieldElement, int x, int width, HighlightFactory hlFactory)
-
-
Method Detail
-
getToken
public ClangToken getToken(FieldLocation loc)
Gets the C language token at the indicated location.- Parameters:
loc
- the field location- Returns:
- the token
-
paint
public void paint(javax.swing.JComponent c, java.awt.Graphics g, PaintContext context, java.awt.Rectangle clip, FieldBackgroundColorManager selectionMap, RowColLocation cursorLoc, int rowHeight)
Description copied from interface:Field
Paints this field- Specified by:
paint
in interfaceField
- Overrides:
paint
in classVerticalLayoutTextField
- Parameters:
c
- the component to paint ontog
- the graphics contextcontext
- common paint parametersclip
- the clipping region to paint intoselectionMap
- 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
-
getLineNumberWidth
public int getLineNumberWidth()
-
getLineNumber
public int getLineNumber()
-
-