예제 #1
0
 static DataType()
 {
   string str1 = "Number";
   // ISSUE: variable of the null type
   __Null local1 = ClassLiteral<TextBox>.Value;
   DataType[] dataTypeArray1 = new DataType[1];
   int index1 = 0;
   DataType dataType1 = DataType.__\u003C\u003EBASIC;
   dataTypeArray1[index1] = dataType1;
   DataType.__\u003C\u003ENUMBER = new DataType(str1, (Class) local1, dataTypeArray1);
   string str2 = "Boolean";
   // ISSUE: variable of the null type
   __Null local2 = ClassLiteral<TextBox>.Value;
   DataType[] dataTypeArray2 = new DataType[1];
   int index2 = 0;
   DataType dataType2 = DataType.__\u003C\u003EBASIC;
   dataTypeArray2[index2] = dataType2;
   DataType.__\u003C\u003EBOOLEAN = new DataType(str2, (Class) local2, dataTypeArray2);
   string str3 = "String";
   // ISSUE: variable of the null type
   __Null local3 = ClassLiteral<TextBox>.Value;
   DataType[] dataTypeArray3 = new DataType[1];
   int index3 = 0;
   DataType dataType3 = DataType.__\u003C\u003EBASIC;
   dataTypeArray3[index3] = dataType3;
   DataType.__\u003C\u003ESTRING = new DataType(str3, (Class) local3, dataTypeArray3);
   DataType.__\u003C\u003ETABLE = new DataType("Table", new DataType[0]);
 }
 static DigitalInputDisplay()
 {
   AbstractTableWidget.__\u003Cclinit\u003E();
   DataType[] dataTypeArray = new DataType[1];
   int index = 0;
   NamedDataType namedDataType = DigitalInputType.get();
   dataTypeArray[index] = (DataType) namedDataType;
   DigitalInputDisplay.__\u003C\u003ETYPES = dataTypeArray;
 }
예제 #3
0
 static TextBox()
 {
   AbstractValueWidget.__\u003Cclinit\u003E();
   DataType[] dataTypeArray = new DataType[1];
   int index = 0;
   DataType dataType = DataType.__\u003C\u003EBASIC;
   dataTypeArray[index] = dataType;
   TextBox.__\u003C\u003ETYPES = dataTypeArray;
 }
예제 #4
0
 static Subsystem()
 {
   AbstractTableWidget.__\u003Cclinit\u003E();
   DataType[] dataTypeArray = new DataType[1];
   int index = 0;
   NamedDataType namedDataType = SubsystemType.get();
   dataTypeArray[index] = (DataType) namedDataType;
   Subsystem.__\u003C\u003ETYPES = dataTypeArray;
 }
예제 #5
0
 static CommandButton()
 {
   AbstractTableWidget.__\u003Cclinit\u003E();
   DataType[] dataTypeArray = new DataType[1];
   int index = 0;
   NamedDataType namedDataType = CommandType.get();
   dataTypeArray[index] = (DataType) namedDataType;
   CommandButton.__\u003C\u003ETYPES = dataTypeArray;
 }
예제 #6
0
 static PIDEditor()
 {
   AbstractTableWidget.__\u003Cclinit\u003E();
   DataType[] dataTypeArray = new DataType[1];
   int index = 0;
   NamedDataType namedDataType = PIDType.get();
   dataTypeArray[index] = (DataType) namedDataType;
   PIDEditor.__\u003C\u003ETYPES = dataTypeArray;
 }
예제 #7
0
 static LinePlot()
 {
   AbstractValueWidget.__\u003Cclinit\u003E();
   DataType[] dataTypeArray = new DataType[1];
   int index = 0;
   DataType dataType = DataType.__\u003C\u003ENUMBER;
   dataTypeArray[index] = dataType;
   LinePlot.__\u003C\u003ETYPES = dataTypeArray;
 }
