src/share/classes/javax/swing/text/html/StyleSheet.java
Print this page
@@ -125,10 +125,11 @@
* @author Timothy Prinzing
* @author Sunita Mani
* @author Sara Swanson
* @author Jill Nakata
*/
+@SuppressWarnings("serial") // Superclass is not serializable across versions
public class StyleSheet extends StyleContext {
// As the javadoc states, this class maintains a mapping between
// a CSS selector (such as p.bar) and a Style.
// This consists of a number of parts:
// . Each selector is broken down into its constituent simple selectors,
@@ -761,10 +762,11 @@
/**
* Large set of attributes that does conversion of requests
* for attributes of type StyleConstants.
*/
+ @SuppressWarnings("serial") // Superclass is not serializable across versions
class LargeConversionSet extends SimpleAttributeSet {
/**
* Creates a new attribute set based on a supplied set of attributes.
*
@@ -1758,10 +1760,11 @@
* <p>
* As a delegate of Views, this object is responsible for
* the insets of a View and making sure the background
* is maintained according to the CSS attributes.
*/
+ @SuppressWarnings("serial") // Same-version serialization only
public static class BoxPainter implements Serializable {
BoxPainter(AttributeSet a, CSS css, StyleSheet ss) {
this.ss = ss;
this.css = css;
@@ -2017,10 +2020,11 @@
* formatting. Implementations of this
* class enable views to present the CSS formatting
* while not knowing anything about how the CSS values
* are being cached.
*/
+ @SuppressWarnings("serial") // Same-version serialization only
public static class ListPainter implements Serializable {
ListPainter(AttributeSet attr, StyleSheet ss) {
this.ss = ss;
/* Get the image to use as a list bullet */
@@ -2446,10 +2450,11 @@
/**
* Paints the background image.
*/
+ @SuppressWarnings("serial") // Same-version serialization only
static class BackgroundImagePainter implements Serializable {
ImageIcon backgroundImage;
float hPosition;
float vPosition;
// bit mask: 0 for repeat x, 1 for repeat y, 2 for horiz relative,
@@ -2613,10 +2618,11 @@
/**
* A subclass of MuxingAttributeSet that translates between
* CSS and HTML and StyleConstants. The AttributeSets used are
* the CSS rules that match the Views Elements.
*/
+ @SuppressWarnings("serial") // Same-version serialization only
class ViewAttributeSet extends MuxingAttributeSet {
ViewAttributeSet(View v) {
host = v;
// PENDING(prinz) fix this up to be a more realistic
@@ -2777,10 +2783,11 @@
*/
// PENDING(sky): Decide what to do with this. Either make it
// contain a SimpleAttributeSet that modify methods are delegated to,
// or change getRule to return an AttributeSet and then don't make this
// implement Style.
+ @SuppressWarnings("serial") // Same-version serialization only
static class ResolvedStyle extends MuxingAttributeSet implements
Serializable, Style {
ResolvedStyle(String name, AttributeSet[] attrs, int extendedIndex) {
super(attrs);
this.name = name;
@@ -3018,10 +3025,11 @@
* so that it behaves like a tree.
* <p>
* This is not thread safe, it is assumed the caller will take the
* necessary precations if this is to be used in a threaded environment.
*/
+ @SuppressWarnings("serial") // Same-version serialization only
static class SelectorMapping implements Serializable {
public SelectorMapping(int specificity) {
this.specificity = specificity;
}