summaryrefslogtreecommitdiff
path: root/javax/swing/text/LabelView.java
Commit message (Collapse)AuthorAgeFilesLines
* 2006-08-25 Roman Kennke <kennke@aicas.com>Roman Kennke2006-08-251-5/+4
| | | | | | | | | | | | | | | * javax/swing/text/LabelView.java (setPropertiesFromAttributes): Only set background when the corresponding attribute is actually defined, otherwise set to null, as the StyleConstants would return black. * javax/swing/text/DefaultStyledDocument.java (ElementBuffer.documentEvent): Removed obsolete field. (ElementBuffer.change): Do prepareEdits() and finishEdits() to correctly update the element structure. (ElementBuffer.insertContentTag): Removed unused statement. (ElementBuffer.recreateAfterFracture): Removed unused obsolete method. (setCharacterAttributes): Removed unused statement.
* 2006-08-24 Roman Kennke <kennke@aicas.com>Roman Kennke2006-08-251-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * javax/swing/text/BoxView.java (childReqs): Removed obsolete field. (baselineLayout): Reimplemented for correct baseline layout. (baselineRequirements): Reimplemented for correct baseline layout. (updateChildRequirements): Removed obsolete method. * javax/swing/text/GlyphView.java (DefaultGlyphPainter.getSpan): Removed unused statement. (DefaultGlyphPainter.paint): Dont paint subscript/superscript specially. The subscript/superscript layout is performed via the alignment, the font is supplied by the StyleContext. (breakView): Removed unused statements. (getAlignment): Adjust alignment according to the superscript/subscript setting. (getFont): Reimplemented to fetch the font from the style context, or from the document if the stylecontext is not available. (getPreferredSpan): Adjust span for superscript. Use switch instead of if-else. * javax/swing/text/LabelView.java (setPropertiesFromAttributes): Fetch background and foreground from document / style context. (isSubscript): Resync properties if needed. * javax/swing/text/ParagraphView.java (Row.calculateMinorAxisRequirements): Overridden to perform a baseline layout. (Row.layoutMinorAxis): Overridden to perform a baseline layout.
* 2006-08-24 Roman Kennke <kennke@aicas.com>Roman Kennke2006-08-241-10/+7
| | | | | | | | | | | * javax/swing/text/FlowView.java: (LogicalView.getAttributes): New method. Overrides super impl to return the attributes of the FlowView instance. * javax/swing/text/LabelView.java: (setPropertiesFromAttributes): Fetch attributes from View, rather then from the Element. (In the HTML package the getAttributes() method is overridden to return different attributes). Fetch font from the StyledDocument.
* 2006-08-11 Roman Kennke <kennke@aicas.com>Roman Kennke2006-08-111-7/+37
| | | | | | | | | | | | | | | | | | | * javax/swing/text/GlyphView.java (DefaultGlyphPainter.modelToView): Fixed model->view mapping. * javax/swing/text/LabelView.java (valid): New flag indicating if the text attributes are valid. (LabelView): Initialize valid field with false. (setPropertiesFromAttributes): Call setter methods instead of setting properties directly. Set valid to true. (changedUpdate): Invalidate attributes. Call super. (getBackground): Sync attributes if necessary. (getForeground): Sync attributes if necessary. (getFont): Sync attributes if necessary. (isUnderline): Sync attributes if necessary. (isSuperscript): Sync attributes if necessary. (isStrikeThrough): Sync attributes if necessary. (getFontMetrics): Sync attributes if necessary. Fetch font metrics from toolkit if Container is not available yet.
* 2006-02-06 Roman Kennke <kennke@aicas.com>Roman Kennke2006-02-061-1/+5
| | | | | | | | | | | | | * javax/swing/text/GlyphView.java: (DefaultGlyphPainter.paint): Store/restore Graphics color setting. Only fill background if there is a background set on the view. Call Utilities.drawTabbedText with the baseline height, rather than the upper left corner of the view rectangle. (getBackground): Return null if no background is set. * javax/swing/text/GlyphView.java: (setPropertiesFromAttributes): Use null for background when no background is set. StyleConstants.getBackground() doesn't work for this, because it returns Color.BLACK in that case.
* 2005-10-05 Roman Kennke <kennke@aicas.com>Roman Kennke2005-10-051-3/+239
| | | | | | | | | | | | | | | | | | | | * javax/swing/text/LabelView.java (LabelView): Implemented the constructor. (setPropertiesFromAttributes): New method. (changedUpdate): New method. (getBackground): New method. (setBackground): New method. (getForeground): New method. (getFont): New method. (getFontMetrics): New method. (isUnderline): New method. (setUnderline): New method. (isSubscript): New method. (setSubscript): New method. (isSuperscript): New method. (setSuperscript): New method. (isStrikeThrough): New method. (setStrikeThrough): New method.
* 2005-07-29 Roman Kennke <roman@kennke.org>Roman Kennke2005-07-291-0/+54
* javax/swing/text/AbstractDocument.java (createPosition): Delegate this call to the actual Content. (LeafElement.constructor): Manage the start and end marks via Position objects. (LeafElement.getEndOffset): Use Position instead of static mark. (LeafElement.getStartOffset): Use Position instead of static mark. * javax/swing/text/DefaultStyledDocument.java (ElementBuffer.change): New method. Performs structural changes in the element tree that are necessary in order to change text attributes. (ElementBuffer.changeUpdate): New method. This is the method for change(). (ElementBuffer.split): New package-private method. Splits an element into two elements. (setCharacterAttributes): Implemented this method. This sets character attributes on a piece of content. * javax/swing/text/GapContent.java (GapContentPosition): New inner class. Implements the Position interface for GapContent. (constructor): Initialize the list that stores the Position objects. (createPosition): Reimplemented. Now uses the GapContentPosition class. (shiftEnd): Update the stored positions. (shiftGap): Update the stored positions. * javax/swing/text/LabelView.java: New class.