Java Code Examples for com.sun.java.swing.ui.CommonUI#setWaitCursor()
The following examples show how to use
com.sun.java.swing.ui.CommonUI#setWaitCursor() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: SortHeaderMouseAdapter.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
public void mouseClicked(MouseEvent evt) { // XXX Benchmark sort performance //long start = System.currentTimeMillis(); CommonUI.setWaitCursor(SwingUtilities.getRoot(table)); TableColumnModel columnModel = table.getColumnModel(); int viewColumn = columnModel.getColumnIndexAtX(evt.getX()); int column = table.convertColumnIndexToModel(viewColumn); if (evt.getClickCount() == 1 && column != -1) { // Reverse the sorting direction. model.sortByColumn(column, !model.isAscending()); } // XXX Benchmark performance // System.out.println("Sort time: " + // (System.currentTimeMillis() - start)); CommonUI.setDefaultCursor(SwingUtilities.getRoot(table)); }
Example 2
Source File: SortHeaderMouseAdapter.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
public void mouseClicked(MouseEvent evt) { // XXX Benchmark sort performance //long start = System.currentTimeMillis(); CommonUI.setWaitCursor(SwingUtilities.getRoot(table)); TableColumnModel columnModel = table.getColumnModel(); int viewColumn = columnModel.getColumnIndexAtX(evt.getX()); int column = table.convertColumnIndexToModel(viewColumn); if (evt.getClickCount() == 1 && column != -1) { // Reverse the sorting direction. model.sortByColumn(column, !model.isAscending()); } // XXX Benchmark performance // System.out.println("Sort time: " + // (System.currentTimeMillis() - start)); CommonUI.setDefaultCursor(SwingUtilities.getRoot(table)); }
Example 3
Source File: SortHeaderMouseAdapter.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
public void mouseClicked(MouseEvent evt) { // XXX Benchmark sort performance //long start = System.currentTimeMillis(); CommonUI.setWaitCursor(SwingUtilities.getRoot(table)); TableColumnModel columnModel = table.getColumnModel(); int viewColumn = columnModel.getColumnIndexAtX(evt.getX()); int column = table.convertColumnIndexToModel(viewColumn); if (evt.getClickCount() == 1 && column != -1) { // Reverse the sorting direction. model.sortByColumn(column, !model.isAscending()); } // XXX Benchmark performance // System.out.println("Sort time: " + // (System.currentTimeMillis() - start)); CommonUI.setDefaultCursor(SwingUtilities.getRoot(table)); }
Example 4
Source File: SortHeaderMouseAdapter.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 6 votes |
public void mouseClicked(MouseEvent evt) { // XXX Benchmark sort performance //long start = System.currentTimeMillis(); CommonUI.setWaitCursor(SwingUtilities.getRoot(table)); TableColumnModel columnModel = table.getColumnModel(); int viewColumn = columnModel.getColumnIndexAtX(evt.getX()); int column = table.convertColumnIndexToModel(viewColumn); if (evt.getClickCount() == 1 && column != -1) { // Reverse the sorting direction. model.sortByColumn(column, !model.isAscending()); } // XXX Benchmark performance // System.out.println("Sort time: " + // (System.currentTimeMillis() - start)); CommonUI.setDefaultCursor(SwingUtilities.getRoot(table)); }
Example 5
Source File: SortHeaderMouseAdapter.java From openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
public void mouseClicked(MouseEvent evt) { // XXX Benchmark sort performance //long start = System.currentTimeMillis(); CommonUI.setWaitCursor(SwingUtilities.getRoot(table)); TableColumnModel columnModel = table.getColumnModel(); int viewColumn = columnModel.getColumnIndexAtX(evt.getX()); int column = table.convertColumnIndexToModel(viewColumn); if (evt.getClickCount() == 1 && column != -1) { // Reverse the sorting direction. model.sortByColumn(column, !model.isAscending()); } // XXX Benchmark performance // System.out.println("Sort time: " + // (System.currentTimeMillis() - start)); CommonUI.setDefaultCursor(SwingUtilities.getRoot(table)); }
Example 6
Source File: SortHeaderMouseAdapter.java From hottub with GNU General Public License v2.0 | 6 votes |
public void mouseClicked(MouseEvent evt) { // XXX Benchmark sort performance //long start = System.currentTimeMillis(); CommonUI.setWaitCursor(SwingUtilities.getRoot(table)); TableColumnModel columnModel = table.getColumnModel(); int viewColumn = columnModel.getColumnIndexAtX(evt.getX()); int column = table.convertColumnIndexToModel(viewColumn); if (evt.getClickCount() == 1 && column != -1) { // Reverse the sorting direction. model.sortByColumn(column, !model.isAscending()); } // XXX Benchmark performance // System.out.println("Sort time: " + // (System.currentTimeMillis() - start)); CommonUI.setDefaultCursor(SwingUtilities.getRoot(table)); }
Example 7
Source File: SortHeaderMouseAdapter.java From openjdk-8-source with GNU General Public License v2.0 | 6 votes |
public void mouseClicked(MouseEvent evt) { // XXX Benchmark sort performance //long start = System.currentTimeMillis(); CommonUI.setWaitCursor(SwingUtilities.getRoot(table)); TableColumnModel columnModel = table.getColumnModel(); int viewColumn = columnModel.getColumnIndexAtX(evt.getX()); int column = table.convertColumnIndexToModel(viewColumn); if (evt.getClickCount() == 1 && column != -1) { // Reverse the sorting direction. model.sortByColumn(column, !model.isAscending()); } // XXX Benchmark performance // System.out.println("Sort time: " + // (System.currentTimeMillis() - start)); CommonUI.setDefaultCursor(SwingUtilities.getRoot(table)); }
Example 8
Source File: SortHeaderMouseAdapter.java From openjdk-8 with GNU General Public License v2.0 | 6 votes |
public void mouseClicked(MouseEvent evt) { // XXX Benchmark sort performance //long start = System.currentTimeMillis(); CommonUI.setWaitCursor(SwingUtilities.getRoot(table)); TableColumnModel columnModel = table.getColumnModel(); int viewColumn = columnModel.getColumnIndexAtX(evt.getX()); int column = table.convertColumnIndexToModel(viewColumn); if (evt.getClickCount() == 1 && column != -1) { // Reverse the sorting direction. model.sortByColumn(column, !model.isAscending()); } // XXX Benchmark performance // System.out.println("Sort time: " + // (System.currentTimeMillis() - start)); CommonUI.setDefaultCursor(SwingUtilities.getRoot(table)); }