Example #1
0
 public void setShowValue(ParamIF pf) {
   int newActive = isActive;
   if (pf != null && pf.value != null) {
     String s = pf.value.trim();
     newActive = Integer.parseInt(s);
     if (newActive > 0) {
       setOpaque(inEditMode);
       if (bg != null) {
         setOpaque(true);
         setBackground(bgColor);
       }
     } else {
       setOpaque(true);
       if (newActive == 0) setBackground(Global.IDLECOLOR);
       else setBackground(Global.NPCOLOR);
     }
     if (newActive >= 0) {
       setEnabled(true);
       isEnabled = true;
       if (setVal != null) vnmrIf.asyncQueryParam(this, setVal, precision);
     } else {
       setEnabled(false);
       isEnabled = false;
     }
     setBorder(isEnabled);
   }
   if (newActive != isActive) {
     isActive = newActive;
     repaint();
   }
 }
Example #2
0
 public void updateValue() {
   if (inModalMode) return;
   if (vnmrIf == null) return;
   if (showVal != null) vnmrIf.asyncQueryShow(this, showVal);
   else if (setVal != null) vnmrIf.asyncQueryParam(this, setVal);
   if (caretQuery != null) vnmrIf.asyncQueryParamNamed("caret", this, caretQuery);
 }