Package docking.widgets.fieldpanel.field
Class WrappingVerticalLayoutTextField
java.lang.Object
docking.widgets.fieldpanel.field.VerticalLayoutTextField
docking.widgets.fieldpanel.field.WrappingVerticalLayoutTextField
- Direct Known Subclasses:
ClangTextField
A text field meant to take a string of text and wrap as needed.
-
Field Summary
Fields inherited from class docking.widgets.fieldpanel.field.VerticalLayoutTextField
hlFactory, isClipped, preferredWidth, startX, subFields, width
-
Constructor Summary
ConstructorDescriptionWrappingVerticalLayoutTextField
(FieldElement textElement, int startX, int width, int maxLines, FieldHighlightFactory hlFactory) This constructor will create a text field from an single AttributedString.WrappingVerticalLayoutTextField
(FieldElement textElement, int startX, int width, int maxLines, FieldHighlightFactory hlFactory, boolean breakOnWhiteSpace) This constructor will create a text field from an single AttributedString. -
Method Summary
Modifier and TypeMethodDescriptiondataToScreenLocation
(int dataRow, int dataColumn) Translates a data row and column into a screen row and column.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, paint, rowHeightChanged, screenLocationToTextOffset, screenToDataLocation, setPrimary, textOffsetToScreenLocation, toString
-
Constructor Details
-
WrappingVerticalLayoutTextField
public WrappingVerticalLayoutTextField(FieldElement textElement, int startX, int width, int maxLines, FieldHighlightFactory hlFactory) This constructor will create a text field from an single AttributedString. The string will be word wrapped.- Parameters:
textElement
- the element 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
-
WrappingVerticalLayoutTextField
public WrappingVerticalLayoutTextField(FieldElement textElement, int startX, int width, int maxLines, FieldHighlightFactory hlFactory, boolean breakOnWhiteSpace) This constructor will create a text field from an single AttributedString. The string will be word wrapped.- Parameters:
textElement
- is the element to displaystartX
- is the position to draw the stringwidth
- is the max width allocated to this fieldmaxLines
- is the max number of lines to displayhlFactory
- is the highlight factorybreakOnWhiteSpace
- is true if wrapping should break on word boundaries
-
-
Method Details
-
dataToScreenLocation
Description copied from interface:TextField
Translates a data row and column into a screen row and column.- Specified by:
dataToScreenLocation
in interfaceTextField
- Overrides:
dataToScreenLocation
in classVerticalLayoutTextField
- Parameters:
dataRow
- row as defined by the factorydataColumn
- the character offset into the dataRow- Returns:
- row and column in the screen coordinate system; a
DefaultRowColLocation
if this field does not contain the given column
-