Ejemplo n.º 1
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);
 }
Ejemplo n.º 2
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;
 }