home *** CD-ROM | disk | FTP | other *** search
/ S283 Planetary Science &n…he Search for Life DVD 2 / DVD-ROM.iso / install / jre1_3 / lib / rt.jar / java / awt / font / TextAttribute.class (.txt) < prev    next >
Encoding:
Java Class File  |  1979-12-31  |  4.4 KB  |  95 lines

  1. package java.awt.font;
  2.  
  3. import java.io.InvalidObjectException;
  4. import java.text.AttributedCharacterIterator;
  5. import java.util.HashMap;
  6. import java.util.Map;
  7.  
  8. public final class TextAttribute extends AttributedCharacterIterator.Attribute {
  9.    private static final Map instanceMap = new HashMap(29);
  10.    static final long serialVersionUID = 7744112784117861702L;
  11.    public static final TextAttribute FAMILY = new TextAttribute("family");
  12.    public static final TextAttribute WEIGHT = new TextAttribute("weight");
  13.    public static final Float WEIGHT_EXTRA_LIGHT = new Float(0.5F);
  14.    public static final Float WEIGHT_LIGHT = new Float(0.75F);
  15.    public static final Float WEIGHT_DEMILIGHT = new Float(0.875F);
  16.    public static final Float WEIGHT_REGULAR = new Float(1.0F);
  17.    public static final Float WEIGHT_SEMIBOLD = new Float(1.25F);
  18.    public static final Float WEIGHT_MEDIUM = new Float(1.5F);
  19.    public static final Float WEIGHT_DEMIBOLD = new Float(1.75F);
  20.    public static final Float WEIGHT_BOLD = new Float(2.0F);
  21.    public static final Float WEIGHT_HEAVY = new Float(2.25F);
  22.    public static final Float WEIGHT_EXTRABOLD = new Float(2.5F);
  23.    public static final Float WEIGHT_ULTRABOLD = new Float(2.75F);
  24.    public static final TextAttribute WIDTH = new TextAttribute("width");
  25.    public static final Float WIDTH_CONDENSED = new Float(0.75F);
  26.    public static final Float WIDTH_SEMI_CONDENSED = new Float(0.875F);
  27.    public static final Float WIDTH_REGULAR = new Float(1.0F);
  28.    public static final Float WIDTH_SEMI_EXTENDED = new Float(1.25F);
  29.    public static final Float WIDTH_EXTENDED = new Float(1.5F);
  30.    public static final TextAttribute POSTURE = new TextAttribute("posture");
  31.    public static final Float POSTURE_REGULAR = new Float(0.0F);
  32.    public static final Float POSTURE_OBLIQUE = new Float(0.2F);
  33.    public static final TextAttribute SIZE = new TextAttribute("size");
  34.    public static final TextAttribute TRANSFORM = new TextAttribute("transform");
  35.    public static final TextAttribute SUPERSCRIPT = new TextAttribute("superscript");
  36.    public static final Integer SUPERSCRIPT_SUPER = new Integer(1);
  37.    public static final Integer SUPERSCRIPT_SUB = new Integer(-1);
  38.    public static final TextAttribute FONT = new TextAttribute("font");
  39.    public static final TextAttribute CHAR_REPLACEMENT = new TextAttribute("char_replacement");
  40.    public static final TextAttribute FOREGROUND = new TextAttribute("foreground");
  41.    public static final TextAttribute BACKGROUND = new TextAttribute("background");
  42.    public static final TextAttribute UNDERLINE = new TextAttribute("underline");
  43.    public static final Integer UNDERLINE_ON = new Integer(0);
  44.    public static final TextAttribute STRIKETHROUGH = new TextAttribute("strikethrough");
  45.    public static final Boolean STRIKETHROUGH_ON = new Boolean(true);
  46.    public static final TextAttribute RUN_DIRECTION = new TextAttribute("run_direction");
  47.    public static final Boolean RUN_DIRECTION_LTR = new Boolean(false);
  48.    public static final Boolean RUN_DIRECTION_RTL = new Boolean(true);
  49.    public static final TextAttribute BIDI_EMBEDDING = new TextAttribute("bidi_embedding");
  50.    public static final TextAttribute JUSTIFICATION = new TextAttribute("justification");
  51.    public static final Float JUSTIFICATION_FULL = new Float(1.0F);
  52.    public static final Float JUSTIFICATION_NONE = new Float(0.0F);
  53.    public static final TextAttribute INPUT_METHOD_HIGHLIGHT = new TextAttribute("input method highlight");
  54.    public static final TextAttribute INPUT_METHOD_UNDERLINE = new TextAttribute("input method underline");
  55.    public static final Integer UNDERLINE_LOW_ONE_PIXEL = new Integer(1);
  56.    public static final Integer UNDERLINE_LOW_TWO_PIXEL = new Integer(2);
  57.    public static final Integer UNDERLINE_LOW_DOTTED = new Integer(3);
  58.    public static final Integer UNDERLINE_LOW_GRAY = new Integer(4);
  59.    public static final Integer UNDERLINE_LOW_DASHED = new Integer(5);
  60.    public static final TextAttribute SWAP_COLORS = new TextAttribute("swap_colors");
  61.    public static final Boolean SWAP_COLORS_ON = new Boolean(true);
  62.    // $FF: synthetic field
  63.    static Class class$java$awt$font$TextAttribute;
  64.  
  65.    protected TextAttribute(String var1) {
  66.       super(var1);
  67.       if (this.getClass() == (class$java$awt$font$TextAttribute == null ? (class$java$awt$font$TextAttribute = class$("java.awt.font.TextAttribute")) : class$java$awt$font$TextAttribute)) {
  68.          instanceMap.put(var1, this);
  69.       }
  70.  
  71.    }
  72.  
  73.    protected Object readResolve() throws InvalidObjectException {
  74.       if (this.getClass() != (class$java$awt$font$TextAttribute == null ? (class$java$awt$font$TextAttribute = class$("java.awt.font.TextAttribute")) : class$java$awt$font$TextAttribute)) {
  75.          throw new InvalidObjectException("subclass didn't correctly implement readResolve");
  76.       } else {
  77.          TextAttribute var1 = (TextAttribute)instanceMap.get(((AttributedCharacterIterator.Attribute)this).getName());
  78.          if (var1 != null) {
  79.             return var1;
  80.          } else {
  81.             throw new InvalidObjectException("unknown attribute name");
  82.          }
  83.       }
  84.    }
  85.  
  86.    // $FF: synthetic method
  87.    static Class class$(String var0) {
  88.       try {
  89.          return Class.forName(var0);
  90.       } catch (ClassNotFoundException var2) {
  91.          throw new NoClassDefFoundError(((Throwable)var2).getMessage());
  92.       }
  93.    }
  94. }
  95.