Examples of OurBorder


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

        commands=null;
        if (text==null) return null; // If this was called prior to the "text" being fully initialized
        OurSyntaxWidget t = text.get();
        if (Util.onMac()) frame.getRootPane().putClientProperty("windowModified", Boolean.valueOf(t.modified()));
        if (t.isFile()) frame.setTitle(t.getFilename()); else frame.setTitle("Alloy Analyzer "+Version.version());
        toolbar.setBorder(new OurBorder(false, false, text.count()<=1, false));
        int c = t.getCaret();
        int y = t.getLineOfOffset(c)+1;
        int x = c - t.getLineStartOffset(y-1)+1;
        status.setText("<html>&nbsp; Line "+y+", Column "+x
              +(t.modified()?" <b style=\"color:#B43333;\">[modified]</b></html>":"</html>"));
View Full Code Here

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

            toolbar.add(runbutton=OurUtil.button("Execute", "Executes the latest command", "images/24_execute.gif", doExecuteLatest()));
            toolbar.add(stopbutton=OurUtil.button("Stop", "Stops the current analysis", "images/24_execute_abort2.gif", doStop(2)));
            stopbutton.setVisible(false);
            toolbar.add(showbutton=OurUtil.button("Show", "Shows the latest instance", "images/24_graph.gif", doShowLatest()));
            toolbar.add(Box.createHorizontalGlue());
            toolbar.setBorder(new OurBorder(false,false,false,false));
        } finally {
            wrap = false;
        }

        // Choose the antiAlias setting
        OurAntiAlias.enableAntiAlias(AntiAlias.get());

        // 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();
        all.setLayout(new BorderLayout());
        all.removeAll();
        JPanel lefthalf=new JPanel();
        lefthalf.setLayout(new BorderLayout());
        lefthalf.add(toolbar, BorderLayout.NORTH);
        text.addTo(lefthalf, BorderLayout.CENTER);
        splitpane = OurUtil.splitpane(JSplitPane.HORIZONTAL_SPLIT, lefthalf, logpane, width/2);
        splitpane.setResizeWeight(0.5D);
        status = OurUtil.make(OurAntiAlias.label(" "), new Font(fontName, Font.PLAIN, fontSize), Color.BLACK, background);
        status.setBorder(new OurBorder(true,false,false,false));
        all.add(splitpane, BorderLayout.CENTER);
        all.add(status, BorderLayout.SOUTH);

        // Generate some informative log messages
        log.logBold("Alloy Analyzer "+Version.version()+" (build date: "+Version.buildDate()+")\n\n");
