< prev index next >

src/java.desktop/share/classes/sun/applet/AppletViewer.java

Print this page




1076     /* values used for placement of AppletViewer's frames */
1077     private static int x = 0;
1078     private static int y = 0;
1079     private static final int XDELTA = 30;
1080     private static final int YDELTA = XDELTA;
1081 
1082     static String encoding = null;
1083 
1084     static private Reader makeReader(InputStream is) {
1085         if (encoding != null) {
1086             try {
1087                 return new BufferedReader(new InputStreamReader(is, encoding));
1088             } catch (IOException x) { }
1089         }
1090         InputStreamReader r = new InputStreamReader(is);
1091         encoding = r.getEncoding();
1092         return new BufferedReader(r);
1093     }
1094 
1095     /**
1096      * Scan an html file for <applet> tags
1097      */
1098     public static void parse(URL url, String enc) throws IOException {
1099         encoding = enc;
1100         parse(url, System.out, new StdAppletViewerFactory());
1101     }
1102 
1103     public static void parse(URL url) throws IOException {
1104         parse(url, System.out, new StdAppletViewerFactory());
1105     }
1106 
1107     public static void parse(URL url, PrintStream statusMsgStream,
1108                              AppletViewerFactory factory) throws IOException {
1109         // <OBJECT> <EMBED> tag flags
1110         boolean isAppletTag = false;
1111         boolean isObjectTag = false;
1112         boolean isEmbedTag = false;
1113 
1114         // warning messages
1115         String requiresNameWarning = amh.getMessage("parse.warning.requiresname");
1116         String paramOutsideWarning = amh.getMessage("parse.warning.paramoutside");




1076     /* values used for placement of AppletViewer's frames */
1077     private static int x = 0;
1078     private static int y = 0;
1079     private static final int XDELTA = 30;
1080     private static final int YDELTA = XDELTA;
1081 
1082     static String encoding = null;
1083 
1084     static private Reader makeReader(InputStream is) {
1085         if (encoding != null) {
1086             try {
1087                 return new BufferedReader(new InputStreamReader(is, encoding));
1088             } catch (IOException x) { }
1089         }
1090         InputStreamReader r = new InputStreamReader(is);
1091         encoding = r.getEncoding();
1092         return new BufferedReader(r);
1093     }
1094 
1095     /**
1096      * Scan an html file for {@code <applet>} tags
1097      */
1098     public static void parse(URL url, String enc) throws IOException {
1099         encoding = enc;
1100         parse(url, System.out, new StdAppletViewerFactory());
1101     }
1102 
1103     public static void parse(URL url) throws IOException {
1104         parse(url, System.out, new StdAppletViewerFactory());
1105     }
1106 
1107     public static void parse(URL url, PrintStream statusMsgStream,
1108                              AppletViewerFactory factory) throws IOException {
1109         // <OBJECT> <EMBED> tag flags
1110         boolean isAppletTag = false;
1111         boolean isObjectTag = false;
1112         boolean isEmbedTag = false;
1113 
1114         // warning messages
1115         String requiresNameWarning = amh.getMessage("parse.warning.requiresname");
1116         String paramOutsideWarning = amh.getMessage("parse.warning.paramoutside");


< prev index next >