package com.onaro.util.jfc.grouping; import java.util.EventObject; /** * Notifies that the sorting had changed. */ public class SortingChangedEvent extends EventObject { private static final long serialVersionUID = 1L; /** * The new sorting column. */ private int column; /** * The new sorting order. */ private boolean ascending; /** * Initialize a sorting change event. * @param source the notifying model * @param column the new sorting column * @param ascending the new order */ public SortingChangedEvent(GroupingModel source, int column, boolean ascending) { super(source); this.column = column; this.ascending = ascending; } /** * Gets the new sorting column. * @return the new sorting column */ public int getColumn() { return column; } /** * Gets if the new sorting order is ascending. * @return true if ascending */ public boolean isAscending() { return ascending; } }