< prev index next >

src/java.desktop/share/classes/javax/swing/text/LabelView.java

Print this page

        

*** 26,36 **** import java.awt.*; import javax.swing.event.*; /** ! * A <code>LabelView</code> is a styled chunk of text * that represents a view mapped over an element in the * text model. It caches the character level attributes * used for rendering. * * @author Timothy Prinzing --- 26,36 ---- import java.awt.*; import javax.swing.event.*; /** ! * A {@code LabelView} is a styled chunk of text * that represents a view mapped over an element in the * text model. It caches the character level attributes * used for rendering. * * @author Timothy Prinzing
*** 117,131 **** subscript = s; } /** * Sets the background color for the view. This method is typically ! * invoked as part of configuring this <code>View</code>. If you need * to customize the background color you should override ! * <code>setPropertiesFromAttributes</code> and invoke this method. A * value of null indicates no background should be rendered, so that the ! * background of the parent <code>View</code> will show through. * * @param bg background color, or null * @see #setPropertiesFromAttributes * @since 1.5 */ --- 117,131 ---- subscript = s; } /** * Sets the background color for the view. This method is typically ! * invoked as part of configuring this {@code View}. If you need * to customize the background color you should override ! * {@code setPropertiesFromAttributes} and invoke this method. A * value of null indicates no background should be rendered, so that the ! * background of the parent {@code View} will show through. * * @param bg background color, or null * @see #setPropertiesFromAttributes * @since 1.5 */
*** 158,169 **** } } } /** ! * 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 * when running in the JDK. */ @Deprecated protected FontMetrics getFontMetrics() { --- 158,169 ---- } } } /** ! * Fetches the {@code FontMetrics} used for this view. ! * @return the {@code FontMetrics} used for this view * @deprecated FontMetrics are not used for glyph rendering * when running in the JDK. */ @Deprecated protected FontMetrics getFontMetrics() {
*** 174,184 **** } /** * Fetches the background color to use to render the glyphs. * This is implemented to return a cached background color, ! * which defaults to <code>null</code>. * * @return the cached background color * @since 1.3 */ public Color getBackground() { --- 174,184 ---- } /** * Fetches the background color to use to render the glyphs. * This is implemented to return a cached background color, ! * which defaults to {@code null}. * * @return the cached background color * @since 1.3 */ public Color getBackground() {
*** 187,197 **** } /** * Fetches the foreground color to use to render the glyphs. * This is implemented to return a cached foreground color, ! * which defaults to <code>null</code>. * * @return the cached foreground color * @since 1.3 */ public Color getForeground() { --- 187,197 ---- } /** * Fetches the foreground color to use to render the glyphs. * This is implemented to return a cached foreground color, ! * which defaults to {@code null}. * * @return the cached foreground color * @since 1.3 */ public Color getForeground() {
*** 213,230 **** /** * Determines if the glyphs should be underlined. If true, * an underline should be drawn through the baseline. This * is implemented to return the cached underline property. * ! * <p>When you request this property, <code>LabelView</code> * re-syncs its state with the properties of the ! * <code>Element</code>'s <code>AttributeSet</code>. ! * If <code>Element</code>'s <code>AttributeSet</code> * does not have this property set, it will revert to false. * * @return the value of the cached ! * <code>underline</code> property * @since 1.3 */ public boolean isUnderline() { sync(); return underline; --- 213,230 ---- /** * Determines if the glyphs should be underlined. If true, * an underline should be drawn through the baseline. This * is implemented to return the cached underline property. * ! * <p>When you request this property, {@code LabelView} * re-syncs its state with the properties of the ! * {@code Element}'s {@code AttributeSet}. ! * If {@code Element}'s {@code AttributeSet} * does not have this property set, it will revert to false. * * @return the value of the cached ! * {@code underline} property * @since 1.3 */ public boolean isUnderline() { sync(); return underline;
*** 232,251 **** /** * Determines if the glyphs should have a strikethrough * line. If true, a line should be drawn through the center * of the glyphs. This is implemented to return the ! * cached <code>strikeThrough</code> property. * ! * <p>When you request this property, <code>LabelView</code> * re-syncs its state with the properties of the ! * <code>Element</code>'s <code>AttributeSet</code>. ! * If <code>Element</code>'s <code>AttributeSet</code> * does not have this property set, it will revert to false. * * @return the value of the cached ! * <code>strikeThrough</code> property * @since 1.3 */ public boolean isStrikeThrough() { sync(); return strike; --- 232,251 ---- /** * Determines if the glyphs should have a strikethrough * line. If true, a line should be drawn through the center * of the glyphs. This is implemented to return the ! * cached {@code strikeThrough} property. * ! * <p>When you request this property, {@code LabelView} * re-syncs its state with the properties of the ! * {@code Element}'s {@code AttributeSet}. ! * If {@code Element}'s {@code AttributeSet} * does not have this property set, it will revert to false. * * @return the value of the cached ! * {@code strikeThrough} property * @since 1.3 */ public boolean isStrikeThrough() { sync(); return strike;
*** 253,288 **** /** * Determines if the glyphs should be rendered as superscript. * @return the value of the cached subscript property * ! * <p>When you request this property, <code>LabelView</code> * re-syncs its state with the properties of the ! * <code>Element</code>'s <code>AttributeSet</code>. ! * If <code>Element</code>'s <code>AttributeSet</code> * does not have this property set, it will revert to false. * * @return the value of the cached ! * <code>subscript</code> property * @since 1.3 */ public boolean isSubscript() { sync(); return subscript; } /** * Determines if the glyphs should be rendered as subscript. * ! * <p>When you request this property, <code>LabelView</code> * re-syncs its state with the properties of the ! * <code>Element</code>'s <code>AttributeSet</code>. ! * If <code>Element</code>'s <code>AttributeSet</code> * does not have this property set, it will revert to false. * * @return the value of the cached ! * <code>superscript</code> property * @since 1.3 */ public boolean isSuperscript() { sync(); return superscript; --- 253,288 ---- /** * Determines if the glyphs should be rendered as superscript. * @return the value of the cached subscript property * ! * <p>When you request this property, {@code LabelView} * re-syncs its state with the properties of the ! * {@code Element}'s {@code AttributeSet}. ! * If {@code Element}'s {@code AttributeSet} * does not have this property set, it will revert to false. * * @return the value of the cached ! * {@code subscript} property * @since 1.3 */ public boolean isSubscript() { sync(); return subscript; } /** * Determines if the glyphs should be rendered as subscript. * ! * <p>When you request this property, {@code LabelView} * re-syncs its state with the properties of the ! * {@code Element}'s {@code AttributeSet}. ! * If {@code Element}'s {@code AttributeSet} * does not have this property set, it will revert to false. * * @return the value of the cached ! * {@code superscript} property * @since 1.3 */ public boolean isSuperscript() { sync(); return superscript;
< prev index next >