1 14 package org.wings; 15 16 import java.io.Serializable ; 17 18 22 public class SFont implements Serializable { 23 26 public final static int PLAIN = java.awt.Font.PLAIN; 27 30 public final static int ITALIC = java.awt.Font.ITALIC; 31 34 public final static int BOLD = java.awt.Font.BOLD; 35 36 39 public final static int DEFAULT_SIZE = -1; 40 41 protected int style = PLAIN; 42 protected String face = null; 43 protected int size = DEFAULT_SIZE; 44 45 public SFont() { 46 } 47 48 public SFont(int style) { 49 setStyle(style); 50 } 51 52 55 public SFont(String face, int style, int size) { 56 setFace(face); 57 setStyle(style); 58 setSize(size); 59 } 60 61 public void setFace(String f) { 62 face = f; 63 if (face != null && face.trim().length() == 0) 64 face = null; 65 } 66 67 public String getFace() { 68 return face; 69 } 70 71 public void setStyle(int s) { 72 style = s; 73 } 74 75 public int getStyle() { 76 return style; 77 } 78 79 public void setSize(int s) { 80 size = s; 81 } 82 83 public int getSize() { 84 return size; 85 } 86 } 87 88 89 | Popular Tags |