public AbstractValueWidget()
 {
   AbstractValueWidget abstractValueWidget = this;
   this.booleanDisplayer = BooleanBindable.NULL;
   this.numberDisplayer = NumberBindable.NULL;
   this.stringDisplayer = StringBindable.NULL;
 }
Exemplo n.º 2
0
 public ServoController()
 {
   ServoController servoController = this;
   this.zeroButton = new JButton("Zero");
   this.defaultText = "0.0";
   this.feedback = new Widget.UneditableNumberField();
   this.valueEntry = (NumberBindable) this.getTableEntryBindable("Value");
 }
Exemplo n.º 3
0
 public override void init()
 {
   ((Container) this).setLayout((LayoutManager) new GridBagLayout());
   GridBagConstraints gridBagConstraints = new GridBagConstraints();
   gridBagConstraints.fill = (__Null) 1;
   GyroDisplay gyroDisplay = this;
   NameTag.__\u003Cclinit\u003E();
   this.nameTag = new NameTag(this.getFieldName());
   string key = "Value";
   NumberBindable[] numberBindableArray = new NumberBindable[2];
   int index1 = 0;
   Widget.UneditableNumberField uneditableNumberField = this.feedback;
   numberBindableArray[index1] = (NumberBindable) uneditableNumberField;
   int index2 = 1;
   Compass compass = this.compass;
   numberBindableArray[index2] = (NumberBindable) compass;
   Widget.NumberMultiBindable numberMultiBindable = new Widget.NumberMultiBindable(numberBindableArray);
   this.setNumberBinding(key, (NumberBindable) numberMultiBindable);
   this.compass.init();
   this.menu.addActionListener((ActionListener) new GyroDisplay\u00241(this, gyroDisplay, gridBagConstraints));
   gridBagConstraints.gridx = (__Null) 0;
   ((Container) this).add((Component) this.nameTag, (object) gridBagConstraints);
   gridBagConstraints.gridy = (__Null) 1;
   ((Container) this).add((Component) this.menu, (object) gridBagConstraints);
   gridBagConstraints.gridy = (__Null) 2;
   gridBagConstraints.weightx = (__Null) 2.0;
   ((Container) this).add((Component) this.feedback, (object) gridBagConstraints);
 }
Exemplo n.º 4
0
 public override void init()
 {
   NameTag.__\u003Cclinit\u003E();
   this.nameTag = new NameTag(this.getFieldName());
   Widget.NumberSlider.__\u003Cclinit\u003E();
   this.controller = new Widget.NumberSlider(this.valueEntry);
   this.controller.setMin(0.0);
   this.controller.setMax(1.0);
   this.controller.setBindableValue(0.0);
   this.controller.setSnapToTicks(false);
   this.controller.setMajorTickSpacing(50);
   this.controller.setPaintTicks(true);
   this.feedback.setText("0.0");
   this.feedback.setColumns(4);
   string key = "Value";
   NumberBindable[] numberBindableArray = new NumberBindable[1];
   int index = 0;
   Widget.UneditableNumberField uneditableNumberField = this.feedback;
   numberBindableArray[index] = (NumberBindable) uneditableNumberField;
   Widget.NumberMultiBindable numberMultiBindable = new Widget.NumberMultiBindable(numberBindableArray);
   this.setNumberBinding(key, (NumberBindable) numberMultiBindable);
   ((Component) this.controller).addKeyListener((KeyListener) new ServoController\u00241(this));
   ((JTextComponent) this.feedback).setEditable(false);
   ((AbstractButton) this.zeroButton).addActionListener((ActionListener) new ServoController\u00242(this));
   ((Container) this).setLayout((LayoutManager) new GridBagLayout());
   GridBagConstraints gridBagConstraints = new GridBagConstraints();
   gridBagConstraints.fill = (__Null) 1;
   gridBagConstraints.gridx = (__Null) 0;
   ((Container) this).add((Component) this.nameTag, (object) gridBagConstraints);
   gridBagConstraints.gridy = (__Null) 1;
   gridBagConstraints.weightx = (__Null) 1.0;
   ((Container) this).add((Component) this.controller, (object) gridBagConstraints);
   gridBagConstraints.weightx = (__Null) 0.0;
   gridBagConstraints.gridx = (__Null) 2;
   ((Container) this).add((Component) this.feedback, (object) gridBagConstraints);
   gridBagConstraints.gridx = (__Null) 3;
   ((Container) this).add((Component) this.zeroButton, (object) gridBagConstraints);
   gridBagConstraints.gridx = (__Null) 4;
 }
 protected internal virtual void setNumberBinding(string key, NumberBindable displayer)
 {
   if (this.numberFields.containsKey((object) key))
   {
     string str = new StringBuilder().append("Cannot have multiple number fields for the same key: ").append(key).toString();
     Throwable.__\u003CsuppressFillInStackTrace\u003E();
     throw new RuntimeException(str);
   }
   else
     this.numberFields.put((object) key, (object) displayer);
 }
 public virtual void setNumberBinding(NumberBindable numberDisplayer)
 {
   this.numberDisplayer = numberDisplayer;
 }
Exemplo n.º 7
0
 public NumberSlider(NumberBindable bindable)
 {
   base.\u002Ector();
   Widget.NumberSlider numberSlider = this;
   this.min = 0.0;
   this.max = 100.0;
   this.value = 0.0;
   this.pixelWidth = 0;
   this.bindable = bindable;
   ((Component) this).addComponentListener((ComponentListener) this);
   this.addChangeListener((ChangeListener) this);
   this.calcBounds();
 }
Exemplo n.º 8
0
 public BindableNumberField(NumberBindable bindable)
 {
   Widget.BindableNumberField bindableNumberField = this;
   this.bindable = bindable;
 }