View
| Modifier and Type | Class and Description |
|---|---|
| pack-priv static enum | |
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final boolean | |
| pack-priv final boolean | |
| pack-priv final boolean | |
| pack-priv int | firstLineOffset
Offset of where to draw the first character on the first line. |
| pack-priv Font | font
Font used to calculate the longest line... |
| pack-priv Segment | |
| pack-priv Element | longLine
The current longest line. |
| private static SoftReference | |
| protected FontMetrics | metrics
Font metrics for the current font. |
| pack-priv int | |
| pack-priv int | |
| pack-priv Color | |
| pack-priv int | |
| pack-priv float | |
| pack-priv Color | |
| pack-priv final boolean |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv Shape | |
| private void | calculateLongestLine()
Iterate over the lines represented by the child elements of the element this view represents, looking for the line that is the longest. |
| pack-priv float | |
| private float | |
| public void | changedUpdate(DocumentEvent
the change information from the associated document changes, Shape the current allocation of the view a, ViewFactory the factory to use to rebuild if the view has children f)Overrides javax. Gives notification from the document that attributes were changed in a location that this view is responsible for. |
| private static boolean | checkFPMethodOverridden(final Class<?> className, final String methodName, final PlainView.
|
| protected void | damageLineRange(int
the starting line number to repaint. This must
be a valid line number in the model. line0, int the ending line number to repaint. This must
be a valid line number in the model. line1, Shape the region allocated for the view to render into a, Component the component hosting the view (used to call repaint) host)Repaint the given line range. |
| private float | |
| protected void | drawLine(int
the line to draw >= 0 lineIndex, Graphics the g, int Graphics contextthe starting X position >= 0 x, int the starting Y position >= 0 y)
Deprecated
since 9. replaced by
drawLine(int, Graphics2D, float, float)
Renders a line of text, suppressing whitespace at the end and expanding any tabs. |
| protected void | drawLine(int
the line to draw lineIndex, Graphics2D >= 0the g, float Graphics contextthe starting X position x, float >= 0the starting Y position y)>= 0Renders a line of text, suppressing whitespace at the end and expanding any tabs. |
| private void | |
| protected int | Returns: the location of the end of the rangethe graphics context g, int the starting X coordinate >= 0 x, int the starting Y coordinate >= 0 y, int the beginning position in the model >= 0 p0, int the ending position in the model >= 0 p1)
Deprecated
since 9. replaced by
drawSelectedText(Graphics2D, float, float, int, int)
Renders the given range in the model as selected text. |
| protected float | Returns: the location of the end of the rangethe graphics context g, float the starting X coordinate x, float >= 0the starting Y coordinate y, int >= 0the beginning position in the model p0, int >= 0the ending position in the model p1)>= 0Renders the given range in the model as selected text. |
| private float | |
| protected int | Returns: the X location of the end of the range >= 0the graphics context g, int the starting X coordinate >= 0 x, int the starting Y coordinate >= 0 y, int the beginning position in the model >= 0 p0, int the ending position in the model >= 0 p1)
Deprecated
since 9. replaced by
drawUnselectedText(Graphics2D, float, float, int, int)
Renders the given range in the model as normal unselected text. |
| protected float | Returns: the X location of the end of the range>= 0the graphics context g, float the starting X coordinate x, float >= 0the starting Y coordinate y, int >= 0the beginning position in the model p0, int >= 0the ending position in the model p1)>= 0Renders the given range in the model as normal unselected text. |
| private float | |
| pack-priv static boolean | |
| protected final Segment | Returns: the bufferGives access to a buffer that can be used to fetch text from the associated document. |
| private int | |
| public float | 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.may be either View.X_AXIS or View.Y_AXIS axis)Implements abstract javax. Determines the preferred span for this view along an axis. |
| protected int | |
| public void | insertUpdate(DocumentEvent
the change information from the associated document changes, Shape the current allocation of the view a, ViewFactory the factory to use to rebuild if the view has children f)Overrides javax. Gives notification that something was inserted into the document in a location that this view is responsible for. |
| private static boolean | |
| protected Rectangle | Returns: the rectangle that represents the given linethe region allocated for the view to render into a, int the line number to find the region of. This must
be a valid line number in the model. line)Determine the rectangle that represents the given line. |
| public Shape | Returns: the bounding box of the given positionthe position to convert >= 0 pos, Shape the allocated region to render into a, Position.Implements abstract javax. Provides a mapping from the document model coordinate space to the coordinate space of the view mapped to it. |
| public float | Returns: the tab stop, measured in points >= 0the current position >= 0 x, int the position within the text stream
that the tab occurred at >= 0. tabOffset)Implements javax. Returns the next tab stop position after a given reference position. |
| public void | paint(Graphics
the rendering surface to use g, Shape the allocated region to render into a)Implements abstract javax. Renders using the given rendering surface and area on that surface. |
| public void | removeUpdate(DocumentEvent
the change information from the associated document changes, Shape the current allocation of the view a, ViewFactory the factory to use to rebuild if the view has children f)Overrides javax. Gives notification that something was removed from the document in a location that this view is responsible for. |
| public void | setSize(float
the width >= 0 width, float the height >= 0 height)Overrides javax. Sets the size of the view. |
| protected void | updateDamage(DocumentEvent
the change information from the associated document changes, Shape the current allocation of the view a, ViewFactory the factory to use to rebuild if the view has children f)Repaint the region of change covered by the given document event. |
| protected void | |
| public int | Returns: the location within the model that best represents the given point in the view >= 0the X coordinate >= 0 x, float the Y coordinate >= 0 y, Shape the allocated region to render into a, Position.Implements abstract javax. Provides a mapping from the view coordinate space to the logical coordinate space of the model. |
| drawLineOverridden | back to summary |
|---|---|
| pack-priv final boolean drawLineOverridden | |
| drawSelectedTextOverridden | back to summary |
|---|---|
| pack-priv final boolean drawSelectedTextOverridden | |
| drawUnselectedTextOverridden | back to summary |
|---|---|
| pack-priv final boolean drawUnselectedTextOverridden | |
| firstLineOffset | back to summary |
|---|---|
| pack-priv int firstLineOffset Offset of where to draw the first character on the first line. This is a hack and temporary until we can better address the problem of text measuring. This field is actually never set directly in PlainView, but by FieldView. | |
| font | back to summary |
|---|---|
| pack-priv Font font Font used to calculate the longest line... if this changes we need to recalculate the longest line | |
| lineBuffer | back to summary |
|---|---|
| pack-priv Segment lineBuffer | |
| longLine | back to summary |
|---|---|
| pack-priv Element longLine The current longest line. This is used to calculate the preferred width of the view. Since the calculation is potentially expensive we try to avoid it by stashing which line is currently the longest. | |
| methodsOverriddenMapRef | back to summary |
|---|---|
| private static SoftReference<HashMap<PlainView. | |
| metrics | back to summary |
|---|---|
| protected FontMetrics metrics Font metrics for the current font. | |
| sel0 | back to summary |
|---|---|
| pack-priv int sel0 | |
| sel1 | back to summary |
|---|---|
| pack-priv int sel1 | |
| selected | back to summary |
|---|---|
| pack-priv Color selected | |
| tabBase | back to summary |
|---|---|
| pack-priv int tabBase | |
| tabSize | back to summary |
|---|---|
| pack-priv float tabSize | |
| unselected | back to summary |
|---|---|
| pack-priv Color unselected | |
| useFloatingPointAPI | back to summary |
|---|---|
| pack-priv final boolean useFloatingPointAPI | |
| PlainView | back to summary |
|---|---|
| public PlainView(Element elem) Constructs a new PlainView wrapped on an element.
| |
| adjustPaintRegion | back to summary |
|---|---|
| pack-priv Shape adjustPaintRegion(Shape a) Should return a shape ideal for painting based on the passed in
Shape | |
| calculateLongestLine | back to summary |
|---|---|
| private void calculateLongestLine() Iterate over the lines represented by the child elements of the element this view represents, looking for the line that is the longest. The longLine variable is updated to represent the longest line contained. The font variable is updated to indicate the font used to calculate the longest line. | |
| callDrawSelectedText | back to summary |
|---|---|
| pack-priv float callDrawSelectedText(Graphics g, float x, float y, int p0, int p1) throws BadLocationException | |
| callDrawUnselectedText | back to summary |
|---|---|
| private float callDrawUnselectedText(Graphics g, float x, float y, int p0, int p1) throws BadLocationException | |
| changedUpdate | back to summary |
|---|---|
| public void changedUpdate(DocumentEvent changes, Shape a, ViewFactory f) Overrides javax. Gives notification from the document that attributes were changed in a location that this view is responsible for.
| |
| checkFPMethodOverridden | back to summary |
|---|---|
| private static boolean checkFPMethodOverridden(final Class<?> className, final String methodName, final PlainView. | |
| damageLineRange | back to summary |
|---|---|
| protected void damageLineRange(int line0, int line1, Shape a, Component host) Repaint the given line range.
| |
| drawElement | back to summary |
|---|---|
| private float drawElement(int lineIndex, Element elem, Graphics g, float x, float y) throws BadLocationException | |
| drawLine | back to summary |
|---|---|
| protected void drawLine(int lineIndex, Graphics g, int x, int y)
Renders a line of text, suppressing whitespace at the end
and expanding any tabs. This is implemented to make calls
to the methods
| |
| drawLine | back to summary |
|---|---|
| protected void drawLine(int lineIndex, Graphics2D g, float x, float y) Renders a line of text, suppressing whitespace at the end
and expanding any tabs. This is implemented to make calls
to the methods
| |
| drawLineImpl | back to summary |
|---|---|
| private void drawLineImpl(int lineIndex, Graphics g, float x, float y) | |
| drawSelectedText | back to summary |
|---|---|
| protected int drawSelectedText(Graphics g, int x, int y, int p0, int p1) throws BadLocationException
Renders the given range in the model as selected text. This is implemented to render the text in the color specified in the hosting component. It assumes the highlighter will render the selected background.
| |
| drawSelectedText | back to summary |
|---|---|
| protected float drawSelectedText(Graphics2D g, float x, float y, int p0, int p1) throws BadLocationException Renders the given range in the model as selected text. This is implemented to render the text in the color specified in the hosting component. It assumes the highlighter will render the selected background.
| |
| drawSelectedTextImpl | back to summary |
|---|---|
| private float drawSelectedTextImpl(Graphics g, float x, float y, int p0, int p1, boolean useFPAPI) throws BadLocationException | |
| drawUnselectedText | back to summary |
|---|---|
| protected int drawUnselectedText(Graphics g, int x, int y, int p0, int p1) throws BadLocationException
Renders the given range in the model as normal unselected text. Uses the foreground or disabled color to render the text.
| |
| drawUnselectedText | back to summary |
|---|---|
| protected float drawUnselectedText(Graphics2D g, float x, float y, int p0, int p1) throws BadLocationException Renders the given range in the model as normal unselected text. Uses the foreground or disabled color to render the text.
| |
| drawUnselectedTextImpl | back to summary |
|---|---|
| private float drawUnselectedTextImpl(Graphics g, float x, float y, int p0, int p1, boolean useFPAPI) throws BadLocationException | |
| getFPMethodOverridden | back to summary |
|---|---|
| pack-priv static boolean getFPMethodOverridden(Class<?> cls, String method, PlainView. | |
| getLineBuffer | back to summary |
|---|---|
| protected final Segment getLineBuffer() Gives access to a buffer that can be used to fetch text from the associated document.
| |
| getLineWidth | back to summary |
|---|---|
| private int getLineWidth(Element line) Calculate the width of the line represented by the given element. It is assumed that the font and font metrics are up-to-date.
| |
| getPreferredSpan | back to summary |
|---|---|
| public float getPreferredSpan(int axis) Implements abstract javax. Determines the preferred span for this view along an axis.
| |
| getTabSize | back to summary |
|---|---|
| protected int getTabSize() Returns the tab size set for the document, defaulting to 8.
| |
| insertUpdate | back to summary |
|---|---|
| public void insertUpdate(DocumentEvent changes, Shape a, ViewFactory f) Overrides javax. Gives notification that something was inserted into the document in a location that this view is responsible for.
| |
| isFPMethodOverridden | back to summary |
|---|---|
| private static boolean isFPMethodOverridden(String method, Class<?> cls, Class<?>[] intTypes, Class<?>[] fpTypes) | |
| lineToRect | back to summary |
|---|---|
| protected Rectangle lineToRect(Shape a, int line) Determine the rectangle that represents the given line. | |
| modelToView | back to summary |
|---|---|
| public Shape modelToView(int pos, Shape a, Position. Implements abstract javax. Provides a mapping from the document model coordinate space to the coordinate space of the view mapped to it.
| |
| nextTabStop | back to summary |
|---|---|
| public float nextTabStop(float x, int tabOffset) Implements javax. Returns the next tab stop position after a given reference position. This implementation does not support things like centering so it ignores the tabOffset argument.
| |
| paint | back to summary |
|---|---|
| public void paint(Graphics g, Shape a) Implements abstract javax. 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.
| |
| removeUpdate | back to summary |
|---|---|
| public void removeUpdate(DocumentEvent changes, Shape a, ViewFactory f) Overrides javax. Gives notification that something was removed from the document in a location that this view is responsible for.
| |
| setSize | back to summary |
|---|---|
| public void setSize(float width, float height) Overrides javax. Sets the size of the view. This should cause layout of the view along the given axis, if it has any layout duties.
| |
| updateDamage | back to summary |
|---|---|
| protected void updateDamage(DocumentEvent changes, Shape a, ViewFactory f) Repaint the region of change covered by the given document event. Damages the line that begins the range to cover the case when the insert/remove is only on one line. If lines are added or removed, damages the whole view. The longest line is checked to see if it has changed.
| |
| updateMetrics | back to summary |
|---|---|
| protected void updateMetrics() Checks to see if the font metrics and longest line are up-to-date.
| |
| viewToModel | back to summary |
|---|---|
| public int viewToModel(float x, float y, Shape a, Position. Implements abstract javax. Provides a mapping from the view coordinate space to the logical coordinate space of the model.
| |
| Modifier and Type | Field and Description |
|---|---|
| public static final PlainView. | |
| public static final PlainView. | |
| public static final PlainView. | |
| public static final PlainView. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public Class | |
| public static PlainView. | |
| public static PlainView. |
| GNNC | back to summary |
|---|---|
| public static final PlainView. | |
| GNNII | back to summary |
|---|---|
| public static final PlainView. | |
| IGNN | back to summary |
|---|---|
| public static final PlainView. | |
| IIGNN | back to summary |
|---|---|
| public static final PlainView. | |
| FPMethodArgs | back to summary |
|---|---|
| private FPMethodArgs() | |
| getMethodArguments | back to summary |
|---|---|
| public Class | |
| valueOf | back to summary |
|---|---|
| public static PlainView. | |
| values | back to summary |
|---|---|
| public static PlainView. | |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final Class | |
| pack-priv final String |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | equals(Object obj)
Overrides java. Indicates whether some other object is "equal to" this one. |
| public int |
| className | back to summary |
|---|---|
| pack-priv final Class<?> className | |
| methodName | back to summary |
|---|---|
| pack-priv final String methodName | |
| FPMethodItem | back to summary |
|---|---|
| public FPMethodItem(Class<?> className, String methodName) | |
| equals | back to summary |
|---|---|
| public boolean equals(Object obj) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes.
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for this object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |