home *** CD-ROM | disk | FTP | other *** search
- package netscape.application;
-
- import netscape.util.CodingException;
- import netscape.util.Decoder;
-
- public class EmptyBorder extends Border {
- private static Border emptyBorder;
- private static Class emptyBorderClass;
-
- public static Border emptyBorder() {
- if (emptyBorder == null) {
- emptyBorder = new EmptyBorder();
- }
-
- return emptyBorder;
- }
-
- public int leftMargin() {
- return 0;
- }
-
- public int rightMargin() {
- return 0;
- }
-
- public int topMargin() {
- return 0;
- }
-
- public int bottomMargin() {
- return 0;
- }
-
- public void drawInRect(Graphics var1, int var2, int var3, int var4, int var5) {
- }
-
- private static Class emptyBorderClass() {
- if (emptyBorderClass == null) {
- emptyBorderClass = emptyBorder().getClass();
- }
-
- return emptyBorderClass;
- }
-
- public void decode(Decoder var1) throws CodingException {
- super.decode(var1);
- if (this.getClass() == emptyBorderClass()) {
- var1.replaceObject(emptyBorder());
- }
-
- }
- }
-