Beispiel #1
0
 public static String getLocaleName(Locale loc, boolean isDefault) {
   String value;
   if (!isDefault) {
     value = loc.getDisplayName(JPRManagerLauncher.getLocale());
   } else {
     if (loc == null) loc = Util.parseLocale(JPRManagerLauncher.getAppConf().getDefaultLanguage());
     value =
         JPRManagerLauncher.getResourceData().getText("main.tc.values")
             + " ["
             + loc.getDisplayName(JPRManagerLauncher.getLocale())
             + "]";
   }
   return value;
 }
 public Component getTableCellRendererComponent(
     JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
   Object nval;
   switch (column) {
     case 0:
       nval = ((Locale) value).getDisplayLanguage(JPRManagerLauncher.getLocale());
       break;
     case 1:
       nval = sdf.format((Date) value);
       break;
     case 2:
       nval = DictionariesInWebForm.getText("sizeformat", new Object[] {value});
       break;
     default:
       nval = value;
   }
   if (column == 2) setHorizontalAlignment(RIGHT);
   else setHorizontalAlignment(LEFT);
   return super.getTableCellRendererComponent(table, nval, isSelected, hasFocus, row, column);
 }