Author: echatellier Date: 2010-04-09 18:13:25 +0200 (Fri, 09 Apr 2010) New Revision: 2843 Log: Remove swingx auto complete class (just use code when needed) Removed: trunk/lima-swing/src/main/java/org/chorem/lima/util/AccountToStringConverter.java trunk/lima-swing/src/main/java/org/chorem/lima/util/JournalToStringConverter.java trunk/lima-swing/src/main/java/org/chorem/lima/util/PeriodToStringConverter.java Deleted: trunk/lima-swing/src/main/java/org/chorem/lima/util/AccountToStringConverter.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/util/AccountToStringConverter.java 2010-04-09 16:12:37 UTC (rev 2842) +++ trunk/lima-swing/src/main/java/org/chorem/lima/util/AccountToStringConverter.java 2010-04-09 16:13:25 UTC (rev 2843) @@ -1,48 +0,0 @@ -/** - * *##% Lima Main - * Copyright (C) 2008 CodeLutin - * - * 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>. ##%* - */ - -package org.chorem.lima.util; - -import org.chorem.lima.dto.AccountDTO; -import org.chorem.lima.dto.util.DTOHelper; -import org.jdesktop.swingx.autocomplete.ObjectToStringConverter; - -/** - * @author ore - */ -public class AccountToStringConverter extends ObjectToStringConverter { - - private static AccountToStringConverter converter; - - @Override - public String getPreferredStringForItem(Object item) { - if (item == null) { - return DTOHelper.EMPTY_STRING; - } - AccountDTO account = (AccountDTO) item; - return account.getIdNumber() + " : " + account.getDescription(); - } - - public static AccountToStringConverter getInstance() { - if (converter == null) { - converter = new AccountToStringConverter(); - } - return converter; - } -} Deleted: trunk/lima-swing/src/main/java/org/chorem/lima/util/JournalToStringConverter.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/util/JournalToStringConverter.java 2010-04-09 16:12:37 UTC (rev 2842) +++ trunk/lima-swing/src/main/java/org/chorem/lima/util/JournalToStringConverter.java 2010-04-09 16:13:25 UTC (rev 2843) @@ -1,50 +0,0 @@ -/** - * *##% Lima Main - * Copyright (C) 2008 CodeLutin - * - * 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>. ##%* - */ - -package org.chorem.lima.util; - -import org.chorem.lima.dto.JournalDTO; -import org.chorem.lima.dto.util.DTOHelper; -import org.jdesktop.swingx.autocomplete.ObjectToStringConverter; - -/** - * Converts a journal to string for AutoCompleteDecorator - * - * @author ore - */ -public class JournalToStringConverter extends ObjectToStringConverter { - - private static JournalToStringConverter converter; - - @Override - public String getPreferredStringForItem(Object item) { - if (item == null) { - return DTOHelper.EMPTY_STRING; - } - JournalDTO journal = (JournalDTO) item; - return journal.getIdName() + " : " + journal.getDescription(); - } - - public static JournalToStringConverter getInstance() { - if (converter == null) { - converter = new JournalToStringConverter(); - } - return converter; - } -} Deleted: trunk/lima-swing/src/main/java/org/chorem/lima/util/PeriodToStringConverter.java =================================================================== --- trunk/lima-swing/src/main/java/org/chorem/lima/util/PeriodToStringConverter.java 2010-04-09 16:12:37 UTC (rev 2842) +++ trunk/lima-swing/src/main/java/org/chorem/lima/util/PeriodToStringConverter.java 2010-04-09 16:13:25 UTC (rev 2843) @@ -1,49 +0,0 @@ -/** - * *##% Lima Main - * Copyright (C) 2008 CodeLutin - * - * 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>. ##%* - */ - -package org.chorem.lima.util; - -import org.chorem.lima.dto.PeriodDTO; -import org.chorem.lima.dto.util.DTOHelper; -import org.jdesktop.swingx.autocomplete.ObjectToStringConverter; - -/** - * @author ore - */ -public class PeriodToStringConverter extends ObjectToStringConverter { - - private static PeriodToStringConverter converter; - - @Override - public String getPreferredStringForItem(Object item) { - if (item == null) { - return DTOHelper.EMPTY_STRING; - } - PeriodDTO period = (PeriodDTO) item; - return period.getIdName(); - } - - - public static PeriodToStringConverter getInstance() { - if (converter == null) { - converter = new PeriodToStringConverter(); - } - return converter; - } -}
participants (1)
-
echatellier@users.chorem.org