Logo Search packages:      
Sourcecode: jabref-plugin-oo version File versions  Download package

void net::sf::jabref::oo::StyleSelectDialog::selectLastUsed (  )  [inline, private]

This method scans the current list of styles, and looks for the styles that was last used. If found, that style is selected. If not found, the first style is selected provided there are >0 styles.

Definition at line 168 of file StyleSelectDialog.java.

Referenced by readStyles().

                                  {
        // Set the initial selection of the table:
        if (initSelection != null) {
            boolean found = false;
            for (int i=0; i < table.getRowCount(); i++) {
                if (((OOBibStyle)tableModel.getElementAt(i)).getFile().getPath().
                        equals(initSelection)) {
                    table.setRowSelectionInterval(i,i);
                    found = true;
                    break;
                }
            }
            if (!found && (table.getRowCount() > 0))
                table.setRowSelectionInterval(0,0);
        }
        else {
            if (table.getRowCount() > 0)
                table.setRowSelectionInterval(0,0);
        }
    }


Generated by  Doxygen 1.6.0   Back to index