Author: echatellier Date: 2014-07-23 16:41:50 +0200 (Wed, 23 Jul 2014) New Revision: 136 Url: http://forge.codelutin.com/projects/jmexico/repository/revisions/136 Log: fixes #5488: Searching in JXTable doesn't work Added: trunk/jmexico-editor/src/main/java/fr/reseaumexico/editor/InputDesignTable.java Modified: trunk/jmexico-editor/src/main/java/fr/reseaumexico/editor/InputDesignEditor.jaxx Modified: trunk/jmexico-editor/src/main/java/fr/reseaumexico/editor/InputDesignEditor.jaxx =================================================================== --- trunk/jmexico-editor/src/main/java/fr/reseaumexico/editor/InputDesignEditor.jaxx 2014-07-21 14:03:27 UTC (rev 135) +++ trunk/jmexico-editor/src/main/java/fr/reseaumexico/editor/InputDesignEditor.jaxx 2014-07-23 14:41:50 UTC (rev 136) @@ -51,7 +51,7 @@ </script> <JScrollPane constraints='BorderLayout.CENTER'> - <JXTable id='inputDesignTable'/> + <InputDesignTable id='inputDesignTable'/> </JScrollPane> <JPanel id='editorToolBar' constraints='BorderLayout.SOUTH'> Added: trunk/jmexico-editor/src/main/java/fr/reseaumexico/editor/InputDesignTable.java =================================================================== --- trunk/jmexico-editor/src/main/java/fr/reseaumexico/editor/InputDesignTable.java (rev 0) +++ trunk/jmexico-editor/src/main/java/fr/reseaumexico/editor/InputDesignTable.java 2014-07-23 14:41:50 UTC (rev 136) @@ -0,0 +1,55 @@ +package fr.reseaumexico.editor; + +import org.jdesktop.swingx.JXTable; + +import fr.reseaumexico.model.Factor; + +/* + * #%L + * JMexico :: Swing Editor + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2014 Réseau Mexico, Codelutin, Eric Chatellier + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Lesser Public License for more details. + * + * You should have received a copy of the GNU General Lesser Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/lgpl-3.0.html>. + * #L% + */ + +/** + * Surcharge pour pouvoir redefinir la méthode getStringAt et faire fonctionner la recherche. + * + * @author Eric Chatellier + */ +public class InputDesignTable extends JXTable { + + /** serialVersionUID. */ + private static final long serialVersionUID = 1535729351105478070L; + + @Override + public String getStringAt(int row, int column) { + + String result = null; + + if (column == 0) { + // traduction du facteur + Factor factor = (Factor)getValueAt(row, column); + result = factor.getName(); + } else { + result = super.getStringAt(row, column); + } + return result; + } +} Property changes on: trunk/jmexico-editor/src/main/java/fr/reseaumexico/editor/InputDesignTable.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision HeadURL Added: svn:eol-style + native