Package org.metaworks.inputter

Examples of org.metaworks.inputter.SelectInput


  public static void metaworksCallback_changeMetadata(Type type){
    FieldDescriptor fd;
   
    fd = type.getFieldDescriptor("FieldName");
    fd.setInputter(new SelectInput(new String[]{"Info","Ext1","Ext2","Ext3","Ext4","Ext5","Ext6","Ext7","Ext8","Ext9","Ext10"}));
  }
View Full Code Here


      String[] minutes = new String[61];
      for (int i = 0; i < 60; i++) {
        minutes[i] = String.valueOf(i);
      }
      minutes[60] = "*";
    fd.setInputter(new SelectInput(minutes));
   
    fd = type.getFieldDescriptor("Hour");
      String[] hours = new String[25];
      for (int i = 0; i < 24; i++) {
        hours[i] = String.valueOf(i);
      }
      hours[24] = "*";
    fd.setInputter(new SelectInput(hours));
   
    fd = type.getFieldDescriptor("DayOfMonth");
      String[] dayOfMonth = new String[34];
      int count = 0 ;
      for (int i = 1; i < 32; i++) {
        dayOfMonth[count++] = String.valueOf(i);
      }
      dayOfMonth[31] = "L";
      dayOfMonth[32] = "*";
      dayOfMonth[33] = "?";
    fd.setInputter(new SelectInput(dayOfMonth));
   
    fd = type.getFieldDescriptor("Month");
    fd.setInputter(new SelectInput(new String[] {
        "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "*"
    }));
   
    fd = type.getFieldDescriptor("DayOfWeek");
    fd.setInputter(new SelectInput(new String[] {
        "MON", "TUE", "WED", "THU", "FRI", "SAT", "SUN", "MON-FRI", "*", "?"
    }));
   
    Calendar c = Calendar.getInstance();
    fd = type.getFieldDescriptor("Year");
      String[] year = new String[51];
      int yearCount = 0;
      year[yearCount++] = "*";
      for (int i = c.get(Calendar.YEAR); i < c.get(Calendar.YEAR) + 50; i++) {
        year[yearCount++] = String.valueOf(i);
      }
    fd.setInputter(new SelectInput(year));
   
  }
View Full Code Here

TOP

Related Classes of org.metaworks.inputter.SelectInput

Copyright © 2018 www.massapicom. 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.