< prev index next >
src/java.desktop/share/classes/sun/swing/SwingUtilities2.java
Print this page
*** 660,670 ****
/**
* A variation of locationToIndex() which only returns an index if the
* Point is within the actual bounds of a list item (not just in the cell)
* and if the JList has the "List.isFileList" client property set.
* Otherwise, this method returns -1.
! * This is used to make WindowsL&F JFileChooser act like native dialogs.
*/
public static int loc2IndexFileList(JList<?> list, Point point) {
int index = list.locationToIndex(point);
if (index != -1) {
Object bySize = list.getClientProperty("List.isFileList");
--- 660,671 ----
/**
* A variation of locationToIndex() which only returns an index if the
* Point is within the actual bounds of a list item (not just in the cell)
* and if the JList has the "List.isFileList" client property set.
* Otherwise, this method returns -1.
! * This is used to make Windows {@literal L&F} JFileChooser act
! * like native dialogs.
*/
public static int loc2IndexFileList(JList<?> list, Point point) {
int index = list.locationToIndex(point);
if (index != -1) {
Object bySize = list.getClientProperty("List.isFileList");
*** 701,711 ****
/**
* Returns true if the given point is outside the preferredSize of the
* item at the given row of the table. (Column must be 0).
* Does not check the "Table.isFileList" property. That should be checked
* before calling this method.
! * This is used to make WindowsL&F JFileChooser act like native dialogs.
*/
public static boolean pointOutsidePrefSize(JTable table, int row, int column, Point p) {
if (table.convertColumnIndexToModel(column) != 0 || row == -1) {
return true;
}
--- 702,713 ----
/**
* Returns true if the given point is outside the preferredSize of the
* item at the given row of the table. (Column must be 0).
* Does not check the "Table.isFileList" property. That should be checked
* before calling this method.
! * This is used to make Windows {@literal L&F} JFileChooser act
! * like native dialogs.
*/
public static boolean pointOutsidePrefSize(JTable table, int row, int column, Point p) {
if (table.convertColumnIndexToModel(column) != 0 || row == -1) {
return true;
}
< prev index next >