예제 #8
0
 static Scheduler()
 {
   Widget.__\u003Cclinit\u003E();
   DataType[] dataTypeArray = new DataType[1];
   int index = 0;
   NamedDataType namedDataType = SchedulerType.get();
   dataTypeArray[index] = (DataType) namedDataType;
   Scheduler.__\u003C\u003ETYPES = dataTypeArray;
 }
예제 #9
0
 static BooleanBox()
 {
   AbstractValueWidget.__\u003Cclinit\u003E();
   DataType[] dataTypeArray = new DataType[1];
   int index = 0;
   DataType dataType = DataType.__\u003C\u003EBOOLEAN;
   dataTypeArray[index] = dataType;
   BooleanBox.__\u003C\u003ETYPES = dataTypeArray;
 }
예제 #10
0
 static ServoController()
 {
   AbstractTableWidget.__\u003Cclinit\u003E();
   DataType[] dataTypeArray = new DataType[1];
   int index = 0;
   NamedDataType namedDataType = ServoType.get();
   dataTypeArray[index] = (DataType) namedDataType;
   ServoController.__\u003C\u003ETYPES = dataTypeArray;
 }
 public virtual void setField(string name, Widget element, DataType type, object value, LWSubsystem subsystem, Point point)
 {
   element.setFieldName(name);
   element.setType(type);
   element.init();
   if (value != null)
     element.setValue(value);
   ((Container) subsystem).add((Component) element);
 }
예제 #12
0
 static FormattedField()
 {
   Widget.__\u003Cclinit\u003E();
   DataType[] dataTypeArray = new DataType[1];
   int index = 0;
   DataType dataType = DataType.__\u003C\u003EBASIC;
   dataTypeArray[index] = dataType;
   FormattedField.__\u003C\u003ETYPES = dataTypeArray;
 }
예제 #13
0
 static Chooser()
 {
   AbstractTableWidget.__\u003Cclinit\u003E();
   DataType[] dataTypeArray = new DataType[1];
   int index = 0;
   NamedDataType namedDataType = StringChooserType.get();
   dataTypeArray[index] = (DataType) namedDataType;
   Chooser.__\u003C\u003ETYPES = dataTypeArray;
 }
예제 #14
0
 static Compass()
 {
   AbstractTableWidget.__\u003Cclinit\u003E();
   DataType[] dataTypeArray = new DataType[2];
   int index1 = 0;
   DataType dataType = DataType.__\u003C\u003ENUMBER;
   dataTypeArray[index1] = dataType;
   int index2 = 1;
   NamedDataType namedDataType = GyroType.get();
   dataTypeArray[index2] = (DataType) namedDataType;
   Compass.__\u003C\u003ETYPES = dataTypeArray;
 }
예제 #15
0
 static GyroDisplay()
 {
   AbstractTableWidget.__\u003Cclinit\u003E();
   DataType[] dataTypeArray = new DataType[2];
   int index1 = 0;
   NamedDataType namedDataType1 = LWGyroType.get();
   dataTypeArray[index1] = (DataType) namedDataType1;
   int index2 = 1;
   NamedDataType namedDataType2 = CompassType.get();
   dataTypeArray[index2] = (DataType) namedDataType2;
   GyroDisplay.__\u003C\u003ETYPES = dataTypeArray;
 }
예제 #16
0
 static RelayController()
 {
   AbstractTableWidget.__\u003Cclinit\u003E();
   DataType[] dataTypeArray = new DataType[2];
   int index1 = 0;
   NamedDataType namedDataType1 = RelayType.get();
   dataTypeArray[index1] = (DataType) namedDataType1;
   int index2 = 1;
   NamedDataType namedDataType2 = DoubleSolenoidType.get();
   dataTypeArray[index2] = (DataType) namedDataType2;
   RelayController.__\u003C\u003ETYPES = dataTypeArray;
 }
