src/share/classes/javax/swing/plaf/basic/BasicBorders.java
Print this page
@@ -1,7 +1,7 @@
/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -142,10 +142,11 @@
/**
* Special thin border for rollover toolbar buttons.
* @since 1.4
*/
+ @SuppressWarnings("serial") // Superclass is not serializable across versions
public static class RolloverButtonBorder extends ButtonBorder {
public RolloverButtonBorder(Color shadow, Color darkShadow,
Color highlight, Color lightHighlight) {
super(shadow, darkShadow, highlight, lightHighlight);
@@ -194,10 +195,11 @@
* if the margin has been explicitly set by the developer.
*
* Note: This is identical to the package private class
* MetalBorders.RolloverMarginBorder and should probably be consolidated.
*/
+ @SuppressWarnings("serial") // Superclass is not serializable across versions
static class RolloverMarginBorder extends EmptyBorder {
public RolloverMarginBorder() {
super(3,3,3,3); // hardcoded margin for JLF requirements.
}
@@ -223,10 +225,11 @@
}
return insets;
}
}
+ @SuppressWarnings("serial") // Superclass is not serializable across versions
public static class ButtonBorder extends AbstractBorder implements UIResource {
protected Color shadow;
protected Color darkShadow;
protected Color highlight;
protected Color lightHighlight;
@@ -265,10 +268,11 @@
return insets;
}
}
+ @SuppressWarnings("serial") // Superclass is not serializable across versions
public static class ToggleButtonBorder extends ButtonBorder {
public ToggleButtonBorder(Color shadow, Color darkShadow,
Color highlight, Color lightHighlight) {
super(shadow, darkShadow, highlight, lightHighlight);
@@ -286,10 +290,11 @@
insets.set(2, 2, 2, 2);
return insets;
}
}
+ @SuppressWarnings("serial") // Superclass is not serializable across versions
public static class RadioButtonBorder extends ButtonBorder {
public RadioButtonBorder(Color shadow, Color darkShadow,
Color highlight, Color lightHighlight) {
super(shadow, darkShadow, highlight, lightHighlight);
@@ -322,10 +327,11 @@
insets.set(2, 2, 2, 2);
return insets;
}
}
+ @SuppressWarnings("serial") // Superclass is not serializable across versions
public static class MenuBarBorder extends AbstractBorder implements UIResource {
private Color shadow;
private Color highlight;
public MenuBarBorder(Color shadow, Color highlight) {
@@ -348,10 +354,11 @@
insets.set(0, 0, 2, 0);
return insets;
}
}
+ @SuppressWarnings("serial") // Superclass is not serializable across versions
public static class MarginBorder extends AbstractBorder implements UIResource {
public Insets getBorderInsets(Component c, Insets insets) {
Insets margin = null;
//
// Ideally we'd have an interface defined for classes which
@@ -375,10 +382,11 @@
return insets;
}
}
+ @SuppressWarnings("serial") // Superclass is not serializable across versions
public static class FieldBorder extends AbstractBorder implements UIResource {
protected Color shadow;
protected Color darkShadow;
protected Color highlight;
protected Color lightHighlight;