Examples of OurCheckbox


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

         if (obj==null && value==null) return;
         Object old = map.put(obj, value);
         if ((old==null && value!=null) || (old!=null && !old.equals(value))) change();
      }
      OurCheckbox pick(String label, String tooltip) {
         return new OurCheckbox(label, tooltip, (Boolean.TRUE.equals(get(null)) ? OurCheckbox.ON : OurCheckbox.OFF)) {
            private static final long serialVersionUID = 0;
            public Icon do_action() {
               T old = get(null);
               boolean ans = (old!=null && old.equals(onValue));
               MMap.this.put(null, ans ? offValue : onValue);
View Full Code Here

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

         };
      }
      OurCheckbox pick(final AlloyElement obj, final String label, final String tooltip) {
         T a = get(obj), b = resolve(obj);
         Icon icon = a==null ? (Boolean.TRUE.equals(b) ? OurCheckbox.INH_ON : OurCheckbox.INH_OFF) : (Boolean.TRUE.equals(a) ? OurCheckbox.ALL_ON : OurCheckbox.ALL_OFF);
         return new OurCheckbox(label, tooltip, icon) {
            private static final long serialVersionUID = 0;
            public Icon do_action() {
               T a = get(obj);
               if (a==null) a=onValue; else if (a.equals(onValue)) a=offValue; else a=null;
               MMap.this.put(obj, a);
View Full Code Here

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

         JPanel vis = vizState.nodeVisible    .pick(elt, "Show",                   "Display members as nodes");
         JPanel con = vizState.hideUnconnected.pick(elt, "Hide unconnected nodes", "Hide nodes without arcs");
         JPanel num = vizState.number         .pick(elt, "Number nodes",           "Attach atom number to node label as suffix");
         JPanel proj = null;
         if (vizState.canProject((AlloyType)elt))
            proj = new OurCheckbox("Project over this sig", "Click here to " + (enabled?"":"un") + "project over this signature", enabled ? OurCheckbox.ALL_OFF : OurCheckbox.ALL_ON) {
            private static final long serialVersionUID = 0;
            public Icon do_action() {
               if (enabled) projectAlloyType((AlloyType)elt); else deprojectAlloyType((AlloyType)elt);
               lastElement = elt;
               return enabled ? ALL_ON : ALL_OFF;
View Full Code Here

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

      JComboBox edgepal = new OurCombobox(false, DotPalette.values(), 100, 32, vizState.getEdgePalette()) {
         private static final long serialVersionUID = 0;
         @Override public String do_getText(Object value) { return ((DotPalette)value).getDisplayedText(); }
         @Override public void   do_changed(Object value) { vizState.setEdgePalette((DotPalette)value); }
      };
      JPanel name = new OurCheckbox("", "Whether the visualizer should use the original atom names as-is.", vizState.useOriginalName() ? OurCheckbox.ON : OurCheckbox.OFF) {
         private static final long serialVersionUID = 0;
         public Icon do_action() { boolean x = vizState.useOriginalName();  vizState.useOriginalName(!x); return (!x ? ON : OFF); }
      };
      JPanel priv = new OurCheckbox("", "Whether the visualizer should hide private sigs, sets, and relations by default.", vizState.hidePrivate() ? OurCheckbox.ON : OurCheckbox.OFF) {
         private static final long serialVersionUID = 0;
         public Icon do_action() { boolean x = vizState.hidePrivate();  vizState.hidePrivate(!x); remakeAll(); return (!x ? ON : OFF); }
      };
      JPanel meta = new OurCheckbox("", "Whether the visualizer should hide meta sigs, sets, and relations by default.", vizState.hideMeta() ? OurCheckbox.ON : OurCheckbox.OFF) {
         private static final long serialVersionUID = 0;
         public Icon do_action() { boolean x = vizState.hideMeta();  vizState.hideMeta(!x); remakeAll(); return (!x ? ON : OFF); }
      };
      parent.add(makelabel(" General Graph Settings:"));
      parent.add(OurUtil.makeH(wcolor, new Dimension(6, 6)));
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.