Package docking.widgets.fieldpanel.field
Class FlowLayoutTextField
- java.lang.Object
-
- docking.widgets.fieldpanel.field.VerticalLayoutTextField
-
- docking.widgets.fieldpanel.field.FlowLayoutTextField
-
public class FlowLayoutTextField extends VerticalLayoutTextField
This class provides a TextField implementation that takes multiple AttributedStrings and places as many that will fit on a line without clipping before continuing to the next line.
-
-
Field Summary
-
Fields inherited from class docking.widgets.fieldpanel.field.VerticalLayoutTextField
hlFactory, isClipped, preferredWidth, startX, subFields, textElements, width
-
-
Constructor Summary
Constructors Constructor Description FlowLayoutTextField(FieldElement[] textElements, int startX, int width, int maxLines, HighlightFactory hlFactory)
This constructor will create a text field that will render one line of text.
-
Method Summary
-
Methods inherited from class docking.widgets.fieldpanel.field.VerticalLayoutTextField
calculateHeight, contains, dataToScreenLocation, generateText, generateText, getCol, getCursorBounds, getFieldElement, getHeight, getHeightAbove, getHeightBelow, getNumCols, getNumRows, getPreferredWidth, getRow, getScrollableUnitIncrement, getStartX, getSubfields, getText, getTextWithLineSeparators, getWidth, getX, getY, isClipped, isPrimary, isValid, layoutElements, paint, rowHeightChanged, screenLocationToTextOffset, screenToDataLocation, setPrimary, textOffsetToScreenLocation, toString
-
-
-
-
Constructor Detail
-
FlowLayoutTextField
public FlowLayoutTextField(FieldElement[] textElements, int startX, int width, int maxLines, HighlightFactory hlFactory)
This constructor will create a text field that will render one line of text. Ifmetrics.stringWidth(text) > width
, then the text will be clipped. No wrapping will be performed. Iftext
contains the highlight string, then it will be highlighted using the highlight color.- Parameters:
textElements
- the AttributedStrings to displaystartX
- the x position to draw the stringwidth
- the max width allocated to this fieldmaxLines
- the max number of lines to displayhlFactory
- the highlight factory
-
-