Ejemplo n.º 1
0
 public int compareRows(int a, int b) {
   if (categoryOrder == null) {
     categoryOrder =
         new HashMap<Object, Integer>(); // Build it no matter what so next call is faster
     if (preferCategorical()) {
       Object[] cats = categories();
       for (int i = 0; i < cats.length; i++) categoryOrder.put(cats[i], i);
     }
   }
   return provider.compareRows(a, b, categoryOrder);
 }
Ejemplo n.º 2
0
 public long expectedSize() {
   return (label.length() + name.length()) * 2 + 84 + 24 + provider.expectedSize();
 }
Ejemplo n.º 3
0
 /**
  * Sets a value for a field. This method is used by selection to set the selection results. It
  * should not be used by general programming, as fields may share data and so setting the value in
  * one field may affect other fields -- or cached data sets.
  *
  * @param o value to set
  * @param index index at which to set the value
  */
 public void setValue(Object o, int index) {
   // We may have to convert a provider from a constant provider
   provider = provider.setValue(o, index);
 }
Ejemplo n.º 4
0
 public String valueFormatted(int index) {
   return format(provider.value(index));
 }
Ejemplo n.º 5
0
 public Object value(int index) {
   return provider.value(index);
 }
Ejemplo n.º 6
0
 public int rowCount() {
   return provider != null ? provider.count() : numericProperty("n").intValue();
 }