Coser-commits
Threads by month
- ----- 2026 -----
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
December 2010
- 2 participants
- 139 discussions
r393 - in trunk: coser-ui/src/main/java/fr/ifremer/coser/ui/common coser-ui/src/main/java/fr/ifremer/coser/ui/maps coser-web/src/main/java/fr/ifremer/coser/web coser-web/src/main/java/fr/ifremer/coser/web/actions coser-web/src/main/webapp/WEB-INF/content
by chatellier@users.labs.libre-entreprise.org 10 Dec '10
by chatellier@users.labs.libre-entreprise.org 10 Dec '10
10 Dec '10
Author: chatellier
Date: 2010-12-10 16:33:11 +0000 (Fri, 10 Dec 2010)
New Revision: 393
Log:
Fix headers
Modified:
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/common/CommonHandler.java
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/common/DataHandler.java
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/common/LengthStructureMatrixRenderer.java
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/maps/CoserMap.java
trunk/coser-web/src/main/java/fr/ifremer/coser/web/CoserWebConfig.java
trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/IndexAction.java
trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/SelectIndicatorAction.java
trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/UploadResultAction.java
trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/WelcomeUserAction.java
trunk/coser-web/src/main/webapp/WEB-INF/content/index.jsp
trunk/coser-web/src/main/webapp/WEB-INF/content/upload-result-success.jsp
trunk/coser-web/src/main/webapp/WEB-INF/content/upload-result.jsp
trunk/coser-web/src/main/webapp/WEB-INF/content/welcome-user.jsp
Modified: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/common/CommonHandler.java
===================================================================
--- trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/common/CommonHandler.java 2010-12-10 15:38:47 UTC (rev 392)
+++ trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/common/CommonHandler.java 2010-12-10 16:33:11 UTC (rev 393)
@@ -1,25 +1,23 @@
/*
* #%L
- *
- *
* $Id$
* $HeadURL$
* %%
- * Copyright (C) 2010 Codelutin, Chatellier Eric
+ * Copyright (C) 2010 Ifremer, Codelutin, Chatellier Eric
* %%
* This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as
+ * 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 Lesser Public License for more details.
+ * GNU General Public License for more details.
*
- * You should have received a copy of the GNU General Lesser Public
+ * You should have received a copy of the GNU General Public
* License along with this program. If not, see
- * <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ * <http://www.gnu.org/licenses/gpl-3.0.html>.
* #L%
*/
Modified: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/common/DataHandler.java
===================================================================
--- trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/common/DataHandler.java 2010-12-10 15:38:47 UTC (rev 392)
+++ trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/common/DataHandler.java 2010-12-10 16:33:11 UTC (rev 393)
@@ -1,25 +1,23 @@
/*
* #%L
- *
- *
* $Id$
* $HeadURL$
* %%
- * Copyright (C) 2010 Codelutin, Chatellier Eric
+ * Copyright (C) 2010 Ifremer, Codelutin, Chatellier Eric
* %%
* This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as
+ * 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 Lesser Public License for more details.
+ * GNU General Public License for more details.
*
- * You should have received a copy of the GNU General Lesser Public
+ * You should have received a copy of the GNU General Public
* License along with this program. If not, see
- * <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ * <http://www.gnu.org/licenses/gpl-3.0.html>.
* #L%
*/
Modified: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/common/LengthStructureMatrixRenderer.java
===================================================================
--- trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/common/LengthStructureMatrixRenderer.java 2010-12-10 15:38:47 UTC (rev 392)
+++ trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/common/LengthStructureMatrixRenderer.java 2010-12-10 16:33:11 UTC (rev 393)
@@ -1,25 +1,23 @@
/*
* #%L
- *
- *
* $Id$
* $HeadURL$
* %%
- * Copyright (C) 2010 Codelutin, Chatellier Eric
+ * Copyright (C) 2010 Ifremer, Codelutin, Chatellier Eric
* %%
* This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as
+ * 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 Lesser Public License for more details.
+ * GNU General Public License for more details.
*
- * You should have received a copy of the GNU General Lesser Public
+ * You should have received a copy of the GNU General Public
* License along with this program. If not, see
- * <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ * <http://www.gnu.org/licenses/gpl-3.0.html>.
* #L%
*/
Modified: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/maps/CoserMap.java
===================================================================
--- trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/maps/CoserMap.java 2010-12-10 15:38:47 UTC (rev 392)
+++ trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/maps/CoserMap.java 2010-12-10 16:33:11 UTC (rev 393)
@@ -1,25 +1,23 @@
/*
* #%L
- *
- *
* $Id$
* $HeadURL$
* %%
- * Copyright (C) 2010 Codelutin, Chatellier Eric
+ * Copyright (C) 2010 Ifremer, Codelutin, Chatellier Eric
* %%
* This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as
+ * 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 Lesser Public License for more details.
+ * GNU General Public License for more details.
*
- * You should have received a copy of the GNU General Lesser Public
+ * You should have received a copy of the GNU General Public
* License along with this program. If not, see
- * <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ * <http://www.gnu.org/licenses/gpl-3.0.html>.
* #L%
*/
Modified: trunk/coser-web/src/main/java/fr/ifremer/coser/web/CoserWebConfig.java
===================================================================
--- trunk/coser-web/src/main/java/fr/ifremer/coser/web/CoserWebConfig.java 2010-12-10 15:38:47 UTC (rev 392)
+++ trunk/coser-web/src/main/java/fr/ifremer/coser/web/CoserWebConfig.java 2010-12-10 16:33:11 UTC (rev 393)
@@ -1,25 +1,22 @@
/*
* #%L
- *
- *
* $Id$
* $HeadURL$
* %%
* Copyright (C) 2010 Ifremer, Codelutin, Chatellier Eric
* %%
* 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.
+ * it under the terms of the GNU Affero 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.
+ * GNU General 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>.
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
* #L%
*/
Modified: trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/IndexAction.java
===================================================================
--- trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/IndexAction.java 2010-12-10 15:38:47 UTC (rev 392)
+++ trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/IndexAction.java 2010-12-10 16:33:11 UTC (rev 393)
@@ -1,25 +1,22 @@
/*
* #%L
- *
- *
* $Id$
* $HeadURL$
* %%
- * Copyright (C) 2010 Codelutin, Chatellier Eric
+ * Copyright (C) 2010 Ifremer, Codelutin, Chatellier Eric
* %%
* 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.
+ * it under the terms of the GNU Affero 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.
+ * GNU General 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>.
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
* #L%
*/
Modified: trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/SelectIndicatorAction.java
===================================================================
--- trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/SelectIndicatorAction.java 2010-12-10 15:38:47 UTC (rev 392)
+++ trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/SelectIndicatorAction.java 2010-12-10 16:33:11 UTC (rev 393)
@@ -1,32 +1,28 @@
/*
* #%L
- *
- *
* $Id$
* $HeadURL$
* %%
- * Copyright (C) 2010 Codelutin, Chatellier Eric
+ * Copyright (C) 2010 Ifremer, Codelutin, Chatellier Eric
* %%
* 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.
+ * it under the terms of the GNU Affero 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.
+ * GNU General 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>.
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
* #L%
*/
package fr.ifremer.coser.web.actions;
import java.io.File;
-import java.util.ArrayList;
import java.util.List;
import org.nuiton.util.ArgumentsParserException;
Modified: trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/UploadResultAction.java
===================================================================
--- trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/UploadResultAction.java 2010-12-10 15:38:47 UTC (rev 392)
+++ trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/UploadResultAction.java 2010-12-10 16:33:11 UTC (rev 393)
@@ -1,25 +1,22 @@
/*
* #%L
- *
- *
* $Id$
* $HeadURL$
* %%
- * Copyright (C) 2010 Codelutin, Chatellier Eric
+ * Copyright (C) 2010 Ifremer, Codelutin, Chatellier Eric
* %%
* 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.
+ * it under the terms of the GNU Affero 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.
+ * GNU General 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>.
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
* #L%
*/
Modified: trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/WelcomeUserAction.java
===================================================================
--- trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/WelcomeUserAction.java 2010-12-10 15:38:47 UTC (rev 392)
+++ trunk/coser-web/src/main/java/fr/ifremer/coser/web/actions/WelcomeUserAction.java 2010-12-10 16:33:11 UTC (rev 393)
@@ -1,32 +1,27 @@
/*
* #%L
- *
- *
* $Id$
* $HeadURL$
* %%
- * Copyright (C) 2010 Codelutin, Chatellier Eric
+ * Copyright (C) 2010 Ifremer, Codelutin, Chatellier Eric
* %%
* 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.
+ * it under the terms of the GNU Affero 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.
+ * GNU General 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>.
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
* #L%
*/
package fr.ifremer.coser.web.actions;
-import org.apache.struts2.convention.annotation.Action;
-
import com.opensymphony.xwork2.ActionSupport;
/**
Modified: trunk/coser-web/src/main/webapp/WEB-INF/content/index.jsp
===================================================================
--- trunk/coser-web/src/main/webapp/WEB-INF/content/index.jsp 2010-12-10 15:38:47 UTC (rev 392)
+++ trunk/coser-web/src/main/webapp/WEB-INF/content/index.jsp 2010-12-10 16:33:11 UTC (rev 393)
@@ -1,3 +1,26 @@
+<!--
+ #%L
+ Coser :: Web
+
+ $Id$
+ $HeadURL$
+ %%
+ Copyright (C) 2010 Ifremer, Codelutin, Chatellier Eric
+ %%
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero 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 Affero General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ #L%
+ -->
<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<%@taglib uri="/struts-tags" prefix="s" %>
Modified: trunk/coser-web/src/main/webapp/WEB-INF/content/upload-result-success.jsp
===================================================================
--- trunk/coser-web/src/main/webapp/WEB-INF/content/upload-result-success.jsp 2010-12-10 15:38:47 UTC (rev 392)
+++ trunk/coser-web/src/main/webapp/WEB-INF/content/upload-result-success.jsp 2010-12-10 16:33:11 UTC (rev 393)
@@ -1,3 +1,26 @@
+<!--
+ #%L
+ Coser :: Web
+
+ $Id$
+ $HeadURL$
+ %%
+ Copyright (C) 2010 Ifremer, Codelutin, Chatellier Eric
+ %%
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero 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 Affero General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ #L%
+ -->
<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<%@taglib uri="/struts-tags" prefix="s" %>
Modified: trunk/coser-web/src/main/webapp/WEB-INF/content/upload-result.jsp
===================================================================
--- trunk/coser-web/src/main/webapp/WEB-INF/content/upload-result.jsp 2010-12-10 15:38:47 UTC (rev 392)
+++ trunk/coser-web/src/main/webapp/WEB-INF/content/upload-result.jsp 2010-12-10 16:33:11 UTC (rev 393)
@@ -1,3 +1,26 @@
+<!--
+ #%L
+ Coser :: Web
+
+ $Id$
+ $HeadURL$
+ %%
+ Copyright (C) 2010 Ifremer, Codelutin, Chatellier Eric
+ %%
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero 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 Affero General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ #L%
+ -->
<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<%@taglib uri="/struts-tags" prefix="s" %>
Modified: trunk/coser-web/src/main/webapp/WEB-INF/content/welcome-user.jsp
===================================================================
--- trunk/coser-web/src/main/webapp/WEB-INF/content/welcome-user.jsp 2010-12-10 15:38:47 UTC (rev 392)
+++ trunk/coser-web/src/main/webapp/WEB-INF/content/welcome-user.jsp 2010-12-10 16:33:11 UTC (rev 393)
@@ -1,3 +1,26 @@
+<!--
+ #%L
+ Coser :: Web
+
+ $Id$
+ $HeadURL$
+ %%
+ Copyright (C) 2010 Ifremer, Codelutin, Chatellier Eric
+ %%
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero 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 Affero General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ #L%
+ -->
<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<%@taglib uri="/struts-tags" prefix="s" %>
1
0
r392 - in trunk/coser-ui/src/main/java/fr/ifremer/coser/ui: . selection
by chatellier@users.labs.libre-entreprise.org 10 Dec '10
by chatellier@users.labs.libre-entreprise.org 10 Dec '10
10 Dec '10
Author: chatellier
Date: 2010-12-10 15:38:47 +0000 (Fri, 10 Dec 2010)
New Revision: 392
Log:
Add openmap toolbar
Modified:
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/CoserFrameHandler.java
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/SelectionDetailsView.jaxx
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/SelectionHandler.java
Modified: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/CoserFrameHandler.java
===================================================================
--- trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/CoserFrameHandler.java 2010-12-10 15:18:00 UTC (rev 391)
+++ trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/CoserFrameHandler.java 2010-12-10 15:38:47 UTC (rev 392)
@@ -512,6 +512,7 @@
SelectionHandler handler = new SelectionHandler();
selectionView.setHandler(handler);
+ handler.initMapToolBar(selectionView.getSelectionDetailsTab());
handler.initSelection(selectionView);
// restore session size
@@ -553,6 +554,7 @@
SelectionHandler handler = new SelectionHandler();
selectionView.setHandler(handler);
+ handler.initMapToolBar(selectionView.getSelectionDetailsTab());
handler.reloadSelection(selectionView);
// restore session size
@@ -618,7 +620,7 @@
SelectionHandler handler = new SelectionHandler();
selectionView.setHandler(handler);
-
+ handler.initMapToolBar(selectionView.getSelectionDetailsTab());
// FIXME chatellier 20101126 il faut faire un mix de init && reload
handler.initSelection(selectionView);
Modified: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/SelectionDetailsView.jaxx
===================================================================
--- trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/SelectionDetailsView.jaxx 2010-12-10 15:18:00 UTC (rev 391)
+++ trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/SelectionDetailsView.jaxx 2010-12-10 15:38:47 UTC (rev 392)
@@ -260,8 +260,8 @@
<CardLayout id="detailDecisionPanelLayout" />
<JPanel id="detailDecisionPanel" layout="{detailDecisionPanelLayout}">
<JPanel layout="{new BorderLayout()}" constraints='"ZONEMAP"'>
- <com.bbn.openmap.gui.ToolPanel id='toolMap' javaBean='new com.bbn.openmap.gui.ToolPanel()' constraints='BorderLayout.NORTH' />
- <fr.ifremer.coser.ui.maps.CoserMap constraints='BorderLayout.CENTER' />
+ <com.bbn.openmap.gui.ToolPanel id='strataMapToolBar' javaBean='new com.bbn.openmap.gui.ToolPanel()' constraints='BorderLayout.NORTH' />
+ <fr.ifremer.coser.ui.maps.CoserMap id="strataMap" constraints='BorderLayout.CENTER' />
</JPanel>
<JScrollPane constraints='"SPECIESDATA"'>
<org.nuiton.math.matrix.gui.MatrixPanelEditor id="matrixPanelEditor" />
Modified: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/SelectionHandler.java
===================================================================
--- trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/SelectionHandler.java 2010-12-10 15:18:00 UTC (rev 391)
+++ trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/SelectionHandler.java 2010-12-10 15:38:47 UTC (rev 392)
@@ -61,6 +61,9 @@
import org.nuiton.math.matrix.gui.MatrixTableModelND;
import org.nuiton.widget.SwingSession;
+import com.bbn.openmap.gui.OMToolSet;
+import com.bbn.openmap.gui.Tool;
+
import fr.ifremer.coser.CoserBusinessException;
import fr.ifremer.coser.CoserException;
import fr.ifremer.coser.bean.Project;
@@ -258,6 +261,17 @@
}
/**
+ * Link map toolbar with map.
+ *
+ * @param view view
+ */
+ public void initMapToolBar(SelectionDetailsView view) {
+ OMToolSet toolSet = new OMToolSet();
+ toolSet.setupListeners(view.getStrataMap());
+ view.getStrataMapToolBar().add((Tool)toolSet);
+ }
+
+ /**
* Appellé lorsque la selection de la liste des zones a changé.
*
* @param view view
1
0
r391 - in trunk/coser-ui/src/main: java/fr/ifremer/coser/ui java/fr/ifremer/coser/ui/maps java/fr/ifremer/coser/ui/selection resources resources/maps resources/maps/ibts
by chatellier@users.labs.libre-entreprise.org 10 Dec '10
by chatellier@users.labs.libre-entreprise.org 10 Dec '10
10 Dec '10
Author: chatellier
Date: 2010-12-10 15:18:00 +0000 (Fri, 10 Dec 2010)
New Revision: 391
Log:
Add map sample with ibts map
Added:
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/maps/
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/maps/CoserMap.java
trunk/coser-ui/src/main/resources/maps/
trunk/coser-ui/src/main/resources/maps/ibts/
trunk/coser-ui/src/main/resources/maps/ibts/pol_ibts.shp
trunk/coser-ui/src/main/resources/maps/ibts/pol_ibts.ssx
Modified:
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/CoserFrameHandler.java
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/SelectionDetailsView.jaxx
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/SelectionHandler.java
Modified: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/CoserFrameHandler.java
===================================================================
--- trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/CoserFrameHandler.java 2010-12-10 15:10:35 UTC (rev 390)
+++ trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/CoserFrameHandler.java 2010-12-10 15:18:00 UTC (rev 391)
@@ -514,14 +514,6 @@
selectionView.setHandler(handler);
handler.initSelection(selectionView);
- try {
- File file = new File("/home/chatellier/tmp/coser/zones.png");
- selectionView.getSelectionDetailsTab().getZonesMap().setImage(file);
-
- } catch(Exception e) {
- e.printStackTrace();
- };
-
// restore session size
SwingSession session = (SwingSession)view.getContextValue(SwingSession.class);
session.add(selectionView);
@@ -563,13 +555,6 @@
selectionView.setHandler(handler);
handler.reloadSelection(selectionView);
- try {
- File file = new File("/home/chatellier/tmp/coser/zones.png");
- selectionView.getSelectionDetailsTab().getZonesMap().setImage(file);
- } catch(Exception e) {
- e.printStackTrace();
- };
-
// restore session size
SwingSession session = (SwingSession)view.getContextValue(SwingSession.class);
session.add(selectionView);
@@ -637,13 +622,6 @@
// FIXME chatellier 20101126 il faut faire un mix de init && reload
handler.initSelection(selectionView);
- try {
- File file = new File("/home/chatellier/tmp/coser/zones.png");
- selectionView.getSelectionDetailsTab().getZonesMap().setImage(file);
-
- } catch(Exception e) {
- e.printStackTrace();
- };
setMainComponent(selectionView);
}
catch (Exception ex) {
Added: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/maps/CoserMap.java
===================================================================
--- trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/maps/CoserMap.java (rev 0)
+++ trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/maps/CoserMap.java 2010-12-10 15:18:00 UTC (rev 391)
@@ -0,0 +1,215 @@
+/*
+ * #%L
+ *
+ *
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2010 Codelutin, Chatellier Eric
+ * %%
+ * 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%
+ */
+
+package fr.ifremer.coser.ui.maps;
+
+import java.util.Properties;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+import com.bbn.openmap.BufferedMapBean;
+import com.bbn.openmap.Layer;
+import com.bbn.openmap.LayerHandler;
+import com.bbn.openmap.MouseDelegator;
+import com.bbn.openmap.event.MapMouseMode;
+import com.bbn.openmap.event.NavMouseMode;
+import com.bbn.openmap.layer.GraticuleLayer;
+import com.bbn.openmap.layer.shape.ShapeLayer;
+import com.bbn.openmap.omGraphics.DrawingAttributes;
+import com.bbn.openmap.plugin.esri.EsriLayer;
+
+/**
+ * Coser map based open openmap.
+ *
+ * @author chatellier
+ * @version $Revision$
+ *
+ * Last update : $Date$
+ * By : $Author$
+ */
+public class CoserMap extends BufferedMapBean {
+
+ /** serialVersionUID. */
+ private static final long serialVersionUID = 3134624721243512358L;
+
+ private static Log log = LogFactory.getLog(CoserMap.class);
+
+ protected LayerHandler layerHandler = new LayerHandler();
+
+ protected MapMouseMode currentMouseMode;
+
+ protected MouseDelegator md;
+
+ protected static final float SCALE = 9500000f;
+
+ public CoserMap() {
+ setScale(SCALE);
+ md = new MouseDelegator(this);
+ md.setDefaultMouseModes();
+ setActiveMouseMode(new NavMouseMode());
+ layerHandler.addLayerListener(this);
+ initMap();
+
+ }
+
+ public void setActiveMouseMode(MapMouseMode mode) {
+ md.setActiveMouseMode(mode);
+ currentMouseMode = mode;
+ // il faut remettre les listeners
+ /*for (MapMouseListener l : orderedListener) {
+ currentMouseMode.addMapMouseListener(l);
+ }*/
+ }
+
+ protected void initMap() {
+
+ addGraticuleLayer();
+
+ addLayer("maps/ibts/pol_ibts.shp", "maps/ibts/pol_ibts.shp", "ff000000", "ffbdde83");
+
+ }
+
+ protected void addGraticuleLayer() {
+ GraticuleLayer layer = new GraticuleLayer();
+ Properties p = new Properties();
+ // Show lat / lon spacing labels
+ p.setProperty("." + GraticuleLayer.ShowRulerProperty, "true");
+ p.setProperty("." + GraticuleLayer.ShowOneAndFiveProperty, "true");
+ // Controls when the five degree lines and one degree lines kick in
+ // - when there is less than the threshold of ten degree lat or lon
+ // lines, five degree lines are drawn. The same relationship is there
+ // for one to five degree lines.
+ p.setProperty("." + GraticuleLayer.ThresholdProperty, "5");
+ // the color of 10 degree spacing lines (Hex ARGB)
+ p.setProperty("." + GraticuleLayer.TenDegreeColorProperty, "FF000000");
+ // the color of 5 degree spacing lines (Hex ARGB)
+ p.setProperty("." + GraticuleLayer.FiveDegreeColorProperty, "C7009900");
+ // the color of 1 degree spacing lines (ARGB)
+ p.setProperty("." + GraticuleLayer.OneDegreeColorProperty, "FF003300");
+ // the color of the equator (ARGB)
+ p.setProperty("." + GraticuleLayer.EquatorColorProperty, "FFFF0000");
+ // the color of the international dateline (ARGB)
+ p.setProperty("." + GraticuleLayer.DateLineColorProperty, "FF000099");
+ // the color of the special lines (ARGB) (Tropic of Cancer, Capricorn)
+ p.setProperty("." + GraticuleLayer.SpecialLineColorProperty, "FF000000");
+ // the color of the labels (ARGB)
+ p.setProperty("." + GraticuleLayer.TextColorProperty, "FF000000");
+
+ layer.setProperties("", p);
+ layerHandler.addLayer(layer);
+ }
+
+ /**
+ * Add a new layer to the map depending on mapFile extension.
+ *
+ * @param layerId layer id
+ * @param mapFile absolute map fail path
+ * @param lineColor line color
+ * @param fillColor fill color
+ */
+ protected void addLayer(String layerId, String mapFile, String lineColor,
+ String fillColor) {
+
+ Layer layer = null;
+ // get layer depending on type
+ if (mapFile.endsWith(".shp")) {
+ layer = getShapeLayer(layerId, mapFile, lineColor, fillColor);
+ }
+ else {
+ if (log.isErrorEnabled()) {
+ log.error("Can't find layer for " + mapFile + " (unknown type)");
+ }
+ }
+
+ // display layer
+ if (layer != null) {
+ if (log.isDebugEnabled()) {
+ log.debug("Add layer " + layer);
+ }
+ layerHandler.addLayer(layer);
+ }
+ }
+
+ /**
+ * Manage shp layer display.
+ *
+ * @param layerId layer id
+ * @param mapFile absolute map fail path
+ * @param lineColor line color
+ * @param fillColor fill color
+ *
+ * @return shape layer
+ * @see ShapeLayer
+ */
+ protected Layer getShapeLayer(String layerId, String mapFile, String lineColor,
+ String fillColor) {
+
+ if (log.isDebugEnabled()) {
+ log.debug("Get ShapeLayer with filename : " + mapFile);
+ }
+
+ ShapeLayer shapeLayer = new ShapeLayer();
+ Properties p = new Properties();
+ p.setProperty(layerId + "." + ShapeLayer.shapeFileProperty, mapFile);
+ p.setProperty(layerId + "." + DrawingAttributes.linePaintProperty, lineColor);
+ p.setProperty(layerId + "." + DrawingAttributes.fillPaintProperty, fillColor);
+ shapeLayer.setProperties(layerId, p);
+ shapeLayer.setName(layerId);
+
+ return shapeLayer;
+ }
+
+ /**
+ * Manage shp layer display.
+ *
+ * @param layerId layer id
+ * @param mapFile absolute map fail path
+ * @param lineColor line color
+ * @param fillColor fill color
+ *
+ * @return shape layer
+ * @see ShapeLayer
+ */
+ protected Layer getEsriLayer(String layerId, String mapFile, String lineColor,
+ String fillColor) {
+
+ if (log.isDebugEnabled()) {
+ log.debug("Get ShapeLayer with filename : " + mapFile);
+ }
+
+ EsriLayer layer = new EsriLayer();
+ Properties p = new Properties();
+ p.setProperty(layerId + "." + EsriLayer.PARAM_DBF, "maps/ibts/pol_ibts.dbf");
+ p.setProperty(layerId + "." + EsriLayer.PARAM_SHP, "maps/ibts/pol_ibts.shp");
+ p.setProperty(layerId + "." + EsriLayer.PARAM_SHX, "maps/ibts/pol_ibts.shx");
+ p.setProperty(layerId + "." + DrawingAttributes.linePaintProperty, lineColor);
+ p.setProperty(layerId + "." + DrawingAttributes.fillPaintProperty, fillColor);
+ layer.setProperties(layerId, p);
+ layer.setName(layerId);
+
+ return layer;
+ }
+}
Property changes on: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/maps/CoserMap.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Modified: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/SelectionDetailsView.jaxx
===================================================================
--- trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/SelectionDetailsView.jaxx 2010-12-10 15:10:35 UTC (rev 390)
+++ trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/SelectionDetailsView.jaxx 2010-12-10 15:18:00 UTC (rev 391)
@@ -259,9 +259,10 @@
<CardLayout id="detailDecisionPanelLayout" />
<JPanel id="detailDecisionPanel" layout="{detailDecisionPanelLayout}">
- <JScrollPane id="zonesScrollPane" constraints='"ZONEMAP"'>
- <JXImageView id="zonesMap" />
- </JScrollPane>
+ <JPanel layout="{new BorderLayout()}" constraints='"ZONEMAP"'>
+ <com.bbn.openmap.gui.ToolPanel id='toolMap' javaBean='new com.bbn.openmap.gui.ToolPanel()' constraints='BorderLayout.NORTH' />
+ <fr.ifremer.coser.ui.maps.CoserMap constraints='BorderLayout.CENTER' />
+ </JPanel>
<JScrollPane constraints='"SPECIESDATA"'>
<org.nuiton.math.matrix.gui.MatrixPanelEditor id="matrixPanelEditor" />
</JScrollPane>
Modified: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/SelectionHandler.java
===================================================================
--- trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/SelectionHandler.java 2010-12-10 15:10:35 UTC (rev 390)
+++ trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/SelectionHandler.java 2010-12-10 15:18:00 UTC (rev 391)
@@ -69,7 +69,6 @@
import fr.ifremer.coser.services.ProjectService;
import fr.ifremer.coser.services.PublicationService;
import fr.ifremer.coser.ui.common.DataHandler;
-import fr.ifremer.coser.ui.control.ControlView;
import fr.ifremer.coser.ui.result.SelectionAddResultDialog;
import fr.ifremer.coser.ui.selection.model.OccurrenceDensitySpecyListModel;
import fr.ifremer.coser.ui.util.CoserListSelectionModel;
Added: trunk/coser-ui/src/main/resources/maps/ibts/pol_ibts.shp
===================================================================
(Binary files differ)
Property changes on: trunk/coser-ui/src/main/resources/maps/ibts/pol_ibts.shp
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/coser-ui/src/main/resources/maps/ibts/pol_ibts.ssx
===================================================================
(Binary files differ)
Property changes on: trunk/coser-ui/src/main/resources/maps/ibts/pol_ibts.ssx
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
1
0
Author: chatellier
Date: 2010-12-10 15:10:35 +0000 (Fri, 10 Dec 2010)
New Revision: 390
Log:
Add openmap
Modified:
trunk/pom.xml
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2010-12-10 15:10:21 UTC (rev 389)
+++ trunk/pom.xml 2010-12-10 15:10:35 UTC (rev 390)
@@ -177,6 +177,13 @@
</dependency>
<dependency>
+ <groupId>com.bbn</groupId>
+ <artifactId>openmap</artifactId>
+ <version>4.6.5</version>
+ <scope>compile</scope>
+ </dependency>
+
+ <dependency>
<groupId>org.swinglabs</groupId>
<artifactId>jxlayer</artifactId>
<version>3.0.3</version>
1
0
Author: chatellier
Date: 2010-12-10 15:10:21 +0000 (Fri, 10 Dec 2010)
New Revision: 389
Log:
Filtering !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
(only filter necessary files !!!)
Modified:
trunk/coser-ui/pom.xml
Modified: trunk/coser-ui/pom.xml
===================================================================
--- trunk/coser-ui/pom.xml 2010-12-10 10:34:00 UTC (rev 388)
+++ trunk/coser-ui/pom.xml 2010-12-10 15:10:21 UTC (rev 389)
@@ -89,6 +89,10 @@
<groupId>jfree</groupId>
<artifactId>jfreechart</artifactId>
</dependency>
+ <dependency>
+ <groupId>com.bbn</groupId>
+ <artifactId>openmap</artifactId>
+ </dependency>
</dependencies>
<name>Coser :: UI</name>
@@ -106,10 +110,16 @@
<resource>
<directory>src/main/resources</directory>
<includes>
- <include>**/*</include>
+ <include>coser.properties</include>
</includes>
<filtering>true</filtering>
</resource>
+ <resource>
+ <directory>src/main/resources</directory>
+ <excludes>
+ <exclude>coser.properties</exclude>
+ </excludes>
+ </resource>
</resources>
<pluginManagement>
1
0
r388 - in trunk: coser-business/src/main/java/fr/ifremer/coser/services coser-business/src/main/resources/i18n coser-ui/src/main/java/fr/ifremer/coser/ui/common
by chatellier@users.labs.libre-entreprise.org 10 Dec '10
by chatellier@users.labs.libre-entreprise.org 10 Dec '10
10 Dec '10
Author: chatellier
Date: 2010-12-10 10:34:00 +0000 (Fri, 10 Dec 2010)
New Revision: 388
Log:
Add custom matrix renderer for length structure (displaying missing data on graph : null)
Removed:
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/common/LengthStructureMatrixDataset.java
Modified:
trunk/coser-business/src/main/java/fr/ifremer/coser/services/ProjectService.java
trunk/coser-business/src/main/resources/i18n/coser-business_en_GB.properties
trunk/coser-business/src/main/resources/i18n/coser-business_fr_FR.properties
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/common/DataHandler.java
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/common/LengthStructureMatrixRenderer.java
Modified: trunk/coser-business/src/main/java/fr/ifremer/coser/services/ProjectService.java
===================================================================
--- trunk/coser-business/src/main/java/fr/ifremer/coser/services/ProjectService.java 2010-12-10 09:58:50 UTC (rev 387)
+++ trunk/coser-business/src/main/java/fr/ifremer/coser/services/ProjectService.java 2010-12-10 10:34:00 UTC (rev 388)
@@ -60,6 +60,7 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.commons.math.util.MathUtils;
+import org.nuiton.math.matrix.DoubleVector;
import org.nuiton.math.matrix.MatrixFactory;
import org.nuiton.math.matrix.MatrixND;
@@ -2215,12 +2216,10 @@
// map lengthstep, species , strata , year > count
Map<Double, Map<String, Map<String, Map<String, Double>>>> countForLengthSpeciesStrataYear =
new HashMap<Double, Map<String, Map<String, Map<String, Double>>>>();
+ Set<Double> lengthSet = new HashSet<Double>();
Set<String> speciesSet = new HashSet<String>();
Set<String> strataSet = new HashSet<String>();
Set<String> yearsSet = new HashSet<String>();
- double minLength = Double.MAX_VALUE;
- double maxLength = Double.MIN_VALUE;
- boolean halfStep = false;
Iterator<String[]> itData = dataContainer.getLength().iterator();
itData.next(); // skip header
@@ -2254,7 +2253,8 @@
// get length step to use
double ceil = Math.ceil(length);
double floor = Math.floor(length);
- double round = Math.round(length);
+ // ne pas prendre 0.5 car 10.0 serait arrondit à 10.5
+ double round = Math.floor(length + 0.499999);
// on prend le pas ou demi pas le plus proche
if (ceil == round) {
@@ -2263,17 +2263,9 @@
else {
length = floor;
}
+
+ lengthSet.add(length);
- if (length < minLength) {
- minLength = length;
- }
- if (length > maxLength) {
- maxLength = length;
- }
- if (length - Math.floor(length) != 0.0) {
- halfStep = true;
- }
-
try {
double number = Double.parseDouble(numberAsString);
@@ -2318,11 +2310,6 @@
}
}
- Set<Double> lengthSet = new HashSet<Double>();
- for (double length = minLength ; length <= maxLength ; length += (halfStep) ? 0.5 : 1) {
- lengthSet.add(length);
- }
-
// convert map to matrixND
List<Double> lengthSem = new ArrayList<Double>(lengthSet);
Collections.sort(lengthSem);
@@ -2332,7 +2319,11 @@
Collections.sort(strataSem);
List<String> yearsSem = new ArrayList<String>(yearsSet);
Collections.sort(yearsSem);
-
+
+ if (log.isDebugEnabled()) {
+ log.debug(_("Creating matrix : %d*%d*%d*%d", lengthSem.size(), speciesSem.size(), strataSem.size(), yearsSem.size()));
+ }
+
MatrixND matrix = MatrixFactory.getInstance().create(n_("coser.business.matrix.lengthstructure"), new List<?>[] {
lengthSem , speciesSem, strataSem, yearsSem});
matrix.setDimensionName(0, n_("coser.business.common.length"));
@@ -2340,7 +2331,7 @@
matrix.setDimensionName(2, n_("coser.business.common.strata"));
matrix.setDimensionName(3, n_("coser.business.common.years"));
- /*for (Map.Entry<Double, Map<String, Map<String, Map<String, Double>>>> lengthTuple : countForLengthSpeciesStrataYear.entrySet()) {
+ for (Map.Entry<Double, Map<String, Map<String, Map<String, Double>>>> lengthTuple : countForLengthSpeciesStrataYear.entrySet()) {
Double length = lengthTuple.getKey();
for (Map.Entry<String, Map<String, Map<String, Double>>> speciesTuple : lengthTuple.getValue().entrySet()) {
String species = speciesTuple.getKey();
@@ -2352,9 +2343,9 @@
}
}
}
- }*/
+ }
- for (double length = minLength ; length <= maxLength ; length += (halfStep) ? 0.5 : 1) {
+ /*for (double length = minLength ; length <= maxLength ; length += (halfStep) ? 0.5 : 1) {
for (String species : speciesSem) {
for (String strata : strataSem) {
for (String year : yearsSem) {
@@ -2377,7 +2368,7 @@
}
}
}
- }
+ }*/
return matrix;
}
Modified: trunk/coser-business/src/main/resources/i18n/coser-business_en_GB.properties
===================================================================
--- trunk/coser-business/src/main/resources/i18n/coser-business_en_GB.properties 2010-12-10 09:58:50 UTC (rev 387)
+++ trunk/coser-business/src/main/resources/i18n/coser-business_en_GB.properties 2010-12-10 10:34:00 UTC (rev 388)
@@ -4,6 +4,7 @@
Can't\ read\ file\ %s\ for\ category\ %s=
Can't\ read\ file\ '%s'.\ Check\ CSV\ file\ separator=
Can't\ replace\ data\ value.\ Expected\ %s\ but\ was\ %s=
+Creating\ matrix\ \:\ %d*%d*%d*%d=
Missing\ file\ %s=
Missing\ haul\ name=
Missing\ maturity\ attribute=
Modified: trunk/coser-business/src/main/resources/i18n/coser-business_fr_FR.properties
===================================================================
--- trunk/coser-business/src/main/resources/i18n/coser-business_fr_FR.properties 2010-12-10 09:58:50 UTC (rev 387)
+++ trunk/coser-business/src/main/resources/i18n/coser-business_fr_FR.properties 2010-12-10 10:34:00 UTC (rev 388)
@@ -4,6 +4,7 @@
Can't\ read\ file\ %s\ for\ category\ %s=Impossible de lire le fichier %s pour la cat\u00E9gorie %s \!
Can't\ read\ file\ '%s'.\ Check\ CSV\ file\ separator=Impossible de lire le fichier '%s'.\nMerci de v\u00E9rifier le s\u00E9parateur utilis\u00E9 est bien un point-virgule ';'
Can't\ replace\ data\ value.\ Expected\ %s\ but\ was\ %s=
+Creating\ matrix\ \:\ %d*%d*%d*%d=
Missing\ file\ %s=Fichier manquant \: %s
Missing\ haul\ name=Nom de trait manquant
Missing\ maturity\ attribute=Attribut maturit\u00E9 manquant
Modified: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/common/DataHandler.java
===================================================================
--- trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/common/DataHandler.java 2010-12-10 09:58:50 UTC (rev 387)
+++ trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/common/DataHandler.java 2010-12-10 10:34:00 UTC (rev 388)
@@ -36,14 +36,12 @@
import org.apache.commons.logging.LogFactory;
import org.nuiton.math.matrix.MatrixND;
import org.nuiton.math.matrix.viewer.MatrixViewerPanel;
-import org.nuiton.math.matrix.viewer.renderer.MatrixChartRenderer;
import org.nuiton.math.matrix.viewer.renderer.MatrixInfoTableRenderer;
import org.nuiton.widget.SwingSession;
import fr.ifremer.coser.bean.AbstractDataContainer;
import fr.ifremer.coser.bean.Project;
import fr.ifremer.coser.services.ProjectService;
-import fr.ifremer.coser.ui.control.ControlHandler;
/**
* Data application handler.
@@ -81,8 +79,8 @@
JFrame matrixViewerFrame = new JFrame(_("coser.ui.graph.lengthStructure"));
matrixViewerFrame.setName("lengthstructureframe");
MatrixViewerPanel panel = new MatrixViewerPanel();
+ panel.addMatrixRenderer(new LengthStructureMatrixRenderer());
panel.addMatrixRenderer(new MatrixInfoTableRenderer());
- panel.addMatrixRenderer(new MatrixChartRenderer());
panel.addMatrix(matrix);
matrixViewerFrame.add(panel);
matrixViewerFrame.pack();
Deleted: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/common/LengthStructureMatrixDataset.java
===================================================================
--- trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/common/LengthStructureMatrixDataset.java 2010-12-10 09:58:50 UTC (rev 387)
+++ trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/common/LengthStructureMatrixDataset.java 2010-12-10 10:34:00 UTC (rev 388)
@@ -1,66 +0,0 @@
-/*
- * #%L
- *
- *
- * $Id$
- * $HeadURL$
- * %%
- * Copyright (C) 2010 Ifremer, CodeLutin, Chatellier Eric
- * %%
- * 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 2 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-2.0.html>.
- * #L%
- */
-
-package fr.ifremer.coser.ui.common;
-
-import java.util.List;
-
-import org.nuiton.math.matrix.MatrixND;
-import org.nuiton.math.matrix.viewer.renderer.jfreechart.GraphMatrixNDDataset;
-
-/**
- * LengthStructureMatrixDataset
- *
- * @author chatellier
- * @version $Revision$
- *
- * Last update : $Date$
- * By : $Author$
- */
-public class LengthStructureMatrixDataset extends GraphMatrixNDDataset {
-
- /** serialVersionUID. */
- private static final long serialVersionUID = 6859245574029509304L;
-
- protected List<Double> categoryKeys;
-
- public LengthStructureMatrixDataset(MatrixND mat) {
- this(mat.getSemantic(1), mat.getSemantic(0), mat);
- }
-
- public LengthStructureMatrixDataset(List<?> seriesNames, List<?> categories, MatrixND mat) {
- super(seriesNames, categories, mat);
- }
-
- /*@Override
- public Number getValue(int row, int column) {
- Number number = super.getValue(row, column);
- if (number.doubleValue() < 0.1) {
- number = null;
- }
- return number;
- }*/
-
-} // GraphMatrixNDDataset
Modified: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/common/LengthStructureMatrixRenderer.java
===================================================================
--- trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/common/LengthStructureMatrixRenderer.java 2010-12-10 09:58:50 UTC (rev 387)
+++ trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/common/LengthStructureMatrixRenderer.java 2010-12-10 10:34:00 UTC (rev 388)
@@ -25,10 +25,19 @@
package fr.ifremer.coser.ui.common;
+import static org.nuiton.i18n.I18n._;
+import static org.nuiton.i18n.I18n.n_;
+
+import java.util.List;
+
import org.jfree.data.category.CategoryDataset;
+import org.jfree.data.category.DefaultCategoryDataset;
import org.nuiton.math.matrix.MatrixND;
import org.nuiton.math.matrix.viewer.renderer.MatrixChartRenderer;
+import org.nuiton.math.matrix.viewer.renderer.jfreechart.GraphMatrixNDDataset;
+import fr.ifremer.coser.CoserConstants.Category;
+
/**
* JFreeChart matrix panel renderer.
*
@@ -45,7 +54,45 @@
@Override
protected CategoryDataset getCategoryDataset(MatrixND matrix) {
- return new LengthStructureMatrixDataset(matrix);
+ return getLengthStructureDataSet(matrix);
}
+
+ protected CategoryDataset getLengthStructureDataSet(MatrixND matrix) {
+ CategoryDataset dataset = null;
+ String semantic0Name = matrix.getDimensionName(0);
+ if ("coser.business.common.length".equals(semantic0Name)) {
+ DefaultCategoryDataset defaultDataset = new DefaultCategoryDataset();
+ List<?> semantic0 = matrix.getSemantic(0);
+ double first = (Double)semantic0.get(0);
+ double last = (Double)semantic0.get(semantic0.size() - 1);
+ boolean haltStep = false;
+
+ for (Object number : semantic0) {
+ double dNumber = (Double)number;
+ if (dNumber - Math.floor(dNumber) > 0) {
+ haltStep = true;
+ break;
+ }
+ }
+
+ for (double index = first ; index <= last ; index += (haltStep) ? 0.5 : 1) {
+
+ for (Object serieSem : matrix.getSemantic(1)) {
+ Double value = null;
+
+ if (semantic0.contains(index)) {
+ value = matrix.getValue(new Object[] { index, serieSem });
+ }
+
+ defaultDataset.setValue((Number)value, (Comparable)serieSem, (Comparable)index);
+ }
+ }
+ dataset = defaultDataset;
+ }
+ else {
+ dataset = new GraphMatrixNDDataset(matrix);
+ }
+ return dataset;
+ }
}
1
0
r387 - trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection
by chatellier@users.labs.libre-entreprise.org 10 Dec '10
by chatellier@users.labs.libre-entreprise.org 10 Dec '10
10 Dec '10
Author: chatellier
Date: 2010-12-10 09:58:50 +0000 (Fri, 10 Dec 2010)
New Revision: 387
Log:
Add split pane and fix accordion pane minimum size
Modified:
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/SelectionDetailsView.jaxx
Modified: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/SelectionDetailsView.jaxx
===================================================================
--- trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/SelectionDetailsView.jaxx 2010-12-09 16:00:43 UTC (rev 386)
+++ trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/SelectionDetailsView.jaxx 2010-12-10 09:58:50 UTC (rev 387)
@@ -54,7 +54,7 @@
</BeanValidator>
<row>
- <cell weightx="1" fill="horizontal" columns="2">
+ <cell weightx="1" fill="horizontal">
<JToolBar floatable="false">
<JButton id="saveSelectionButton" text="coser.ui.selection.details.saveSelection"
icon="disk.png" onActionPerformed="getHandler().saveSelection(this)" />
@@ -65,210 +65,211 @@
</row>
<row>
<cell weightx="1" weighty="1" fill="both">
- <AccordionPane id="detailAccordionPane">
- <AccordionPaneSubPanel title="coser.ui.selection.detail.mainAccordion">
- <Table>
- <row>
- <cell anchor="west">
- <JLabel text="coser.ui.selection.details.name" />
- </cell>
- <cell weightx="1" fill="horizontal" columns="3">
- <JTextField id="detailsSelectionNameField" text="{getSelection().getName()}"
- enabled="{isCreationState()}"/>
- <javax.swing.text.Document javaBean="detailsSelectionNameField.getDocument()"
- onInsertUpdate='getSelection().setName(detailsSelectionNameField.getText())'
- onRemoveUpdate='getSelection().setName(detailsSelectionNameField.getText())' />
- </cell>
- </row>
- <row>
- <cell anchor="west">
- <JLabel text="coser.ui.selection.details.description" />
- </cell>
- <cell weightx="1" fill="horizontal" columns="3">
- <JScrollPane>
- <JTextArea id="detailsDescription" text="{getSelection().getDescription()}" rows="3" />
- </JScrollPane>
- <javax.swing.text.Document javaBean="detailsDescription.getDocument()"
- onInsertUpdate='getSelection().setDescription(detailsDescription.getText())'
- onRemoveUpdate='getSelection().setDescription(detailsDescription.getText())' />
- </cell>
- </row>
- <row>
- <cell anchor="northwest">
- <JLabel text="coser.ui.selection.details.comment" />
- </cell>
- <cell anchor="north" fill="horizontal" weighty="1" columns="3">
- <JScrollPane>
- <JTextArea id="detailsComment" rows="3" />
- <javax.swing.text.Document javaBean="detailsComment.getDocument()"
- onInsertUpdate='getSelection().setComment(detailsComment.getText())'
- onRemoveUpdate='getSelection().setComment(detailsComment.getText())' />
- </JScrollPane>
- </cell>
- </row>
- </Table>
- </AccordionPaneSubPanel>
- <AccordionPaneSubPanel title="coser.ui.selection.detail.yearAccordion">
- <Table>
- <row>
- <cell anchor="west" columns="2">
- <JLabel text="coser.ui.selection.details.dates" />
- </cell>
- </row>
- <row>
- <cell weighty="1" weightx="1" fill="both">
- <JScrollPane>
- <YearListModel id="datesListModel" />
- <JList id="datesList" model="{datesListModel}"
- selectionModel="{new CoserListSelectionModel(datesList.getSelectionModel(), datesListModel)}"
- onValueChanged="setYearsValidated(false)" />
- <ListSelectionModel id="datesListSelectionModel" javaBean="datesList.getSelectionModel()" />
- </JScrollPane>
- </cell>
- <cell anchor="south">
- <JButton id="validDatesButton" text="coser.ui.selection.details.validDates"
- onActionPerformed="getHandler().updateSelectionDateData(this);setYearsValidated(true)"
- enabled="{!isYearsValidated()}"/>
- </cell>
- </row>
- </Table>
- </AccordionPaneSubPanel>
- <AccordionPaneSubPanel title="coser.ui.selection.detail.strataAccordion">
- <Table>
- <row>
- <cell fill="horizontal">
- <JLabel id="strataLabel" text='{_("coser.ui.selection.details.strata", 0, 0)}' />
- </cell>
- </row>
- <row>
- <cell weightx="1" weighty="2" fill="both" rows="2">
- <JScrollPane>
- <StrataListModel id="strataListModel"
- onContentsChanged='strataLabel.setText(_("coser.ui.selection.details.strata", strataList.getSelectedIndices().length, strataList.getModel().getSize()))'/>
- <JList id="strataList" model="{strataListModel}"
- selectionModel="{new CoserListSelectionModel(strataList.getSelectionModel(), strataListModel)}"
- onValueChanged='setStrataValidated(false); strataLabel.setText(_("coser.ui.selection.details.strata", strataList.getSelectedIndices().length, strataList.getModel().getSize()))'/>
- </JScrollPane>
- </cell>
- <cell anchor="northeast">
- <JButton icon="map.png" toolTipText="coser.ui.selection.details.showMapTip"
- onActionPerformed='getDetailDecisionPanelLayout().show(getDetailDecisionPanel(), "ZONEMAP");' />
- </cell>
- <cell anchor="northeast">
- <JButton icon="table.png" toolTipText="coser.ui.selection.details.showSpreciesTip"
- onActionPerformed='getDetailDecisionPanelLayout().show(getDetailDecisionPanel(), "SPECIESDATA");getHandler().showSamplingEffort(this);' />
- </cell>
- </row>
- <row>
- <cell anchor="south" columns="2">
- <JButton id="validStrataButton" text="coser.ui.selection.details.validStrata"
- onActionPerformed="getHandler().strataListChanged(this);setStrataValidated(true)"
- enabled="{isYearsValidated() && !isStrataValidated()}"/>
- </cell>
- </row>
- </Table>
- </AccordionPaneSubPanel>
- <AccordionPaneSubPanel title="coser.ui.selection.detail.speciesAccordion">
- <Table>
- <row>
- <cell fill="horizontal" columns="4">
- <JLabel id="typeSpecyLabel" text='{_("coser.ui.selection.details.type", typeSpecyList.getSelectedIndices().length, typeSpecyList.getModel().getSize())}' />
- </cell>
- </row>
- <row>
- <cell fill="both" weightx="1" weighty="1" columns="2">
- <JScrollPane>
- <SpecyTypesListModel id="typeSpecyModel" constructorParams="this"
- onContentsChanged='typeSpecyLabel.setText(_("coser.ui.selection.details.type", typeSpecyList.getSelectedIndices().length, typeSpecyList.getModel().getSize()))'/>
- <JList id="typeSpecyList" model="{typeSpecyModel}"
- selectionModel="{new CoserListSelectionModel(typeSpecyList.getSelectionModel(), typeSpecyModel)}"
- enabled="{isYearsValidated() && isStrataValidated()}"
- onValueChanged='validFilterButton.setEnabled(true); typeSpecyLabel.setText(_("coser.ui.selection.details.type", typeSpecyList.getSelectedIndices().length, typeSpecyList.getModel().getSize()))' />
- </JScrollPane>
- </cell>
- <cell anchor="south" columns="2">
- <JButton id="validFilterButton" text="coser.ui.selection.details.validFilter"
- onActionPerformed="getHandler().updateSelectionSpecies(this);validFilterButton.setEnabled(false)"
- enabled="false"/>
- </cell>
- </row>
- <row>
- <cell weighty="3" fill="both" columns="4">
- <Table>
- <row>
- <cell fill="horizontal" columns="2">
- <JLabel id="filteredSpecyLabel" text='{_("coser.ui.selection.details.filteredSpecies", 0, 0)}' />
- </cell>
- <cell fill="horizontal">
- <JLabel id="selectedSpecyLabel" text='{_("coser.ui.selection.details.selectedSpecies", 0, 0)}' />
- </cell>
- </row>
- <row>
- <cell weightx="1" weighty="1" fill="both">
- <JScrollPane>
- <SpecyListModel id="filteredSpecyListModel"
- onContentsChanged='filteredSpecyLabel.setText(_("coser.ui.selection.details.filteredSpecies", filteredSpecyList.getSelectedIndices().length, filteredSpecyList.getModel().getSize()))'/>
- <JList id="filteredSpecyList" model="{filteredSpecyListModel}"
- onMouseClicked="getHandler().showFilteredSpeciesContextMenu(this, event)"
- selectionModel="{new CoserListSelectionModel(filteredSpecyList.getSelectionModel(), filteredSpecyListModel)}"
- enabled="{isYearsValidated() && isStrataValidated()}"
- onValueChanged='filteredSpecyLabel.setText(_("coser.ui.selection.details.filteredSpecies", filteredSpecyList.getSelectedIndices().length, filteredSpecyList.getModel().getSize()))' />
- <ListSelectionModel id="filteredSpecyListSelectionModel" javaBean="filteredSpecyList.getSelectionModel()" />
- </JScrollPane>
- </cell>
- <cell anchor="north">
- <Table>
- <row>
- <cell>
- <JButton icon="arrow_right.png"
- toolTipText="coser.ui.selection.details.addToSelectedListTip"
- onActionPerformed="getHandler().addSelectedFilteredSpecies(this)"
- enabled="{getFilteredSpecyList().getSelectedIndex() != -1 && isYearsValidated() && isStrataValidated()}"/>
- </cell>
- </row>
- <row>
- <cell>
- <JButton icon="arrow_left.png"
- toolTipText="coser.ui.selection.details.removeFromSelectedListTip"
- onActionPerformed="getHandler().removeSelectedSpecies(this)"
- enabled="{getSelectedSpecyList().getSelectedIndex() != -1 && isYearsValidated() && isStrataValidated()}"/>
- </cell>
- </row>
- </Table>
- </cell>
- <cell weightx="1" weighty="1" fill="both">
- <JScrollPane>
- <SpecyListModel id="selectedSpecyListModel"
- onContentsChanged='selectedSpecyLabel.setText(_("coser.ui.selection.details.selectedSpecies", selectedSpecyList.getSelectedIndices().length, selectedSpecyList.getModel().getSize()))'/>
- <JList id="selectedSpecyList" model="{selectedSpecyListModel}"
- onMouseClicked="getHandler().showSelectedSpeciesContextMenu(this, event)"
- selectionModel="{new CoserListSelectionModel(selectedSpecyList.getSelectionModel(), selectedSpecyListModel)}"
- enabled="{isYearsValidated() && isStrataValidated()}"
- onValueChanged='selectedSpecyLabel.setText(_("coser.ui.selection.details.selectedSpecies", selectedSpecyList.getSelectedIndices().length, selectedSpecyList.getModel().getSize()))'/>
- <ListSelectionModel id="selectedSpecyListSelectionModel" javaBean="selectedSpecyList.getSelectionModel()" />
- </JScrollPane>
- </cell>
- </row>
- </Table>
- </cell>
- </row>
- </Table>
- </AccordionPaneSubPanel>
- </AccordionPane>
+ <JSplitPane>
+ <AccordionPane id="detailAccordionPane" minimumSize="{new Dimension(100, 0)}">
+ <AccordionPaneSubPanel title="coser.ui.selection.detail.mainAccordion">
+ <Table>
+ <row>
+ <cell anchor="west">
+ <JLabel text="coser.ui.selection.details.name" />
+ </cell>
+ <cell weightx="1" fill="horizontal" columns="3">
+ <JTextField id="detailsSelectionNameField" text="{getSelection().getName()}"
+ enabled="{isCreationState()}"/>
+ <javax.swing.text.Document javaBean="detailsSelectionNameField.getDocument()"
+ onInsertUpdate='getSelection().setName(detailsSelectionNameField.getText())'
+ onRemoveUpdate='getSelection().setName(detailsSelectionNameField.getText())' />
+ </cell>
+ </row>
+ <row>
+ <cell anchor="west">
+ <JLabel text="coser.ui.selection.details.description" />
+ </cell>
+ <cell weightx="1" fill="horizontal" columns="3">
+ <JScrollPane>
+ <JTextArea id="detailsDescription" text="{getSelection().getDescription()}" rows="3" />
+ </JScrollPane>
+ <javax.swing.text.Document javaBean="detailsDescription.getDocument()"
+ onInsertUpdate='getSelection().setDescription(detailsDescription.getText())'
+ onRemoveUpdate='getSelection().setDescription(detailsDescription.getText())' />
+ </cell>
+ </row>
+ <row>
+ <cell anchor="northwest">
+ <JLabel text="coser.ui.selection.details.comment" />
+ </cell>
+ <cell anchor="north" fill="horizontal" weighty="1" columns="3">
+ <JScrollPane>
+ <JTextArea id="detailsComment" rows="3" />
+ <javax.swing.text.Document javaBean="detailsComment.getDocument()"
+ onInsertUpdate='getSelection().setComment(detailsComment.getText())'
+ onRemoveUpdate='getSelection().setComment(detailsComment.getText())' />
+ </JScrollPane>
+ </cell>
+ </row>
+ </Table>
+ </AccordionPaneSubPanel>
+ <AccordionPaneSubPanel title="coser.ui.selection.detail.yearAccordion">
+ <Table>
+ <row>
+ <cell anchor="west" columns="2">
+ <JLabel text="coser.ui.selection.details.dates" />
+ </cell>
+ </row>
+ <row>
+ <cell weighty="1" weightx="1" fill="both">
+ <JScrollPane>
+ <YearListModel id="datesListModel" />
+ <JList id="datesList" model="{datesListModel}"
+ selectionModel="{new CoserListSelectionModel(datesList.getSelectionModel(), datesListModel)}"
+ onValueChanged="setYearsValidated(false)" />
+ <ListSelectionModel id="datesListSelectionModel" javaBean="datesList.getSelectionModel()" />
+ </JScrollPane>
+ </cell>
+ <cell anchor="south">
+ <JButton id="validDatesButton" text="coser.ui.selection.details.validDates"
+ onActionPerformed="getHandler().updateSelectionDateData(this);setYearsValidated(true)"
+ enabled="{!isYearsValidated()}"/>
+ </cell>
+ </row>
+ </Table>
+ </AccordionPaneSubPanel>
+ <AccordionPaneSubPanel title="coser.ui.selection.detail.strataAccordion">
+ <Table>
+ <row>
+ <cell fill="horizontal">
+ <JLabel id="strataLabel" text='{_("coser.ui.selection.details.strata", 0, 0)}' />
+ </cell>
+ </row>
+ <row>
+ <cell weightx="1" weighty="2" fill="both" rows="2">
+ <JScrollPane>
+ <StrataListModel id="strataListModel"
+ onContentsChanged='strataLabel.setText(_("coser.ui.selection.details.strata", strataList.getSelectedIndices().length, strataList.getModel().getSize()))'/>
+ <JList id="strataList" model="{strataListModel}"
+ selectionModel="{new CoserListSelectionModel(strataList.getSelectionModel(), strataListModel)}"
+ onValueChanged='setStrataValidated(false); strataLabel.setText(_("coser.ui.selection.details.strata", strataList.getSelectedIndices().length, strataList.getModel().getSize()))'/>
+ </JScrollPane>
+ </cell>
+ <cell anchor="northeast">
+ <JButton icon="map.png" toolTipText="coser.ui.selection.details.showMapTip"
+ onActionPerformed='getDetailDecisionPanelLayout().show(getDetailDecisionPanel(), "ZONEMAP");' />
+ </cell>
+ <cell anchor="northeast">
+ <JButton icon="table.png" toolTipText="coser.ui.selection.details.showSpreciesTip"
+ onActionPerformed='getDetailDecisionPanelLayout().show(getDetailDecisionPanel(), "SPECIESDATA");getHandler().showSamplingEffort(this);' />
+ </cell>
+ </row>
+ <row>
+ <cell anchor="south" columns="2">
+ <JButton id="validStrataButton" text="coser.ui.selection.details.validStrata"
+ onActionPerformed="getHandler().strataListChanged(this);setStrataValidated(true)"
+ enabled="{isYearsValidated() && !isStrataValidated()}"/>
+ </cell>
+ </row>
+ </Table>
+ </AccordionPaneSubPanel>
+ <AccordionPaneSubPanel title="coser.ui.selection.detail.speciesAccordion">
+ <Table>
+ <row>
+ <cell fill="horizontal" columns="4">
+ <JLabel id="typeSpecyLabel" text='{_("coser.ui.selection.details.type", typeSpecyList.getSelectedIndices().length, typeSpecyList.getModel().getSize())}' />
+ </cell>
+ </row>
+ <row>
+ <cell fill="both" weightx="1" weighty="1" columns="2">
+ <JScrollPane>
+ <SpecyTypesListModel id="typeSpecyModel" constructorParams="this"
+ onContentsChanged='typeSpecyLabel.setText(_("coser.ui.selection.details.type", typeSpecyList.getSelectedIndices().length, typeSpecyList.getModel().getSize()))'/>
+ <JList id="typeSpecyList" model="{typeSpecyModel}"
+ selectionModel="{new CoserListSelectionModel(typeSpecyList.getSelectionModel(), typeSpecyModel)}"
+ enabled="{isYearsValidated() && isStrataValidated()}"
+ onValueChanged='validFilterButton.setEnabled(true); typeSpecyLabel.setText(_("coser.ui.selection.details.type", typeSpecyList.getSelectedIndices().length, typeSpecyList.getModel().getSize()))' />
+ </JScrollPane>
+ </cell>
+ <cell anchor="south" columns="2">
+ <JButton id="validFilterButton" text="coser.ui.selection.details.validFilter"
+ onActionPerformed="getHandler().updateSelectionSpecies(this);validFilterButton.setEnabled(false)"
+ enabled="false"/>
+ </cell>
+ </row>
+ <row>
+ <cell weighty="3" fill="both" columns="4">
+ <Table>
+ <row>
+ <cell fill="horizontal" columns="2">
+ <JLabel id="filteredSpecyLabel" text='{_("coser.ui.selection.details.filteredSpecies", 0, 0)}' />
+ </cell>
+ <cell fill="horizontal">
+ <JLabel id="selectedSpecyLabel" text='{_("coser.ui.selection.details.selectedSpecies", 0, 0)}' />
+ </cell>
+ </row>
+ <row>
+ <cell weightx="1" weighty="1" fill="both">
+ <JScrollPane>
+ <SpecyListModel id="filteredSpecyListModel"
+ onContentsChanged='filteredSpecyLabel.setText(_("coser.ui.selection.details.filteredSpecies", filteredSpecyList.getSelectedIndices().length, filteredSpecyList.getModel().getSize()))'/>
+ <JList id="filteredSpecyList" model="{filteredSpecyListModel}"
+ onMouseClicked="getHandler().showFilteredSpeciesContextMenu(this, event)"
+ selectionModel="{new CoserListSelectionModel(filteredSpecyList.getSelectionModel(), filteredSpecyListModel)}"
+ enabled="{isYearsValidated() && isStrataValidated()}"
+ onValueChanged='filteredSpecyLabel.setText(_("coser.ui.selection.details.filteredSpecies", filteredSpecyList.getSelectedIndices().length, filteredSpecyList.getModel().getSize()))' />
+ <ListSelectionModel id="filteredSpecyListSelectionModel" javaBean="filteredSpecyList.getSelectionModel()" />
+ </JScrollPane>
+ </cell>
+ <cell anchor="north">
+ <Table>
+ <row>
+ <cell>
+ <JButton icon="arrow_right.png"
+ toolTipText="coser.ui.selection.details.addToSelectedListTip"
+ onActionPerformed="getHandler().addSelectedFilteredSpecies(this)"
+ enabled="{getFilteredSpecyList().getSelectedIndex() != -1 && isYearsValidated() && isStrataValidated()}"/>
+ </cell>
+ </row>
+ <row>
+ <cell>
+ <JButton icon="arrow_left.png"
+ toolTipText="coser.ui.selection.details.removeFromSelectedListTip"
+ onActionPerformed="getHandler().removeSelectedSpecies(this)"
+ enabled="{getSelectedSpecyList().getSelectedIndex() != -1 && isYearsValidated() && isStrataValidated()}"/>
+ </cell>
+ </row>
+ </Table>
+ </cell>
+ <cell weightx="1" weighty="1" fill="both">
+ <JScrollPane>
+ <SpecyListModel id="selectedSpecyListModel"
+ onContentsChanged='selectedSpecyLabel.setText(_("coser.ui.selection.details.selectedSpecies", selectedSpecyList.getSelectedIndices().length, selectedSpecyList.getModel().getSize()))'/>
+ <JList id="selectedSpecyList" model="{selectedSpecyListModel}"
+ onMouseClicked="getHandler().showSelectedSpeciesContextMenu(this, event)"
+ selectionModel="{new CoserListSelectionModel(selectedSpecyList.getSelectionModel(), selectedSpecyListModel)}"
+ enabled="{isYearsValidated() && isStrataValidated()}"
+ onValueChanged='selectedSpecyLabel.setText(_("coser.ui.selection.details.selectedSpecies", selectedSpecyList.getSelectedIndices().length, selectedSpecyList.getModel().getSize()))'/>
+ <ListSelectionModel id="selectedSpecyListSelectionModel" javaBean="selectedSpecyList.getSelectionModel()" />
+ </JScrollPane>
+ </cell>
+ </row>
+ </Table>
+ </cell>
+ </row>
+ </Table>
+ </AccordionPaneSubPanel>
+ </AccordionPane>
+
+ <CardLayout id="detailDecisionPanelLayout" />
+ <JPanel id="detailDecisionPanel" layout="{detailDecisionPanelLayout}">
+ <JScrollPane id="zonesScrollPane" constraints='"ZONEMAP"'>
+ <JXImageView id="zonesMap" />
+ </JScrollPane>
+ <JScrollPane constraints='"SPECIESDATA"'>
+ <org.nuiton.math.matrix.gui.MatrixPanelEditor id="matrixPanelEditor" />
+ </JScrollPane>
+ <JScrollPane constraints='"SPECIESGRAPH"'>
+ <JPanel id="speciesGraphPanel" layout="{new GridBagLayout()}"/>
+ </JScrollPane>
+ </JPanel>
+ </JSplitPane>
</cell>
- <cell weightx="3" weighty="1" fill="both">
- <CardLayout id="detailDecisionPanelLayout" />
- <JPanel id="detailDecisionPanel" layout="{detailDecisionPanelLayout}">
- <JScrollPane id="zonesScrollPane" constraints='"ZONEMAP"'>
- <JXImageView id="zonesMap" />
- </JScrollPane>
- <JScrollPane constraints='"SPECIESDATA"'>
- <org.nuiton.math.matrix.gui.MatrixPanelEditor id="matrixPanelEditor" />
- </JScrollPane>
- <JScrollPane constraints='"SPECIESGRAPH"'>
- <JPanel id="speciesGraphPanel" layout="{new GridBagLayout()}"/>
- </JScrollPane>
- </JPanel>
- </cell>
</row>
</Table>
1
0
r386 - trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection
by chatellier@users.labs.libre-entreprise.org 09 Dec '10
by chatellier@users.labs.libre-entreprise.org 09 Dec '10
09 Dec '10
Author: chatellier
Date: 2010-12-09 16:00:43 +0000 (Thu, 09 Dec 2010)
New Revision: 386
Log:
Add tooltip text
Modified:
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/SelectionListsView.jaxx
Modified: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/SelectionListsView.jaxx
===================================================================
--- trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/SelectionListsView.jaxx 2010-12-09 15:58:14 UTC (rev 385)
+++ trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/SelectionListsView.jaxx 2010-12-09 16:00:43 UTC (rev 386)
@@ -91,7 +91,8 @@
</JPanel>
</cell>
<cell columns="2">
- <JButton icon="chart_bar.png" onActionPerformed="getHandler().displayLengthStructureGraph(this)" />
+ <JButton icon="chart_bar.png" toolTipText="coser.ui.graph.lengthStructure"
+ onActionPerformed="getHandler().displayLengthStructureGraph(this)" />
</cell>
<cell />
<cell />
1
0
r385 - in trunk/coser-ui/src/main: java/fr/ifremer/coser java/fr/ifremer/coser/ui resources/i18n
by chatellier@users.labs.libre-entreprise.org 09 Dec '10
by chatellier@users.labs.libre-entreprise.org 09 Dec '10
09 Dec '10
Author: chatellier
Date: 2010-12-09 15:58:14 +0000 (Thu, 09 Dec 2010)
New Revision: 385
Log:
Add link to website
Modified:
trunk/coser-ui/src/main/java/fr/ifremer/coser/CoserConfig.java
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/CoserFrame.jaxx
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/CoserFrameHandler.java
trunk/coser-ui/src/main/resources/i18n/coser-ui_en_GB.properties
trunk/coser-ui/src/main/resources/i18n/coser-ui_fr_FR.properties
Modified: trunk/coser-ui/src/main/java/fr/ifremer/coser/CoserConfig.java
===================================================================
--- trunk/coser-ui/src/main/java/fr/ifremer/coser/CoserConfig.java 2010-12-09 15:58:01 UTC (rev 384)
+++ trunk/coser-ui/src/main/java/fr/ifremer/coser/CoserConfig.java 2010-12-09 15:58:14 UTC (rev 385)
@@ -95,6 +95,11 @@
return result;
}
+ public String getWebsiteURL() {
+ String result = getOption(CoserOption.WEBSITE_URL.key);
+ return result;
+ }
+
public static enum CoserOption implements OptionDef {
CONFIG_FILE(CONFIG_FILE_NAME, _("coser.config.config.file.description"), "coser.properties", String.class, true, true),
@@ -102,7 +107,8 @@
LOOKANDFEEL("coser.lookandfeel", _("coser.config.lookandfeel.description"), "Nimbus", String.class, false, false),
APPLICATION_VERSION("coser.application.version", _("coser.config.application.version.description"), null, String.class, false, false),
SMTP_HOST("coser.smtp.host", _("coser.config.smtp.host.description"), "smtp", String.class, false, false),
- SUPPORT_EMAIL("coser.support.email", _("coser.config.support.email.description"), "support at codelutin.com", String.class, false, false);
+ SUPPORT_EMAIL("coser.support.email", _("coser.config.support.email.description"), "support at codelutin.com", String.class, false, false),
+ WEBSITE_URL("coser.website", _("coser.config.website.description"), "http://coser.labs.libre-entreprise.org/", String.class, false, false);
protected String key;
protected String description;
Modified: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/CoserFrame.jaxx
===================================================================
--- trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/CoserFrame.jaxx 2010-12-09 15:58:01 UTC (rev 384)
+++ trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/CoserFrame.jaxx 2010-12-09 15:58:14 UTC (rev 385)
@@ -58,6 +58,10 @@
<fr.ifremer.coser.ui.widgets.LookAndFeelViewMenuItem text="coser.ui.mainframe.menu.view.lookandfeel"
onPropertyChange="getHandler().saveLookAndFeelConfiguration(event)"/>
</JMenu>
+
+ <JMenu id='menuHelp' text="coser.ui.mainframe.menu.help">
+ <JMenuItem text="coser.ui.mainframe.menu.website" onActionPerformed="getHandler().showCoserWebsite()"/>
+ </JMenu>
</JMenuBar>
<JPanel id="mainViewContent" layout="{new BorderLayout()}" constraints="BorderLayout.CENTER">
Modified: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/CoserFrameHandler.java
===================================================================
--- trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/CoserFrameHandler.java 2010-12-09 15:58:01 UTC (rev 384)
+++ trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/CoserFrameHandler.java 2010-12-09 15:58:14 UTC (rev 385)
@@ -28,8 +28,11 @@
import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.Cursor;
+import java.awt.Desktop;
import java.beans.PropertyChangeEvent;
import java.io.File;
+import java.io.IOException;
+import java.net.URI;
import java.net.URL;
import java.util.HashMap;
import java.util.Locale;
@@ -206,6 +209,19 @@
}
/**
+ * Open default system browser to coser website.
+ */
+ public void showCoserWebsite() {
+ CoserConfig config = view.getContextValue(CoserConfig.class);
+ URI uri = URI.create(config.getWebsiteURL());
+ try {
+ Desktop.getDesktop().browse(uri);
+ } catch (IOException ex) {
+ throw new CoserException("Can't open system browser", ex);
+ }
+ }
+
+ /**
* Affiche la fenetre de configuration des validateurs personnel de
* l'utilisateur.
*/
Modified: trunk/coser-ui/src/main/resources/i18n/coser-ui_en_GB.properties
===================================================================
--- trunk/coser-ui/src/main/resources/i18n/coser-ui_en_GB.properties 2010-12-09 15:58:01 UTC (rev 384)
+++ trunk/coser-ui/src/main/resources/i18n/coser-ui_en_GB.properties 2010-12-09 15:58:14 UTC (rev 385)
@@ -10,6 +10,7 @@
coser.config.lookandfeel.description=Application's swing theme
coser.config.smtp.host.description=SMTP host address
coser.config.support.email.description=Support email address
+coser.config.website.description=Coser website
coser.ui.common.cancel=Cancel
coser.ui.common.comment=Comment
coser.ui.common.selectAll=Select all
@@ -77,6 +78,7 @@
coser.ui.mainframe.menu.data.summary=Summary
coser.ui.mainframe.menu.editProject=Edit project
coser.ui.mainframe.menu.file=File
+coser.ui.mainframe.menu.help=Help
coser.ui.mainframe.menu.locale.fr=Fran\u00E7ais
coser.ui.mainframe.menu.locale.uk=English
coser.ui.mainframe.menu.newProject=New project
@@ -86,6 +88,7 @@
coser.ui.mainframe.menu.validators=Controls
coser.ui.mainframe.menu.view=View
coser.ui.mainframe.menu.view.lookandfeel=Look and feel
+coser.ui.mainframe.menu.website=Online help
coser.ui.mainview.title=Contr\u00F4le et S\u00E9lection RSufi
coser.ui.project.catchFile=Catch file \:
coser.ui.project.createProject=Create project
Modified: trunk/coser-ui/src/main/resources/i18n/coser-ui_fr_FR.properties
===================================================================
--- trunk/coser-ui/src/main/resources/i18n/coser-ui_fr_FR.properties 2010-12-09 15:58:01 UTC (rev 384)
+++ trunk/coser-ui/src/main/resources/i18n/coser-ui_fr_FR.properties 2010-12-09 15:58:14 UTC (rev 385)
@@ -10,6 +10,7 @@
coser.config.lookandfeel.description=Themes graphique Swing de l'application
coser.config.smtp.host.description=Adresse du serveur SMTP pour envoyer les mails
coser.config.support.email.description=Adresse de support pour l'envoi des erreurs
+coser.config.website.description=Site internet de Coser
coser.ui.common.cancel=Annuler
coser.ui.common.comment=Commentaire
coser.ui.common.selectAll=S\u00E9lectionner tout
@@ -77,6 +78,7 @@
coser.ui.mainframe.menu.data.summary=R\u00E9sum\u00E9
coser.ui.mainframe.menu.editProject=Modifier le projet
coser.ui.mainframe.menu.file=Fichier
+coser.ui.mainframe.menu.help=Aide
coser.ui.mainframe.menu.locale.fr=Fran\u00E7ais
coser.ui.mainframe.menu.locale.uk=English
coser.ui.mainframe.menu.newProject=Nouveau projet
@@ -86,6 +88,7 @@
coser.ui.mainframe.menu.validators=Contr\u00F4les
coser.ui.mainframe.menu.view=Vue
coser.ui.mainframe.menu.view.lookandfeel=Th\u00E8me
+coser.ui.mainframe.menu.website=Aide en ligne
coser.ui.mainview.title=Contr\u00F4le et S\u00E9lection RSufi
coser.ui.project.catchFile=Fichier de captures \:
coser.ui.project.createProject=Cr\u00E9er le projet
1
0
r384 - in trunk/coser-ui/src/main/java/fr/ifremer/coser/ui: common control selection
by chatellier@users.labs.libre-entreprise.org 09 Dec '10
by chatellier@users.labs.libre-entreprise.org 09 Dec '10
09 Dec '10
Author: chatellier
Date: 2010-12-09 15:58:01 +0000 (Thu, 09 Dec 2010)
New Revision: 384
Log:
Display length structures graphs in L3
Modified:
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/common/DataHandler.java
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/control/ControlHandler.java
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/SelectionHandler.java
trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/SelectionListsView.jaxx
Modified: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/common/DataHandler.java
===================================================================
--- trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/common/DataHandler.java 2010-12-09 14:30:24 UTC (rev 383)
+++ trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/common/DataHandler.java 2010-12-09 15:58:01 UTC (rev 384)
@@ -25,9 +25,24 @@
package fr.ifremer.coser.ui.common;
+import static org.nuiton.i18n.I18n._;
+
+import java.awt.Component;
+
+import javax.swing.JFrame;
+import javax.swing.SwingUtilities;
+
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import org.nuiton.math.matrix.MatrixND;
+import org.nuiton.math.matrix.viewer.MatrixViewerPanel;
+import org.nuiton.math.matrix.viewer.renderer.MatrixChartRenderer;
+import org.nuiton.math.matrix.viewer.renderer.MatrixInfoTableRenderer;
+import org.nuiton.widget.SwingSession;
+import fr.ifremer.coser.bean.AbstractDataContainer;
+import fr.ifremer.coser.bean.Project;
+import fr.ifremer.coser.services.ProjectService;
import fr.ifremer.coser.ui.control.ControlHandler;
/**
@@ -41,6 +56,44 @@
*/
public class DataHandler extends CommonHandler {
- private static final Log log = LogFactory.getLog(ControlHandler.class);
+ private static final Log log = LogFactory.getLog(DataHandler.class);
+ /**
+ * Display lengthStructure matrix in matrixviewerpanel.
+ *
+ * @param parent parent component
+ * @param session session to restore frame state
+ * @param projectService projectService
+ * @param project project
+ * @param container data container
+ */
+ public void displayLengthStructureGraph(final Component parent, final SwingSession session,
+ final ProjectService projectService, final Project project, final AbstractDataContainer container) {
+ SwingUtilities.invokeLater(new Runnable() {
+ public void run() {
+ try {
+ setWaitCursor(parent);
+
+ // get matrix
+ MatrixND matrix = projectService.getLengthStructure(project, container);
+
+ // display matrix viewer component
+ JFrame matrixViewerFrame = new JFrame(_("coser.ui.graph.lengthStructure"));
+ matrixViewerFrame.setName("lengthstructureframe");
+ MatrixViewerPanel panel = new MatrixViewerPanel();
+ panel.addMatrixRenderer(new MatrixInfoTableRenderer());
+ panel.addMatrixRenderer(new MatrixChartRenderer());
+ panel.addMatrix(matrix);
+ matrixViewerFrame.add(panel);
+ matrixViewerFrame.pack();
+ matrixViewerFrame.setLocationRelativeTo(parent);
+ session.add(matrixViewerFrame); // session restore
+ matrixViewerFrame.setVisible(true);
+ }
+ finally {
+ setDefaultCursor(parent);
+ }
+ }
+ });
+ }
}
Modified: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/control/ControlHandler.java
===================================================================
--- trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/control/ControlHandler.java 2010-12-09 14:30:24 UTC (rev 383)
+++ trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/control/ControlHandler.java 2010-12-09 15:58:01 UTC (rev 384)
@@ -862,42 +862,15 @@
}
/**
- * Display data graph, initialized with graph for first specy
- * selected in specyComboModel.
+ * Display lengthStructure matrix in matrixviewerpanel.
*
* @param view view
*/
- public void displayLengthStructureGraph(final ControlView view) {
- final Project project = view.getContextValue(Project.class);
- final ProjectService projectService = view.getContextValue(ProjectService.class);
- final SwingSession session = view.getContextValue(SwingSession.class);
-
- SwingUtilities.invokeLater(new Runnable() {
- public void run() {
- try {
- setWaitCursor(view);
-
- // get matrix
- MatrixND matrix = projectService.getLengthStructure(project, project.getControl());
-
- // display matrix viewer component
- JFrame matrixViewerFrame = new JFrame(_("coser.ui.graph.lengthStructure"));
- matrixViewerFrame.setName("lengthstructureframe");
- MatrixViewerPanel panel = new MatrixViewerPanel();
- panel.addMatrixRenderer(new MatrixInfoTableRenderer());
- panel.addMatrixRenderer(new MatrixChartRenderer());
- panel.addMatrix(matrix);
- matrixViewerFrame.add(panel);
- matrixViewerFrame.pack();
- matrixViewerFrame.setLocationRelativeTo(view);
- session.add(matrixViewerFrame); // session restore
- matrixViewerFrame.setVisible(true);
- }
- finally {
- setDefaultCursor(view);
- }
- }
- });
+ public void displayLengthStructureGraph(ControlView view) {
+ Project project = view.getContextValue(Project.class);
+ ProjectService projectService = view.getContextValue(ProjectService.class);
+ SwingSession session = view.getContextValue(SwingSession.class);
+ displayLengthStructureGraph(view, session, projectService, project, project.getControl());
}
/**
Modified: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/SelectionHandler.java
===================================================================
--- trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/SelectionHandler.java 2010-12-09 14:30:24 UTC (rev 383)
+++ trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/SelectionHandler.java 2010-12-09 15:58:01 UTC (rev 384)
@@ -59,6 +59,7 @@
import org.jfree.chart.JFreeChart;
import org.nuiton.math.matrix.MatrixND;
import org.nuiton.math.matrix.gui.MatrixTableModelND;
+import org.nuiton.widget.SwingSession;
import fr.ifremer.coser.CoserBusinessException;
import fr.ifremer.coser.CoserException;
@@ -68,6 +69,7 @@
import fr.ifremer.coser.services.ProjectService;
import fr.ifremer.coser.services.PublicationService;
import fr.ifremer.coser.ui.common.DataHandler;
+import fr.ifremer.coser.ui.control.ControlView;
import fr.ifremer.coser.ui.result.SelectionAddResultDialog;
import fr.ifremer.coser.ui.selection.model.OccurrenceDensitySpecyListModel;
import fr.ifremer.coser.ui.util.CoserListSelectionModel;
@@ -752,6 +754,19 @@
}
/**
+ * Display lengthStructure matrix in matrixviewerpanel.
+ *
+ * @param view view
+ */
+ public void displayLengthStructureGraph(SelectionListsView view) {
+ ProjectService projectService = view.getContextValue(ProjectService.class);
+ Project project = view.getContextValue(Project.class);
+ Selection selection = view.getContextValue(Selection.class);
+ SwingSession session = view.getContextValue(SwingSession.class);
+ displayLengthStructureGraph(view, session, projectService, project, selection);
+ }
+
+ /**
* Ajout les especes filtrées selectionnées dans la liste des especes
* selectionnées.
*
Modified: trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/SelectionListsView.jaxx
===================================================================
--- trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/SelectionListsView.jaxx 2010-12-09 14:30:24 UTC (rev 383)
+++ trunk/coser-ui/src/main/java/fr/ifremer/coser/ui/selection/SelectionListsView.jaxx 2010-12-09 15:58:01 UTC (rev 384)
@@ -91,7 +91,7 @@
</JPanel>
</cell>
<cell columns="2">
- <JButton icon="chart_bar.png" />
+ <JButton icon="chart_bar.png" onActionPerformed="getHandler().displayLengthStructureGraph(this)" />
</cell>
<cell />
<cell />
1
0