8076624: Fix missing doclint warnings in javax.swing.text
Reviewed-by: serb
This commit is contained in:
parent
0b622e20f7
commit
d617368a75
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -308,9 +308,8 @@ public abstract class AbstractDocument implements Document, Serializable {
|
|||||||
*
|
*
|
||||||
* If no such listeners exist, this method returns an empty array.
|
* If no such listeners exist, this method returns an empty array.
|
||||||
*
|
*
|
||||||
* @param listenerType the type of listeners requested; this parameter
|
* @param <T> the listener type
|
||||||
* should specify an interface that descends from
|
* @param listenerType the type of listeners requested
|
||||||
* <code>java.util.EventListener</code>
|
|
||||||
* @return an array of all objects registered as
|
* @return an array of all objects registered as
|
||||||
* <code><em>Foo</em>Listener</code>s on this component,
|
* <code><em>Foo</em>Listener</code>s on this component,
|
||||||
* or an empty array if no such
|
* or an empty array if no such
|
||||||
@ -905,6 +904,8 @@ public abstract class AbstractDocument implements Document, Serializable {
|
|||||||
* Returns the root element of the bidirectional structure for this
|
* Returns the root element of the bidirectional structure for this
|
||||||
* document. Its children represent character runs with a given
|
* document. Its children represent character runs with a given
|
||||||
* Unicode bidi level.
|
* Unicode bidi level.
|
||||||
|
* @return the root element of the bidirectional structure for this
|
||||||
|
* document
|
||||||
*/
|
*/
|
||||||
public Element getBidiRootElement() {
|
public Element getBidiRootElement() {
|
||||||
return bidiRoot;
|
return bidiRoot;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1998, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -186,7 +186,7 @@ public abstract class AbstractWriter {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the first offset to be output.
|
* Returns the first offset to be output.
|
||||||
*
|
* @return the first offset to be output
|
||||||
* @since 1.3
|
* @since 1.3
|
||||||
*/
|
*/
|
||||||
public int getStartOffset() {
|
public int getStartOffset() {
|
||||||
@ -195,7 +195,7 @@ public abstract class AbstractWriter {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the last offset to be output.
|
* Returns the last offset to be output.
|
||||||
*
|
* @return the last offset to be output
|
||||||
* @since 1.3
|
* @since 1.3
|
||||||
*/
|
*/
|
||||||
public int getEndOffset() {
|
public int getEndOffset() {
|
||||||
@ -213,7 +213,7 @@ public abstract class AbstractWriter {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the Writer that is used to output the content.
|
* Returns the Writer that is used to output the content.
|
||||||
*
|
* @return the Writer that is used to output the content
|
||||||
* @since 1.3
|
* @since 1.3
|
||||||
*/
|
*/
|
||||||
protected Writer getWriter() {
|
protected Writer getWriter() {
|
||||||
@ -257,6 +257,9 @@ public abstract class AbstractWriter {
|
|||||||
* by subclasses. Its responsibility is to
|
* by subclasses. Its responsibility is to
|
||||||
* iterate over the elements and use the write()
|
* iterate over the elements and use the write()
|
||||||
* methods to generate output in the desired format.
|
* methods to generate output in the desired format.
|
||||||
|
* @throws IOException if an I/O problem has occurred
|
||||||
|
* @throws BadLocationException for an invalid location within
|
||||||
|
* the document
|
||||||
*/
|
*/
|
||||||
abstract protected void write() throws IOException, BadLocationException;
|
abstract protected void write() throws IOException, BadLocationException;
|
||||||
|
|
||||||
@ -314,7 +317,7 @@ public abstract class AbstractWriter {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the maximum line length.
|
* Returns the maximum line length.
|
||||||
*
|
* @return the maximum line length
|
||||||
* @since 1.3
|
* @since 1.3
|
||||||
*/
|
*/
|
||||||
protected int getLineLength() {
|
protected int getLineLength() {
|
||||||
@ -323,7 +326,7 @@ public abstract class AbstractWriter {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the current line length.
|
* Sets the current line length.
|
||||||
*
|
* @param length the new line length
|
||||||
* @since 1.3
|
* @since 1.3
|
||||||
*/
|
*/
|
||||||
protected void setCurrentLineLength(int length) {
|
protected void setCurrentLineLength(int length) {
|
||||||
@ -333,7 +336,7 @@ public abstract class AbstractWriter {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the current line length.
|
* Returns the current line length.
|
||||||
*
|
* @return the current line length
|
||||||
* @since 1.3
|
* @since 1.3
|
||||||
*/
|
*/
|
||||||
protected int getCurrentLineLength() {
|
protected int getCurrentLineLength() {
|
||||||
@ -344,7 +347,7 @@ public abstract class AbstractWriter {
|
|||||||
* Returns true if the current line should be considered empty. This
|
* Returns true if the current line should be considered empty. This
|
||||||
* is true when <code>getCurrentLineLength</code> == 0 ||
|
* is true when <code>getCurrentLineLength</code> == 0 ||
|
||||||
* <code>indent</code> has been invoked on an empty line.
|
* <code>indent</code> has been invoked on an empty line.
|
||||||
*
|
* @return true if the current line should be considered empty
|
||||||
* @since 1.3
|
* @since 1.3
|
||||||
*/
|
*/
|
||||||
protected boolean isLineEmpty() {
|
protected boolean isLineEmpty() {
|
||||||
@ -355,7 +358,7 @@ public abstract class AbstractWriter {
|
|||||||
* Sets whether or not lines can be wrapped. This can be toggled
|
* Sets whether or not lines can be wrapped. This can be toggled
|
||||||
* during the writing of lines. For example, outputting HTML might
|
* during the writing of lines. For example, outputting HTML might
|
||||||
* set this to false when outputting a quoted string.
|
* set this to false when outputting a quoted string.
|
||||||
*
|
* @param newValue new value for line wrapping
|
||||||
* @since 1.3
|
* @since 1.3
|
||||||
*/
|
*/
|
||||||
protected void setCanWrapLines(boolean newValue) {
|
protected void setCanWrapLines(boolean newValue) {
|
||||||
@ -365,7 +368,7 @@ public abstract class AbstractWriter {
|
|||||||
/**
|
/**
|
||||||
* Returns whether or not the lines can be wrapped. If this is false
|
* Returns whether or not the lines can be wrapped. If this is false
|
||||||
* no lineSeparator's will be output.
|
* no lineSeparator's will be output.
|
||||||
*
|
* @return whether or not the lines can be wrapped
|
||||||
* @since 1.3
|
* @since 1.3
|
||||||
*/
|
*/
|
||||||
protected boolean getCanWrapLines() {
|
protected boolean getCanWrapLines() {
|
||||||
@ -385,7 +388,7 @@ public abstract class AbstractWriter {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the amount of space to indent.
|
* Returns the amount of space to indent.
|
||||||
*
|
* @return the amount of space to indent
|
||||||
* @since 1.3
|
* @since 1.3
|
||||||
*/
|
*/
|
||||||
protected int getIndentSpace() {
|
protected int getIndentSpace() {
|
||||||
@ -396,7 +399,7 @@ public abstract class AbstractWriter {
|
|||||||
* Sets the String used to represent newlines. This is initialized
|
* Sets the String used to represent newlines. This is initialized
|
||||||
* in the constructor from either the Document, or the System property
|
* in the constructor from either the Document, or the System property
|
||||||
* line.separator.
|
* line.separator.
|
||||||
*
|
* @param value the new line separator
|
||||||
* @since 1.3
|
* @since 1.3
|
||||||
*/
|
*/
|
||||||
public void setLineSeparator(String value) {
|
public void setLineSeparator(String value) {
|
||||||
@ -405,7 +408,7 @@ public abstract class AbstractWriter {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the string used to represent newlines.
|
* Returns the string used to represent newlines.
|
||||||
*
|
* @return the string used to represent newlines
|
||||||
* @since 1.3
|
* @since 1.3
|
||||||
*/
|
*/
|
||||||
public String getLineSeparator() {
|
public String getLineSeparator() {
|
||||||
@ -446,7 +449,7 @@ public abstract class AbstractWriter {
|
|||||||
* Returns the current indentation level. That is, the number of times
|
* Returns the current indentation level. That is, the number of times
|
||||||
* <code>incrIndent</code> has been invoked minus the number of times
|
* <code>incrIndent</code> has been invoked minus the number of times
|
||||||
* <code>decrIndent</code> has been invoked.
|
* <code>decrIndent</code> has been invoked.
|
||||||
*
|
* @return the current indentation level
|
||||||
* @since 1.3
|
* @since 1.3
|
||||||
*/
|
*/
|
||||||
protected int getIndentLevel() {
|
protected int getIndentLevel() {
|
||||||
@ -514,7 +517,7 @@ public abstract class AbstractWriter {
|
|||||||
/**
|
/**
|
||||||
* Writes the line separator. This invokes <code>output</code> directly
|
* Writes the line separator. This invokes <code>output</code> directly
|
||||||
* as well as setting the <code>lineLength</code> to 0.
|
* as well as setting the <code>lineLength</code> to 0.
|
||||||
*
|
* @throws IOException on any I/O error
|
||||||
* @since 1.3
|
* @since 1.3
|
||||||
*/
|
*/
|
||||||
protected void writeLineSeparator() throws IOException {
|
protected void writeLineSeparator() throws IOException {
|
||||||
@ -539,6 +542,10 @@ public abstract class AbstractWriter {
|
|||||||
* and won't fit in which case the line length will exceed
|
* and won't fit in which case the line length will exceed
|
||||||
* <code>getLineLength</code>.
|
* <code>getLineLength</code>.
|
||||||
*
|
*
|
||||||
|
* @param chars characters to output
|
||||||
|
* @param startIndex starting index
|
||||||
|
* @param length length of output
|
||||||
|
* @throws IOException on any I/O error
|
||||||
* @since 1.3
|
* @since 1.3
|
||||||
*/
|
*/
|
||||||
protected void write(char[] chars, int startIndex, int length)
|
protected void write(char[] chars, int startIndex, int length)
|
||||||
@ -686,6 +693,10 @@ public abstract class AbstractWriter {
|
|||||||
* <code>writeLineSeparator</code> to write out a newline, which will
|
* <code>writeLineSeparator</code> to write out a newline, which will
|
||||||
* property update the current line length.
|
* property update the current line length.
|
||||||
*
|
*
|
||||||
|
* @param content characters to output
|
||||||
|
* @param start starting index
|
||||||
|
* @param length length of output
|
||||||
|
* @throws IOException on any I/O error
|
||||||
* @since 1.3
|
* @since 1.3
|
||||||
*/
|
*/
|
||||||
protected void output(char[] content, int start, int length)
|
protected void output(char[] content, int start, int length)
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -71,6 +71,7 @@ public class AsyncBoxView extends View {
|
|||||||
* Fetch the major axis (the axis the children
|
* Fetch the major axis (the axis the children
|
||||||
* are tiled along). This will have a value of
|
* are tiled along). This will have a value of
|
||||||
* either X_AXIS or Y_AXIS.
|
* either X_AXIS or Y_AXIS.
|
||||||
|
* @return the major axis
|
||||||
*/
|
*/
|
||||||
public int getMajorAxis() {
|
public int getMajorAxis() {
|
||||||
return axis;
|
return axis;
|
||||||
@ -80,6 +81,7 @@ public class AsyncBoxView extends View {
|
|||||||
* Fetch the minor axis (the axis orthogonal
|
* Fetch the minor axis (the axis orthogonal
|
||||||
* to the tiled axis). This will have a value of
|
* to the tiled axis). This will have a value of
|
||||||
* either X_AXIS or Y_AXIS.
|
* either X_AXIS or Y_AXIS.
|
||||||
|
* @return the minor axis
|
||||||
*/
|
*/
|
||||||
public int getMinorAxis() {
|
public int getMinorAxis() {
|
||||||
return (axis == X_AXIS) ? Y_AXIS : X_AXIS;
|
return (axis == X_AXIS) ? Y_AXIS : X_AXIS;
|
||||||
@ -87,6 +89,7 @@ public class AsyncBoxView extends View {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the top part of the margin around the view.
|
* Get the top part of the margin around the view.
|
||||||
|
* @return the top part of the margin around the view
|
||||||
*/
|
*/
|
||||||
public float getTopInset() {
|
public float getTopInset() {
|
||||||
return topInset;
|
return topInset;
|
||||||
@ -103,6 +106,7 @@ public class AsyncBoxView extends View {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the bottom part of the margin around the view.
|
* Get the bottom part of the margin around the view.
|
||||||
|
* @return the bottom part of the margin around the view
|
||||||
*/
|
*/
|
||||||
public float getBottomInset() {
|
public float getBottomInset() {
|
||||||
return bottomInset;
|
return bottomInset;
|
||||||
@ -119,6 +123,7 @@ public class AsyncBoxView extends View {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the left part of the margin around the view.
|
* Get the left part of the margin around the view.
|
||||||
|
* @return the left part of the margin around the view
|
||||||
*/
|
*/
|
||||||
public float getLeftInset() {
|
public float getLeftInset() {
|
||||||
return leftInset;
|
return leftInset;
|
||||||
@ -135,6 +140,7 @@ public class AsyncBoxView extends View {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the right part of the margin around the view.
|
* Get the right part of the margin around the view.
|
||||||
|
* @return the right part of the margin around the view
|
||||||
*/
|
*/
|
||||||
public float getRightInset() {
|
public float getRightInset() {
|
||||||
return rightInset;
|
return rightInset;
|
||||||
@ -154,6 +160,7 @@ public class AsyncBoxView extends View {
|
|||||||
*
|
*
|
||||||
* @param axis the axis to determine the total insets along,
|
* @param axis the axis to determine the total insets along,
|
||||||
* either X_AXIS or Y_AXIS.
|
* either X_AXIS or Y_AXIS.
|
||||||
|
* @return the span along an axis that is taken up by the insets
|
||||||
* @since 1.4
|
* @since 1.4
|
||||||
*/
|
*/
|
||||||
protected float getInsetSpan(int axis) {
|
protected float getInsetSpan(int axis) {
|
||||||
@ -173,6 +180,7 @@ public class AsyncBoxView extends View {
|
|||||||
* considered to be accurate and incremental changes will be
|
* considered to be accurate and incremental changes will be
|
||||||
* added into the total as they are calculated.
|
* added into the total as they are calculated.
|
||||||
*
|
*
|
||||||
|
* @param isEstimated new value for the estimatedMajorSpan property
|
||||||
* @since 1.4
|
* @since 1.4
|
||||||
*/
|
*/
|
||||||
protected void setEstimatedMajorSpan(boolean isEstimated) {
|
protected void setEstimatedMajorSpan(boolean isEstimated) {
|
||||||
@ -181,6 +189,7 @@ public class AsyncBoxView extends View {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Is the major span currently estimated?
|
* Is the major span currently estimated?
|
||||||
|
* @return whether or not the major span currently estimated
|
||||||
*
|
*
|
||||||
* @since 1.4
|
* @since 1.4
|
||||||
*/
|
*/
|
||||||
@ -194,6 +203,8 @@ public class AsyncBoxView extends View {
|
|||||||
*
|
*
|
||||||
* @param index the child index. This should be a
|
* @param index the child index. This should be a
|
||||||
* value >= 0 and < getViewCount().
|
* value >= 0 and < getViewCount().
|
||||||
|
* @return the object representing the layout state of
|
||||||
|
* of the child at the given index
|
||||||
*/
|
*/
|
||||||
protected ChildState getChildState(int index) {
|
protected ChildState getChildState(int index) {
|
||||||
synchronized(stats) {
|
synchronized(stats) {
|
||||||
@ -206,6 +217,7 @@ public class AsyncBoxView extends View {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Fetch the queue to use for layout.
|
* Fetch the queue to use for layout.
|
||||||
|
* @return the queue to use for layout
|
||||||
*/
|
*/
|
||||||
protected LayoutQueue getLayoutQueue() {
|
protected LayoutQueue getLayoutQueue() {
|
||||||
return LayoutQueue.getDefaultQueue();
|
return LayoutQueue.getDefaultQueue();
|
||||||
@ -214,7 +226,9 @@ public class AsyncBoxView extends View {
|
|||||||
/**
|
/**
|
||||||
* New ChildState records are created through
|
* New ChildState records are created through
|
||||||
* this method to allow subclasses the extend
|
* this method to allow subclasses the extend
|
||||||
* the ChildState records to do/hold more
|
* the ChildState records to do/hold more.
|
||||||
|
* @param v the view
|
||||||
|
* @return new child state
|
||||||
*/
|
*/
|
||||||
protected ChildState createChildState(View v) {
|
protected ChildState createChildState(View v) {
|
||||||
return new ChildState(v);
|
return new ChildState(v);
|
||||||
@ -237,6 +251,8 @@ public class AsyncBoxView extends View {
|
|||||||
* not estimated, it is updated by the given delta to reflect
|
* not estimated, it is updated by the given delta to reflect
|
||||||
* the incremental change. The delta is ignored if the
|
* the incremental change. The delta is ignored if the
|
||||||
* major span is estimated.
|
* major span is estimated.
|
||||||
|
* @param cs the child state
|
||||||
|
* @param delta the delta
|
||||||
*/
|
*/
|
||||||
protected synchronized void majorRequirementChange(ChildState cs, float delta) {
|
protected synchronized void majorRequirementChange(ChildState cs, float delta) {
|
||||||
if (estimatedMajorSpan == false) {
|
if (estimatedMajorSpan == false) {
|
||||||
@ -254,6 +270,7 @@ public class AsyncBoxView extends View {
|
|||||||
* might be the GUI thread if it is trying to update
|
* might be the GUI thread if it is trying to update
|
||||||
* something immediately (such as to perform a
|
* something immediately (such as to perform a
|
||||||
* model/view translation).
|
* model/view translation).
|
||||||
|
* @param cs the child state
|
||||||
*/
|
*/
|
||||||
protected synchronized void minorRequirementChange(ChildState cs) {
|
protected synchronized void minorRequirementChange(ChildState cs) {
|
||||||
minorChanged = true;
|
minorChanged = true;
|
||||||
@ -418,6 +435,7 @@ public class AsyncBoxView extends View {
|
|||||||
* where there is a child view for each child element.
|
* where there is a child view for each child element.
|
||||||
*
|
*
|
||||||
* @param pos the position >= 0
|
* @param pos the position >= 0
|
||||||
|
* @param b the position bias
|
||||||
* @return index of the view representing the given position, or
|
* @return index of the view representing the given position, or
|
||||||
* -1 if no view represents that position
|
* -1 if no view represents that position
|
||||||
*/
|
*/
|
||||||
@ -946,6 +964,7 @@ public class AsyncBoxView extends View {
|
|||||||
* This is called by a ChildState object that has
|
* This is called by a ChildState object that has
|
||||||
* changed it's major span. This can therefore be
|
* changed it's major span. This can therefore be
|
||||||
* called by multiple threads.
|
* called by multiple threads.
|
||||||
|
* @param cs the child state
|
||||||
*/
|
*/
|
||||||
public synchronized void childChanged(ChildState cs) {
|
public synchronized void childChanged(ChildState cs) {
|
||||||
if (lastValidOffset == null) {
|
if (lastValidOffset == null) {
|
||||||
@ -958,6 +977,7 @@ public class AsyncBoxView extends View {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Paint the children that intersect the clip area.
|
* Paint the children that intersect the clip area.
|
||||||
|
* @param g the rendering surface to use
|
||||||
*/
|
*/
|
||||||
public synchronized void paintChildren(Graphics g) {
|
public synchronized void paintChildren(Graphics g) {
|
||||||
Rectangle clip = g.getClipBounds();
|
Rectangle clip = g.getClipBounds();
|
||||||
@ -987,6 +1007,9 @@ public class AsyncBoxView extends View {
|
|||||||
* Fetch the allocation to use for a child view.
|
* Fetch the allocation to use for a child view.
|
||||||
* This will update the offsets for all children
|
* This will update the offsets for all children
|
||||||
* not yet updated before the given index.
|
* not yet updated before the given index.
|
||||||
|
* @param index the child index
|
||||||
|
* @param a the allocation
|
||||||
|
* @return the allocation to use for a child view
|
||||||
*/
|
*/
|
||||||
public synchronized Shape getChildAllocation(int index, Shape a) {
|
public synchronized Shape getChildAllocation(int index, Shape a) {
|
||||||
if (a == null) {
|
if (a == null) {
|
||||||
@ -1031,6 +1054,8 @@ public class AsyncBoxView extends View {
|
|||||||
* Fetch the allocation to use for a child view.
|
* Fetch the allocation to use for a child view.
|
||||||
* <em>This does not update the offsets in the ChildState
|
* <em>This does not update the offsets in the ChildState
|
||||||
* records.</em>
|
* records.</em>
|
||||||
|
* @param index the index
|
||||||
|
* @return the allocation to use for a child view
|
||||||
*/
|
*/
|
||||||
protected Shape getChildAllocation(int index) {
|
protected Shape getChildAllocation(int index) {
|
||||||
ChildState cs = getChildState(index);
|
ChildState cs = getChildState(index);
|
||||||
@ -1057,6 +1082,7 @@ public class AsyncBoxView extends View {
|
|||||||
* Copy the currently allocated shape into the Rectangle
|
* Copy the currently allocated shape into the Rectangle
|
||||||
* used to store the current allocation. This would be
|
* used to store the current allocation. This would be
|
||||||
* a floating point rectangle in a Java2D-specific implementation.
|
* a floating point rectangle in a Java2D-specific implementation.
|
||||||
|
* @param a the allocation
|
||||||
*/
|
*/
|
||||||
protected void setAllocation(Shape a) {
|
protected void setAllocation(Shape a) {
|
||||||
if (a instanceof Rectangle) {
|
if (a instanceof Rectangle) {
|
||||||
@ -1072,6 +1098,7 @@ public class AsyncBoxView extends View {
|
|||||||
* along the major axis. Make sure that offsets are set
|
* along the major axis. Make sure that offsets are set
|
||||||
* on the ChildState objects up to the given target span
|
* on the ChildState objects up to the given target span
|
||||||
* past the desired offset.
|
* past the desired offset.
|
||||||
|
* @param targetOffset the target offset
|
||||||
*
|
*
|
||||||
* @return index of the view representing the given visual
|
* @return index of the view representing the given visual
|
||||||
* location (targetOffset), or -1 if no view represents
|
* location (targetOffset), or -1 if no view represents
|
||||||
@ -1201,6 +1228,7 @@ public class AsyncBoxView extends View {
|
|||||||
* Construct a child status. This needs to start
|
* Construct a child status. This needs to start
|
||||||
* out as fairly large so we don't falsely begin with
|
* out as fairly large so we don't falsely begin with
|
||||||
* the idea that all of the children are visible.
|
* the idea that all of the children are visible.
|
||||||
|
* @param v the view
|
||||||
* @since 1.4
|
* @since 1.4
|
||||||
*/
|
*/
|
||||||
public ChildState(View v) {
|
public ChildState(View v) {
|
||||||
@ -1212,7 +1240,8 @@ public class AsyncBoxView extends View {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Fetch the child view this record represents
|
* Fetch the child view this record represents.
|
||||||
|
* @return the child view this record represents
|
||||||
*/
|
*/
|
||||||
public View getChildView() {
|
public View getChildView() {
|
||||||
return child;
|
return child;
|
||||||
@ -1322,6 +1351,7 @@ public class AsyncBoxView extends View {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* What is the span along the minor axis.
|
* What is the span along the minor axis.
|
||||||
|
* @return the span along the minor axis
|
||||||
*/
|
*/
|
||||||
public float getMinorSpan() {
|
public float getMinorSpan() {
|
||||||
if (max < minorSpan) {
|
if (max < minorSpan) {
|
||||||
@ -1333,6 +1363,7 @@ public class AsyncBoxView extends View {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* What is the offset along the minor axis
|
* What is the offset along the minor axis
|
||||||
|
* @return the offset along the minor axis
|
||||||
*/
|
*/
|
||||||
public float getMinorOffset() {
|
public float getMinorOffset() {
|
||||||
if (max < minorSpan) {
|
if (max < minorSpan) {
|
||||||
@ -1345,13 +1376,15 @@ public class AsyncBoxView extends View {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* What is the span along the major axis.
|
* What is the span along the major axis.
|
||||||
|
* @return the span along the major axis
|
||||||
*/
|
*/
|
||||||
public float getMajorSpan() {
|
public float getMajorSpan() {
|
||||||
return span;
|
return span;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the offset along the major axis
|
* Get the offset along the major axis.
|
||||||
|
* @return the offset along the major axis
|
||||||
*/
|
*/
|
||||||
public float getMajorOffset() {
|
public float getMajorOffset() {
|
||||||
return offset;
|
return offset;
|
||||||
@ -1361,6 +1394,7 @@ public class AsyncBoxView extends View {
|
|||||||
* This method should only be called by the ChildLocator,
|
* This method should only be called by the ChildLocator,
|
||||||
* it is simply a convenient place to hold the cached
|
* it is simply a convenient place to hold the cached
|
||||||
* location.
|
* location.
|
||||||
|
* @param offs offsets
|
||||||
*/
|
*/
|
||||||
public void setMajorOffset(float offs) {
|
public void setMajorOffset(float offs) {
|
||||||
offset = offs;
|
offset = offs;
|
||||||
@ -1394,6 +1428,7 @@ public class AsyncBoxView extends View {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Has the child view been laid out.
|
* Has the child view been laid out.
|
||||||
|
* @return whether or not the child view been laid out.
|
||||||
*/
|
*/
|
||||||
public boolean isLayoutValid() {
|
public boolean isLayoutValid() {
|
||||||
return (minorValid && majorValid && childSizeValid);
|
return (minorValid && majorValid && childSizeValid);
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -134,6 +134,7 @@ public class BoxView extends CompositeView {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Determines if the layout is valid along the given axis.
|
* Determines if the layout is valid along the given axis.
|
||||||
|
* @return if the layout is valid along the given axis
|
||||||
*
|
*
|
||||||
* @param axis either <code>View.X_AXIS</code> or <code>View.Y_AXIS</code>
|
* @param axis either <code>View.X_AXIS</code> or <code>View.Y_AXIS</code>
|
||||||
*
|
*
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1998, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -38,15 +38,28 @@ public class ChangedCharSetException extends IOException {
|
|||||||
String charSetSpec;
|
String charSetSpec;
|
||||||
boolean charSetKey;
|
boolean charSetKey;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructs a {@code ChangedCharSetException}.
|
||||||
|
* @param charSetSpec name of the char set specification
|
||||||
|
* @param charSetKey char set key
|
||||||
|
*/
|
||||||
public ChangedCharSetException(String charSetSpec, boolean charSetKey) {
|
public ChangedCharSetException(String charSetSpec, boolean charSetKey) {
|
||||||
this.charSetSpec = charSetSpec;
|
this.charSetSpec = charSetSpec;
|
||||||
this.charSetKey = charSetKey;
|
this.charSetKey = charSetKey;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the char set specification.
|
||||||
|
* @return the char set specification
|
||||||
|
*/
|
||||||
public String getCharSetSpec() {
|
public String getCharSetSpec() {
|
||||||
return charSetSpec;
|
return charSetSpec;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the char set key.
|
||||||
|
* @return the char set key
|
||||||
|
*/
|
||||||
public boolean keyEqualsCharSet() {
|
public boolean keyEqualsCharSet() {
|
||||||
return charSetKey;
|
return charSetKey;
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -85,6 +85,8 @@ public class ComponentView extends View {
|
|||||||
* This would result from a call to setParent or
|
* This would result from a call to setParent or
|
||||||
* as a result of being notified that attributes
|
* as a result of being notified that attributes
|
||||||
* have changed.
|
* have changed.
|
||||||
|
* @return the component that is associated with
|
||||||
|
* this view
|
||||||
*/
|
*/
|
||||||
protected Component createComponent() {
|
protected Component createComponent() {
|
||||||
AttributeSet attr = getElement().getAttributes();
|
AttributeSet attr = getElement().getAttributes();
|
||||||
@ -94,6 +96,7 @@ public class ComponentView extends View {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Fetch the component associated with the view.
|
* Fetch the component associated with the view.
|
||||||
|
* @return the component associated with the view
|
||||||
*/
|
*/
|
||||||
public final Component getComponent() {
|
public final Component getComponent() {
|
||||||
return createdC;
|
return createdC;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -825,10 +825,8 @@ public class DefaultCaret extends Rectangle implements Caret, FocusListener, Mou
|
|||||||
* <pre>ChangeListener[] cls = (ChangeListener[])(c.getListeners(ChangeListener.class));</pre>
|
* <pre>ChangeListener[] cls = (ChangeListener[])(c.getListeners(ChangeListener.class));</pre>
|
||||||
*
|
*
|
||||||
* If no such listeners exist, this method returns an empty array.
|
* If no such listeners exist, this method returns an empty array.
|
||||||
*
|
* @param <T> the listener type
|
||||||
* @param listenerType the type of listeners requested; this parameter
|
* @param listenerType the type of listeners requested
|
||||||
* should specify an interface that descends from
|
|
||||||
* <code>java.util.EventListener</code>
|
|
||||||
* @return an array of all objects registered as
|
* @return an array of all objects registered as
|
||||||
* <code><em>Foo</em>Listener</code>s on this component,
|
* <code><em>Foo</em>Listener</code>s on this component,
|
||||||
* or an empty array if no such
|
* or an empty array if no such
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -97,6 +97,9 @@ public class DefaultFormatterFactory extends JFormattedTextField.AbstractFormatt
|
|||||||
private JFormattedTextField.AbstractFormatter nullFormat;
|
private JFormattedTextField.AbstractFormatter nullFormat;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructs a {@code DefaultFormatterFactory}.
|
||||||
|
*/
|
||||||
public DefaultFormatterFactory() {
|
public DefaultFormatterFactory() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -336,11 +336,16 @@ public class DefaultHighlighter extends LayeredHighlighter {
|
|||||||
* (if the offsets are in a highlighted region that is). For this to
|
* (if the offsets are in a highlighted region that is). For this to
|
||||||
* work the painter supplied must be an instance of
|
* work the painter supplied must be an instance of
|
||||||
* LayeredHighlightPainter.
|
* LayeredHighlightPainter.
|
||||||
|
* @param newValue the new value
|
||||||
*/
|
*/
|
||||||
public void setDrawsLayeredHighlights(boolean newValue) {
|
public void setDrawsLayeredHighlights(boolean newValue) {
|
||||||
drawsLayeredHighlights = newValue;
|
drawsLayeredHighlights = newValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return the draw layered highlights.
|
||||||
|
* @return the draw layered highlights
|
||||||
|
*/
|
||||||
public boolean getDrawsLayeredHighlights() {
|
public boolean getDrawsLayeredHighlights() {
|
||||||
return drawsLayeredHighlights;
|
return drawsLayeredHighlights;
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -122,6 +122,7 @@ public class DefaultStyledDocument extends AbstractDocument implements StyledDoc
|
|||||||
* structure (i.e. the structure reported by the
|
* structure (i.e. the structure reported by the
|
||||||
* <code>getDefaultRootElement</code> method. If the
|
* <code>getDefaultRootElement</code> method. If the
|
||||||
* document contained any data it will first be removed.
|
* document contained any data it will first be removed.
|
||||||
|
* @param data the element data
|
||||||
*/
|
*/
|
||||||
protected void create(ElementSpec[] data) {
|
protected void create(ElementSpec[] data) {
|
||||||
try {
|
try {
|
||||||
@ -1104,6 +1105,9 @@ public class DefaultStyledDocument extends AbstractDocument implements StyledDoc
|
|||||||
*/
|
*/
|
||||||
public static final int BUFFER_SIZE_DEFAULT = 4096;
|
public static final int BUFFER_SIZE_DEFAULT = 4096;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The element buffer.
|
||||||
|
*/
|
||||||
protected ElementBuffer buffer;
|
protected ElementBuffer buffer;
|
||||||
|
|
||||||
/** Styles listening to. */
|
/** Styles listening to. */
|
||||||
@ -2524,6 +2528,12 @@ public class DefaultStyledDocument extends AbstractDocument implements StyledDoc
|
|||||||
* Element.
|
* Element.
|
||||||
*/
|
*/
|
||||||
public static class AttributeUndoableEdit extends AbstractUndoableEdit {
|
public static class AttributeUndoableEdit extends AbstractUndoableEdit {
|
||||||
|
/**
|
||||||
|
* Constructs an {@code AttributeUndoableEdit}.
|
||||||
|
* @param element the element
|
||||||
|
* @param newAttributes the new attributes
|
||||||
|
* @param isReplacing true if all the attributes in the element were removed first.
|
||||||
|
*/
|
||||||
public AttributeUndoableEdit(Element element, AttributeSet newAttributes,
|
public AttributeUndoableEdit(Element element, AttributeSet newAttributes,
|
||||||
boolean isReplacing) {
|
boolean isReplacing) {
|
||||||
super();
|
super();
|
||||||
@ -2561,13 +2571,21 @@ public class DefaultStyledDocument extends AbstractDocument implements StyledDoc
|
|||||||
as.addAttributes(copy);
|
as.addAttributes(copy);
|
||||||
}
|
}
|
||||||
|
|
||||||
// AttributeSet containing additional entries, must be non-mutable!
|
/**
|
||||||
|
* AttributeSet containing additional entries, must be non-mutable!
|
||||||
|
*/
|
||||||
protected AttributeSet newAttributes;
|
protected AttributeSet newAttributes;
|
||||||
// Copy of the AttributeSet the Element contained.
|
/**
|
||||||
|
* Copy of the AttributeSet the Element contained.
|
||||||
|
*/
|
||||||
protected AttributeSet copy;
|
protected AttributeSet copy;
|
||||||
// true if all the attributes in the element were removed first.
|
/**
|
||||||
|
* true if all the attributes in the element were removed first.
|
||||||
|
*/
|
||||||
protected boolean isReplacing;
|
protected boolean isReplacing;
|
||||||
// Efected Element.
|
/**
|
||||||
|
* Affected Element.
|
||||||
|
*/
|
||||||
protected Element element;
|
protected Element element;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -70,6 +70,8 @@ public abstract class FlowView extends BoxView {
|
|||||||
* rows are tiled (the axis of the default flow
|
* rows are tiled (the axis of the default flow
|
||||||
* rows themselves). This is typically used
|
* rows themselves). This is typically used
|
||||||
* by the <code>FlowStrategy</code>.
|
* by the <code>FlowStrategy</code>.
|
||||||
|
* @return the axis along which views should be
|
||||||
|
* flowed
|
||||||
*/
|
*/
|
||||||
public int getFlowAxis() {
|
public int getFlowAxis() {
|
||||||
if (getAxis() == Y_AXIS) {
|
if (getAxis() == Y_AXIS) {
|
||||||
@ -89,6 +91,8 @@ public abstract class FlowView extends BoxView {
|
|||||||
*
|
*
|
||||||
* @param index the index of the row being updated.
|
* @param index the index of the row being updated.
|
||||||
* This should be a value >= 0 and < getViewCount().
|
* This should be a value >= 0 and < getViewCount().
|
||||||
|
* @return the constraining span to flow against for
|
||||||
|
* the given child index
|
||||||
* @see #getFlowStart
|
* @see #getFlowStart
|
||||||
*/
|
*/
|
||||||
public int getFlowSpan(int index) {
|
public int getFlowSpan(int index) {
|
||||||
@ -104,6 +108,8 @@ public abstract class FlowView extends BoxView {
|
|||||||
|
|
||||||
* @param index the index of the row being updated.
|
* @param index the index of the row being updated.
|
||||||
* This should be a value >= 0 and < getViewCount().
|
* This should be a value >= 0 and < getViewCount().
|
||||||
|
* @return the location along the flow axis that the
|
||||||
|
* flow span will start at
|
||||||
* @see #getFlowSpan
|
* @see #getFlowSpan
|
||||||
*/
|
*/
|
||||||
public int getFlowStart(int index) {
|
public int getFlowStart(int index) {
|
||||||
@ -116,6 +122,8 @@ public abstract class FlowView extends BoxView {
|
|||||||
* called by the FlowStrategy when new children
|
* called by the FlowStrategy when new children
|
||||||
* are added or removed (i.e. rows are added or
|
* are added or removed (i.e. rows are added or
|
||||||
* removed) in the process of updating the flow.
|
* removed) in the process of updating the flow.
|
||||||
|
* @return a View that should be used to hold a
|
||||||
|
* a rows worth of children in a flow
|
||||||
*/
|
*/
|
||||||
protected abstract View createRow();
|
protected abstract View createRow();
|
||||||
|
|
||||||
@ -359,6 +367,7 @@ public abstract class FlowView extends BoxView {
|
|||||||
* strategy should update the appropriate changed region (which
|
* strategy should update the appropriate changed region (which
|
||||||
* depends upon the strategy used for repair).
|
* depends upon the strategy used for repair).
|
||||||
*
|
*
|
||||||
|
* @param fv the flow view
|
||||||
* @param e the change information from the associated document
|
* @param e the change information from the associated document
|
||||||
* @param alloc the current allocation of the view inside of the insets.
|
* @param alloc the current allocation of the view inside of the insets.
|
||||||
* This value will be null if the view has not yet been displayed.
|
* This value will be null if the view has not yet been displayed.
|
||||||
@ -385,6 +394,7 @@ public abstract class FlowView extends BoxView {
|
|||||||
* Gives notification that something was removed from the document
|
* Gives notification that something was removed from the document
|
||||||
* in a location that the given flow view is responsible for.
|
* in a location that the given flow view is responsible for.
|
||||||
*
|
*
|
||||||
|
* @param fv the flow view
|
||||||
* @param e the change information from the associated document
|
* @param e the change information from the associated document
|
||||||
* @param alloc the current allocation of the view inside of the insets.
|
* @param alloc the current allocation of the view inside of the insets.
|
||||||
* @see View#removeUpdate
|
* @see View#removeUpdate
|
||||||
@ -426,6 +436,8 @@ public abstract class FlowView extends BoxView {
|
|||||||
/**
|
/**
|
||||||
* This method gives flow strategies access to the logical
|
* This method gives flow strategies access to the logical
|
||||||
* view of the FlowView.
|
* view of the FlowView.
|
||||||
|
* @param fv the FlowView
|
||||||
|
* @return the logical view of the FlowView
|
||||||
*/
|
*/
|
||||||
protected View getLogicalView(FlowView fv) {
|
protected View getLogicalView(FlowView fv) {
|
||||||
return fv.layoutPool;
|
return fv.layoutPool;
|
||||||
@ -495,6 +507,7 @@ public abstract class FlowView extends BoxView {
|
|||||||
* the adjustRow method will be called to perform adjustments
|
* the adjustRow method will be called to perform adjustments
|
||||||
* to the row to try and make it fit into the given span.
|
* to the row to try and make it fit into the given span.
|
||||||
*
|
*
|
||||||
|
* @param fv the flow view
|
||||||
* @param rowIndex the index of the row to fill in with views. The
|
* @param rowIndex the index of the row to fill in with views. The
|
||||||
* row is assumed to be empty on entry.
|
* row is assumed to be empty on entry.
|
||||||
* @param pos The current position in the children of
|
* @param pos The current position in the children of
|
||||||
@ -578,6 +591,7 @@ public abstract class FlowView extends BoxView {
|
|||||||
* the row. If a forced break is encountered, the
|
* the row. If a forced break is encountered, the
|
||||||
* break will be positioned there.
|
* break will be positioned there.
|
||||||
*
|
*
|
||||||
|
* @param fv the flow view
|
||||||
* @param rowIndex the row to adjust to the current layout
|
* @param rowIndex the row to adjust to the current layout
|
||||||
* span.
|
* span.
|
||||||
* @param desiredSpan the current layout span >= 0
|
* @param desiredSpan the current layout span >= 0
|
||||||
@ -654,6 +668,8 @@ public abstract class FlowView extends BoxView {
|
|||||||
* @param startOffset the start location for the view being created
|
* @param startOffset the start location for the view being created
|
||||||
* @param spanLeft the about of span left to fill in the row
|
* @param spanLeft the about of span left to fill in the row
|
||||||
* @param rowIndex the row the view will be placed into
|
* @param rowIndex the row the view will be placed into
|
||||||
|
* @return a view that can be used to represent the current piece
|
||||||
|
* of the flow
|
||||||
*/
|
*/
|
||||||
protected View createView(FlowView fv, int startOffset, int spanLeft, int rowIndex) {
|
protected View createView(FlowView fv, int startOffset, int spanLeft, int rowIndex) {
|
||||||
// Get the child view that contains the given starting position
|
// Get the child view that contains the given starting position
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1998, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -758,6 +758,8 @@ public class GapContent extends GapVector implements AbstractDocument.Content, S
|
|||||||
* to subclasses.
|
* to subclasses.
|
||||||
*
|
*
|
||||||
* @param positions the UndoPosRef instances to reset
|
* @param positions the UndoPosRef instances to reset
|
||||||
|
* @param offset where the string was inserted
|
||||||
|
* @param length length of inserted string
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("rawtypes") // UndoPosRef type cannot be exposed
|
@SuppressWarnings("rawtypes") // UndoPosRef type cannot be exposed
|
||||||
protected void updateUndoPositions(Vector positions, int offset,
|
protected void updateUndoPositions(Vector positions, int offset,
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -102,6 +102,7 @@ public class GlyphView extends View implements TabableView, Cloneable {
|
|||||||
* Fetch the currently installed glyph painter.
|
* Fetch the currently installed glyph painter.
|
||||||
* If a painter has not yet been installed, and
|
* If a painter has not yet been installed, and
|
||||||
* a default was not yet needed, null is returned.
|
* a default was not yet needed, null is returned.
|
||||||
|
* @return the currently installed glyph painter
|
||||||
*/
|
*/
|
||||||
public GlyphPainter getGlyphPainter() {
|
public GlyphPainter getGlyphPainter() {
|
||||||
return painter;
|
return painter;
|
||||||
@ -109,6 +110,7 @@ public class GlyphView extends View implements TabableView, Cloneable {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the painter to use for rendering glyphs.
|
* Sets the painter to use for rendering glyphs.
|
||||||
|
* @param p the painter to use for rendering glyphs
|
||||||
*/
|
*/
|
||||||
public void setGlyphPainter(GlyphPainter p) {
|
public void setGlyphPainter(GlyphPainter p) {
|
||||||
painter = p;
|
painter = p;
|
||||||
@ -144,6 +146,7 @@ public class GlyphView extends View implements TabableView, Cloneable {
|
|||||||
* be returned. This is implemented to call
|
* be returned. This is implemented to call
|
||||||
* <code>StyledDocument.getBackground</code> if the associated
|
* <code>StyledDocument.getBackground</code> if the associated
|
||||||
* document is a styled document, otherwise it returns null.
|
* document is a styled document, otherwise it returns null.
|
||||||
|
* @return the background color to use to render the glyphs
|
||||||
*/
|
*/
|
||||||
public Color getBackground() {
|
public Color getBackground() {
|
||||||
Document doc = getDocument();
|
Document doc = getDocument();
|
||||||
@ -165,6 +168,7 @@ public class GlyphView extends View implements TabableView, Cloneable {
|
|||||||
* is not a StyledDocument, the associated components foreground
|
* is not a StyledDocument, the associated components foreground
|
||||||
* color is used. If there is no associated component, null
|
* color is used. If there is no associated component, null
|
||||||
* is returned.
|
* is returned.
|
||||||
|
* @return the foreground color to use to render the glyphs
|
||||||
*/
|
*/
|
||||||
public Color getForeground() {
|
public Color getForeground() {
|
||||||
Document doc = getDocument();
|
Document doc = getDocument();
|
||||||
@ -187,6 +191,7 @@ public class GlyphView extends View implements TabableView, Cloneable {
|
|||||||
* is not a StyledDocument, the associated components font
|
* is not a StyledDocument, the associated components font
|
||||||
* is used. If there is no associated component, null
|
* is used. If there is no associated component, null
|
||||||
* is returned.
|
* is returned.
|
||||||
|
* @return the font that the glyphs should be based upon
|
||||||
*/
|
*/
|
||||||
public Font getFont() {
|
public Font getFont() {
|
||||||
Document doc = getDocument();
|
Document doc = getDocument();
|
||||||
@ -204,6 +209,7 @@ public class GlyphView extends View implements TabableView, Cloneable {
|
|||||||
/**
|
/**
|
||||||
* Determine if the glyphs should be underlined. If true,
|
* Determine if the glyphs should be underlined. If true,
|
||||||
* an underline should be drawn through the baseline.
|
* an underline should be drawn through the baseline.
|
||||||
|
* @return if the glyphs should be underlined
|
||||||
*/
|
*/
|
||||||
public boolean isUnderline() {
|
public boolean isUnderline() {
|
||||||
AttributeSet attr = getAttributes();
|
AttributeSet attr = getAttributes();
|
||||||
@ -214,6 +220,7 @@ public class GlyphView extends View implements TabableView, Cloneable {
|
|||||||
* Determine if the glyphs should have a strikethrough
|
* Determine if the glyphs should have a strikethrough
|
||||||
* line. If true, a line should be drawn through the center
|
* line. If true, a line should be drawn through the center
|
||||||
* of the glyphs.
|
* of the glyphs.
|
||||||
|
* @return if the glyphs should have a strikethrough line
|
||||||
*/
|
*/
|
||||||
public boolean isStrikeThrough() {
|
public boolean isStrikeThrough() {
|
||||||
AttributeSet attr = getAttributes();
|
AttributeSet attr = getAttributes();
|
||||||
@ -222,6 +229,7 @@ public class GlyphView extends View implements TabableView, Cloneable {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Determine if the glyphs should be rendered as superscript.
|
* Determine if the glyphs should be rendered as superscript.
|
||||||
|
* @return if the glyphs should be rendered as superscript
|
||||||
*/
|
*/
|
||||||
public boolean isSubscript() {
|
public boolean isSubscript() {
|
||||||
AttributeSet attr = getAttributes();
|
AttributeSet attr = getAttributes();
|
||||||
@ -230,6 +238,7 @@ public class GlyphView extends View implements TabableView, Cloneable {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Determine if the glyphs should be rendered as subscript.
|
* Determine if the glyphs should be rendered as subscript.
|
||||||
|
* @return if the glyphs should be rendered as subscript
|
||||||
*/
|
*/
|
||||||
public boolean isSuperscript() {
|
public boolean isSuperscript() {
|
||||||
AttributeSet attr = getAttributes();
|
AttributeSet attr = getAttributes();
|
||||||
@ -238,6 +247,7 @@ public class GlyphView extends View implements TabableView, Cloneable {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Fetch the TabExpander to use if tabs are present in this view.
|
* Fetch the TabExpander to use if tabs are present in this view.
|
||||||
|
* @return the TabExpander to use if tabs are present in this view
|
||||||
*/
|
*/
|
||||||
public TabExpander getTabExpander() {
|
public TabExpander getTabExpander() {
|
||||||
return expander;
|
return expander;
|
||||||
@ -1148,17 +1158,43 @@ public class GlyphView extends View implements TabableView, Cloneable {
|
|||||||
/**
|
/**
|
||||||
* Determine the span the glyphs given a start location
|
* Determine the span the glyphs given a start location
|
||||||
* (for tab expansion).
|
* (for tab expansion).
|
||||||
|
* @param v the {@code GlyphView}
|
||||||
|
* @param p0 the beginning position
|
||||||
|
* @param p1 the ending position
|
||||||
|
* @param e how to expand the tabs when encountered
|
||||||
|
* @param x the X coordinate
|
||||||
|
* @return the span the glyphs given a start location
|
||||||
*/
|
*/
|
||||||
public abstract float getSpan(GlyphView v, int p0, int p1, TabExpander e, float x);
|
public abstract float getSpan(GlyphView v, int p0, int p1, TabExpander e, float x);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns of the height.
|
||||||
|
* @param v the {@code GlyphView}
|
||||||
|
* @return of the height
|
||||||
|
*/
|
||||||
public abstract float getHeight(GlyphView v);
|
public abstract float getHeight(GlyphView v);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns of the ascent.
|
||||||
|
* @param v the {@code GlyphView}
|
||||||
|
* @return of the ascent
|
||||||
|
*/
|
||||||
public abstract float getAscent(GlyphView v);
|
public abstract float getAscent(GlyphView v);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns of the descent.
|
||||||
|
* @param v the {@code GlyphView}
|
||||||
|
* @return of the descent
|
||||||
|
*/
|
||||||
public abstract float getDescent(GlyphView v);
|
public abstract float getDescent(GlyphView v);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Paint the glyphs representing the given range.
|
* Paint the glyphs representing the given range.
|
||||||
|
* @param v the {@code GlyphView}
|
||||||
|
* @param g the graphics context
|
||||||
|
* @param a the current allocation of the view
|
||||||
|
* @param p0 the beginning position
|
||||||
|
* @param p1 the ending position
|
||||||
*/
|
*/
|
||||||
public abstract void paint(GlyphView v, Graphics g, Shape a, int p0, int p1);
|
public abstract void paint(GlyphView v, Graphics g, Shape a, int p0, int p1);
|
||||||
|
|
||||||
@ -1231,6 +1267,7 @@ public class GlyphView extends View implements TabableView, Cloneable {
|
|||||||
* @param v the <code>GlyphView</code> to provide a painter for
|
* @param v the <code>GlyphView</code> to provide a painter for
|
||||||
* @param p0 the starting document offset >= 0
|
* @param p0 the starting document offset >= 0
|
||||||
* @param p1 the ending document offset >= p0
|
* @param p1 the ending document offset >= p0
|
||||||
|
* @return a painter to use for the given GlyphView
|
||||||
*/
|
*/
|
||||||
public GlyphPainter getPainter(GlyphView v, int p0, int p1) {
|
public GlyphPainter getPainter(GlyphView v, int p0, int p1) {
|
||||||
return this;
|
return this;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -124,6 +124,9 @@ public interface Highlighter {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A highlight.
|
||||||
|
*/
|
||||||
public interface Highlight {
|
public interface Highlight {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -148,5 +151,4 @@ public interface Highlighter {
|
|||||||
public HighlightPainter getPainter();
|
public HighlightPainter getPainter();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -535,6 +535,7 @@ public abstract class JTextComponent extends JComponent implements Scrollable, A
|
|||||||
* Sets the <code>NavigationFilter</code>. <code>NavigationFilter</code>
|
* Sets the <code>NavigationFilter</code>. <code>NavigationFilter</code>
|
||||||
* is used by <code>DefaultCaret</code> and the default cursor movement
|
* is used by <code>DefaultCaret</code> and the default cursor movement
|
||||||
* actions as a way to restrict the cursor movement.
|
* actions as a way to restrict the cursor movement.
|
||||||
|
* @param filter the filter
|
||||||
*
|
*
|
||||||
* @since 1.4
|
* @since 1.4
|
||||||
*/
|
*/
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 1997, 2006, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -161,6 +161,7 @@ public class LabelView extends GlyphView implements TabableView {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Fetches the <code>FontMetrics</code> used for this view.
|
* Fetches the <code>FontMetrics</code> used for this view.
|
||||||
|
* @return the <code>FontMetrics</code> used for this view
|
||||||
* @deprecated FontMetrics are not used for glyph rendering
|
* @deprecated FontMetrics are not used for glyph rendering
|
||||||
* when running in the JDK.
|
* when running in the JDK.
|
||||||
*/
|
*/
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 1998, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1998, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -56,6 +56,15 @@ public abstract class LayeredHighlighter implements Highlighter {
|
|||||||
* Layered highlight renderer.
|
* Layered highlight renderer.
|
||||||
*/
|
*/
|
||||||
static public abstract class LayerPainter implements Highlighter.HighlightPainter {
|
static public abstract class LayerPainter implements Highlighter.HighlightPainter {
|
||||||
|
/**
|
||||||
|
* @return a shape
|
||||||
|
* @param g Graphics used to draw
|
||||||
|
* @param p0 starting offset of view
|
||||||
|
* @param p1 ending offset of view
|
||||||
|
* @param viewBounds Bounds of View
|
||||||
|
* @param editor JTextComponent
|
||||||
|
* @param view View instance being rendered
|
||||||
|
*/
|
||||||
public abstract Shape paintLayer(Graphics g, int p0, int p1,
|
public abstract Shape paintLayer(Graphics g, int p0, int p1,
|
||||||
Shape viewBounds,JTextComponent editor,
|
Shape viewBounds,JTextComponent editor,
|
||||||
View view);
|
View view);
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 1999, 2008, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -50,6 +50,7 @@ public class LayoutQueue {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Fetch the default layout queue.
|
* Fetch the default layout queue.
|
||||||
|
* @return the default layout queue
|
||||||
*/
|
*/
|
||||||
public static LayoutQueue getDefaultQueue() {
|
public static LayoutQueue getDefaultQueue() {
|
||||||
AppContext ac = AppContext.getAppContext();
|
AppContext ac = AppContext.getAppContext();
|
||||||
@ -77,6 +78,7 @@ public class LayoutQueue {
|
|||||||
/**
|
/**
|
||||||
* Add a task that is not needed immediately because
|
* Add a task that is not needed immediately because
|
||||||
* the results are not believed to be visible.
|
* the results are not believed to be visible.
|
||||||
|
* @param task the task to add to the queue
|
||||||
*/
|
*/
|
||||||
public synchronized void addTask(Runnable task) {
|
public synchronized void addTask(Runnable task) {
|
||||||
if (worker == null) {
|
if (worker == null) {
|
||||||
@ -88,7 +90,8 @@ public class LayoutQueue {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Used by the worker thread to get a new task to execute
|
* Used by the worker thread to get a new task to execute.
|
||||||
|
* @return a task from the queue
|
||||||
*/
|
*/
|
||||||
protected synchronized Runnable waitForWork() {
|
protected synchronized Runnable waitForWork() {
|
||||||
while (tasks.size() == 0) {
|
while (tasks.size() == 0) {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -199,7 +199,7 @@ public class MaskFormatter extends DefaultFormatter {
|
|||||||
* Creates a <code>MaskFormatter</code> with the specified mask.
|
* Creates a <code>MaskFormatter</code> with the specified mask.
|
||||||
* A <code>ParseException</code>
|
* A <code>ParseException</code>
|
||||||
* will be thrown if <code>mask</code> is an invalid mask.
|
* will be thrown if <code>mask</code> is an invalid mask.
|
||||||
*
|
* @param mask the mask
|
||||||
* @throws ParseException if mask does not contain valid mask characters
|
* @throws ParseException if mask does not contain valid mask characters
|
||||||
*/
|
*/
|
||||||
public MaskFormatter(String mask) throws ParseException {
|
public MaskFormatter(String mask) throws ParseException {
|
||||||
@ -211,6 +211,7 @@ public class MaskFormatter extends DefaultFormatter {
|
|||||||
* Sets the mask dictating the legal characters.
|
* Sets the mask dictating the legal characters.
|
||||||
* This will throw a <code>ParseException</code> if <code>mask</code> is
|
* This will throw a <code>ParseException</code> if <code>mask</code> is
|
||||||
* not valid.
|
* not valid.
|
||||||
|
* @param mask the mask
|
||||||
*
|
*
|
||||||
* @throws ParseException if mask does not contain valid mask characters
|
* @throws ParseException if mask does not contain valid mask characters
|
||||||
*/
|
*/
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -246,6 +246,7 @@ public class ParagraphView extends FlowView implements TabExpander {
|
|||||||
* <code>rowIndex</code> gives the index of the view that corresponds
|
* <code>rowIndex</code> gives the index of the view that corresponds
|
||||||
* that should be looked in.
|
* that should be looked in.
|
||||||
* @param pos position into the model
|
* @param pos position into the model
|
||||||
|
* @param b the bias
|
||||||
* @param a the allocated region to render into
|
* @param a the allocated region to render into
|
||||||
* @param direction one of the following values:
|
* @param direction one of the following values:
|
||||||
* <ul>
|
* <ul>
|
||||||
@ -256,6 +257,7 @@ public class ParagraphView extends FlowView implements TabExpander {
|
|||||||
* in this method
|
* in this method
|
||||||
* @param rowIndex the index of the view
|
* @param rowIndex the index of the view
|
||||||
* @param x the x coordinate of interest
|
* @param x the x coordinate of interest
|
||||||
|
* @throws BadLocationException if a bad location is encountered
|
||||||
* @return the closest model position to <code>x</code>
|
* @return the closest model position to <code>x</code>
|
||||||
*/
|
*/
|
||||||
// NOTE: This will not properly work if ParagraphView contains
|
// NOTE: This will not properly work if ParagraphView contains
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -520,6 +520,9 @@ public class PlainView extends View implements TabExpander {
|
|||||||
* view. The longest line is checked to see if it has
|
* view. The longest line is checked to see if it has
|
||||||
* changed.
|
* changed.
|
||||||
*
|
*
|
||||||
|
* @param changes the change information from the associated document
|
||||||
|
* @param a the current allocation of the view
|
||||||
|
* @param f the factory to use to rebuild if the view has children
|
||||||
* @since 1.4
|
* @since 1.4
|
||||||
*/
|
*/
|
||||||
protected void updateDamage(DocumentEvent changes, Shape a, ViewFactory f) {
|
protected void updateDamage(DocumentEvent changes, Shape a, ViewFactory f) {
|
||||||
@ -608,6 +611,7 @@ public class PlainView extends View implements TabExpander {
|
|||||||
* @param a the region allocated for the view to render into
|
* @param a the region allocated for the view to render into
|
||||||
* @param line the line number to find the region of. This must
|
* @param line the line number to find the region of. This must
|
||||||
* be a valid line number in the model.
|
* be a valid line number in the model.
|
||||||
|
* @return the rectangle that represents the given line
|
||||||
* @since 1.4
|
* @since 1.4
|
||||||
*/
|
*/
|
||||||
protected Rectangle lineToRect(Shape a, int line) {
|
protected Rectangle lineToRect(Shape a, int line) {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -479,9 +479,9 @@ public class StyleContext implements Serializable, AbstractDocument.AttributeCon
|
|||||||
* behavior of SmallAttributeSet. This can be reimplemented
|
* behavior of SmallAttributeSet. This can be reimplemented
|
||||||
* to return an AttributeSet that provides some sort of
|
* to return an AttributeSet that provides some sort of
|
||||||
* attribute conversion.
|
* attribute conversion.
|
||||||
*
|
|
||||||
* @param a The set of attributes to be represented in the
|
* @param a The set of attributes to be represented in the
|
||||||
* the compact form.
|
* the compact form.
|
||||||
|
* @return a compact set of attributes that might be shared
|
||||||
*/
|
*/
|
||||||
protected SmallAttributeSet createSmallAttributeSet(AttributeSet a) {
|
protected SmallAttributeSet createSmallAttributeSet(AttributeSet a) {
|
||||||
return new SmallAttributeSet(a);
|
return new SmallAttributeSet(a);
|
||||||
@ -498,6 +498,8 @@ public class StyleContext implements Serializable, AbstractDocument.AttributeCon
|
|||||||
*
|
*
|
||||||
* @param a The set of attributes to be represented in the
|
* @param a The set of attributes to be represented in the
|
||||||
* the larger form.
|
* the larger form.
|
||||||
|
* @return a large set of attributes that should trade off
|
||||||
|
* space for time
|
||||||
*/
|
*/
|
||||||
protected MutableAttributeSet createLargeAttributeSet(AttributeSet a) {
|
protected MutableAttributeSet createLargeAttributeSet(AttributeSet a) {
|
||||||
return new SimpleAttributeSet(a);
|
return new SimpleAttributeSet(a);
|
||||||
@ -558,6 +560,9 @@ public class StyleContext implements Serializable, AbstractDocument.AttributeCon
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Context-specific handling of writing out attributes
|
* Context-specific handling of writing out attributes
|
||||||
|
* @param out the output stream
|
||||||
|
* @param a the attribute set
|
||||||
|
* @exception IOException on any I/O error
|
||||||
*/
|
*/
|
||||||
public void writeAttributes(ObjectOutputStream out,
|
public void writeAttributes(ObjectOutputStream out,
|
||||||
AttributeSet a) throws IOException {
|
AttributeSet a) throws IOException {
|
||||||
@ -566,6 +571,13 @@ public class StyleContext implements Serializable, AbstractDocument.AttributeCon
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Context-specific handling of reading in attributes
|
* Context-specific handling of reading in attributes
|
||||||
|
* @param in the object stream to read the attribute data from.
|
||||||
|
* @param a the attribute set to place the attribute
|
||||||
|
* definitions in.
|
||||||
|
* @exception ClassNotFoundException passed upward if encountered
|
||||||
|
* when reading the object stream.
|
||||||
|
* @exception IOException passed upward if encountered when
|
||||||
|
* reading the object stream.
|
||||||
*/
|
*/
|
||||||
public void readAttributes(ObjectInputStream in,
|
public void readAttributes(ObjectInputStream in,
|
||||||
MutableAttributeSet a) throws ClassNotFoundException, IOException {
|
MutableAttributeSet a) throws ClassNotFoundException, IOException {
|
||||||
@ -685,6 +697,9 @@ public class StyleContext implements Serializable, AbstractDocument.AttributeCon
|
|||||||
/**
|
/**
|
||||||
* Returns the object previously registered with
|
* Returns the object previously registered with
|
||||||
* <code>registerStaticAttributeKey</code>.
|
* <code>registerStaticAttributeKey</code>.
|
||||||
|
* @param key the object key
|
||||||
|
* @return Returns the object previously registered with
|
||||||
|
* {@code registerStaticAttributeKey}
|
||||||
*/
|
*/
|
||||||
public static Object getStaticAttribute(Object key) {
|
public static Object getStaticAttribute(Object key) {
|
||||||
if (thawKeyMap == null || key == null) {
|
if (thawKeyMap == null || key == null) {
|
||||||
@ -694,9 +709,11 @@ public class StyleContext implements Serializable, AbstractDocument.AttributeCon
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the String that <code>key</code> will be registered with
|
* Returns the String that <code>key</code> will be registered with.
|
||||||
* @see #getStaticAttribute
|
* @see #getStaticAttribute
|
||||||
* @see #registerStaticAttributeKey
|
* @see #registerStaticAttributeKey
|
||||||
|
* @param key the object key
|
||||||
|
* @return the String that {@code key} will be registered with
|
||||||
*/
|
*/
|
||||||
public static Object getStaticAttributeKey(Object key) {
|
public static Object getStaticAttributeKey(Object key) {
|
||||||
return key.getClass().getName() + "." + key.toString();
|
return key.getClass().getName() + "." + key.toString();
|
||||||
@ -772,11 +789,19 @@ public class StyleContext implements Serializable, AbstractDocument.AttributeCon
|
|||||||
*/
|
*/
|
||||||
public class SmallAttributeSet implements AttributeSet {
|
public class SmallAttributeSet implements AttributeSet {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructs a SmallAttributeSet.
|
||||||
|
* @param attributes the attributes
|
||||||
|
*/
|
||||||
public SmallAttributeSet(Object[] attributes) {
|
public SmallAttributeSet(Object[] attributes) {
|
||||||
this.attributes = attributes;
|
this.attributes = attributes;
|
||||||
updateResolveParent();
|
updateResolveParent();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructs a SmallAttributeSet.
|
||||||
|
* @param attrs the attributes
|
||||||
|
*/
|
||||||
public SmallAttributeSet(AttributeSet attrs) {
|
public SmallAttributeSet(AttributeSet attrs) {
|
||||||
int n = attrs.getAttributeCount();
|
int n = attrs.getAttributeCount();
|
||||||
Object[] tbl = new Object[2 * n];
|
Object[] tbl = new Object[2 * n];
|
||||||
@ -818,7 +843,8 @@ public class StyleContext implements Serializable, AbstractDocument.AttributeCon
|
|||||||
// --- Object methods -------------------------
|
// --- Object methods -------------------------
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a string showing the key/value pairs
|
* Returns a string showing the key/value pairs.
|
||||||
|
* @return a string showing the key/value pairs
|
||||||
*/
|
*/
|
||||||
public String toString() {
|
public String toString() {
|
||||||
String s = "{";
|
String s = "{";
|
||||||
@ -1382,7 +1408,8 @@ public class StyleContext implements Serializable, AbstractDocument.AttributeCon
|
|||||||
/**
|
/**
|
||||||
* Return an array of all the listeners of the given type that
|
* Return an array of all the listeners of the given type that
|
||||||
* were added to this model.
|
* were added to this model.
|
||||||
*
|
* @param <T> the listener type
|
||||||
|
* @param listenerType the type of listeners requested
|
||||||
* @return all of the objects receiving <em>listenerType</em> notifications
|
* @return all of the objects receiving <em>listenerType</em> notifications
|
||||||
* from this model
|
* from this model
|
||||||
*
|
*
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -288,6 +288,8 @@ public class StyledEditorKit extends DefaultEditorKit {
|
|||||||
* are in <code>set</code>.<p>
|
* are in <code>set</code>.<p>
|
||||||
* This is called anytime the caret moves over a different location.
|
* This is called anytime the caret moves over a different location.
|
||||||
*
|
*
|
||||||
|
* @param element the element
|
||||||
|
* @param set the attributes
|
||||||
*/
|
*/
|
||||||
protected void createInputAttributes(Element element,
|
protected void createInputAttributes(Element element,
|
||||||
MutableAttributeSet set) {
|
MutableAttributeSet set) {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1998, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -58,6 +58,7 @@ public class TabSet implements Serializable
|
|||||||
/**
|
/**
|
||||||
* Creates and returns an instance of TabSet. The array of Tabs
|
* Creates and returns an instance of TabSet. The array of Tabs
|
||||||
* passed in must be sorted in ascending order.
|
* passed in must be sorted in ascending order.
|
||||||
|
* @param tabs the TabStops to initialize the TabSet
|
||||||
*/
|
*/
|
||||||
public TabSet(TabStop[] tabs) {
|
public TabSet(TabStop[] tabs) {
|
||||||
// PENDING(sky): If this becomes a problem, make it sort.
|
// PENDING(sky): If this becomes a problem, make it sort.
|
||||||
@ -73,6 +74,7 @@ public class TabSet implements Serializable
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the number of Tab instances the receiver contains.
|
* Returns the number of Tab instances the receiver contains.
|
||||||
|
* @return the number of Tab instances the receiver contains
|
||||||
*/
|
*/
|
||||||
public int getTabCount() {
|
public int getTabCount() {
|
||||||
return (tabs == null) ? 0 : tabs.length;
|
return (tabs == null) ? 0 : tabs.length;
|
||||||
@ -82,6 +84,8 @@ public class TabSet implements Serializable
|
|||||||
* Returns the TabStop at index <code>index</code>. This will throw an
|
* Returns the TabStop at index <code>index</code>. This will throw an
|
||||||
* IllegalArgumentException if <code>index</code> is outside the range
|
* IllegalArgumentException if <code>index</code> is outside the range
|
||||||
* of tabs.
|
* of tabs.
|
||||||
|
* @param index which TapStop to return
|
||||||
|
* @return the TabStop at index {@code index}
|
||||||
*/
|
*/
|
||||||
public TabStop getTab(int index) {
|
public TabStop getTab(int index) {
|
||||||
int numTabs = getTabCount();
|
int numTabs = getTabCount();
|
||||||
@ -95,6 +99,8 @@ public class TabSet implements Serializable
|
|||||||
/**
|
/**
|
||||||
* Returns the Tab instance after <code>location</code>. This will
|
* Returns the Tab instance after <code>location</code>. This will
|
||||||
* return null if there are no tabs after <code>location</code>.
|
* return null if there are no tabs after <code>location</code>.
|
||||||
|
* @param location location to find a Tab after
|
||||||
|
* @return the Tab instance after {@code location}
|
||||||
*/
|
*/
|
||||||
public TabStop getTabAfter(float location) {
|
public TabStop getTabAfter(float location) {
|
||||||
int index = getTabIndexAfter(location);
|
int index = getTabIndexAfter(location);
|
||||||
@ -103,6 +109,9 @@ public class TabSet implements Serializable
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Returns the index of the TabStop <code>tab</code>, or -1 if
|
||||||
|
* <code>tab</code> is not contained in the receiver.
|
||||||
|
* @param tab the TabStop to find
|
||||||
* @return the index of the TabStop <code>tab</code>, or -1 if
|
* @return the index of the TabStop <code>tab</code>, or -1 if
|
||||||
* <code>tab</code> is not contained in the receiver.
|
* <code>tab</code> is not contained in the receiver.
|
||||||
*/
|
*/
|
||||||
@ -117,6 +126,8 @@ public class TabSet implements Serializable
|
|||||||
/**
|
/**
|
||||||
* Returns the index of the Tab to be used after <code>location</code>.
|
* Returns the index of the Tab to be used after <code>location</code>.
|
||||||
* This will return -1 if there are no tabs after <code>location</code>.
|
* This will return -1 if there are no tabs after <code>location</code>.
|
||||||
|
* @param location location to find a Tab after
|
||||||
|
* @return the index of the Tab to be used after <code>location</code>
|
||||||
*/
|
*/
|
||||||
public int getTabIndexAfter(float location) {
|
public int getTabIndexAfter(float location) {
|
||||||
int current, min, max;
|
int current, min, max;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -59,6 +59,7 @@ public class TabStop implements Serializable {
|
|||||||
* RIGHT_TAB, just includes decimal as additional character to look for.
|
* RIGHT_TAB, just includes decimal as additional character to look for.
|
||||||
*/
|
*/
|
||||||
public static final int ALIGN_DECIMAL = 4;
|
public static final int ALIGN_DECIMAL = 4;
|
||||||
|
/** Align bar */
|
||||||
public static final int ALIGN_BAR = 5;
|
public static final int ALIGN_BAR = 5;
|
||||||
|
|
||||||
/* Bar tabs (whatever they are) are actually a separate kind of tab
|
/* Bar tabs (whatever they are) are actually a separate kind of tab
|
||||||
@ -66,11 +67,17 @@ public class TabStop implements Serializable {
|
|||||||
properties are mutually exclusive, so the reader treats barness
|
properties are mutually exclusive, so the reader treats barness
|
||||||
as being a kind of alignment. */
|
as being a kind of alignment. */
|
||||||
|
|
||||||
|
/** Lead none */
|
||||||
public static final int LEAD_NONE = 0;
|
public static final int LEAD_NONE = 0;
|
||||||
|
/** Lead dots */
|
||||||
public static final int LEAD_DOTS = 1;
|
public static final int LEAD_DOTS = 1;
|
||||||
|
/** Lead hyphens */
|
||||||
public static final int LEAD_HYPHENS = 2;
|
public static final int LEAD_HYPHENS = 2;
|
||||||
|
/** Lead underline */
|
||||||
public static final int LEAD_UNDERLINE = 3;
|
public static final int LEAD_UNDERLINE = 3;
|
||||||
|
/** Lead thickline */
|
||||||
public static final int LEAD_THICKLINE = 4;
|
public static final int LEAD_THICKLINE = 4;
|
||||||
|
/** Lead equals */
|
||||||
public static final int LEAD_EQUALS = 5;
|
public static final int LEAD_EQUALS = 5;
|
||||||
|
|
||||||
/** Tab type. */
|
/** Tab type. */
|
||||||
@ -82,6 +89,7 @@ public class TabStop implements Serializable {
|
|||||||
/**
|
/**
|
||||||
* Creates a tab at position <code>pos</code> with a default alignment
|
* Creates a tab at position <code>pos</code> with a default alignment
|
||||||
* and default leader.
|
* and default leader.
|
||||||
|
* @param pos position of the tab
|
||||||
*/
|
*/
|
||||||
public TabStop(float pos) {
|
public TabStop(float pos) {
|
||||||
this(pos, ALIGN_LEFT, LEAD_NONE);
|
this(pos, ALIGN_LEFT, LEAD_NONE);
|
||||||
@ -90,6 +98,9 @@ public class TabStop implements Serializable {
|
|||||||
/**
|
/**
|
||||||
* Creates a tab with the specified position <code>pos</code>,
|
* Creates a tab with the specified position <code>pos</code>,
|
||||||
* alignment <code>align</code> and leader <code>leader</code>.
|
* alignment <code>align</code> and leader <code>leader</code>.
|
||||||
|
* @param pos position of the tab
|
||||||
|
* @param align alignment of the tab
|
||||||
|
* @param leader leader of the tab
|
||||||
*/
|
*/
|
||||||
public TabStop(float pos, int align, int leader) {
|
public TabStop(float pos, int align, int leader) {
|
||||||
alignment = align;
|
alignment = align;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -311,6 +311,23 @@ public class Utilities {
|
|||||||
justificationData);
|
justificationData);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determines the relative offset into the given text that
|
||||||
|
* best represents the given span in the view coordinate
|
||||||
|
* system.
|
||||||
|
*
|
||||||
|
* @param s the source of the text
|
||||||
|
* @param metrics the font metrics to use for the calculation
|
||||||
|
* @param x0 the starting view location representing the start
|
||||||
|
* of the given text >= 0.
|
||||||
|
* @param x the target view location to translate to an
|
||||||
|
* offset into the text >= 0.
|
||||||
|
* @param e how to expand the tabs. If this value is null,
|
||||||
|
* tabs will be expanded as a space character.
|
||||||
|
* @param startOffset starting offset of the text in the document >= 0
|
||||||
|
* @param round whether or not to round
|
||||||
|
* @return the offset into the text >= 0
|
||||||
|
*/
|
||||||
public static final int getTabbedTextOffset(Segment s,
|
public static final int getTabbedTextOffset(Segment s,
|
||||||
FontMetrics metrics,
|
FontMetrics metrics,
|
||||||
int x0, int x, TabExpander e,
|
int x0, int x, TabExpander e,
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -381,6 +381,7 @@ public abstract class View implements SwingConstants {
|
|||||||
/**
|
/**
|
||||||
* Removes one of the children at the given position.
|
* Removes one of the children at the given position.
|
||||||
* This is a convenience call to <code>replace</code>.
|
* This is a convenience call to <code>replace</code>.
|
||||||
|
* @param i the position
|
||||||
* @since 1.3
|
* @since 1.3
|
||||||
*/
|
*/
|
||||||
public void remove(int i) {
|
public void remove(int i) {
|
||||||
@ -444,6 +445,7 @@ public abstract class View implements SwingConstants {
|
|||||||
* position.
|
* position.
|
||||||
*
|
*
|
||||||
* @param pos the position >= 0
|
* @param pos the position >= 0
|
||||||
|
* @param b the bias
|
||||||
* @return index of the view representing the given position, or
|
* @return index of the view representing the given position, or
|
||||||
* -1 if no view represents that position
|
* -1 if no view represents that position
|
||||||
* @since 1.3
|
* @since 1.3
|
||||||
@ -480,6 +482,7 @@ public abstract class View implements SwingConstants {
|
|||||||
* the {@code BadLocationException} will be thrown.
|
* the {@code BadLocationException} will be thrown.
|
||||||
*
|
*
|
||||||
* @param pos the position to convert
|
* @param pos the position to convert
|
||||||
|
* @param b the bias
|
||||||
* @param a the allocated region in which to render
|
* @param a the allocated region in which to render
|
||||||
* @param direction the direction from the current position that can
|
* @param direction the direction from the current position that can
|
||||||
* be thought of as the arrow keys typically found on a keyboard.
|
* be thought of as the arrow keys typically found on a keyboard.
|
||||||
@ -490,6 +493,7 @@ public abstract class View implements SwingConstants {
|
|||||||
* <li>SwingConstants.NORTH
|
* <li>SwingConstants.NORTH
|
||||||
* <li>SwingConstants.SOUTH
|
* <li>SwingConstants.SOUTH
|
||||||
* </ul>
|
* </ul>
|
||||||
|
* @param biasRet the returned bias
|
||||||
* @return the location within the model that best represents the next
|
* @return the location within the model that best represents the next
|
||||||
* location visual position
|
* location visual position
|
||||||
* @exception BadLocationException the given position is not a valid
|
* @exception BadLocationException the given position is not a valid
|
||||||
@ -662,6 +666,7 @@ public abstract class View implements SwingConstants {
|
|||||||
* @param x the X coordinate >= 0
|
* @param x the X coordinate >= 0
|
||||||
* @param y the Y coordinate >= 0
|
* @param y the Y coordinate >= 0
|
||||||
* @param a the allocated region in which to render
|
* @param a the allocated region in which to render
|
||||||
|
* @param biasReturn the returned bias
|
||||||
* @return the location within the model that best represents the
|
* @return the location within the model that best represents the
|
||||||
* given point in the view >= 0. The <code>biasReturn</code>
|
* given point in the view >= 0. The <code>biasReturn</code>
|
||||||
* argument will be
|
* argument will be
|
||||||
@ -864,6 +869,7 @@ public abstract class View implements SwingConstants {
|
|||||||
* for the purpose of rendering or layout, and should always
|
* for the purpose of rendering or layout, and should always
|
||||||
* access them through the <code>AttributeSet</code> returned
|
* access them through the <code>AttributeSet</code> returned
|
||||||
* by this method.
|
* by this method.
|
||||||
|
* @return the attributes to use when rendering
|
||||||
*/
|
*/
|
||||||
public AttributeSet getAttributes() {
|
public AttributeSet getAttributes() {
|
||||||
return elem.getAttributes();
|
return elem.getAttributes();
|
||||||
@ -1026,6 +1032,10 @@ public abstract class View implements SwingConstants {
|
|||||||
* Returns the tooltip text at the specified location. The default
|
* Returns the tooltip text at the specified location. The default
|
||||||
* implementation returns the value from the child View identified by
|
* implementation returns the value from the child View identified by
|
||||||
* the passed in location.
|
* the passed in location.
|
||||||
|
* @param x the x coordinate
|
||||||
|
* @param y the y coordinate
|
||||||
|
* @param allocation current allocation of the View.
|
||||||
|
* @return the tooltip text at the specified location
|
||||||
*
|
*
|
||||||
* @since 1.4
|
* @since 1.4
|
||||||
* @see JTextComponent#getToolTipText
|
* @see JTextComponent#getToolTipText
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1998, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -228,6 +228,9 @@ public class WrappedPlainView extends BoxView implements TabExpander {
|
|||||||
* It will either break at word or character boundaries
|
* It will either break at word or character boundaries
|
||||||
* depending upon the break argument given at
|
* depending upon the break argument given at
|
||||||
* construction.
|
* construction.
|
||||||
|
* @param p0 the starting document location
|
||||||
|
* @param p1 the ending document location to use
|
||||||
|
* @return the break position
|
||||||
*/
|
*/
|
||||||
protected int calculateBreakPosition(int p0, int p1) {
|
protected int calculateBreakPosition(int p0, int p1) {
|
||||||
int p;
|
int p;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1998, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -94,6 +94,7 @@ public class ZoneView extends BoxView {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the current maximum zone size.
|
* Get the current maximum zone size.
|
||||||
|
* @return the current maximum zone size
|
||||||
*/
|
*/
|
||||||
public int getMaximumZoneSize() {
|
public int getMaximumZoneSize() {
|
||||||
return maxZoneSize;
|
return maxZoneSize;
|
||||||
@ -117,6 +118,8 @@ public class ZoneView extends BoxView {
|
|||||||
/**
|
/**
|
||||||
* Get the current setting of the number of zones
|
* Get the current setting of the number of zones
|
||||||
* allowed to be loaded at the same time.
|
* allowed to be loaded at the same time.
|
||||||
|
* @return current setting of the number of zones
|
||||||
|
* allowed to be loaded at the same time
|
||||||
*/
|
*/
|
||||||
public int getMaxZonesLoaded() {
|
public int getMaxZonesLoaded() {
|
||||||
return maxZonesLoaded;
|
return maxZonesLoaded;
|
||||||
@ -184,6 +187,9 @@ public class ZoneView extends BoxView {
|
|||||||
* child elements of the element this view is responsible for.
|
* child elements of the element this view is responsible for.
|
||||||
* Therefore, the default implementation is to return
|
* Therefore, the default implementation is to return
|
||||||
* true if the view has children.
|
* true if the view has children.
|
||||||
|
* param zone the child view
|
||||||
|
* @param zone the zone
|
||||||
|
* @return whether or not the zone is in the loaded state.
|
||||||
*/
|
*/
|
||||||
protected boolean isZoneLoaded(View zone) {
|
protected boolean isZoneLoaded(View zone) {
|
||||||
return (zone.getViewCount() > 0);
|
return (zone.getViewCount() > 0);
|
||||||
@ -203,6 +209,8 @@ public class ZoneView extends BoxView {
|
|||||||
* @param p1 the end of the desired zone. This should
|
* @param p1 the end of the desired zone. This should
|
||||||
* be > getStartOffset() and <= getEndOffset(). This
|
* be > getStartOffset() and <= getEndOffset(). This
|
||||||
* value should also be > p0.
|
* value should also be > p0.
|
||||||
|
* @return a view to represent a zone for the given range within
|
||||||
|
* the model
|
||||||
*/
|
*/
|
||||||
protected View createZone(int p0, int p1) {
|
protected View createZone(int p0, int p1) {
|
||||||
Document doc = getDocument();
|
Document doc = getDocument();
|
||||||
|
Loading…
Reference in New Issue
Block a user