r1104 - trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/table
Author: kmorin Date: 2013-06-12 09:45:06 +0200 (Wed, 12 Jun 2013) New Revision: 1104 Url: http://forge.codelutin.com/projects/tutti/repository/revisions/1104 Log: fixes #2704 [ERGO] - Parcourt des tableaux bloqu?\195?\169 sur certains champs non ?\195?\169ditables Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/table/MoveToNextEditableCellAction.java trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/table/MoveToNextEditableRowAction.java trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/table/MoveToPreviousEditableCellAction.java trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/table/MoveToPreviousEditableRowAction.java Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/table/MoveToNextEditableCellAction.java =================================================================== --- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/table/MoveToNextEditableCellAction.java 2013-06-11 16:25:14 UTC (rev 1103) +++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/table/MoveToNextEditableCellAction.java 2013-06-12 07:45:06 UTC (rev 1104) @@ -67,7 +67,9 @@ int rowCount = getRowCount(); - while (currentRow <= rowCount || currentColumn <= columnCount) { + // I commented the part of the code to skip the not editable cells (ref #2704) +// while (currentRow <= rowCount || currentColumn <= columnCount) { + if (currentRow <= rowCount || currentColumn <= columnCount) { // go to next cell currentColumn++; @@ -85,25 +87,25 @@ // create a new row in model addNewRow(); - } else { - - // can not create new row, so do nothing - break; +// } else { +// +// // can not create new row, so do nothing +// break; } } } - if (isCellEditable(currentRow, currentColumn)) { +// if (isCellEditable(currentRow, currentColumn)) { doSelectCell(currentRow, currentColumn); - break; - } else { - if (log.isDebugEnabled()) { - log.debug("Cell not editable at " + - getCellCoordinate(currentRow, currentColumn)); - } - } +// break; +// } else { +// if (log.isDebugEnabled()) { +// log.debug("Cell not editable at " + +// getCellCoordinate(currentRow, currentColumn)); +// } +// } } } } \ No newline at end of file Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/table/MoveToNextEditableRowAction.java =================================================================== --- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/table/MoveToNextEditableRowAction.java 2013-06-11 16:25:14 UTC (rev 1103) +++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/table/MoveToNextEditableRowAction.java 2013-06-12 07:45:06 UTC (rev 1104) @@ -64,11 +64,12 @@ int rowCount = getRowCount(); - while (currentRow < rowCount) { - + // I commented the part of the code to skip the not editable cells (ref #2704) +// while (currentRow < rowCount) { + if (currentRow < rowCount) { // go to next cell currentRow++; - boolean canSelect = true; +// boolean canSelect = true; // select next cell if (currentRow >= rowCount) { @@ -80,23 +81,23 @@ // create a new row in model addNewRow(); - } else { - canSelect = false; +// } else { +// canSelect = false; } - } else { - canSelect = isCellEditable(currentRow, currentColumn); +// } else { +// canSelect = isCellEditable(currentRow, currentColumn); } - if (canSelect) { +// if (canSelect) { doSelectCell(currentRow, currentColumn); - break; - } else { - if (log.isDebugEnabled()) { - log.debug("Cell not editable at " + - getCellCoordinate(currentRow, currentColumn)); - } - } +// break; +// } else { +// if (log.isDebugEnabled()) { +// log.debug("Cell not editable at " + +// getCellCoordinate(currentRow, currentColumn)); +// } +// } } } } Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/table/MoveToPreviousEditableCellAction.java =================================================================== --- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/table/MoveToPreviousEditableCellAction.java 2013-06-11 16:25:14 UTC (rev 1103) +++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/table/MoveToPreviousEditableCellAction.java 2013-06-12 07:45:06 UTC (rev 1104) @@ -64,7 +64,9 @@ int columnCount = getColumnCount(); - while (currentRow > 0 || currentColumn > 0) { + // I commented the part of the code to skip the not editable cells (ref #2704) +// while (currentRow > 0 || currentColumn > 0) { + if (currentRow > 0 || currentColumn > 0) { // go to next cell currentColumn--; @@ -76,15 +78,15 @@ currentRow--; } - if (isCellEditable(currentRow, currentColumn)) { +// if (isCellEditable(currentRow, currentColumn)) { doSelectCell(currentRow, currentColumn); - break; - } else { - if (log.isDebugEnabled()) { - log.debug("Cell not editable at " + - getCellCoordinate(currentRow, currentColumn)); - } - } +// break; +// } else { +// if (log.isDebugEnabled()) { +// log.debug("Cell not editable at " + +// getCellCoordinate(currentRow, currentColumn)); +// } +// } } } } \ No newline at end of file Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/table/MoveToPreviousEditableRowAction.java =================================================================== --- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/table/MoveToPreviousEditableRowAction.java 2013-06-11 16:25:14 UTC (rev 1103) +++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/util/table/MoveToPreviousEditableRowAction.java 2013-06-12 07:45:06 UTC (rev 1104) @@ -65,22 +65,24 @@ int rowCount = getRowCount(); - while (currentRow > 0) { + // I commented the part of the code to skip the not editable cells (ref #2704) +// while (currentRow > 0) { + if (currentRow > 0) { // go to next cell currentRow--; - boolean canSelect = isCellEditable(currentRow, currentColumn); - - if (canSelect) { +// boolean canSelect = isCellEditable(currentRow, currentColumn); +// +// if (canSelect) { doSelectCell(currentRow, currentColumn); - break; - } else { - if (log.isDebugEnabled()) { - log.debug("Cell not editable at " + - getCellCoordinate(currentRow, currentColumn)); - } - } +// break; +// } else { +// if (log.isDebugEnabled()) { +// log.debug("Cell not editable at " + +// getCellCoordinate(currentRow, currentColumn)); +// } +// } } } }
participants (1)
-
kmorin@users.forge.codelutin.com