< prev index next >
src/java.desktop/share/classes/javax/swing/text/html/CSS.java
Print this page
*** 1,7 ****
/*
! * Copyright (c) 1998, 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
--- 1,7 ----
/*
! * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
*** 946,956 ****
/**
* Returns the size of a font from the passed in string.
*
* @param size CSS string describing font size
- * @param baseFontSize size to use for relative units.
*/
float getPointSize(String size, StyleSheet ss) {
int relSize, absSize, diff, index;
ss = getStyleSheet(ss);
if (size != null) {
--- 946,955 ----
*** 1656,1678 ****
/**
* Given a CSS.Attribute object and its corresponding HTML.Attribute's
* value, this method returns a CssValue object to associate with the
* CSS attribute.
*
! * @param the CSS.Attribute
! * @param a String containing the value associated HTML.Attribtue.
*/
Object getCssValue(CSS.Attribute cssAttr, String htmlAttrValue) {
CssValue value = (CssValue)valueConvertor.get(cssAttr);
Object o = value.parseHtmlValue(htmlAttrValue);
return o;
}
/**
* Maps an HTML.Attribute object to its appropriate CSS.Attributes.
*
! * @param HTML.Attribute
* @return CSS.Attribute[]
*/
private CSS.Attribute[] getCssAttribute(HTML.Attribute hAttr) {
return htmlAttrToCssAttrMap.get(hAttr);
}
--- 1655,1677 ----
/**
* Given a CSS.Attribute object and its corresponding HTML.Attribute's
* value, this method returns a CssValue object to associate with the
* CSS attribute.
*
! * @param cssAttr the CSS.Attribute
! * @param htmlAttrValue a String containing the value associated HTML.Attribute.
*/
Object getCssValue(CSS.Attribute cssAttr, String htmlAttrValue) {
CssValue value = (CssValue)valueConvertor.get(cssAttr);
Object o = value.parseHtmlValue(htmlAttrValue);
return o;
}
/**
* Maps an HTML.Attribute object to its appropriate CSS.Attributes.
*
! * @param hAttr HTML.Attribute
* @return CSS.Attribute[]
*/
private CSS.Attribute[] getCssAttribute(HTML.Attribute hAttr) {
return htmlAttrToCssAttrMap.get(hAttr);
}
*** 1683,1693 ****
* CSS.Attribute.FLOAT
* CSS.Attribute.VERTICAL_ALIGN
* based on the tag associated with the attribute and the
* value of the attribute.
*
! * @param AttributeSet containing HTML attributes.
* @return CSS.Attribute mapping for HTML.Attribute.ALIGN.
*/
private CSS.Attribute getCssAlignAttribute(HTML.Tag tag,
AttributeSet htmlAttrSet) {
return CSS.Attribute.TEXT_ALIGN;
--- 1682,1692 ----
* CSS.Attribute.FLOAT
* CSS.Attribute.VERTICAL_ALIGN
* based on the tag associated with the attribute and the
* value of the attribute.
*
! * @param tag the AttributeSet containing HTML attributes.
* @return CSS.Attribute mapping for HTML.Attribute.ALIGN.
*/
private CSS.Attribute getCssAlignAttribute(HTML.Tag tag,
AttributeSet htmlAttrSet) {
return CSS.Attribute.TEXT_ALIGN;
*** 1709,1719 ****
}
/**
* Fetches the tag associated with the HTML AttributeSet.
*
! * @param AttributeSet containing the HTML attributes.
* @return HTML.Tag
*/
private HTML.Tag getHTMLTag(AttributeSet htmlAttrSet) {
Object o = htmlAttrSet.getAttribute(StyleConstants.NameAttribute);
if (o instanceof HTML.Tag) {
--- 1708,1718 ----
}
/**
* Fetches the tag associated with the HTML AttributeSet.
*
! * @param htmlAttrSet the AttributeSet containing the HTML attributes.
* @return HTML.Tag
*/
private HTML.Tag getHTMLTag(AttributeSet htmlAttrSet) {
Object o = htmlAttrSet.getAttribute(StyleConstants.NameAttribute);
if (o instanceof HTML.Tag) {
< prev index next >