| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* javax/swing/plaf/basic/BasicTextUI.java
(damageRange(JTextComponent,int,int)): Call damageRange() with
correct biases, rather than null.
(damageRange(JTextComponent,int,int,Bias,Bias)): Rewritten
to use simpler modelToView() approach without much special
casing. This seems not worth the effort and actually
caused problems. Added locking of the document.
* javax/swing/text/BoxView.java
(requirementsValid): New field.
(calculateMajorAxisRequirements): Rewritten without using
SizeRequirements. The SizeRequirements algorithms are slightly
different and too inefficient.
(calculateMinorAxisRequirements): Rewritten without using
SizeRequirements. The SizeRequirements algorithms are slightly
different and too inefficient.
(getAlignment): Simply return the alignment of the cached
requirements.
(getMaximumSpan): Add insets.
(getMinimumSpan): Add insets.
(getPreferredSpan): Add insets.
(layoutMajorAxis): Rewritten without using
SizeRequirements. The SizeRequirements algorithms are slightly
different and too inefficient.
(layoutMinorAxis): Rewritten without using
SizeRequirements. The SizeRequirements algorithms are slightly
different and too inefficient.
(modelToView): Call setSize() rather than layout().
(paint): Check clip for more efficient painting.
(preferenceChanged): Invalidate requirements here.
(replace): Invalidate requirements here.
(updateRequirements): Update requirements only when requirements
are marked invalid.
* javax/swing/text/CompositeView.java
(modelToView): Added some more checks and handling of corner cases.
* javax/swing/text/FlowView.java
(calculateMinorAxisRequirements): Set aligment to 0.5 and maximum
span to Integer.MAX_VALUE. Limit preferredSize to minimumSize.
* javax/swing/text/IconView.java
(getAlignment): Implemented to return 1.0 for vertical alignment.
* javax/swing/text/ParagraphView.java
(Row.getMaximumSpan): Implemented to let Rows span the whole
ParagraphView.
(getAlignment): Fixed horizontal alignment and vertical alignment
for empty paragraphs to be 0.5.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* javax/swing/text/BoxView.java
(getAxis): Added @since tag.
(setAxis): Added @since tag.
(layoutChanged): Added @since tag.
(isLayoutValid): Added @since tag.
(paint): Don't call setSize here. This is done in RootView already.
(getMaximumSpan): Reimplemented to return the requirements'
maximum size. Added API docs.
(getMinimumSpan): New method.
(layout): Fixed layout order.
(modelToView): Call layout instead of setSize here.
(getResizeWeight): New method.
(getChildAllocation): New method.
(forwardUpdate): New method.
(viewToModel): New method.
(flipEastEndWestEnds): New method.
* javax/swing/text/CompositeView.java
(modelToView): Made this method more robust by returning a default
location if it's not possible to calculate one via the children.
This default location returns the left or right edge of this
view.
(createDefaultLocation): New helper method.
* javax/swing/text/IconView.java
(modelToView): Don't throw BadLocationException. This should
really only be thrown if the position is outside the document
model, not if it's outside the view's boundary.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* javax/swing/text/View.java
(getNextVisualPositionFrom): Fixed signature and (partly)
implemented this method.
* javax/swing/text/Utilities.java
(getPositionAbove): Fixed to use the correct signature for the call
to above method.
(getPositionBelow): Fixed to use the correct signature for the call
to above method.
* javax/swing/text/ComponentView.java
(getNextVisualPositionFrom): Removed method. This is not specified
to be implemented.
* javax/swing/text/CompositeView.java
(getNextVisualPositionFrom): Removed method with wrong signature.
A method with the correct signature is already in place.
* javax/swing/text/FlowView.java
(LogicalView.getNextVisualPositionFrom): Removed method with wrong
signature.
* javax/swing/text/GlyphView.java
(getNextVisualPositionFrom): Removed method with wrong signature.
A method with the correct signature is already in place.
* javax/swing/text/IconView.java
(getNextVisualPositionFrom): Removed method. This is not specified
to be implemented.
* javax/swing/text/PlainView.java
(getNextVisualPositionFrom): Removed method. This is not specified
to be implemented.
* javax/swing/text/WrappedPlainView.java
(WrappedLine.getNextVisualPositionFrom): Removed method with wrong
signature.
* javax/swing/plaf/basic/BasicTextUI.java
(RootView.getNextVisualPositionFrom): Fixed signature.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* javax/swing/text/AbstractDocument.java
(LeafElement.getName): If super.getName() returns something
non-null, then return that instead of ContentElementName.
* javax/swing/text/ComponentView.java
(comp): New field.
(getAlignment): Implemented previously stubbed method.
(getComponent): Implemented previously stubbed method.
(getMaximumSpan): Implemented previously stubbed method.
(getMinimumSpan): Implemented previously stubbed method.
(getPreferredSpan): Implemented previously stubbed method.
(modelToView): Implemented previously stubbed method.
(paint): Implemented previously stubbed method.
(setParent): Implemented previously stubbed method.
(setSize): Removed unneeded method.
(viewToModel): Implemented previously stubbed method.
* javax/swing/text/FlowView.java
(insertUpdate): Forward this event to the logical view.
* javax/swing/text/IconView.java
(paint): Implemented previously stubbed method.
(getPreferredSpan): Implemented previously stubbed method.
(modelToView): Implemented previously stubbed method.
(viewToModel): Implemented previously stubbed method.
* javax/swing/text/ParagraphView.java
(firstLineIndent): New field.
(justification): New field.
(lineSpacing): New field.
(tabSet): New field.
(changedUpdate): New method.
(setPropertiesFromAttributes): New method.
(setFirstLineIndent): New method.
(setJustification): New method.
(setLineSpacing): New method.
(getLayoutView): New method.
(getLayoutViewCount): New method.
(getTabSet): New method.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* javax/swing/text/Utilities.java
(getPositionAbove): New utility method.
(getPositionBelow): New utility method.
(getParagraphElement): Special case for StyledDocuments.
* javax/swing/text/View.java
(getNextVisualPositionFrom): New abstract method.
* javax/swing/text/ComponentView.java
(getNextVisualPositionFrom): New method.
* javax/swing/text/CompositeView.java
(getNextVisualPositionFrom): New method.
* javax/swing/text/FlowView.java
(LogicalView.getNextVisualPositionFrom): New method.
* javax/swing/text/GlyphView.java
(getNextVisualPositionFrom): New method.
* javax/swing/text/IconView.java
(getNextVisualPositionFrom): New method.
* javax/swing/text/PlainView.java
(getNextVisualPositionFrom): New method.
* javax/swing/text/WrappedPlainView.java
(WrappedLine.getNextVisualPositionFrom): New method.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* javax/swing/text/AbstractDocument.java: fixed minor API doc
problems,
* javax/swing/text/Caret.java: likewise,
* javax/swing/text/CompositeView.java: likewise,
* javax/swing/text/DefaultCaret.java: likewise,
* javax/swing/text/DefaultEditorKit.java: likewise,
* javax/swing/text/DefaultStyledDocument.java: likewise,
* javax/swing/text/ElementIterator.java: likewise,
* javax/swing/text/GlyphView.java: likewise,
* javax/swing/text/IconView.java: likewise,
* javax/swing/text/View.java: likewise.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* javax/swing/plaf/basic/BasicTextUI.java
(viewToModel): Changed to match API spec.
* javax/swing/text/CompositeView.java
(viewToModel): Changed to match API spec.
* javax/swing/text/FieldView.java
(viewToModel): Changed to match API spec.
* javax/swing/text/GlyphView.java
(viewToModel): Changed to match API spec.
* javax/swing/text/IconView.java
(viewToModel): Changed to match API spec.
* javax/swing/text/PasswordView.java
(viewToModel): Changed to match API spec.
* javax/swing/text/PlainView.java
(viewToModel): Changed to match API spec.
* javax/swing/text/View.java
(viewToModel): Changed to match API spec.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* javax/swing/plaf/basic/BasicTextUI.java
(RootView.viewToModel): New method.
* javax/swing/text/BoxView.java
(isBefore): New method. This is a stub method to implement the
new abstract method from CompositeView.
(isAfter): New method. This is a stub method to implement the
new abstract method from CompositeView.
(getViewAtPoint): New method. This is a stub method to implement the
new abstract method from CompositeView.
(childAllocation): New method. This is a stub method to implement the
new abstract method from CompositeView.
* javax/swing/text/ComponentView.java
(viewToModel): New method. This is a stub method to implement the
new abstract method from View.
* javax/swing/text/CompositeView.java
(loadChildren): Implemented new method.
(setParent): Implemented new method.
(getViewCount): Implemented new method.
(getView): Implemented new method.
(replace): Implemented new method.
(getChildAllocation): Implemented new method.
(modelToView(int, Shape, Position.Bias)): Implemented this method.
(modelToView(int, Position.Bias, int, Position.Bias, Shape):
Implemented new method.
(viewToModel): Implemented new method.
(getNextVisualPositionFrom): Implemented new method.
(getViewIndex): Implemented new method.
(isBefore): New abstract method.
(isAfter): New abstract method.
(getViewAtPoint): New abstract method.
(childAllocation): New abstract method.
(getViewAtPosition): Implemented new method.
(getViewIndexAtPosition): Implemented new method.
(getInsideAllocation): Implemented new method.
(setParagraphInsets): Implemented new method.
(setInsets): Implemented new method.
(getLeftInset): Implemented new method.
(getRightInset): Implemented new method.
(getTopInset): Implemented new method.
(getBottomInset): Implemented new method.
(getNextNorthSouthVisualPositionFrom): New method.
(getNextEastWestVisualPositionFrom): New method.
(flipEastAndWestAtEnds): Implemented new method.
* javax/swing/text/GlyphView.java
(viewToModel): New method. This is a stub method to implement the
new abstract method from View.
* javax/swing/text/IconView.java
(viewToModel): New method. This is a stub method to implement the
new abstract method from View.
* javax/swing/text/PlainView.java
(viewToModel): New method. This is a stub method to implement the
new abstract method from View.
* javax/swing/text/View.java
(viewToModel): New abstract method.
|
|
* javax/swing/text/BoxView.java: New class.
* javax/swing/text/CompositeView.java: New class.
* javax/swing/text/FlowView.java: New class.
* javax/swing/text/GlyphView.java: New class.
* javax/swing/text/IconView.java: New class.
* javax/swing/text/ParagraphView.java: New class.
* javax/swing/text/StyledEditorKit.java
(UnderLineAction.constructor): Added TODO comment.
(UnderLineAction.actionPerformed): Implemented this method. This
toggles the underline attribute to a piece of content.
(ItalicAction.constructor): Added TODO comment.
(ItalicAction.actionPerformed): Implemented this method. This
toggles the italic attribute to a piece of content.
(BoldAction.constructor): Added TODO comment.
(BoldAction.actionPerformed): Implemented this method. This
toggles the bold attribute to a piece of content.
(AlignmentAction.constructor): Implemented this constructor.
(AlignmentAction.actionPerformed): Implemented this method. This
sets the alignment attribute for a piece of content.
(ForegroundAction.constructor): Implemented this constructor.
(ForegroundAction.actionPerformed): Implemented this method. This
sets the foreground attribute for a piece of content.
(FontSizeAction.constructor): Implemented this constructor.
(FontSizeAction.actionPerformed): Implemented this method. This
sets the font size attribute for a piece of content.
(FontFamilyAction.constructor): Implemented this constructor.
(FontFamilyAction.actionPerformed): Implemented this method. This
sets the font family attribute for a piece of content.
(StyledTextAction.constructor): Removed TODO comment.
(StyledTextAction.getEditor): Implemented this method.
(StyledTextAction.getStyledDocument): Implemented this method.
(StyledTextAction.getStyledEditorKit): Implemented this method.
(StyledTextAction.setCharacterAttributes): Implemented this method.
(StyledTextAction.setParagraphAttributes): Implemented this method.
(StyledViewFactory.constructor): Removed. This is not necessary here.
(StyledViewFactory.create): Implemented this method.
(AttributeTracker): Removed this inner class.
(CaretTracker): New inner class.
(CaretTracker.caretUpdate): Implemented this method. This meeps
track of the caret in a text component and updates some fields
of the StyledEditorKit.
(constructor): Implemented this constructor.
The inputAttributes are initialized here.
(clone): Implemented this method.
(getActions): Implemented this method.
(getInputAttributes): Implemented this method.
(getCharacterAttributeRun): Implemented this method.
(createDefaultDocument): Implemented this method.
(install): Implemented this method.
(deinstall): Implemented this method.
(getViewFactory): Implemented this method.
(createInputAttributes): Implemented this method.
* javax/swing/text/View.java
(modelToView(int, Shape, Position.Bias)): Added new abstract method.
(modelToView(int, Position.Bias, int, Position.Bias, Shape):
New method.
|