예제 #17
0
 private PIDSubsystemType()
 {
   string name = "PIDSubsystem";
   DataType[] dataTypeArray = new DataType[2];
   int index1 = 0;
   NamedDataType namedDataType1 = SubsystemType.get();
   dataTypeArray[index1] = (DataType) namedDataType1;
   int index2 = 1;
   NamedDataType namedDataType2 = PIDType.get();
   dataTypeArray[index2] = (DataType) namedDataType2;
   // ISSUE: explicit constructor call
   base.\u002Ector(name, dataTypeArray);
 }
예제 #18
0
 static EncoderDisplay()
 {
   AbstractTableWidget.__\u003Cclinit\u003E();
   DataType[] dataTypeArray = new DataType[3];
   int index1 = 0;
   NamedDataType namedDataType1 = QuadratureEncoderType.get();
   dataTypeArray[index1] = (DataType) namedDataType1;
   int index2 = 1;
   NamedDataType namedDataType2 = EncoderType.get();
   dataTypeArray[index2] = (DataType) namedDataType2;
   int index3 = 2;
   NamedDataType namedDataType3 = GearToothSensorType.get();
   dataTypeArray[index3] = (DataType) namedDataType3;
   EncoderDisplay.__\u003C\u003ETYPES = dataTypeArray;
 }
 static DigitalOutputController()
 {
   AbstractTableWidget.__\u003Cclinit\u003E();
   DataType[] dataTypeArray = new DataType[3];
   int index1 = 0;
   NamedDataType namedDataType1 = DigitalOutputType.get();
   dataTypeArray[index1] = (DataType) namedDataType1;
   int index2 = 1;
   NamedDataType namedDataType2 = CompressorType.get();
   dataTypeArray[index2] = (DataType) namedDataType2;
   int index3 = 2;
   NamedDataType namedDataType3 = SolenoidType.get();
   dataTypeArray[index3] = (DataType) namedDataType3;
   DigitalOutputController.__\u003C\u003ETYPES = dataTypeArray;
 }
 static SingleNumberDisplay()
 {
   AbstractTableWidget.__\u003Cclinit\u003E();
   DataType[] dataTypeArray = new DataType[5];
   int index1 = 0;
   NamedDataType namedDataType1 = AnalogInputType.get();
   dataTypeArray[index1] = (DataType) namedDataType1;
   int index2 = 1;
   NamedDataType namedDataType2 = UltrasonicType.get();
   dataTypeArray[index2] = (DataType) namedDataType2;
   int index3 = 2;
   NamedDataType namedDataType3 = AccelerometerType.get();
   dataTypeArray[index3] = (DataType) namedDataType3;
   int index4 = 3;
   NamedDataType namedDataType4 = GearToothSensorType.get();
   dataTypeArray[index4] = (DataType) namedDataType4;
   int index5 = 4;
   NamedDataType namedDataType5 = CounterType.get();
   dataTypeArray[index5] = (DataType) namedDataType5;
   SingleNumberDisplay.__\u003C\u003ETYPES = dataTypeArray;
 }
예제 #21
0
 public virtual void setType(string type)
 {
   this.type = DataType.getType(type, false);
 }
예제 #22
0
 public virtual void setType(DataType type)
 {
   this.type = type;
 }
예제 #23
0
    public virtual void setField(string key, Class preferred, DataType type, object value, Point point)
    {
      // ISSUE: explicit reference operation
      // ISSUE: variable of a reference type
      object& local = @value;
      Widget widget = (Widget) this.fields.get((object) key);
      if (type == null)
      {
        System.get_out().println(new StringBuilder().append("WARNING: has no way of handling data at field \"").append(key).append("\"").toString());
        this.removeField(key);
      }
      else if (widget != null && preferred == null && (widget.getType() == type || widget.supportsType(type)))
      {
        if (widget.getType() != type)
          widget.setType(type);
        value = this.verifyValue(type, value);
        if (value == null)
          return;
        widget.setValue(value);
      }
      else
      {
        Class @class = preferred != null ? preferred : type.getDefault();
        if (@class == null)
        {
          Set widgetsForType = DisplayElementRegistry.getWidgetsForType(type);
          if (widgetsForType.isEmpty())
          {
            System.get_out().println(new StringBuilder().append("WARNING: has no way of handling type ").append((object) type).toString());
            return;
          }
          else
            @class = (Class) widgetsForType.toArray()[0];
        }
        try
        {
          try
          {
            Widget element = (Widget) @class.newInstance(DashboardPanel.__\u003CGetCallerID\u003E());
            this.setField(key, element, type, value, point);
            return;
          }
          catch (InstantiationException ex)
          {
          }
        }
        catch (IllegalAccessException ex)
        {
          goto label_16;
        }
        System.get_out().println(new StringBuilder().append("ERROR: ").append(@class.getName()).append(" has no default constructor!").toString());
        return;
label_16:
        System.get_out().println(new StringBuilder().append("ERROR: ").append(@class.getName()).append(" has no public default constructor!").toString());
      }
    }
