Package docking.widgets.fieldpanel.field
Class FlowLayoutTextField
java.lang.Object
docking.widgets.fieldpanel.field.VerticalLayoutTextField
docking.widgets.fieldpanel.field.FlowLayoutTextField
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
ConstructorDescriptionFlowLayoutTextField
(FieldElement[] textElements, int startX, int width, int maxLines, FieldHighlightFactory hlFactory) Deprecated, for removal: This API element is subject to removal in a future version.use the constructor that takes a listFlowLayoutTextField
(List<FieldElement> elements, int startX, int width, int maxLines, FieldHighlightFactory hlFactory) This constructor will create a text field that will render one line of text. -
Method Summary
Modifier and TypeMethodDescriptionprotected TextField
createFieldForLine
(FieldElement element) Create the text field for given field elementMethods 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 Details
-
FlowLayoutTextField
@Deprecated(since="10.1", forRemoval=true) public FlowLayoutTextField(FieldElement[] textElements, int startX, int width, int maxLines, FieldHighlightFactory 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(List<FieldElement> elements, int startX, int width, int maxLines, FieldHighlightFactory 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 Details
-
createFieldForLine
Description copied from class:VerticalLayoutTextField
Create the text field for given field element- Overrides:
createFieldForLine
in classVerticalLayoutTextField
- Parameters:
element
- the element- Returns:
- the field
-