phamow / fest

Automatically exported from code.google.com/p/fest
0 stars 0 forks source link

JTable startCellEditing sometimes fails #225

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
From Jan Zuchhold:

i've got a problem with FEST-Swing (tested with 1.0b2 and trunk @ rev 1875).

The JTable editor for textfields doesn't get activated reliably when called
from enterValue(...). This also happens with your test
"Bug216_PerformanceIssuesTest" for example -it works about 50% of the time.

When it fails, it fails with: 
org.fest.swing.exception.WaitTimedOutError: Timed out waiting for Component
javax.swing.JTextField[name='Table.editor', text='5', enabled=true,
visible=true, showing=false] to show on the screen

And I can see that it didn't start editing, although the cell is selected.
Maybe the second click gets lost or something.

If I replace startCellEditing(...) of JTableTextComponentEditorCellWriter with
the following it always works:

    /** {@inheritDoc} */
    public void startCellEditing(JTable table, int row, int column) {
        JTextComponent editor = editor(table, row, column);

        clickCell(table, row, column, 1);
        driver.pressAndReleaseKeys(table, KeyEvent.VK_F2);

        pause(untilIsShowing(editor));
    }

(that is: exchanging the double click for single click + F2 to start editing)

This is on Debian Etch, KDE 3.5.5, JDK 6 Update 7 or 10 (tried both), double
click delay in KDE system settings is 400ms - changing up or down didn't
change anything.

I guess this has to be some platform specific thing, otherwise someone else
would have noticed. Is there anything else I can do?

Thanks!

Original issue reported on code.google.com by Alex.Rui...@gmail.com on 26 Oct 2008 at 3:58

GoogleCodeExporter commented 9 years ago
org.fest.swing.driver.JTableTextComponentEditorCellWriter now presses the 'F2' 
key to
start editing a table cell that uses a JTextComponent as editor.

Original comment by Alex.Rui...@gmail.com on 30 Nov 2008 at 6:12

GoogleCodeExporter commented 9 years ago
Set the module as a label, instead of being part of the title.

Original comment by Alex.Rui...@gmail.com on 1 Dec 2008 at 5:11