예제 #24
0
 static SimpleDial()
 {
   AbstractNumberDatasetWidget.__\u003Cclinit\u003E();
   DataType[] dataTypeArray = new DataType[1];
   int index = 0;
   DataType dataType = DataType.__\u003C\u003ENUMBER;
   dataTypeArray[index] = dataType;
   SimpleDial.__\u003C\u003ETYPES = dataTypeArray;
 }
예제 #25
0
 public virtual bool supportsType(DataType type)
 {
   return (DisplayElementRegistry.supportsType(Object.instancehelper_getClass((object) this), type) ? 1 : 0) != 0;
 }
예제 #26
0
 static ProgressBar()
 {
   AbstractValueWidget.__\u003Cclinit\u003E();
   DataType[] dataTypeArray = new DataType[1];
   int index = 0;
   DataType dataType = DataType.__\u003C\u003ENUMBER;
   dataTypeArray[index] = dataType;
   ProgressBar.__\u003C\u003ETYPES = dataTypeArray;
 }
예제 #27
0
 public virtual void setField(string key, Widget element, DataType type, object value, Point point)
 {
   this.removeField(key);
   this.hiddenFields.remove((object) key);
   value = this.verifyValue(type, value);
   element.setFieldName(key);
   if (type != null)
     element.setType(type);
   this.fields.put((object) key, (object) element);
   this.addElement((DisplayElement) element, point);
   if (value == null)
     return;
   element.setValue(value);
 }
예제 #28
0
 public virtual bool isChildOf(DataType parent)
 {
   if (Object.instancehelper_equals((object) this, (object) parent))
     return true;
   for (int index = 0; index < this.parents.Length; ++index)
   {
     if (this.parents[index].isChildOf(parent))
       return true;
   }
   return false;
 }
 public static Set getWidgetsForType(DataType type)
 {
   Set set1 = DisplayElementRegistry.generateTypes((Set) new LinkedHashSet(), type.getParents());
   set1.add((object) type);
   LinkedHashSet linkedHashSet = new LinkedHashSet();
   Iterator iterator1 = set1.iterator();
   while (iterator1.hasNext())
   {
     DataType dataType = (DataType) iterator1.next();
     if ((Set) DisplayElementRegistry.map.get((object) dataType) != null)
     {
       Class @default = dataType.getDefault();
       if (@default != null)
         ((Set) linkedHashSet).add((object) @default);
     }
   }
   Iterator iterator2 = set1.iterator();
   while (iterator2.hasNext())
   {
     DataType dataType = (DataType) iterator2.next();
     Set set2 = (Set) DisplayElementRegistry.map.get((object) dataType);
     if (set2 != null)
       ((Set) linkedHashSet).addAll((Collection) set2);
   }
   return (Set) linkedHashSet;
 }
 public static bool supportsType(Class clazz, DataType type)
 {
   DataType[] dataTypeArray = (DataType[]) DisplayElementRegistry.declaredTypes.get((object) clazz);
   int length = dataTypeArray.Length;
   for (int index = 0; index < length; ++index)
   {
     DataType parent = dataTypeArray[index];
     if (type.isChildOf(parent))
       return true;
   }
   return false;
 }