1 package com.etymon.pj.object; 2 3 import java.io.*; 4 import java.util.*; 5 import com.etymon.pj.*; 6 import com.etymon.pj.exception.*; 7 8 12 public class PjFontType1 13 extends PjFont { 14 15 18 public PjFontType1() { 19 super(); 20 _h.put(PjName.SUBTYPE, PjName.TYPE1); 21 } 22 23 27 public PjFontType1(Hashtable h) { 28 super(h); 29 } 30 31 37 public static boolean isLike(PjDictionary dictionary) { 38 Hashtable h = dictionary.getHashtable(); 39 try { 41 PjName type = (PjName)(h.get(PjName.TYPE)); 42 if (type == null) { 43 return false; 44 } 45 if ( ! type.equals(PjName.FONT) ) { 46 return false; 47 } 48 PjName subtype = (PjName)(h.get(PjName.SUBTYPE)); 49 if (subtype == null) { 50 return false; 51 } 52 if ( ! subtype.equals(PjName.TYPE1) ) { 53 return false; 54 } 55 } 56 catch (ClassCastException e) { 57 return false; 58 } 59 return true; 60 } 61 62 67 public Object clone() throws CloneNotSupportedException { 68 return new PjFontType1(cloneHt()); 69 } 70 71 } 72 | Popular Tags |