home *** CD-ROM | disk | FTP | other *** search
/ PC Pro 2001 December / dppcpro1201.iso / Extras / maple / Viewer / WebEQ / MMLViewerInstall.cab / MMLViewerApplet.cab / webeq3 / schema / MSqrt.class (.txt) < prev    next >
Encoding:
Java Class File  |  2001-05-24  |  2.0 KB  |  66 lines

  1. package webeq3.schema;
  2.  
  3. import webeq3.app.Equation;
  4. import webeq3.util.OutputHandler;
  5.  
  6. public class MSqrt extends MRoot {
  7.    public MSqrt(Box var1) {
  8.       super(var1);
  9.       super.type = 4;
  10.    }
  11.  
  12.    public MSqrt() {
  13.       super.type = 4;
  14.    }
  15.  
  16.    public MSqrt(Equation var1) {
  17.       super(var1);
  18.       super.type = 4;
  19.    }
  20.  
  21.    public void size() {
  22.       int var1 = super.children.size();
  23.       if (var1 != 2 || !"webeq3.schema.Box".equals(((Box)this).getChild(1).getClass().getName())) {
  24.          if (var1 == 1) {
  25.             Box var2 = new Box(this);
  26.             ((Box)this).addChild(var2);
  27.          } else if (var1 == 0) {
  28.             Box var4 = new Box(this);
  29.             ((Box)this).addChild(var4);
  30.             Box var3 = new Box(this);
  31.             ((Box)this).addChild(var3);
  32.          } else {
  33.             MRow var5 = new MRow(this);
  34.  
  35.             while(super.children.size() > 0) {
  36.                ((Box)var5).addChild(((Box)this).removeChildAt(0));
  37.             }
  38.  
  39.             ((Box)this).addChild(var5);
  40.             Box var6 = new Box(this);
  41.             ((Box)this).addChild(var6);
  42.          }
  43.       }
  44.  
  45.       super.size();
  46.    }
  47.  
  48.    public void printSelected(String var1, OutputHandler var2, boolean var3, boolean var4, String var5, boolean var6, int var7) {
  49.       if (var3 && !super.reverse_video) {
  50.          for(int var9 = 0; var9 < super.children.size(); ++var9) {
  51.             ((Box)this).getChild(var9).printSelected(var1, var2, var3, var4, var5, var6, var7);
  52.          }
  53.       } else if (var6 && super.cpeer != null) {
  54.          super.cpeer.printSelected(var1, var2, var3, var4, var5, var6, var7);
  55.       } else if (super.children.size() == 0) {
  56.          var2.println(var1 + ((Box)this).make_head(false, var5) + "</" + ((Box)this).make_tag(var5) + ">");
  57.       } else {
  58.          var2.println(var1 + ((Box)this).make_head(false, var5));
  59.          String var8 = var1 + "  ";
  60.          ((Box)this).getChild(0).printSelected(var8, var2, var3, var4, var5, var6, var7);
  61.          var2.println(var1 + "</" + ((Box)this).make_tag(var5) + ">");
  62.       }
  63.  
  64.    }
  65. }
  66.