Package edu.mit.csail.sdg.alloy4

Examples of edu.mit.csail.sdg.alloy4.OurAntiAlias


        // Create the message area
        logpane = OurUtil.scrollpane(null);
        log = new SwingLogPanel(logpane, fontName, fontSize, background, Color.BLACK, new Color(.7f,.2f,.2f), this);

        // Create the text area
        text = new OurTabbedSyntaxWidget(fontName, fontSize, TabSize.get());
        text.listeners.add(this);
        text.enableSyntax(! SyntaxDisabled.get());

        // Add everything to the frame, then display the frame
        Container all=frame.getContentPane();
View Full Code Here


      };
   }

   /** Display this object (and so objects) as a tree; if listener!=null, it will receive OurTree.Event.SELECT events. */
   public final JFrame showAsTree(Listener listener) {
      final OurTree tree = new OurTree(12) {
         private static final long serialVersionUID = 0;
         private final boolean onWindows = Util.onWindows();
         {do_start();}
         @Override public String convertValueToText(Object val,boolean selected,boolean expanded,boolean leaf,int row,boolean focus) {
             String c = ">";
             String x = (val instanceof Browsable) ? ((Browsable)val).getDescription() : String.valueOf(val);
             if (onWindows) c = selected ? " style=\"color:#ffffff;\">" : " style=\"color:#000000;\">";
             return "<html> <span" + c + x + "</span></html>";
         }
         @Override public List<?> do_ask(Object parent) {
            if (parent instanceof Browsable) return ((Browsable)parent).getSubnodes(); else return new ArrayList<Browsable>();
         }
         @Override public Object do_root() { return Browsable.this; }
      };
      tree.setBorder(new EmptyBorder(3,3,3,3));
      final JScrollPane scr = new JScrollPane(tree, JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
      scr.addFocusListener(new FocusListener() {
         public void focusGained(FocusEvent e) { tree.requestFocusInWindow(); }
         public void focusLost(FocusEvent e) { }
      });
      final JFrame x = new JFrame("Parse Tree");
      x.setLayout(new BorderLayout());
      x.add(scr, BorderLayout.CENTER);
View Full Code Here

   /** Returns the formula (all...| this)
    * <p> this must be a formula
    */
   public final Expr forAll(Decl firstDecl, Decl... moreDecls) throws Err {
      Pos p = firstDecl.span();
      for(Decl v: moreDecls) p=p.merge(v.span());
      return ExprQt.Op.ALL.make(p, null, Util.prepend(Util.asList(moreDecls), firstDecl), this);
   }
View Full Code Here

   /** Returns the formula (no...| this)
    * <p> this must be a formula
    */
   public final Expr forNo(Decl firstDecl, Decl... moreDecls) throws Err {
      Pos p = firstDecl.span();
      for(Decl v: moreDecls) p=p.merge(v.span());
      return ExprQt.Op.NO.make(p, null, Util.prepend(Util.asList(moreDecls), firstDecl), this);
   }
View Full Code Here

   /** Returns the formula (lone...| this)
    * <p> this must be a formula
    */
   public final Expr forLone(Decl firstDecl, Decl... moreDecls) throws Err {
      Pos p = firstDecl.span();
      for(Decl v: moreDecls) p=p.merge(v.span());
      return ExprQt.Op.LONE.make(p, null, Util.prepend(Util.asList(moreDecls), firstDecl), this);
   }
View Full Code Here

   /** Returns the formula (one ...| this)
    * <p> this must be a formula
    */
   public final Expr forOne(Decl firstDecl, Decl... moreDecls) throws Err {
      Pos p = firstDecl.span();
      for(Decl v: moreDecls) p=p.merge(v.span());
      return ExprQt.Op.ONE.make(p, null, Util.prepend(Util.asList(moreDecls), firstDecl), this);
   }
View Full Code Here

   /** Returns the formula (some...| this)
    * <p> this must be a formula
    */
   public final Expr forSome(Decl firstDecl, Decl... moreDecls) throws Err {
      Pos p = firstDecl.span();
      for(Decl v: moreDecls) p=p.merge(v.span());
      return ExprQt.Op.SOME.make(p, null, Util.prepend(Util.asList(moreDecls), firstDecl), this);
   }
View Full Code Here

   /** Returns the comprehension expression {...|this}
    * <p> this must be a formula
    * <p> each declaration must be a "one-of" quantification over a unary set
    */
   public final Expr comprehensionOver(Decl firstDecl, Decl... moreDecls) throws Err {
      Pos p = firstDecl.span();
      for(Decl v: moreDecls) p=p.merge(v.span());
      return ExprQt.Op.COMPREHENSION.make(p, null, Util.prepend(Util.asList(moreDecls), firstDecl), this);
   }
View Full Code Here

   /** Returns the integer (sum...| this)
    * <p> this must be an integer expression
    * <p> each declaration must be a "one-of" quantification over a unary set
    */
   public final Expr sumOver(Decl firstDecl, Decl... moreDecls) throws Err {
      Pos p = firstDecl.span();
      for(Decl v: moreDecls) p=p.merge(v.span());
      return ExprQt.Op.SUM.make(p, null, Util.prepend(Util.asList(moreDecls), firstDecl), this);
   }
View Full Code Here

            }
            catch(Err e) {
                commands = null;
                runmenu.getItem(0).setEnabled(false);
                runmenu.getItem(3).setEnabled(false);
                text.shade(new Pos(text.get().getFilename(), e.pos.x, e.pos.y, e.pos.x2, e.pos.y2));
                if ("yes".equals(System.getProperty("debug")) && Verbosity.get()==Verbosity.FULLDEBUG)
                    log.logRed("Fatal Exception!" + e.dump() + "\n\n");
                else
                    log.logRed(e.toString()+"\n\n");
                return null;
View Full Code Here

TOP

Related Classes of edu.mit.csail.sdg.alloy4.OurAntiAlias

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.