Exemplo n.º 1
0
  static {
    // RENDERERS
    ORDER_RENDERER = new DefaultTableCellRenderer();
    COLUMN_RENDERER = new DefaultTableCellRenderer();
    SORT_ORDER_RENDERER = new TaskSorterSortOrderRenderer();

    // EDITORS
    COLUMN_EDITOR = new DefaultCellEditor(new JComboBox(TaskColumn.values()));

    JComboBox comboBox = null;

    comboBox = new JComboBox(SortOrder.values());
    comboBox.setRenderer(new DefaultListRenderer(StringValueSortOrder.INSTANCE));

    SORT_ORDER_EDITOR = new DefaultCellEditor(comboBox);
  }
Exemplo n.º 2
0
 /**
  * Returns the hash code for this <code>SortKey</code>.
  *
  * @return hash code
  */
 public int hashCode() {
   int result = 17;
   result = 37 * result + column;
   result = 37 * result + sortOrder.hashCode();
   return result;
 }