Author: tchemit Date: 2012-08-17 16:03:32 +0200 (Fri, 17 Aug 2012) New Revision: 427 Url: http://forge.codelutin.com/repositories/revision/sammoa/427 Log: remove ValidationTable ui Removed: trunk/sammoa-ui-swing/src/main/java/fr/ulr/sammoa/ui/swing/ValidationTable.css trunk/sammoa-ui-swing/src/main/java/fr/ulr/sammoa/ui/swing/ValidationTable.jaxx trunk/sammoa-ui-swing/src/main/java/fr/ulr/sammoa/ui/swing/ValidationTableHandler.java Deleted: trunk/sammoa-ui-swing/src/main/java/fr/ulr/sammoa/ui/swing/ValidationTable.css =================================================================== --- trunk/sammoa-ui-swing/src/main/java/fr/ulr/sammoa/ui/swing/ValidationTable.css 2012-08-17 08:14:14 UTC (rev 426) +++ trunk/sammoa-ui-swing/src/main/java/fr/ulr/sammoa/ui/swing/ValidationTable.css 2012-08-17 14:03:32 UTC (rev 427) @@ -1,35 +0,0 @@ -/* - * #%L - * SAMMOA :: UI Swing - * $Id$ - * $HeadURL$ - * %% - * Copyright (C) 2012 UMS 3462, Code Lutin - * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU 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 Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this program. If not, see - * <http://www.gnu.org/licenses/gpl-3.0.html>. - * #L% - */ -#scrollPanel { - columnHeaderView:{errorTable.getTableHeader()}; -} - -#errorTable { - rowSelectionAllowed:true; - autoCreateRowSorter:true; - autoResizeMode:2; - cellSelectionEnabled:false; - selectionMode:0; - model:{errorTableModel}; -} \ No newline at end of file Deleted: trunk/sammoa-ui-swing/src/main/java/fr/ulr/sammoa/ui/swing/ValidationTable.jaxx =================================================================== --- trunk/sammoa-ui-swing/src/main/java/fr/ulr/sammoa/ui/swing/ValidationTable.jaxx 2012-08-17 08:14:14 UTC (rev 426) +++ trunk/sammoa-ui-swing/src/main/java/fr/ulr/sammoa/ui/swing/ValidationTable.jaxx 2012-08-17 14:03:32 UTC (rev 427) @@ -1,49 +0,0 @@ -<!-- - #%L - SAMMOA :: UI Swing - - $Id$ - $HeadURL$ - %% - Copyright (C) 2012 UMS 3462, Code Lutin - %% - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU 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 Public License for more details. - - You should have received a copy of the GNU General Public - License along with this program. If not, see - <http://www.gnu.org/licenses/gpl-3.0.html>. - #L% - --> -<JPanel id='panel' layout='{new BorderLayout()}'> - - -<JScrollPane id='scrollPanel' constraints='BorderLayout.CENTER'> - <import> - jaxx.runtime.validator.swing.SwingValidatorMessageTableModel - </import> - - <ValidationTableHandler id='handler' constructorParams='this'/> - - <script><![CDATA[ - - protected void $afterCompleteSetup() { - getHandler().init(); - } - - ]]></script> - - <SwingValidatorMessageTableModel id='errorTableModel' - javaBean='handler.getValidationModel()'/> - - <JTable id='errorTable'/> -</JScrollPane> - -</JPanel> \ No newline at end of file Deleted: trunk/sammoa-ui-swing/src/main/java/fr/ulr/sammoa/ui/swing/ValidationTableHandler.java =================================================================== --- trunk/sammoa-ui-swing/src/main/java/fr/ulr/sammoa/ui/swing/ValidationTableHandler.java 2012-08-17 08:14:14 UTC (rev 426) +++ trunk/sammoa-ui-swing/src/main/java/fr/ulr/sammoa/ui/swing/ValidationTableHandler.java 2012-08-17 14:03:32 UTC (rev 427) @@ -1,112 +0,0 @@ -/* - * #%L - * SAMMOA :: UI Swing - * $Id$ - * $HeadURL$ - * %% - * Copyright (C) 2012 UMS 3462, Code Lutin - * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU 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 Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this program. If not, see - * <http://www.gnu.org/licenses/gpl-3.0.html>. - * #L% - */ -package fr.ulr.sammoa.ui.swing; - -import jaxx.runtime.JAXXUtil; -import jaxx.runtime.SwingUtil; -import jaxx.runtime.validator.swing.SwingValidatorMessageTableModel; -import jaxx.runtime.validator.swing.SwingValidatorMessageTableRenderer; -import jaxx.runtime.validator.swing.SwingValidatorUtil; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import javax.swing.AbstractAction; -import javax.swing.Action; -import javax.swing.JComponent; -import javax.swing.JDialog; -import javax.swing.JRootPane; -import javax.swing.KeyStroke; -import java.awt.Component; -import java.awt.Frame; -import java.awt.event.ActionEvent; -import java.awt.event.WindowAdapter; -import java.awt.event.WindowEvent; - -import static org.nuiton.i18n.I18n._; - -/** - * TODO - * - * @author tchemit <chemit@codelutin.com> - * @since 0.2 - */ -public class ValidationTableHandler { - - private static final Logger logger = LoggerFactory.getLogger(StartApp.class); - - protected final ValidationTable ui; - - public ValidationTableHandler(ValidationTable ui) { - this.ui = ui; - } - - public SwingValidatorMessageTableModel getValidationModel() { - return SammoaUIContext.getUIContext().getFlightUIHandler().getModel().getValidatorTableModel(); - } - - public void init() { - SwingValidatorUtil.installUI(ui.getErrorTable(), - new SwingValidatorMessageTableRenderer()); - } - - public void showInDialog(Frame ui) { - - JDialog f = new JDialog(ui, false); - f.setTitle(_("sammoa.title.validation")); - f.add(this.ui); - f.setResizable(true); - f.setSize(550, 450); - JRootPane rootPane = f.getRootPane(); -// rootPane.setDefaultButton(this.ui.close); - rootPane.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke("ESCAPE"), "close"); - rootPane.getActionMap().put("close", closeAction); - f.addWindowListener(new WindowAdapter() { - @Override - public void windowClosed(WindowEvent e) { - Component ui = (Component) e.getSource(); - if (logger.isInfoEnabled()) { - logger.info("destroy ui " + ui); - } - JAXXUtil.destroy(ui); -// JAXXUtil.destroy(ValidationTable.this.ui); - } - }); - SwingUtil.center(ui, f); - f.setVisible(true); - } - - final protected Action closeAction = new AbstractAction("close") { - private static final long serialVersionUID = 1L; - - @Override - public void actionPerformed(ActionEvent e) { - JDialog container = ui.getParentContainer(JDialog.class); - if (container != null) { - container.dispose(); - } else { - ui.setVisible(false); - } - } - }; -}
participants (1)
-
tchemit@users.forge.codelutin.com