Examples of SortingState


Examples of ca.odell.glazedlists.impl.gui.SortingState

    /**
     * Returns the object which models the current sorting state of all columns
     * in the table.
     */
    protected SortingState createSortingState() {
        return new SortingState(this);
    }
View Full Code Here

Examples of com.dci.intellij.dbn.data.sorting.SortingState

    }

    public int compareTo(@NotNull Object o) {
        SortableDataModelRow row = (SortableDataModelRow) o;
        SortableDataModel model = getModel();
        SortingState sortingState = model.getSortingState();

        for (SortingInstruction sortingInstruction : sortingState.getSortingInstructions()) {
            int columnIndex = model.getColumnIndex(sortingInstruction.getColumnName());

            SortableDataModelCell local = getCellAtIndex(columnIndex);
            SortableDataModelCell remote = row.getCellAtIndex(columnIndex);
View Full Code Here

Examples of com.dci.intellij.dbn.data.sorting.SortingState

    protected DataModelState createState() {
        return new SortableDataModelState();
    }

    protected boolean updateSortingState(int columnIndex, SortDirection direction, boolean keepExisting) {
        SortingState sortingState = getSortingState();
        String columnName = getColumnName(columnIndex);
        return sortingState.applySorting(columnName, direction, keepExisting);
    }
View Full Code Here

Examples of com.dci.intellij.dbn.data.sorting.SortingState

    public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int rowIndex, int columnIndex) {
        SortableDataModel model = (SortableDataModel) table.getModel();
        sortingLabel.setText(null);
        int width = 0;
        String columnName = value.toString();
        SortingState sortingState = (SortingState) model.getSortingState();
        SortingInstruction sortingInstruction = sortingState.getSortingInstruction(columnName);

        if (sortingInstruction != null) {
            Icon icon = sortingInstruction.getDirection() == SortDirection.ASCENDING ?
                    Icons.DATA_EDITOR_SORT_ASC :
                    Icons.DATA_EDITOR_SORT_DESC;
            sortingLabel.setIcon(icon);
            width += icon.getIconWidth();
            if (sortingState.size() > 1) {
                sortingLabel.setText(Integer.toString(sortingInstruction.getIndex()));
            }
        } else {
            sortingLabel.setIcon(null);
        }
View Full Code Here

Examples of com.dci.intellij.dbn.data.sorting.SortingState

    public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int rowIndex, int columnIndex) {
        DatasetEditorModel model = (DatasetEditorModel) table.getModel();
        sortingLabel.setText(null);
        int width = 0;
        String columnName = value.toString();
        SortingState sortingState = (SortingState) model.getSortingState();
        SortingInstruction sortingInstruction = sortingState.getSortingInstruction(columnName);

        if (sortingInstruction != null) {
            Icon icon = sortingInstruction.getDirection() == SortDirection.ASCENDING ?
                    Icons.DATA_EDITOR_SORT_ASC :
                    Icons.DATA_EDITOR_SORT_DESC;
            sortingLabel.setIcon(icon);
            width += icon.getIconWidth();
            if (sortingState.size() > 1) {
                sortingLabel.setText(Integer.toString(sortingInstruction.getIndex()));
            }
        } else {
            sortingLabel.setIcon(null);
        }
View Full Code Here

Examples of org.pdfsam.guiclient.commons.models.AbstractPdfSelectionTableModel.SortingState

   * @param size
   * @return the arrow icon
   */
  private Icon getHeaderRendererIcon(int column, int size) {
    Icon retVal = null;
    SortingState sortingState = tableModel.getSortingState();
    if(sortingState != null && (AbstractPdfSelectionTableModel.NOT_SORTED != sortingState.getSortType()) && (column == sortingState.getCol())){
      retVal = new Arrow(sortingState.getSortType() != AbstractPdfSelectionTableModel.DESCENDING, size);
    }
        return retVal;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.