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 AttributedString field elements 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, width
-
-
Constructor Summary
Constructors Constructor Description FlowLayoutTextField(FieldElement[] textElements, int startX, int width, int maxLines, HighlightFactory hlFactory)
Deprecated, for removal: This API element is subject to removal in a future version.use the constructor that takes a listFlowLayoutTextField(java.util.List<FieldElement> elements, int startX, int width, int maxLines, HighlightFactory hlFactory)
This constructor will create a text field that will render one line of text.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected TextField
createFieldForLine(FieldElement element)
Create the text field for given field element-
Methods inherited from class docking.widgets.fieldpanel.field.VerticalLayoutTextField
calculateHeight, contains, dataToScreenLocation, getCol, getCursorBounds, getFieldElement, getHeight, getHeightAbove, getHeightBelow, getLines, getNumCols, getNumDataRows, getNumRows, getPreferredWidth, getRow, getScrollableUnitIncrement, getStartX, getText, getTextWithLineSeparators, getWidth, getX, getY, isClipped, isPrimary, isValid, layoutElements, paint, rowHeightChanged, screenLocationToTextOffset, screenToDataLocation, setPrimary, textOffsetToScreenLocation, toString
-
-
-
-
Constructor Detail
-
FlowLayoutTextField
@Deprecated(since="10.1", forRemoval=true) public FlowLayoutTextField(FieldElement[] textElements, int startX, int width, int maxLines, HighlightFactory hlFactory)
Deprecated, for removal: This API element is subject to removal in a future version.use the constructor that takes a listThis constructor will create a text field that will render one line of text. Ifmetrics.stringWidth(text) > width
, then the text will be wrapped. 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
-
FlowLayoutTextField
public FlowLayoutTextField(java.util.List<FieldElement> elements, 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 wrapped. Iftext
contains the highlight string, then it will be highlighted using the highlight color.- Parameters:
elements
- 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
-
-
Method Detail
-
createFieldForLine
protected TextField createFieldForLine(FieldElement element)
Description copied from class:VerticalLayoutTextField
Create the text field for given field element- Overrides:
createFieldForLine
in classVerticalLayoutTextField
- Parameters:
element
- the element- Returns:
- the field
-
-