Extends the multi-line plain text view to be suitable for a single-line editor view. If the view is allocated extra space, the field must adjust for it. If the hosting component is a JTextField, this view will manage the ranges of the associated BoundedRangeModel and will adjust the horizontal allocation to match the current visibility settings of the JTextField.
Extends the multi-line plain text view to be suitable for a single-line editor view. If the view is allocated extra space, the field must adjust for it. If the hosting component is a JTextField, this view will manage the ranges of the associated BoundedRangeModel and will adjust the horizontal allocation to match the current visibility settings of the JTextField.
(->field-view elem)
Constructor.
Constructs a new FieldView wrapped on an element.
elem - the element - javax.swing.text.Element
Constructor. Constructs a new FieldView wrapped on an element. elem - the element - `javax.swing.text.Element`
(get-preferred-span this axis)
Determines the preferred span for this view along an axis.
axis - may be either View.X_AXIS or View.Y_AXIS - int
returns: the span the view would like to be rendered into >= 0.
Typically the view is told to render into the span
that is returned, although there is no guarantee.
The parent may choose to resize or break the view. - float
Determines the preferred span for this view along an axis. axis - may be either View.X_AXIS or View.Y_AXIS - `int` returns: the span the view would like to be rendered into >= 0. Typically the view is told to render into the span that is returned, although there is no guarantee. The parent may choose to resize or break the view. - `float`
(get-resize-weight this axis)
Determines the resizability of the view along the given axis. A value of 0 or less is not resizable.
axis - View.X_AXIS or View.Y_AXIS - int
returns: the weight -> 1 for View.X_AXIS, else 0 - int
Determines the resizability of the view along the given axis. A value of 0 or less is not resizable. axis - View.X_AXIS or View.Y_AXIS - `int` returns: the weight -> 1 for View.X_AXIS, else 0 - `int`
(insert-update this changes a f)
Gives notification that something was inserted into the document in a location that this view is responsible for.
changes - the change information from the associated document - javax.swing.event.DocumentEvent
a - the current allocation of the view - java.awt.Shape
f - the factory to use to rebuild if the view has children - javax.swing.text.ViewFactory
Gives notification that something was inserted into the document in a location that this view is responsible for. changes - the change information from the associated document - `javax.swing.event.DocumentEvent` a - the current allocation of the view - `java.awt.Shape` f - the factory to use to rebuild if the view has children - `javax.swing.text.ViewFactory`
(model-to-view this pos a b)
Provides a mapping from the document model coordinate space to the coordinate space of the view mapped to it.
pos - the position to convert >= 0 - int
a - the allocated region to render into - java.awt.Shape
b - the bias toward the previous character or the next character represented by the offset, in case the position is a boundary of two views; b will have one of these values: Position.Bias.Forward Position.Bias.Backward - javax.swing.text.Position$Bias
returns: the bounding box of the given position - java.awt.Shape
throws: javax.swing.text.BadLocationException - if the given position does not represent a valid location in the associated document
Provides a mapping from the document model coordinate space to the coordinate space of the view mapped to it. pos - the position to convert >= 0 - `int` a - the allocated region to render into - `java.awt.Shape` b - the bias toward the previous character or the next character represented by the offset, in case the position is a boundary of two views; b will have one of these values: Position.Bias.Forward Position.Bias.Backward - `javax.swing.text.Position$Bias` returns: the bounding box of the given position - `java.awt.Shape` throws: javax.swing.text.BadLocationException - if the given position does not represent a valid location in the associated document
(paint this g a)
Renders using the given rendering surface and area on that surface. The view may need to do layout and create child views to enable itself to render into the given allocation.
g - the rendering surface to use - java.awt.Graphics
a - the allocated region to render into - java.awt.Shape
Renders using the given rendering surface and area on that surface. The view may need to do layout and create child views to enable itself to render into the given allocation. g - the rendering surface to use - `java.awt.Graphics` a - the allocated region to render into - `java.awt.Shape`
(remove-update this changes a f)
Gives notification that something was removed from the document in a location that this view is responsible for.
changes - the change information from the associated document - javax.swing.event.DocumentEvent
a - the current allocation of the view - java.awt.Shape
f - the factory to use to rebuild if the view has children - javax.swing.text.ViewFactory
Gives notification that something was removed from the document in a location that this view is responsible for. changes - the change information from the associated document - `javax.swing.event.DocumentEvent` a - the current allocation of the view - `java.awt.Shape` f - the factory to use to rebuild if the view has children - `javax.swing.text.ViewFactory`
(view-to-model this fx fy a bias)
Provides a mapping from the view coordinate space to the logical coordinate space of the model.
fx - the X coordinate >= 0.0f - float
fy - the Y coordinate >= 0.0f - float
a - the allocated region to render into - java.awt.Shape
bias - javax.swing.text.Position$Bias[]
returns: the location within the model that best represents the
given point in the view - int
Provides a mapping from the view coordinate space to the logical coordinate space of the model. fx - the X coordinate >= 0.0f - `float` fy - the Y coordinate >= 0.0f - `float` a - the allocated region to render into - `java.awt.Shape` bias - `javax.swing.text.Position$Bias[]` returns: the location within the model that best represents the given point in the view - `int`
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close