Example #1
0
 public Colgroup(Element element) {
   super(element);
   align_ = UString.checkNull(element.getAttribute("align"));
   String widthString = UString.checkNull(element.getAttribute("width"));
   if (widthString != null) {
     width_ = new CSSLength(widthString);
   }
   String spanArg = UString.checkNull(element.getAttribute("span"));
   if (spanArg == null) {
     span_ = 0; // means any
   } else {
     span_ = Integer.parseInt(spanArg);
   }
 }
Example #2
0
 public void setFile(File file) throws IOException {
   url_ = null;
   file_ = file;
   text_ = UString.makeStringFromFile(file);
   setChanged();
   notifyObservers();
 }
Example #3
0
 public void setURL(URL url) throws IOException {
   url_ = url;
   file_ = null;
   text_ = UString.makeStringFromURL(url);
   setChanged();
   notifyObservers();
 }
Example #4
0
 protected void _doImportFromFile(File file) {
   try {
     String text = UString.makeStringFromFile(file);
     setText(text);
   } catch (IOException e) {
     throw (new InternalError());
   }
 }
Example #5
0
 protected void _doImportFromURL(String name) {
   try {
     URL url = new URL(name);
     String text = UString.makeStringFromURL(url);
     setText(text);
   } catch (MalformedURLException e) {
     throw (new InternalError());
   } catch (IOException e) {
     throw (new InternalError());
   }
 }