View Full Code Here

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

      splitpane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT);
      splitpane.setOneTouchExpandable(false);
      splitpane.setResizeWeight(0.);
      splitpane.setContinuousLayout(true);
      splitpane.setBorder(null);
      ((BasicSplitPaneUI)(splitpane.getUI())).getDivider().setBorder(new OurBorder(false,true,false,false));

      // Display the window, then proceed to load the input file
      if (frame!=null) {
         frame.pack();
         if (!Util.onMac() && !Util.onWindows()) {
View Full Code Here

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

      // Now, generate the graph or tree or textarea that we want to display on the right
      if (frame!=null) frame.setTitle(makeVizTitle());
      switch (currentMode) {
         case Tree: {
            final VizTree t = new VizTree(myState.getOriginalInstance().originalA4, makeVizTitle(), fontSize);
            final JScrollPane scroll = OurUtil.scrollpane(t, Color.BLACK, Color.WHITE, new OurBorder(true, false, true, false));
            scroll.addFocusListener(new FocusListener() {
               public final void focusGained(FocusEvent e) { t.requestFocusInWindow(); }
               public final void focusLost(FocusEvent e) { }
            });
            content = scroll;
            break;
         }
         case XML: {
            content=getTextComponent(xmlFileName);
            break;
         }
         default: {
            if (myGraphPanel==null) myGraphPanel=new VizGraphPanel(myState, currentMode == VisualizerMode.DOT);
            else {myGraphPanel.seeDot(currentMode==VisualizerMode.DOT); myGraphPanel.remakeAll();}
         }
         content=myGraphPanel;
      }
      // Now that we've re-constructed "content", let's set its font size
      if (currentMode != VisualizerMode.Tree) {
         content.setFont(OurUtil.getVizFont().deriveFont((float)fontSize));
         content.invalidate();
         content.repaint();
         content.validate();
      }
      // Now, display them!
      final Box instanceTopBox = Box.createHorizontalBox();
      instanceTopBox.add(toolbar);
      final JPanel instanceArea = new JPanel(new BorderLayout());
      instanceArea.add(instanceTopBox, BorderLayout.NORTH);
      instanceArea.add(content, BorderLayout.CENTER);
      instanceArea.setVisible(true);
      if (!Util.onMac()) { instanceTopBox.setBackground(background); instanceArea.setBackground(background); }
      JComponent left = null;
      if (settingsOpen==1) {
         if (myCustomPanel==null) myCustomPanel = new VizCustomizationPanel(splitpane,myState); else myCustomPanel.remakeAll();
         left = myCustomPanel;
      } else if (settingsOpen>1) {
         if (myEvaluatorPanel==null)
            myEvaluatorPanel = new OurConsole(evaluator, true,
                  "The ", true, "Alloy Evaluator ", false,
                  "allows you to type\nin Alloy expressions and see their values.\nFor example, ", true,
                  "univ", false, " shows the list of all atoms.\n(You can press UP and DOWN to recall old inputs).\n");
         try { evaluator.compute(new File(xmlFileName)); } catch(Exception ex) { } // exception should not happen
         left = myEvaluatorPanel;
         left.setBorder(new OurBorder(false, false, false, false));
      }
      if (frame!=null && frame.getContentPane()==splitpane) lastDividerPosition=splitpane.getDividerLocation();
      splitpane.setRightComponent(instanceArea);
      splitpane.setLeftComponent(left);
      if (left!=null) {
View Full Code Here

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

      final JTextArea ta = OurUtil.textarea(text, 10, 10, false, true);
      final JScrollPane ans = new JScrollPane(ta, JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED) {
         private static final long serialVersionUID = 0;
         @Override public void setFont(Font font) { ta.setFont(font); }
      };
      ans.setBorder(new OurBorder(true, false, true, false));
      return ans;
   }
View Full Code Here

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

      this.divider = divider;
      this.vizState = vizState;
      setBorder(null);
      setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));
      zoomPane = new JPanel();
      zoomPane.setBorder(new OurBorder(false,false,true,false));
      zoomPane.setLayout(new BoxLayout(zoomPane, BoxLayout.Y_AXIS));
      zoomPane.setAlignmentX(0f);
      zoomPane.setBackground(wcolor);
      remakeAll();
   }
View Full Code Here

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

      }
      // Show the current element if found, else show the GENERAL OPTIONS
      if (last!=null) { zoom(lastElement); } else { last = tree.getPathForRow(0); zoom(GENERAL); }
      tree.scrollPathToVisible(last);
      tree.setSelectionPath(last);
      JScrollPane scroll = OurUtil.scrollpane(tree, Color.BLACK, Color.WHITE, new OurBorder(false, false, false, Util.onMac()));
      scroll.setAlignmentX(0f);
      scroll.getVerticalScrollBar().setUnitIncrement(50);
      removeAll();
      add(zoomPane);
      add(scroll);
View Full Code Here

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

            else if (ev.getButton()==MouseEvent.BUTTON1 && ev.isControlDown()) { }
            else return;
            viewer.alloyPopup(graphPanel, ev.getX(), ev.getY());
         }
      });
      diagramScrollPanel = OurUtil.scrollpane(graphPanel, new OurBorder(true,true,true,false));
      diagramScrollPanel.getVerticalScrollBar().addAdjustmentListener(new AdjustmentListener() {
         public void adjustmentValueChanged(AdjustmentEvent e) {
            diagramScrollPanel.invalidate(); diagramScrollPanel.repaint(); diagramScrollPanel.validate();
         }
      });
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.