Buix-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
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2005 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2004 -----
- December
- November
- October
- September
- August
April 2008
- 1 participants
- 373 discussions
r403 - in trunk/lutinvcs: lutinvcs-core/src/main/resources/i18n lutinvcs-ui-jaxx lutinvcs-ui-pre-jaxx lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui lutinvcs-ui-pre-jaxx/src/main/resources/i18n
by tchemit@users.labs.libre-entreprise.org 06 Apr '08
by tchemit@users.labs.libre-entreprise.org 06 Apr '08
06 Apr '08
Author: tchemit
Date: 2008-04-06 13:18:58 +0000 (Sun, 06 Apr 2008)
New Revision: 403
Added:
trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/resources/i18n/lutinvcs-ui-pre-jaxx-en_GB.properties
Modified:
trunk/lutinvcs/lutinvcs-core/src/main/resources/i18n/lutinvcs-core-en_GB.properties
trunk/lutinvcs/lutinvcs-core/src/main/resources/i18n/lutinvcs-core-fr_FR.properties
trunk/lutinvcs/lutinvcs-ui-jaxx/pom.xml
trunk/lutinvcs/lutinvcs-ui-pre-jaxx/
trunk/lutinvcs/lutinvcs-ui-pre-jaxx/pom.xml
trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/VCSInitializer.java
trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/resources/i18n/lutinvcs-ui-pre-jaxx-fr_FR.properties
Log:
new module : ui-pre-jaxx
Modified: trunk/lutinvcs/lutinvcs-core/src/main/resources/i18n/lutinvcs-core-en_GB.properties
===================================================================
--- trunk/lutinvcs/lutinvcs-core/src/main/resources/i18n/lutinvcs-core-en_GB.properties 2008-04-06 13:08:15 UTC (rev 402)
+++ trunk/lutinvcs/lutinvcs-core/src/main/resources/i18n/lutinvcs-core-en_GB.properties 2008-04-06 13:18:58 UTC (rev 403)
@@ -1,4 +1 @@
lutinvcs.error.thread.action=
-lutinvcs.file=File
-lutinvcs.module=Module
-lutinvcs.status=Status
Modified: trunk/lutinvcs/lutinvcs-core/src/main/resources/i18n/lutinvcs-core-fr_FR.properties
===================================================================
--- trunk/lutinvcs/lutinvcs-core/src/main/resources/i18n/lutinvcs-core-fr_FR.properties 2008-04-06 13:08:15 UTC (rev 402)
+++ trunk/lutinvcs/lutinvcs-core/src/main/resources/i18n/lutinvcs-core-fr_FR.properties 2008-04-06 13:18:58 UTC (rev 403)
@@ -1,4 +1 @@
lutinvcs.error.thread.action=
-lutinvcs.file=Fichier
-lutinvcs.module=Module
-lutinvcs.status=Status
Modified: trunk/lutinvcs/lutinvcs-ui-jaxx/pom.xml
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-jaxx/pom.xml 2008-04-06 13:08:15 UTC (rev 402)
+++ trunk/lutinvcs/lutinvcs-ui-jaxx/pom.xml 2008-04-06 13:18:58 UTC (rev 403)
@@ -60,7 +60,7 @@
</dependency-->
<dependency>
<groupId>lutinlib.vcs</groupId>
- <artifactId>lutinvcs-core</artifactId>
+ <artifactId>lutinvcs-ui-pre-jaxx</artifactId>
<scope>compile</scope>
<version>${current.version}</version>
</dependency>
Property changes on: trunk/lutinvcs/lutinvcs-ui-pre-jaxx
___________________________________________________________________
Name: svn:ignore
+ target
Modified: trunk/lutinvcs/lutinvcs-ui-pre-jaxx/pom.xml
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-pre-jaxx/pom.xml 2008-04-06 13:08:15 UTC (rev 402)
+++ trunk/lutinvcs/lutinvcs-ui-pre-jaxx/pom.xml 2008-04-06 13:18:58 UTC (rev 403)
@@ -39,7 +39,7 @@
<dependencies>
<dependency>
<groupId>lutinlib.vcs</groupId>
- <artifactId>lutinvcs-api</artifactId>
+ <artifactId>lutinvcs-core</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
Modified: trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/VCSInitializer.java
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/VCSInitializer.java 2008-04-06 13:08:15 UTC (rev 402)
+++ trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/VCSInitializer.java 2008-04-06 13:18:58 UTC (rev 403)
@@ -31,11 +31,12 @@
Introspector.setBeanInfoSearchPath(newSearchPath);
- TagManager.registerTag("org.codelutin.vcs.ui.*", "JVCSPopup", new DefaultObjectHandler(ClassDescriptorLoader.getClassDescriptor(JPopupMenuHandler.class)));
+ //TagManager.registerTag("org.codelutin.vcs.ui.*", "JVCSPopup", new jaxx.tags.DefaultObjectHandler(ClassDescriptorLoader.getClassDescriptor(JPopupMenuHandler.class)));
- TagManager.registerBean(ClassDescriptorLoader.getClassDescriptor(AbstractSynchUI.class), JWindowHandler.class);
TagManager.registerBean(ClassDescriptorLoader.getClassDescriptor(AbstractVCSPopup.class), JPopupMenuHandler.class);
+ TagManager.registerBean(ClassDescriptorLoader.getClassDescriptor(AbstractSynchUI.class), JWindowHandler.class);
+
//TagManager.registerBean(ClassDescriptorLoader.getClassDescriptor(AbstractUI.class), JDialog.class);
//TagManager.registerDefaultNamespace("AbstractUI", "javax.swing.*");
Added: trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/resources/i18n/lutinvcs-ui-pre-jaxx-en_GB.properties
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/resources/i18n/lutinvcs-ui-pre-jaxx-en_GB.properties (rev 0)
+++ trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/resources/i18n/lutinvcs-ui-pre-jaxx-en_GB.properties 2008-04-06 13:18:58 UTC (rev 403)
@@ -0,0 +1,3 @@
+lutinvcs.file=File
+lutinvcs.module=Module
+lutinvcs.status=Status
Modified: trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/resources/i18n/lutinvcs-ui-pre-jaxx-fr_FR.properties
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/resources/i18n/lutinvcs-ui-pre-jaxx-fr_FR.properties 2008-04-06 13:08:15 UTC (rev 402)
+++ trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/resources/i18n/lutinvcs-ui-pre-jaxx-fr_FR.properties 2008-04-06 13:18:58 UTC (rev 403)
@@ -1,4 +1,3 @@
-lutinvcs.error.thread.action=
lutinvcs.file=Fichier
lutinvcs.module=Module
lutinvcs.status=Status
1
0
r402 - trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs
by tchemit@users.labs.libre-entreprise.org 06 Apr '08
by tchemit@users.labs.libre-entreprise.org 06 Apr '08
06 Apr '08
Author: tchemit
Date: 2008-04-06 13:08:15 +0000 (Sun, 06 Apr 2008)
New Revision: 402
Removed:
trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/
Log:
new module : ui-pre-jaxx
1
0
r401 - in trunk/lutinvcs: lutinvcs-core/src/main/java/org/codelutin/vcs/ui lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui
by tchemit@users.labs.libre-entreprise.org 06 Apr '08
by tchemit@users.labs.libre-entreprise.org 06 Apr '08
06 Apr '08
Author: tchemit
Date: 2008-04-06 13:07:44 +0000 (Sun, 06 Apr 2008)
New Revision: 401
Added:
trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/package.html
Removed:
trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/package.html
Log:
new module : ui-pre-jaxx
Deleted: trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/package.html
===================================================================
--- trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/package.html 2008-04-06 13:07:15 UTC (rev 400)
+++ trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/package.html 2008-04-06 13:07:44 UTC (rev 401)
@@ -1,6 +0,0 @@
-<html>
-<body>
-<h1>Lutin vcs ui package</h1>
-TODO
-</body>
-</html>
\ No newline at end of file
Copied: trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/package.html (from rev 398, trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/package.html)
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/package.html (rev 0)
+++ trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/package.html 2008-04-06 13:07:44 UTC (rev 401)
@@ -0,0 +1,6 @@
+<html>
+<body>
+<h1>Lutin vcs ui package</h1>
+TODO
+</body>
+</html>
\ No newline at end of file
1
0
r400 - in trunk/lutinvcs: lutinvcs-core/src/main/java/org/codelutin/vcs/ui lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui
by tchemit@users.labs.libre-entreprise.org 06 Apr '08
by tchemit@users.labs.libre-entreprise.org 06 Apr '08
06 Apr '08
Author: tchemit
Date: 2008-04-06 13:07:15 +0000 (Sun, 06 Apr 2008)
New Revision: 400
Added:
trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/AbstractDiffUI.java
trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/AbstractSynchUI.java
trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/AbstractTabUI.java
trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/AbstractUI.java
trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/AbstractVCSPopup.java
trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/UIHelper.java
trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/VCSInitializer.java
trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/VCSUIConstants.java
Removed:
trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/AbstractDiffUI.java
trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/AbstractSynchUI.java
trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/AbstractTabUI.java
trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/AbstractUI.java
trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/AbstractVCSPopup.java
trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/UIHelper.java
trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/VCSInitializer.java
trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/VCSUIConstants.java
Log:
new module : ui-pre-jaxx
Deleted: trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/AbstractDiffUI.java
===================================================================
--- trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/AbstractDiffUI.java 2008-04-06 13:06:51 UTC (rev 399)
+++ trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/AbstractDiffUI.java 2008-04-06 13:07:15 UTC (rev 400)
@@ -1,64 +0,0 @@
-/**
- * # #% Copyright (C) 2008 Code Lutin, Tony Chemit
- * 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, write to the Free Software Foundation, Inc., 59 Temple Place
- * - Suite 330, Boston, MA 02111-1307, USA.
- * # #%
- */
-package org.codelutin.vcs.ui;
-
-import org.codelutin.vcs.type.VCSAction;
-import org.codelutin.vcs.ui.handler.AbstractDiffUIHandler;
-import org.codelutin.vcs.ui.handler.AbstractTabUIHandler;
-import org.codelutin.vcs.ui.model.AbstractTabUIModel;
-import org.codelutin.vcs.ui.model.DiffUIModel;
-
-import javax.swing.JButton;
-import javax.swing.JTable;
-
-/** @author chemit */
-public abstract class AbstractDiffUI extends AbstractTabUI {
-
- public abstract JButton getNextDiff();
-
- public abstract JButton getPreviousDiff();
-
- public AbstractDiffUI() {
- super();
- }
-
- public AbstractDiffUI(AbstractTabUIHandler handler, AbstractTabUIModel model) {
- super(handler, model);
- }
-
- public DiffUIModel getModel() {
- return (DiffUIModel) model;
- }
-
- protected AbstractDiffUIHandler getHandler() {
- return (AbstractDiffUIHandler) handler;
- }
-
- protected void selectFile(JTable table) {
- getModel().setFileModel(model.getModel().getDisplayedEntries(table.getSelectionModel()).get(0));
- }
-
- protected void doAction(VCSAction action) {
- getHandler().doAction(action, getModel().getFileModel());
- }
-
- protected void gotoNextDiff() {
- getHandler().gotoNextDiff();
- }
-
- protected void gotoPreviousDiff() {
- getHandler().gotoPreviousDiff();
- }
-}
Deleted: trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/AbstractSynchUI.java
===================================================================
--- trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/AbstractSynchUI.java 2008-04-06 13:06:51 UTC (rev 399)
+++ trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/AbstractSynchUI.java 2008-04-06 13:07:15 UTC (rev 400)
@@ -1,80 +0,0 @@
-/**
- * # #% Copyright (C) 2008 Code Lutin, Tony Chemit
- * 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, write to the Free Software Foundation, Inc., 59 Temple Place
- * - Suite 330, Boston, MA 02111-1307, USA.
- * # #%
- */
-package org.codelutin.vcs.ui;
-
-import org.codelutin.vcs.type.VCSAction;
-import org.codelutin.vcs.type.VCSEntryLocation;
-import org.codelutin.vcs.ui.handler.AbstractSynchUIHandler;
-import org.codelutin.vcs.ui.model.SynchUIModel;
-
-import javax.swing.JButton;
-import java.awt.CardLayout;
-
-/** @author chemit */
-public abstract class AbstractSynchUI extends AbstractTabUI {
-
- public abstract JButton getRefreshAll();
-
- public abstract JButton getDiffAll();
-
- public abstract JButton getUpdateAll();
-
- public abstract JButton getCommitAll();
-
- public abstract JButton getRevertAll();
-
- public abstract JButton getDeleteAll();
-
- public abstract AbstractVCSPopup getAllPopup();
-
- public abstract AbstractVCSPopup getLocalPopup();
-
- public abstract AbstractVCSPopup getRemotePopup();
-
-
- public AbstractSynchUI() {
- super();
- }
-
- public AbstractSynchUI(AbstractSynchUIHandler handler, SynchUIModel model) {
- super(handler, model);
- }
-
- public SynchUIModel getModel() {
- return (SynchUIModel) model;
- }
-
- protected AbstractSynchUIHandler getHandler() {
- return (AbstractSynchUIHandler) handler;
- }
-
- protected void doAllAction(VCSAction action) {
- getModel().doAllAction(action);
- }
-
- public AbstractVCSPopup getPopup(VCSEntryLocation modelName) {
- switch (modelName) {
- case ALL:
- return getAllPopup();
- case LOCAL:
- return getLocalPopup();
- case REMOTE:
- return getRemotePopup();
- case UNKNOW:
- break;
- }
- throw new IllegalStateException("no popup found for " + modelName);
- }
-}
\ No newline at end of file
Deleted: trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/AbstractTabUI.java
===================================================================
--- trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/AbstractTabUI.java 2008-04-06 13:06:51 UTC (rev 399)
+++ trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/AbstractTabUI.java 2008-04-06 13:07:15 UTC (rev 400)
@@ -1,95 +0,0 @@
-/**
- * # #% Copyright (C) 2008 Code Lutin, Tony Chemit
- * 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, write to the Free Software Foundation, Inc., 59 Temple Place
- * - Suite 330, Boston, MA 02111-1307, USA.
- * # #%
- */
-package org.codelutin.vcs.ui;
-
-import org.codelutin.vcs.type.VCSEntryLocation;
-import org.codelutin.vcs.ui.handler.AbstractTabUIHandler;
-import org.codelutin.vcs.ui.model.AbstractTabUIModel;
-
-import javax.swing.JPanel;
-import javax.swing.JScrollPane;
-import javax.swing.JTable;
-import javax.swing.JToggleButton;
-import java.awt.CardLayout;
-
-/** @author chemit */
-public abstract class AbstractTabUI extends AbstractUI {
-
- public abstract JToggleButton getAllTab();
-
- public abstract JToggleButton getLocalTab();
-
- public abstract JToggleButton getRemoteTab();
-
- public abstract JScrollPane getAllContent();
-
- public abstract JScrollPane getLocalContent();
-
- public abstract JScrollPane getRemoteContent();
-
- public abstract JTable getAllTable();
-
- public abstract JTable getLocalTable();
-
- public abstract JTable getRemoteTable();
-
- public abstract JPanel getPreview();
-
- public abstract CardLayout getCardLayout();
-
- public AbstractTabUI(AbstractTabUIHandler handler, AbstractTabUIModel model) {
- super(handler, model);
- }
-
- public AbstractTabUI() {
- // for jaxx but never used
- super();
- }
-
- public AbstractTabUIModel getModel() {
- return (AbstractTabUIModel) model;
- }
-
- protected AbstractTabUIHandler getHandler() {
- return (AbstractTabUIHandler) handler;
- }
-
- @Override
- public void setVisible(boolean b) {
- if (handler.getLocation() == VCSEntryLocation.UNKNOW) {
- // first launch, no tab model selected,choose one
- getAllTab().doClick();
- }
- super.setVisible(b);
- }
-
- public JTable getTable(VCSEntryLocation modelName) {
- switch (modelName) {
- case ALL:
- return getAllTable();
- case LOCAL:
- return getLocalTable();
- case REMOTE:
- return getRemoteTable();
- case UNKNOW:
- break;
- }
- throw new IllegalStateException("no table found for " + modelName);
- }
-
- protected void setLocation(VCSEntryLocation location) {
- getModel().setLocation(location);
- }
-}
Deleted: trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/AbstractUI.java
===================================================================
--- trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/AbstractUI.java 2008-04-06 13:06:51 UTC (rev 399)
+++ trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/AbstractUI.java 2008-04-06 13:07:15 UTC (rev 400)
@@ -1,47 +0,0 @@
-/**
- * # #% Copyright (C) 2008 Code Lutin, Tony Chemit
- * 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, write to the Free Software Foundation, Inc., 59 Temple Place
- * - Suite 330, Boston, MA 02111-1307, USA.
- * # #%
- */
-package org.codelutin.vcs.ui;
-
-import org.codelutin.vcs.ui.handler.AbstractUIHandler;
-import org.codelutin.vcs.ui.model.AbstractUIModel;
-
-/** @author chemit */
-public class AbstractUI extends javax.swing.JDialog {
-
- protected final AbstractUIModel model;
-
- protected final AbstractUIHandler handler;
-
- public AbstractUI() {
- // Jaxx always generate the default constructor, so need it, but DO NOT USE IT!
- throw new IllegalStateException("the default constructor can NOT be used!");
- }
-
- public AbstractUI(AbstractUIHandler handler, AbstractUIModel model) {
- this.handler = handler;
- this.model = model;
- UIHelper.setQuitAction(this);
- }
-
- public AbstractUIModel getModel() {
- return model;
- }
-
- protected AbstractUIHandler getHandler() {
- return handler;
- }
-
-
-}
Deleted: trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/AbstractVCSPopup.java
===================================================================
--- trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/AbstractVCSPopup.java 2008-04-06 13:06:51 UTC (rev 399)
+++ trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/AbstractVCSPopup.java 2008-04-06 13:07:15 UTC (rev 400)
@@ -1,48 +0,0 @@
-/**
- * # #% Copyright (C) 2008 Code Lutin, Tony Chemit
- * 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, write to the Free Software Foundation, Inc., 59 Temple Place
- * - Suite 330, Boston, MA 02111-1307, USA.
- * # #%
- */
-package org.codelutin.vcs.ui;
-
-import org.codelutin.vcs.ui.handler.VCSAbsractAction;
-import org.codelutin.vcs.type.VCSAction;
-
-import javax.swing.JMenuItem;
-import java.awt.event.ActionEvent;
-
-/** @author chemit */
-public abstract class AbstractVCSPopup extends javax.swing.JPopupMenu {/* begin raw body code */
- protected VCSAbsractAction dispatchAction;
-
- public abstract JMenuItem getRefresh();
-
- public abstract JMenuItem getDiff();
-
- public abstract JMenuItem getUpdate();
-
- public abstract JMenuItem getCommit();
-
- public abstract JMenuItem getRevert();
-
- public abstract JMenuItem getDelete();
-
- protected void setDispatchAction(VCSAbsractAction action) {
- this.dispatchAction = action;
- }
-
- protected void doAction(VCSAction action, JMenuItem item) {
- dispatchAction.setAction(action);
- ActionEvent e = new ActionEvent(item, 1, action.name());
- dispatchAction.actionPerformed(e);
- }
-}
Deleted: trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/UIHelper.java
===================================================================
--- trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/UIHelper.java 2008-04-06 13:06:51 UTC (rev 399)
+++ trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/UIHelper.java 2008-04-06 13:07:15 UTC (rev 400)
@@ -1,45 +0,0 @@
-/**
- * # #% Copyright (C) 2008 Code Lutin, Tony Chemit
- * 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, write to the Free Software Foundation, Inc., 59 Temple Place
- * - Suite 330, Boston, MA 02111-1307, USA.
- * # #%
- */
-package org.codelutin.vcs.ui;
-
-import javax.swing.JDialog;
-import javax.swing.JRootPane;
-import javax.swing.Action;
-import javax.swing.AbstractAction;
-import javax.swing.JComponent;
-import javax.swing.KeyStroke;
-import java.awt.event.ActionEvent;
-
-/**
- * UI Helper methods
- *
- * @author chemit
- */
-public class UIHelper {
- public static void setQuitAction(final JDialog ui) {
- JRootPane rootPane = ui.getRootPane();
- //rootPane.setDefaultButton(accept);
-
- Action quitAction = new AbstractAction("quit") {
- private static final long serialVersionUID = -869095664995763057L;
-
- public void actionPerformed(ActionEvent e) {
- ui.dispose();
- }
- };
- rootPane.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke("ESCAPE"), "quit");
- rootPane.getActionMap().put("quit", quitAction);
- }
-}
Deleted: trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/VCSInitializer.java
===================================================================
--- trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/VCSInitializer.java 2008-04-06 13:06:51 UTC (rev 399)
+++ trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/VCSInitializer.java 2008-04-06 13:07:15 UTC (rev 400)
@@ -1,44 +0,0 @@
-/**
- * # #% Copyright (C) 2008 Code Lutin, Tony Chemit
- * 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, write to the Free Software Foundation, Inc., 59 Temple Place
- * - Suite 330, Boston, MA 02111-1307, USA.
- * # #%
- */
-package org.codelutin.vcs.ui;
-
-import jaxx.reflect.ClassDescriptorLoader;
-import jaxx.tags.TagManager;
-import jaxx.tags.swing.JPopupMenuHandler;
-import jaxx.tags.swing.JWindowHandler;
-
-import java.beans.Introspector;
-
-public class VCSInitializer implements jaxx.spi.Initializer {
-
- public void initialize() {
- String[] searchPath = Introspector.getBeanInfoSearchPath();
- String[] newSearchPath = new String[searchPath.length + 1];
- System.arraycopy(searchPath, 0, newSearchPath, 0, searchPath.length);
- newSearchPath[newSearchPath.length - 1] = "jaxx.beaninfos";
-
- Introspector.setBeanInfoSearchPath(newSearchPath);
-
- TagManager.registerTag("org.codelutin.vcs.ui.*", "JVCSPopup", new DefaultObjectHandler(ClassDescriptorLoader.getClassDescriptor(JPopupMenuHandler.class)));
-
- TagManager.registerBean(ClassDescriptorLoader.getClassDescriptor(AbstractSynchUI.class), JWindowHandler.class);
- TagManager.registerBean(ClassDescriptorLoader.getClassDescriptor(AbstractVCSPopup.class), JPopupMenuHandler.class);
-
- //TagManager.registerBean(ClassDescriptorLoader.getClassDescriptor(AbstractUI.class), JDialog.class);
-
- //TagManager.registerDefaultNamespace("AbstractUI", "javax.swing.*");
-
- }
-}
\ No newline at end of file
Deleted: trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/VCSUIConstants.java
===================================================================
--- trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/VCSUIConstants.java 2008-04-06 13:06:51 UTC (rev 399)
+++ trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/VCSUIConstants.java 2008-04-06 13:07:15 UTC (rev 400)
@@ -1,67 +0,0 @@
-/**
- * # #% Copyright (C) 2008 Code Lutin, Tony Chemit
- * 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, write to the Free Software Foundation, Inc., 59 Temple Place
- * - Suite 330, Boston, MA 02111-1307, USA.
- * # #%
- */
-package org.codelutin.vcs.ui;
-
-import static org.codelutin.i18n.I18n.n_;
-
-/** @author chemit */
-public class VCSUIConstants {
-
- /** columns names for a simple table model with module, file and status */
- public static final String[] SIMPLE_COLUMNS_NAMES = new String[]{
- n_("lutinvcs.module"),
- n_("lutinvcs.file"),
- n_("lutinvcs.status")
- };
-
- /** model name for synchronize ui */
- public static final String SYNCH_MODEL_PROPERTY = "modelSynch";
-
- /** model name for confirm ui */
- public static final String CONFIRM_MODEL_PROPERTY = "modelConfirm";
-
- /** model name for diff ui */
- public static final String DIFF_MODEL_PROPERTY = "modelConfirm";
-
- public static final String ACTION_PROPERTY_CHANGED = "action";
-
- public static final String MESSAGE_HISTORY_PROPERTY_CHANGED = "historyMessage";
-
- public static final String FILE_PROPERTY_CHANGED = "file";
-
- public static final String NEXT_DIFF_PROPERTY_CHANGED = "nextDiff";
-
- public static final String PREVIOUS_DIFF_PROPERTY_CHANGED = "previousDiff";
-
- public static final String REFRESH_PROPERTY_CHANGED = "refresh";
-
- public static final String TAB_PROPERTY_CHANGED = "tab";
-
- public static final String DIFF_ALL_PROPERTY_CHANGED = "diffAll";
-
- public static final String COMMIT_ALL_PROPERTY_CHANGED = "commitAll";
-
- public static final String UPDATE_ALL_PROPERTY_CHANGED = "updateAll";
-
- public static final String REVERT_ALL_PROPERTY_CHANGED = "revertAll";
-
- public static final String DIFF_PROPERTY_CHANGED = "diff";
-
- public static final String COMMIT_PROPERTY_CHANGED = "commit";
-
- public static final String UPDATE_PROPERTY_CHANGED = "update";
-
- public static final String REVERT_PROPERTY_CHANGED = "revert";
-}
Copied: trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/AbstractDiffUI.java (from rev 398, trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/AbstractDiffUI.java)
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/AbstractDiffUI.java (rev 0)
+++ trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/AbstractDiffUI.java 2008-04-06 13:07:15 UTC (rev 400)
@@ -0,0 +1,64 @@
+/**
+ * # #% Copyright (C) 2008 Code Lutin, Tony Chemit
+ * 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, write to the Free Software Foundation, Inc., 59 Temple Place
+ * - Suite 330, Boston, MA 02111-1307, USA.
+ * # #%
+ */
+package org.codelutin.vcs.ui;
+
+import org.codelutin.vcs.type.VCSAction;
+import org.codelutin.vcs.ui.handler.AbstractDiffUIHandler;
+import org.codelutin.vcs.ui.handler.AbstractTabUIHandler;
+import org.codelutin.vcs.ui.model.AbstractTabUIModel;
+import org.codelutin.vcs.ui.model.DiffUIModel;
+
+import javax.swing.JButton;
+import javax.swing.JTable;
+
+/** @author chemit */
+public abstract class AbstractDiffUI extends AbstractTabUI {
+
+ public abstract JButton getNextDiff();
+
+ public abstract JButton getPreviousDiff();
+
+ public AbstractDiffUI() {
+ super();
+ }
+
+ public AbstractDiffUI(AbstractTabUIHandler handler, AbstractTabUIModel model) {
+ super(handler, model);
+ }
+
+ public DiffUIModel getModel() {
+ return (DiffUIModel) model;
+ }
+
+ protected AbstractDiffUIHandler getHandler() {
+ return (AbstractDiffUIHandler) handler;
+ }
+
+ protected void selectFile(JTable table) {
+ getModel().setFileModel(model.getModel().getDisplayedEntries(table.getSelectionModel()).get(0));
+ }
+
+ protected void doAction(VCSAction action) {
+ getHandler().doAction(action, getModel().getFileModel());
+ }
+
+ protected void gotoNextDiff() {
+ getHandler().gotoNextDiff();
+ }
+
+ protected void gotoPreviousDiff() {
+ getHandler().gotoPreviousDiff();
+ }
+}
Copied: trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/AbstractSynchUI.java (from rev 398, trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/AbstractSynchUI.java)
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/AbstractSynchUI.java (rev 0)
+++ trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/AbstractSynchUI.java 2008-04-06 13:07:15 UTC (rev 400)
@@ -0,0 +1,80 @@
+/**
+ * # #% Copyright (C) 2008 Code Lutin, Tony Chemit
+ * 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, write to the Free Software Foundation, Inc., 59 Temple Place
+ * - Suite 330, Boston, MA 02111-1307, USA.
+ * # #%
+ */
+package org.codelutin.vcs.ui;
+
+import org.codelutin.vcs.type.VCSAction;
+import org.codelutin.vcs.type.VCSEntryLocation;
+import org.codelutin.vcs.ui.handler.AbstractSynchUIHandler;
+import org.codelutin.vcs.ui.model.SynchUIModel;
+
+import javax.swing.JButton;
+import java.awt.CardLayout;
+
+/** @author chemit */
+public abstract class AbstractSynchUI extends AbstractTabUI {
+
+ public abstract JButton getRefreshAll();
+
+ public abstract JButton getDiffAll();
+
+ public abstract JButton getUpdateAll();
+
+ public abstract JButton getCommitAll();
+
+ public abstract JButton getRevertAll();
+
+ public abstract JButton getDeleteAll();
+
+ public abstract AbstractVCSPopup getAllPopup();
+
+ public abstract AbstractVCSPopup getLocalPopup();
+
+ public abstract AbstractVCSPopup getRemotePopup();
+
+
+ public AbstractSynchUI() {
+ super();
+ }
+
+ public AbstractSynchUI(AbstractSynchUIHandler handler, SynchUIModel model) {
+ super(handler, model);
+ }
+
+ public SynchUIModel getModel() {
+ return (SynchUIModel) model;
+ }
+
+ protected AbstractSynchUIHandler getHandler() {
+ return (AbstractSynchUIHandler) handler;
+ }
+
+ protected void doAllAction(VCSAction action) {
+ getModel().doAllAction(action);
+ }
+
+ public AbstractVCSPopup getPopup(VCSEntryLocation modelName) {
+ switch (modelName) {
+ case ALL:
+ return getAllPopup();
+ case LOCAL:
+ return getLocalPopup();
+ case REMOTE:
+ return getRemotePopup();
+ case UNKNOW:
+ break;
+ }
+ throw new IllegalStateException("no popup found for " + modelName);
+ }
+}
\ No newline at end of file
Copied: trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/AbstractTabUI.java (from rev 398, trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/AbstractTabUI.java)
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/AbstractTabUI.java (rev 0)
+++ trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/AbstractTabUI.java 2008-04-06 13:07:15 UTC (rev 400)
@@ -0,0 +1,95 @@
+/**
+ * # #% Copyright (C) 2008 Code Lutin, Tony Chemit
+ * 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, write to the Free Software Foundation, Inc., 59 Temple Place
+ * - Suite 330, Boston, MA 02111-1307, USA.
+ * # #%
+ */
+package org.codelutin.vcs.ui;
+
+import org.codelutin.vcs.type.VCSEntryLocation;
+import org.codelutin.vcs.ui.handler.AbstractTabUIHandler;
+import org.codelutin.vcs.ui.model.AbstractTabUIModel;
+
+import javax.swing.JPanel;
+import javax.swing.JScrollPane;
+import javax.swing.JTable;
+import javax.swing.JToggleButton;
+import java.awt.CardLayout;
+
+/** @author chemit */
+public abstract class AbstractTabUI extends AbstractUI {
+
+ public abstract JToggleButton getAllTab();
+
+ public abstract JToggleButton getLocalTab();
+
+ public abstract JToggleButton getRemoteTab();
+
+ public abstract JScrollPane getAllContent();
+
+ public abstract JScrollPane getLocalContent();
+
+ public abstract JScrollPane getRemoteContent();
+
+ public abstract JTable getAllTable();
+
+ public abstract JTable getLocalTable();
+
+ public abstract JTable getRemoteTable();
+
+ public abstract JPanel getPreview();
+
+ public abstract CardLayout getCardLayout();
+
+ public AbstractTabUI(AbstractTabUIHandler handler, AbstractTabUIModel model) {
+ super(handler, model);
+ }
+
+ public AbstractTabUI() {
+ // for jaxx but never used
+ super();
+ }
+
+ public AbstractTabUIModel getModel() {
+ return (AbstractTabUIModel) model;
+ }
+
+ protected AbstractTabUIHandler getHandler() {
+ return (AbstractTabUIHandler) handler;
+ }
+
+ @Override
+ public void setVisible(boolean b) {
+ if (handler.getLocation() == VCSEntryLocation.UNKNOW) {
+ // first launch, no tab model selected,choose one
+ getAllTab().doClick();
+ }
+ super.setVisible(b);
+ }
+
+ public JTable getTable(VCSEntryLocation modelName) {
+ switch (modelName) {
+ case ALL:
+ return getAllTable();
+ case LOCAL:
+ return getLocalTable();
+ case REMOTE:
+ return getRemoteTable();
+ case UNKNOW:
+ break;
+ }
+ throw new IllegalStateException("no table found for " + modelName);
+ }
+
+ protected void setLocation(VCSEntryLocation location) {
+ getModel().setLocation(location);
+ }
+}
Copied: trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/AbstractUI.java (from rev 398, trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/AbstractUI.java)
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/AbstractUI.java (rev 0)
+++ trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/AbstractUI.java 2008-04-06 13:07:15 UTC (rev 400)
@@ -0,0 +1,47 @@
+/**
+ * # #% Copyright (C) 2008 Code Lutin, Tony Chemit
+ * 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, write to the Free Software Foundation, Inc., 59 Temple Place
+ * - Suite 330, Boston, MA 02111-1307, USA.
+ * # #%
+ */
+package org.codelutin.vcs.ui;
+
+import org.codelutin.vcs.ui.handler.AbstractUIHandler;
+import org.codelutin.vcs.ui.model.AbstractUIModel;
+
+/** @author chemit */
+public class AbstractUI extends javax.swing.JDialog {
+
+ protected final AbstractUIModel model;
+
+ protected final AbstractUIHandler handler;
+
+ public AbstractUI() {
+ // Jaxx always generate the default constructor, so need it, but DO NOT USE IT!
+ throw new IllegalStateException("the default constructor can NOT be used!");
+ }
+
+ public AbstractUI(AbstractUIHandler handler, AbstractUIModel model) {
+ this.handler = handler;
+ this.model = model;
+ UIHelper.setQuitAction(this);
+ }
+
+ public AbstractUIModel getModel() {
+ return model;
+ }
+
+ protected AbstractUIHandler getHandler() {
+ return handler;
+ }
+
+
+}
Copied: trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/AbstractVCSPopup.java (from rev 398, trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/AbstractVCSPopup.java)
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/AbstractVCSPopup.java (rev 0)
+++ trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/AbstractVCSPopup.java 2008-04-06 13:07:15 UTC (rev 400)
@@ -0,0 +1,48 @@
+/**
+ * # #% Copyright (C) 2008 Code Lutin, Tony Chemit
+ * 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, write to the Free Software Foundation, Inc., 59 Temple Place
+ * - Suite 330, Boston, MA 02111-1307, USA.
+ * # #%
+ */
+package org.codelutin.vcs.ui;
+
+import org.codelutin.vcs.ui.handler.VCSAbsractAction;
+import org.codelutin.vcs.type.VCSAction;
+
+import javax.swing.JMenuItem;
+import java.awt.event.ActionEvent;
+
+/** @author chemit */
+public abstract class AbstractVCSPopup extends javax.swing.JPopupMenu {/* begin raw body code */
+ protected VCSAbsractAction dispatchAction;
+
+ public abstract JMenuItem getRefresh();
+
+ public abstract JMenuItem getDiff();
+
+ public abstract JMenuItem getUpdate();
+
+ public abstract JMenuItem getCommit();
+
+ public abstract JMenuItem getRevert();
+
+ public abstract JMenuItem getDelete();
+
+ protected void setDispatchAction(VCSAbsractAction action) {
+ this.dispatchAction = action;
+ }
+
+ protected void doAction(VCSAction action, JMenuItem item) {
+ dispatchAction.setAction(action);
+ ActionEvent e = new ActionEvent(item, 1, action.name());
+ dispatchAction.actionPerformed(e);
+ }
+}
Copied: trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/UIHelper.java (from rev 398, trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/UIHelper.java)
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/UIHelper.java (rev 0)
+++ trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/UIHelper.java 2008-04-06 13:07:15 UTC (rev 400)
@@ -0,0 +1,45 @@
+/**
+ * # #% Copyright (C) 2008 Code Lutin, Tony Chemit
+ * 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, write to the Free Software Foundation, Inc., 59 Temple Place
+ * - Suite 330, Boston, MA 02111-1307, USA.
+ * # #%
+ */
+package org.codelutin.vcs.ui;
+
+import javax.swing.JDialog;
+import javax.swing.JRootPane;
+import javax.swing.Action;
+import javax.swing.AbstractAction;
+import javax.swing.JComponent;
+import javax.swing.KeyStroke;
+import java.awt.event.ActionEvent;
+
+/**
+ * UI Helper methods
+ *
+ * @author chemit
+ */
+public class UIHelper {
+ public static void setQuitAction(final JDialog ui) {
+ JRootPane rootPane = ui.getRootPane();
+ //rootPane.setDefaultButton(accept);
+
+ Action quitAction = new AbstractAction("quit") {
+ private static final long serialVersionUID = -869095664995763057L;
+
+ public void actionPerformed(ActionEvent e) {
+ ui.dispose();
+ }
+ };
+ rootPane.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke("ESCAPE"), "quit");
+ rootPane.getActionMap().put("quit", quitAction);
+ }
+}
Copied: trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/VCSInitializer.java (from rev 398, trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/VCSInitializer.java)
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/VCSInitializer.java (rev 0)
+++ trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/VCSInitializer.java 2008-04-06 13:07:15 UTC (rev 400)
@@ -0,0 +1,44 @@
+/**
+ * # #% Copyright (C) 2008 Code Lutin, Tony Chemit
+ * 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, write to the Free Software Foundation, Inc., 59 Temple Place
+ * - Suite 330, Boston, MA 02111-1307, USA.
+ * # #%
+ */
+package org.codelutin.vcs.ui;
+
+import jaxx.reflect.ClassDescriptorLoader;
+import jaxx.tags.TagManager;
+import jaxx.tags.swing.JPopupMenuHandler;
+import jaxx.tags.swing.JWindowHandler;
+
+import java.beans.Introspector;
+
+public class VCSInitializer implements jaxx.spi.Initializer {
+
+ public void initialize() {
+ String[] searchPath = Introspector.getBeanInfoSearchPath();
+ String[] newSearchPath = new String[searchPath.length + 1];
+ System.arraycopy(searchPath, 0, newSearchPath, 0, searchPath.length);
+ newSearchPath[newSearchPath.length - 1] = "jaxx.beaninfos";
+
+ Introspector.setBeanInfoSearchPath(newSearchPath);
+
+ TagManager.registerTag("org.codelutin.vcs.ui.*", "JVCSPopup", new DefaultObjectHandler(ClassDescriptorLoader.getClassDescriptor(JPopupMenuHandler.class)));
+
+ TagManager.registerBean(ClassDescriptorLoader.getClassDescriptor(AbstractSynchUI.class), JWindowHandler.class);
+ TagManager.registerBean(ClassDescriptorLoader.getClassDescriptor(AbstractVCSPopup.class), JPopupMenuHandler.class);
+
+ //TagManager.registerBean(ClassDescriptorLoader.getClassDescriptor(AbstractUI.class), JDialog.class);
+
+ //TagManager.registerDefaultNamespace("AbstractUI", "javax.swing.*");
+
+ }
+}
\ No newline at end of file
Copied: trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/VCSUIConstants.java (from rev 398, trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/VCSUIConstants.java)
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/VCSUIConstants.java (rev 0)
+++ trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/VCSUIConstants.java 2008-04-06 13:07:15 UTC (rev 400)
@@ -0,0 +1,67 @@
+/**
+ * # #% Copyright (C) 2008 Code Lutin, Tony Chemit
+ * 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, write to the Free Software Foundation, Inc., 59 Temple Place
+ * - Suite 330, Boston, MA 02111-1307, USA.
+ * # #%
+ */
+package org.codelutin.vcs.ui;
+
+import static org.codelutin.i18n.I18n.n_;
+
+/** @author chemit */
+public class VCSUIConstants {
+
+ /** columns names for a simple table model with module, file and status */
+ public static final String[] SIMPLE_COLUMNS_NAMES = new String[]{
+ n_("lutinvcs.module"),
+ n_("lutinvcs.file"),
+ n_("lutinvcs.status")
+ };
+
+ /** model name for synchronize ui */
+ public static final String SYNCH_MODEL_PROPERTY = "modelSynch";
+
+ /** model name for confirm ui */
+ public static final String CONFIRM_MODEL_PROPERTY = "modelConfirm";
+
+ /** model name for diff ui */
+ public static final String DIFF_MODEL_PROPERTY = "modelConfirm";
+
+ public static final String ACTION_PROPERTY_CHANGED = "action";
+
+ public static final String MESSAGE_HISTORY_PROPERTY_CHANGED = "historyMessage";
+
+ public static final String FILE_PROPERTY_CHANGED = "file";
+
+ public static final String NEXT_DIFF_PROPERTY_CHANGED = "nextDiff";
+
+ public static final String PREVIOUS_DIFF_PROPERTY_CHANGED = "previousDiff";
+
+ public static final String REFRESH_PROPERTY_CHANGED = "refresh";
+
+ public static final String TAB_PROPERTY_CHANGED = "tab";
+
+ public static final String DIFF_ALL_PROPERTY_CHANGED = "diffAll";
+
+ public static final String COMMIT_ALL_PROPERTY_CHANGED = "commitAll";
+
+ public static final String UPDATE_ALL_PROPERTY_CHANGED = "updateAll";
+
+ public static final String REVERT_ALL_PROPERTY_CHANGED = "revertAll";
+
+ public static final String DIFF_PROPERTY_CHANGED = "diff";
+
+ public static final String COMMIT_PROPERTY_CHANGED = "commit";
+
+ public static final String UPDATE_PROPERTY_CHANGED = "update";
+
+ public static final String REVERT_PROPERTY_CHANGED = "revert";
+}
1
0
r399 - in trunk/lutinvcs: lutinvcs-core/src/main/java/org/codelutin/vcs/ui lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/handler lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/model
by tchemit@users.labs.libre-entreprise.org 06 Apr '08
by tchemit@users.labs.libre-entreprise.org 06 Apr '08
06 Apr '08
Author: tchemit
Date: 2008-04-06 13:06:51 +0000 (Sun, 06 Apr 2008)
New Revision: 399
Added:
trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/handler/
trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/handler/AbstractConfirmUIHandler.java
trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/handler/AbstractDiffUIHandler.java
trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/handler/AbstractSynchUIHandler.java
trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/handler/AbstractTabUIHandler.java
trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/handler/AbstractUIHandler.java
trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/handler/VCSAbsractAction.java
trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/model/
trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/model/AbstractTabUIModel.java
trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/model/AbstractUIModel.java
trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/model/AbstractVCSEntriesTableModel.java
trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/model/ConfirmUIModel.java
trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/model/DiffPanelUIModel.java
trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/model/DiffUIModel.java
trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/model/SimpleVCSEntriesTableModelImpl.java
trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/model/SynchUIModel.java
Removed:
trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/handler/
trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/model/
trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/handler/AbstractConfirmUIHandler.java
trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/handler/AbstractDiffUIHandler.java
trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/handler/AbstractSynchUIHandler.java
trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/handler/AbstractUIHandler.java
trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/handler/VCSAbsractAction.java
trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/model/AbstractUIModel.java
trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/model/AbstractVCSEntriesTableModel.java
trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/model/ConfirmUIModel.java
trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/model/DiffPanelUIModel.java
trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/model/DiffUIModel.java
trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/model/SimpleVCSEntriesTableModelImpl.java
trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/model/SynchUIModel.java
Log:
new module : ui-pre-jaxx
Copied: trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/handler (from rev 371, trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/handler)
Deleted: trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/handler/AbstractConfirmUIHandler.java
===================================================================
--- trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/handler/AbstractConfirmUIHandler.java 2008-04-05 20:43:39 UTC (rev 371)
+++ trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/handler/AbstractConfirmUIHandler.java 2008-04-06 13:06:51 UTC (rev 399)
@@ -1,81 +0,0 @@
-/**
- * # #% Copyright (C) 2008 Code Lutin, Tony Chemit
- * 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, write to the Free Software Foundation, Inc., 59 Temple Place
- * - Suite 330, Boston, MA 02111-1307, USA.
- * # #%
- */
-package org.codelutin.vcs.ui.handler;
-
-import org.codelutin.vcs.VCSAction;
-import org.codelutin.vcs.VCSEntry;
-import org.codelutin.vcs.ui.VCSUIConstants;
-import org.codelutin.vcs.ui.model.AbstractVCSEntriesTableModel;
-import org.codelutin.vcs.ui.model.ConfirmUIModel;
-
-import java.beans.PropertyChangeEvent;
-import java.util.List;
-
-/**
- * Abstract ConfirmUI handler
- *
- * @author chemit
- */
-public abstract class AbstractConfirmUIHandler extends AbstractUIHandler<ConfirmUIModel> {
-
- protected abstract void updateUI();
-
- protected abstract void updateMessageUI();
-
- public void propertyChange(PropertyChangeEvent evt) {
- if (log.isDebugEnabled()) {
- log.debug(evt.getPropertyName() + " old:" + evt.getOldValue() + ", new:" + evt.getNewValue());
- }
- String action = evt.getPropertyName();
-
- if (VCSUIConstants.ACTION_PROPERTY_CHANGED.equals(action)) {
- updateUI();
- return;
- }
-
- if (VCSUIConstants.MESSAGE_HISTORY_PROPERTY_CHANGED.equals(action)) {
- updateMessageUI();
- return;
- }
-
- throw new IllegalStateException("unimplemented property changed : " + evt);
- }
-
- public void doAction(String commitMessage, AbstractVCSEntriesTableModel model) {
-
- VCSAction action = getModel().getAction();
-
- List<VCSEntry> entries = model.filter(action, model.getDisplayedEntries(getSelectionModel()));
-
- if (action.isCommit()) {
- getModel().addCommitMessage(commitMessage);
-
- } else {
- commitMessage = null;
- }
-
- if (log.isDebugEnabled()) {
- log.debug("action:" + action + ", message:" + commitMessage + ", nb files:" + entries.size());
- }
-
- getActionManager().add(action, entries.toArray(new VCSEntry[entries.size()]), commitMessage);
-
- // dispose ui
- getUi().dispose();
-
- }
-
-
-}
\ No newline at end of file
Copied: trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/handler/AbstractConfirmUIHandler.java (from rev 398, trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/handler/AbstractConfirmUIHandler.java)
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/handler/AbstractConfirmUIHandler.java (rev 0)
+++ trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/handler/AbstractConfirmUIHandler.java 2008-04-06 13:06:51 UTC (rev 399)
@@ -0,0 +1,82 @@
+/**
+ * # #% Copyright (C) 2008 Code Lutin, Tony Chemit
+ * 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, write to the Free Software Foundation, Inc., 59 Temple Place
+ * - Suite 330, Boston, MA 02111-1307, USA.
+ * # #%
+ */
+package org.codelutin.vcs.ui.handler;
+
+import org.codelutin.vcs.VCSEntry;
+import org.codelutin.vcs.type.VCSAction;
+import org.codelutin.vcs.ui.AbstractUI;
+import org.codelutin.vcs.ui.VCSUIConstants;
+import org.codelutin.vcs.ui.model.AbstractVCSEntriesTableModel;
+import org.codelutin.vcs.ui.model.ConfirmUIModel;
+
+import java.beans.PropertyChangeEvent;
+import java.util.List;
+
+/**
+ * Abstract ConfirmUI handler
+ *
+ * @author chemit
+ */
+public abstract class AbstractConfirmUIHandler extends AbstractUIHandler<ConfirmUIModel, AbstractUI> {
+
+ protected abstract void updateUI();
+
+ protected abstract void updateMessageUI();
+
+ public void propertyChange(PropertyChangeEvent evt) {
+ if (log.isDebugEnabled()) {
+ log.debug(evt.getPropertyName() + " old:" + evt.getOldValue() + ", new:" + evt.getNewValue());
+ }
+ String action = evt.getPropertyName();
+
+ if (VCSUIConstants.ACTION_PROPERTY_CHANGED.equals(action)) {
+ updateUI();
+ return;
+ }
+
+ if (VCSUIConstants.MESSAGE_HISTORY_PROPERTY_CHANGED.equals(action)) {
+ updateMessageUI();
+ return;
+ }
+
+ throw new IllegalStateException("unimplemented property changed : " + evt);
+ }
+
+ public void doAction(String commitMessage, AbstractVCSEntriesTableModel model) {
+
+ VCSAction action = getModel().getAction();
+
+ List<VCSEntry> entries = model.filter(action, model.getDisplayedEntries(getSelectionModel()));
+
+ if (action.isCommit()) {
+ getModel().addCommitMessage(commitMessage);
+
+ } else {
+ commitMessage = null;
+ }
+
+ if (log.isDebugEnabled()) {
+ log.debug("action:" + action + ", message:" + commitMessage + ", nb files:" + entries.size());
+ }
+
+ getActionManager().add(action, entries.toArray(new VCSEntry[entries.size()]), commitMessage);
+
+ // dispose ui
+ getUi().dispose();
+
+ }
+
+
+}
\ No newline at end of file
Deleted: trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/handler/AbstractDiffUIHandler.java
===================================================================
--- trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/handler/AbstractDiffUIHandler.java 2008-04-05 20:43:39 UTC (rev 371)
+++ trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/handler/AbstractDiffUIHandler.java 2008-04-06 13:06:51 UTC (rev 399)
@@ -1,60 +0,0 @@
-/**
- * # #% Copyright (C) 2008 Code Lutin, Tony Chemit
- * 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, write to the Free Software Foundation, Inc., 59 Temple Place
- * - Suite 330, Boston, MA 02111-1307, USA.
- * # #%
- */
-package org.codelutin.vcs.ui.handler;
-
-import org.codelutin.vcs.VCSAction;
-import org.codelutin.vcs.VCSEntry;
-import org.codelutin.vcs.ui.VCSUIConstants;
-import org.codelutin.vcs.ui.model.AbstractVCSEntriesTableModel;
-import org.codelutin.vcs.ui.model.DiffUIModel;
-
-import java.beans.PropertyChangeEvent;
-
-/** @author chemit */
-public abstract class AbstractDiffUIHandler extends AbstractUIHandler<DiffUIModel> {
-
- public void propertyChange(PropertyChangeEvent evt) {
- //if (log.isDebugEnabled()) {
- log.info(evt.getPropertyName() + " old:" + evt.getOldValue() + ", new:" + evt.getNewValue());
- //}
- String action = evt.getPropertyName();
-
- if (VCSUIConstants.TAB_PROPERTY_CHANGED.equals(action)) {
- doSelectTab((AbstractVCSEntriesTableModel) evt.getNewValue());
- } else {
- if (VCSUIConstants.FILE_PROPERTY_CHANGED.equals(action)) {
- doSelectFile((VCSEntry) evt.getNewValue());
- } else {
- try {
- VCSAction vcsAction = VCSAction.valueOf(action.toUpperCase());
- doAction(vcsAction, (VCSEntry) evt.getNewValue());
- } catch (IllegalArgumentException e) {
- // ignore ite
- }
- }
- }
- }
-
- public abstract void doSelectTab(AbstractVCSEntriesTableModel action);
-
- public abstract void doSelectFile(VCSEntry model);
-
- public abstract void doAction(VCSAction action, VCSEntry model);
-
- public abstract void gotoNextDiff();
-
- public abstract void gotoPreviousDiff();
-
-}
\ No newline at end of file
Copied: trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/handler/AbstractDiffUIHandler.java (from rev 398, trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/handler/AbstractDiffUIHandler.java)
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/handler/AbstractDiffUIHandler.java (rev 0)
+++ trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/handler/AbstractDiffUIHandler.java 2008-04-06 13:06:51 UTC (rev 399)
@@ -0,0 +1,67 @@
+/**
+ * # #% Copyright (C) 2008 Code Lutin, Tony Chemit
+ * 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, write to the Free Software Foundation, Inc., 59 Temple Place
+ * - Suite 330, Boston, MA 02111-1307, USA.
+ * # #%
+ */
+package org.codelutin.vcs.ui.handler;
+
+import org.codelutin.vcs.VCSEntry;
+import org.codelutin.vcs.type.VCSAction;
+import org.codelutin.vcs.type.VCSEntryLocation;
+import org.codelutin.vcs.ui.AbstractDiffUI;
+import org.codelutin.vcs.ui.VCSUIConstants;
+import org.codelutin.vcs.ui.model.DiffUIModel;
+
+import java.beans.PropertyChangeEvent;
+
+/** @author chemit */
+public abstract class AbstractDiffUIHandler<U extends AbstractDiffUI> extends AbstractTabUIHandler<DiffUIModel, U> {
+
+ public void propertyChange(PropertyChangeEvent evt) {
+ //if (log.isDebugEnabled()) {
+ log.info(evt.getPropertyName() + " old:" + evt.getOldValue() + ", new:" + evt.getNewValue());
+ //}
+
+ String action = evt.getPropertyName();
+ if (VCSUIConstants.FILE_PROPERTY_CHANGED.equals(action)) {
+ doSelectFile((VCSEntry) evt.getNewValue());
+ } else {
+ super.propertyChange(evt);
+ }
+ }
+
+ public abstract void doSelectFile(VCSEntry model);
+
+ public abstract void doAction(VCSAction action, VCSEntry model);
+
+ public abstract void gotoNextDiff();
+
+ public abstract void gotoPreviousDiff();
+
+ public void doSelectLocation(VCSEntryLocation location) {
+ log.info(location);
+
+ getUi().getCardLayout().show(getUi().getPreview(), location.name().toLowerCase() + "Content");
+ //VCSAction[] actions = getModel().getModel().getActions((ListSelectionModel) null);
+ /*List<String> acts = new ArrayList<String>();
+ for (VCSAction action : actions) {
+ acts.add(action.name().toLowerCase());
+ } */
+ /*boolean hasActions = actions.length > 0;
+ getUi().getDiffAll().setEnabled(hasActions && acts.contains("diff"));
+ getUi().getUpdateAll().setEnabled(hasActions && acts.contains("update"));
+ getUi().getCommitAll().setEnabled(hasActions && acts.contains("commit"));
+ getUi().getRevertAll().setEnabled(hasActions && acts.contains("revert"));
+ getUi().getDeleteAll().setEnabled(hasActions && acts.contains("delete"));
+ getUi().getRefreshAll().setEnabled(hasActions);*/
+ }
+}
\ No newline at end of file
Deleted: trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/handler/AbstractSynchUIHandler.java
===================================================================
--- trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/handler/AbstractSynchUIHandler.java 2008-04-05 20:43:39 UTC (rev 371)
+++ trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/handler/AbstractSynchUIHandler.java 2008-04-06 13:06:51 UTC (rev 399)
@@ -1,52 +0,0 @@
-/**
- * # #% Copyright (C) 2008 Code Lutin, Tony Chemit
- * 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, write to the Free Software Foundation, Inc., 59 Temple Place
- * - Suite 330, Boston, MA 02111-1307, USA.
- * # #%
- */
-package org.codelutin.vcs.ui.handler;
-
-import org.codelutin.vcs.VCSAction;
-import org.codelutin.vcs.VCSEntryLocation;
-import org.codelutin.vcs.ui.VCSUIConstants;
-import org.codelutin.vcs.ui.model.SynchUIModel;
-
-import java.beans.PropertyChangeEvent;
-
-/** @author chemit */
-public abstract class AbstractSynchUIHandler extends AbstractUIHandler<SynchUIModel> {
-
- public void propertyChange(PropertyChangeEvent evt) {
- //if (log.isDebugEnabled()) {
- log.info(evt.getPropertyName() + " old:" + evt.getOldValue() + ", new:" + evt.getNewValue());
- //}
- String action = evt.getPropertyName();
-
- if (VCSUIConstants.TAB_PROPERTY_CHANGED.equals(action)) {
- doSelectLocation((VCSEntryLocation) evt.getNewValue());
- } else if (action.endsWith("All")) {
- try {
- String actionName = action.substring(0, action.length() - 3);
- VCSAction vcsAction = VCSAction.valueOf(actionName.toUpperCase());
- doAllAction(vcsAction);
- } catch (IllegalArgumentException e) {
- // ignore it ?
- }
- }
- }
-
- //public abstract void doSelectAction(VCSAction action);
-
- public abstract void doAllAction(VCSAction action);
-
- public abstract void doSelectLocation(VCSEntryLocation action);
-
-}
Copied: trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/handler/AbstractSynchUIHandler.java (from rev 398, trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/handler/AbstractSynchUIHandler.java)
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/handler/AbstractSynchUIHandler.java (rev 0)
+++ trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/handler/AbstractSynchUIHandler.java 2008-04-06 13:06:51 UTC (rev 399)
@@ -0,0 +1,49 @@
+/**
+ * # #% Copyright (C) 2008 Code Lutin, Tony Chemit
+ * 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, write to the Free Software Foundation, Inc., 59 Temple Place
+ * - Suite 330, Boston, MA 02111-1307, USA.
+ * # #%
+ */
+package org.codelutin.vcs.ui.handler;
+
+import org.codelutin.vcs.type.VCSAction;
+import org.codelutin.vcs.type.VCSEntryLocation;
+import org.codelutin.vcs.ui.AbstractSynchUI;
+import org.codelutin.vcs.ui.model.SynchUIModel;
+
+import javax.swing.ListSelectionModel;
+import java.util.ArrayList;
+import java.util.List;
+
+/** @author chemit */
+public abstract class AbstractSynchUIHandler<U extends AbstractSynchUI> extends AbstractTabUIHandler<SynchUIModel, U> {
+
+ public abstract void doAllAction(VCSAction action);
+
+ public void doSelectLocation(VCSEntryLocation location) {
+
+ super.doSelectLocation(location);
+
+ VCSAction[] actions = getModel().getModel().getActions((ListSelectionModel) null);
+ List<String> acts = new ArrayList<String>();
+ for (VCSAction action : actions) {
+ acts.add(action.name().toLowerCase());
+ }
+ boolean hasActions = actions.length > 0;
+ getUi().getDiffAll().setEnabled(hasActions && acts.contains("diff"));
+ getUi().getUpdateAll().setEnabled(hasActions && acts.contains("update"));
+ getUi().getCommitAll().setEnabled(hasActions && acts.contains("commit"));
+ getUi().getRevertAll().setEnabled(hasActions && acts.contains("revert"));
+ getUi().getDeleteAll().setEnabled(hasActions && acts.contains("delete"));
+ getUi().getRefreshAll().setEnabled(hasActions);
+ }
+
+}
Copied: trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/handler/AbstractTabUIHandler.java (from rev 398, trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/handler/AbstractTabUIHandler.java)
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/handler/AbstractTabUIHandler.java (rev 0)
+++ trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/handler/AbstractTabUIHandler.java 2008-04-06 13:06:51 UTC (rev 399)
@@ -0,0 +1,59 @@
+/**
+ * # #% Copyright (C) 2008 Code Lutin, Tony Chemit
+ * 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, write to the Free Software Foundation, Inc., 59 Temple Place
+ * - Suite 330, Boston, MA 02111-1307, USA.
+ * # #%
+ */
+package org.codelutin.vcs.ui.handler;
+
+import org.codelutin.vcs.type.VCSEntryLocation;
+import org.codelutin.vcs.ui.AbstractTabUI;
+import org.codelutin.vcs.ui.VCSUIConstants;
+import org.codelutin.vcs.ui.model.AbstractTabUIModel;
+
+import javax.swing.ListSelectionModel;
+import java.beans.PropertyChangeEvent;
+
+/** @author chemit */
+public abstract class AbstractTabUIHandler<M extends AbstractTabUIModel, U extends AbstractTabUI> extends AbstractUIHandler<M, U> {
+
+ protected abstract void initTab(VCSEntryLocation location);
+
+ @Override
+ public void init() {
+ super.init();
+ initTab(VCSEntryLocation.ALL);
+ initTab(VCSEntryLocation.LOCAL);
+ initTab(VCSEntryLocation.REMOTE);
+ }
+
+ public ListSelectionModel getSelectionModel() {
+ return getUi().getTable(getLocation()).getSelectionModel();
+ }
+
+ public void propertyChange(PropertyChangeEvent evt) {
+ //if (log.isDebugEnabled()) {
+ log.info(evt.getPropertyName() + " old:" + evt.getOldValue() + ", new:" + evt.getNewValue());
+ //}
+ String action = evt.getPropertyName();
+
+ if (VCSUIConstants.TAB_PROPERTY_CHANGED.equals(action)) {
+ doSelectLocation((VCSEntryLocation) evt.getNewValue());
+ }
+ }
+
+ public void doSelectLocation(VCSEntryLocation location) {
+ log.info(location);
+ getUi().getCardLayout().show(getUi().getPreview(), location.name().toLowerCase() + "Content");
+
+ }
+
+}
\ No newline at end of file
Deleted: trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/handler/AbstractUIHandler.java
===================================================================
--- trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/handler/AbstractUIHandler.java 2008-04-05 20:43:39 UTC (rev 371)
+++ trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/handler/AbstractUIHandler.java 2008-04-06 13:06:51 UTC (rev 399)
@@ -1,48 +0,0 @@
-/**
- * # #% Copyright (C) 2008 Code Lutin, Tony Chemit
- * 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, write to the Free Software Foundation, Inc., 59 Temple Place
- * - Suite 330, Boston, MA 02111-1307, USA.
- * # #%
- */
-package org.codelutin.vcs.ui.handler;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.codelutin.vcs.VCSFactory;
-import org.codelutin.vcs.runner.VCSActionManager;
-import org.codelutin.vcs.ui.model.AbstractUIModel;
-
-import javax.swing.JDialog;
-import javax.swing.ListSelectionModel;
-import java.beans.PropertyChangeListener;
-
-/** @author chemit */
-public abstract class AbstractUIHandler<M extends AbstractUIModel> implements PropertyChangeListener {
-
- protected static Log log = LogFactory.getLog(AbstractUIHandler.class);
-
- public abstract M getModel();
-
- public abstract JDialog getUi();
-
- public abstract ListSelectionModel getSelectionModel();
-
- public void init() {
- if (getModel() == null) {
- throw new IllegalStateException("no model was defined for " + this);
- }
- getModel().addPropertyChangeListener(this);
- }
-
- protected VCSActionManager getActionManager() {
- return VCSFactory.getActionManager();
- }
-}
Copied: trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/handler/AbstractUIHandler.java (from rev 398, trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/handler/AbstractUIHandler.java)
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/handler/AbstractUIHandler.java (rev 0)
+++ trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/handler/AbstractUIHandler.java 2008-04-06 13:06:51 UTC (rev 399)
@@ -0,0 +1,53 @@
+/**
+ * # #% Copyright (C) 2008 Code Lutin, Tony Chemit
+ * 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, write to the Free Software Foundation, Inc., 59 Temple Place
+ * - Suite 330, Boston, MA 02111-1307, USA.
+ * # #%
+ */
+package org.codelutin.vcs.ui.handler;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.codelutin.vcs.VCSFactory;
+import org.codelutin.vcs.runner.VCSActionManager;
+import org.codelutin.vcs.type.VCSEntryLocation;
+import org.codelutin.vcs.ui.AbstractUI;
+import org.codelutin.vcs.ui.model.AbstractUIModel;
+
+import javax.swing.ListSelectionModel;
+import java.beans.PropertyChangeListener;
+
+/** @author chemit */
+public abstract class AbstractUIHandler<M extends AbstractUIModel, U extends AbstractUI> implements PropertyChangeListener {
+
+ protected static Log log = LogFactory.getLog(AbstractUIHandler.class);
+
+ public abstract M getModel();
+
+ public abstract U getUi();
+
+ public abstract ListSelectionModel getSelectionModel();
+
+ public void init() {
+ if (getModel() == null) {
+ throw new IllegalStateException("no model was defined for " + this);
+ }
+ getModel().addPropertyChangeListener(this);
+ }
+
+ public VCSEntryLocation getLocation() {
+ return getModel().getModel().getLocation();
+ }
+
+ protected VCSActionManager getActionManager() {
+ return VCSFactory.getActionManager();
+ }
+}
Deleted: trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/handler/VCSAbsractAction.java
===================================================================
--- trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/handler/VCSAbsractAction.java 2008-04-05 20:43:39 UTC (rev 371)
+++ trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/handler/VCSAbsractAction.java 2008-04-06 13:06:51 UTC (rev 399)
@@ -1,39 +0,0 @@
-/**
- * # #% Copyright (C) 2008 Code Lutin, Tony Chemit
- * 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, write to the Free Software Foundation, Inc., 59 Temple Place
- * - Suite 330, Boston, MA 02111-1307, USA.
- * # #%
- */
-package org.codelutin.vcs.ui.handler;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.codelutin.vcs.VCSAction;
-
-import javax.swing.AbstractAction;
-
-/** @author chemit */
-public abstract class VCSAbsractAction extends AbstractAction {
-
- protected static Log log = LogFactory.getLog(VCSAbsractAction.class);
-
- protected VCSAction action;
-
- private static final long serialVersionUID = 1074145285171920255L;
-
- public VCSAbsractAction() {
- }
-
- public void setAction(VCSAction action) {
- this.action = action;
- }
-
-}
Copied: trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/handler/VCSAbsractAction.java (from rev 398, trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/handler/VCSAbsractAction.java)
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/handler/VCSAbsractAction.java (rev 0)
+++ trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/handler/VCSAbsractAction.java 2008-04-06 13:06:51 UTC (rev 399)
@@ -0,0 +1,39 @@
+/**
+ * # #% Copyright (C) 2008 Code Lutin, Tony Chemit
+ * 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, write to the Free Software Foundation, Inc., 59 Temple Place
+ * - Suite 330, Boston, MA 02111-1307, USA.
+ * # #%
+ */
+package org.codelutin.vcs.ui.handler;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.codelutin.vcs.type.VCSAction;
+
+import javax.swing.AbstractAction;
+
+/** @author chemit */
+public abstract class VCSAbsractAction extends AbstractAction {
+
+ protected static Log log = LogFactory.getLog(VCSAbsractAction.class);
+
+ protected VCSAction action;
+
+ private static final long serialVersionUID = 1074145285171920255L;
+
+ public VCSAbsractAction() {
+ }
+
+ public void setAction(VCSAction action) {
+ this.action = action;
+ }
+
+}
Copied: trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/model (from rev 371, trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/model)
Copied: trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/model/AbstractTabUIModel.java (from rev 398, trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/model/AbstractTabUIModel.java)
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/model/AbstractTabUIModel.java (rev 0)
+++ trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/model/AbstractTabUIModel.java 2008-04-06 13:06:51 UTC (rev 399)
@@ -0,0 +1,33 @@
+/**
+ * # #% Copyright (C) 2008 Code Lutin, Tony Chemit
+ * 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, write to the Free Software Foundation, Inc., 59 Temple Place
+ * - Suite 330, Boston, MA 02111-1307, USA.
+ * # #%
+ */
+package org.codelutin.vcs.ui.model;
+
+import org.codelutin.vcs.type.VCSEntryLocation;
+import org.codelutin.vcs.ui.VCSUIConstants;
+
+/**
+ * Model of a repository
+ *
+ * @author chemit
+ */
+public class AbstractTabUIModel extends AbstractUIModel {
+
+ public void setLocation(VCSEntryLocation location) {
+ VCSEntryLocation oldLocation = getModel().getLocation();
+ getModel().setLocation(location);
+ firePropertyChange(VCSUIConstants.TAB_PROPERTY_CHANGED, oldLocation, location);
+ }
+
+}
\ No newline at end of file
Deleted: trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/model/AbstractUIModel.java
===================================================================
--- trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/model/AbstractUIModel.java 2008-04-05 20:43:39 UTC (rev 371)
+++ trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/model/AbstractUIModel.java 2008-04-06 13:06:51 UTC (rev 399)
@@ -1,113 +0,0 @@
-/**
- * # #% Copyright (C) 2008 Code Lutin, Tony Chemit
- * 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, write to the Free Software Foundation, Inc., 59 Temple Place
- * - Suite 330, Boston, MA 02111-1307, USA.
- * # #%
- */
-package org.codelutin.vcs.ui.model;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.codelutin.vcs.VCSConnexion;
-import org.codelutin.vcs.VCSEntry;
-import org.codelutin.vcs.VCSEntryLocation;
-import org.codelutin.vcs.VCSException;
-
-import java.beans.PropertyChangeListener;
-import java.beans.PropertyChangeSupport;
-import java.util.List;
-
-/** @author chemit */
-public abstract class AbstractUIModel {
-
- /** to use log facility, just put in your code: log.info(\"...\"); */
- static protected final Log log = LogFactory.getLog(AbstractUIModel.class);
-
- /** support for change properties support */
- protected PropertyChangeSupport changeSupport;
-
- protected final AbstractVCSEntriesTableModel model;
-
- protected AbstractUIModel() {
- model = new SimpleVCSEntriesTableModelImpl(getClass().getSimpleName());
- }
-
- public AbstractVCSEntriesTableModel getModel() {
- return model;
- }
-
- public void populate(VCSConnexion connexion) throws VCSException {
- getModel().populate(connexion, System.nanoTime());
- }
-
- public void populate(VCSConnexion connexion, List<String> relativeLocalPaths, VCSEntryLocation location) throws VCSException {
- getModel().populate(connexion, relativeLocalPaths, location, System.nanoTime());
- }
-
- public void populate(VCSEntryLocation location, VCSEntry[] datas) {
- getModel().populate(location, datas);
- }
-
- public void refresh(List<VCSEntry> entries) {
- getModel().refresh(entries, System.nanoTime());
- }
-
- public synchronized void addPropertyChangeListener(String propertyName, PropertyChangeListener listener) {
- if (listener == null) {
- return;
- }
- if (changeSupport == null) {
- changeSupport = new PropertyChangeSupport(this);
- }
- changeSupport.addPropertyChangeListener(propertyName, listener);
- }
-
- public synchronized void addPropertyChangeListener(PropertyChangeListener listener) {
- if (listener == null) {
- return;
- }
- if (changeSupport == null) {
- changeSupport = new PropertyChangeSupport(this);
- }
- changeSupport.addPropertyChangeListener(listener);
- }
-
- public synchronized void removePropertyChangeListener(PropertyChangeListener listener) {
- if (listener == null || changeSupport == null) {
- return;
- }
- changeSupport.removePropertyChangeListener(listener);
- }
-
- public synchronized void removePropertyChangeListeners() {
- if (changeSupport == null) {
- return;
- }
- for (PropertyChangeListener listener : getPropertyChangeListeners()) {
- changeSupport.removePropertyChangeListener(listener);
- }
- }
-
- public synchronized PropertyChangeListener[] getPropertyChangeListeners() {
- if (changeSupport == null) {
- return new PropertyChangeListener[0];
- }
- return changeSupport.getPropertyChangeListeners();
- }
-
- public void firePropertyChange(String propertyName, Object oldValue, Object newValue) {
- if (changeSupport == null || (oldValue == null && newValue == null) ||
- (oldValue != null && oldValue.equals(newValue))) {
- return;
- }
- changeSupport.firePropertyChange(propertyName, oldValue, newValue);
- }
-}
Copied: trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/model/AbstractUIModel.java (from rev 398, trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/model/AbstractUIModel.java)
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/model/AbstractUIModel.java (rev 0)
+++ trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/model/AbstractUIModel.java 2008-04-06 13:06:51 UTC (rev 399)
@@ -0,0 +1,128 @@
+/**
+ * # #% Copyright (C) 2008 Code Lutin, Tony Chemit
+ * 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, write to the Free Software Foundation, Inc., 59 Temple Place
+ * - Suite 330, Boston, MA 02111-1307, USA.
+ * # #%
+ */
+package org.codelutin.vcs.ui.model;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.codelutin.vcs.VCSConnexion;
+import org.codelutin.vcs.VCSEntry;
+import org.codelutin.vcs.type.VCSEntryLocation;
+import org.codelutin.vcs.type.VCSAction;
+import org.codelutin.vcs.VCSException;
+import org.codelutin.vcs.ui.VCSUIConstants;
+
+import java.beans.PropertyChangeListener;
+import java.beans.PropertyChangeSupport;
+import java.util.List;
+
+/** @author chemit */
+public abstract class AbstractUIModel {
+
+ /** to use log facility, just put in your code: log.info(\"...\"); */
+ static protected final Log log = LogFactory.getLog(AbstractUIModel.class);
+
+ /** current action to be fired */
+ protected VCSAction action;
+
+ /** support for change properties support */
+ protected PropertyChangeSupport changeSupport;
+
+ protected final AbstractVCSEntriesTableModel model;
+
+ protected AbstractUIModel() {
+ model = new SimpleVCSEntriesTableModelImpl(getClass().getSimpleName());
+ }
+
+ public AbstractVCSEntriesTableModel getModel() {
+ return model;
+ }
+
+ public void populate(VCSConnexion connexion) throws VCSException {
+ getModel().populate(connexion, System.nanoTime());
+ }
+
+ public void populate(VCSConnexion connexion, List<String> relativeLocalPaths, VCSEntryLocation location) throws VCSException {
+ getModel().populate(connexion, relativeLocalPaths, location, System.nanoTime());
+ }
+
+ public void populate(VCSEntryLocation location, VCSEntry[] datas) {
+ getModel().populate(location, datas);
+ }
+
+ public void refresh(List<VCSEntry> entries) {
+ getModel().refresh(entries, System.nanoTime());
+ }
+
+ public VCSAction getAction() {
+ return action;
+ }
+
+ public void setAction(VCSAction action) {
+ VCSAction oldAction = this.action;
+ this.action = action;
+ firePropertyChange(VCSUIConstants.ACTION_PROPERTY_CHANGED, oldAction, action);
+ }
+
+ public synchronized void addPropertyChangeListener(String propertyName, PropertyChangeListener listener) {
+ if (listener == null) {
+ return;
+ }
+ if (changeSupport == null) {
+ changeSupport = new PropertyChangeSupport(this);
+ }
+ changeSupport.addPropertyChangeListener(propertyName, listener);
+ }
+
+ public synchronized void addPropertyChangeListener(PropertyChangeListener listener) {
+ if (listener == null) {
+ return;
+ }
+ if (changeSupport == null) {
+ changeSupport = new PropertyChangeSupport(this);
+ }
+ changeSupport.addPropertyChangeListener(listener);
+ }
+
+ public synchronized void removePropertyChangeListener(PropertyChangeListener listener) {
+ if (listener == null || changeSupport == null) {
+ return;
+ }
+ changeSupport.removePropertyChangeListener(listener);
+ }
+
+ public synchronized void removePropertyChangeListeners() {
+ if (changeSupport == null) {
+ return;
+ }
+ for (PropertyChangeListener listener : getPropertyChangeListeners()) {
+ changeSupport.removePropertyChangeListener(listener);
+ }
+ }
+
+ public synchronized PropertyChangeListener[] getPropertyChangeListeners() {
+ if (changeSupport == null) {
+ return new PropertyChangeListener[0];
+ }
+ return changeSupport.getPropertyChangeListeners();
+ }
+
+ public void firePropertyChange(String propertyName, Object oldValue, Object newValue) {
+ if (changeSupport == null || (oldValue == null && newValue == null) ||
+ (oldValue != null && oldValue.equals(newValue))) {
+ return;
+ }
+ changeSupport.firePropertyChange(propertyName, oldValue, newValue);
+ }
+}
Deleted: trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/model/AbstractVCSEntriesTableModel.java
===================================================================
--- trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/model/AbstractVCSEntriesTableModel.java 2008-04-05 20:43:39 UTC (rev 371)
+++ trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/model/AbstractVCSEntriesTableModel.java 2008-04-06 13:06:51 UTC (rev 399)
@@ -1,187 +0,0 @@
-/*
-* ##% Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 Code Lutin,
-* Benjamin Poussin, Tony Chemit
-*
-*
-* 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, write to the Free Software
-* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-* ##% */
-package org.codelutin.vcs.ui.model;
-
-import static org.codelutin.i18n.I18n._;
-import org.codelutin.vcs.VCSAction;
-import org.codelutin.vcs.VCSConnexion;
-import org.codelutin.vcs.VCSEntries;
-import org.codelutin.vcs.VCSEntry;
-import org.codelutin.vcs.VCSEntryLocation;
-import org.codelutin.vcs.VCSException;
-import org.codelutin.vcs.VCSState;
-import org.codelutin.vcs.util.VCSEntriesImpl;
-
-import javax.swing.ListSelectionModel;
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * Simple Table model to display list of VCSFileState
- *
- * @author chemit
- */
-public abstract class AbstractVCSEntriesTableModel extends javax.swing.table.AbstractTableModel implements VCSEntries {
-
- protected final String name;
-
- /** column names */
- protected final String[] columnNames;
-
- protected VCSEntryLocation location;
-
- /** delegate model */
- protected final transient VCSEntries delegate;
-
- /** displayed entries */
- protected final transient List<VCSEntry> displayedEntries;
-
- private static final long serialVersionUID = 4697917831388337369L;
-
- protected AbstractVCSEntriesTableModel(String name, String[] columnNames) {
- super();
- this.name = name;
- this.columnNames = columnNames;
- this.displayedEntries = new ArrayList<VCSEntry>();
- this.delegate = new VCSEntriesImpl();
- }
-
- public String getName() {
- return name;
- }
-
- public VCSEntryLocation getLocation() {
- return location;
- }
-
- public List<VCSEntry> getDisplayedEntries(ListSelectionModel selectionModel) {
- return selectionModel == null ? new ArrayList<VCSEntry>(displayedEntries) : filter(selectionModel, displayedEntries);
- }
-
- public int getColumnCount() {
- return columnNames.length;
- }
-
- public int getRowCount() {
- return displayedEntries.size();
- }
-
- @Override
- public String getColumnName(int columnIndex) {
- return _(columnNames[columnIndex]);
- }
-
- @Override
- public boolean isCellEditable(int rowIndex, int columnIndex) {
- // read only data
- return false;
- }
-
- @Override
- public void setValueAt(Object aValue, int rowIndex, int columnIndex) {
- // read only data
- }
-
- public void setLocation(VCSEntryLocation location) {
- this.location = location;
- displayedEntries.clear();
- displayedEntries.addAll(filter(location, getEntries()));
- fireTableDataChanged();
- }
-
- public VCSAction[] getActions(ListSelectionModel selectionModel) {
- return getActions(getDisplayedEntries(selectionModel));
- }
-
- @Override
- public String toString() {
- return super.toString() + "<name:" + name + ", size:" + (getRowCount()) + '>';
- }
-
- //===================================================================================================//
- // === delegate methods =============================================================================//
- //===================================================================================================//
-
- public List<VCSEntry> getEntries() {
- return delegate.getEntries();
- }
-
- public List<VCSEntry> filter(VCSAction action, List<VCSEntry> entries) {
- return delegate.filter(action, entries);
- }
-
- public List<VCSEntry> filter(VCSConnexion connexion, List<VCSEntry> entries) {
- return delegate.filter(connexion, entries);
- }
-
- public List<VCSEntry> filter(VCSEntryLocation location, List<VCSEntry> entries) {
- return delegate.filter(location, entries);
- }
-
- public List<VCSEntry> filter(VCSState state, List<VCSEntry> entries) {
- return delegate.filter(state, entries);
- }
-
- public List<VCSEntry> filter(ListSelectionModel selectionModel, List<VCSEntry> entries) {
- return delegate.filter(selectionModel, entries);
- }
-
- public void populate(VCSConnexion connexion, long timestamp) throws VCSException {
- delegate.populate(connexion, timestamp);
- updateEntries();
- }
-
- public void populate(VCSConnexion connexion, List<String> relativeLocalPaths, VCSEntryLocation location, long timestamp) throws VCSException {
- delegate.populate(connexion, relativeLocalPaths, location, timestamp);
- updateEntries();
- }
-
- public void populate(VCSEntryLocation location, VCSEntry[] states) {
- clear();
- this.location = location;
- delegate.populate(location, states);
- updateEntries();
- }
-
- public void refresh(List<VCSEntry> entries, long timestamp) throws IllegalStateException {
- delegate.refresh(entries, timestamp);
- updateEntries();
- }
-
- public VCSAction[] getActions(List<VCSEntry> entries) {
- return delegate.getActions(entries);
- }
-
- public VCSState[] getStates(List<VCSEntry> entries) {
- return delegate.getStates(entries);
- }
-
- public void clear() {
- delegate.clear();
- displayedEntries.clear();
- fireTableDataChanged();
- }
-
- protected void updateEntries() {
- displayedEntries.clear();
- displayedEntries.addAll(filter(location, delegate.getEntries()));
- fireTableDataChanged();
- }
-}
\ No newline at end of file
Copied: trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/model/AbstractVCSEntriesTableModel.java (from rev 398, trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/model/AbstractVCSEntriesTableModel.java)
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/model/AbstractVCSEntriesTableModel.java (rev 0)
+++ trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/model/AbstractVCSEntriesTableModel.java 2008-04-06 13:06:51 UTC (rev 399)
@@ -0,0 +1,187 @@
+/*
+* ##% Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 Code Lutin,
+* Benjamin Poussin, Tony Chemit
+*
+*
+* 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, write to the Free Software
+* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+* ##% */
+package org.codelutin.vcs.ui.model;
+
+import static org.codelutin.i18n.I18n._;
+import org.codelutin.vcs.type.VCSAction;
+import org.codelutin.vcs.VCSConnexion;
+import org.codelutin.vcs.VCSEntries;
+import org.codelutin.vcs.VCSEntry;
+import org.codelutin.vcs.type.VCSEntryLocation;
+import org.codelutin.vcs.VCSException;
+import org.codelutin.vcs.type.VCSState;
+import org.codelutin.vcs.util.VCSEntriesImpl;
+
+import javax.swing.ListSelectionModel;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Simple Table model to display list of VCSFileState
+ *
+ * @author chemit
+ */
+public abstract class AbstractVCSEntriesTableModel extends javax.swing.table.AbstractTableModel implements VCSEntries {
+
+ protected final String name;
+
+ /** column names */
+ protected final String[] columnNames;
+
+ protected VCSEntryLocation location;
+
+ /** delegate model */
+ protected final transient VCSEntries delegate;
+
+ /** displayed entries */
+ protected final transient List<VCSEntry> displayedEntries;
+
+ private static final long serialVersionUID = 4697917831388337369L;
+
+ protected AbstractVCSEntriesTableModel(String name, String[] columnNames) {
+ super();
+ this.name = name;
+ this.columnNames = columnNames;
+ this.displayedEntries = new ArrayList<VCSEntry>();
+ this.delegate = new VCSEntriesImpl();
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public VCSEntryLocation getLocation() {
+ return location;
+ }
+
+ public List<VCSEntry> getDisplayedEntries(ListSelectionModel selectionModel) {
+ return selectionModel == null ? new ArrayList<VCSEntry>(displayedEntries) : filter(selectionModel, displayedEntries);
+ }
+
+ public int getColumnCount() {
+ return columnNames.length;
+ }
+
+ public int getRowCount() {
+ return displayedEntries.size();
+ }
+
+ @Override
+ public String getColumnName(int columnIndex) {
+ return _(columnNames[columnIndex]);
+ }
+
+ @Override
+ public boolean isCellEditable(int rowIndex, int columnIndex) {
+ // read only data
+ return false;
+ }
+
+ @Override
+ public void setValueAt(Object aValue, int rowIndex, int columnIndex) {
+ // read only data
+ }
+
+ public void setLocation(VCSEntryLocation location) {
+ this.location = location;
+ displayedEntries.clear();
+ displayedEntries.addAll(filter(location, getEntries()));
+ fireTableDataChanged();
+ }
+
+ public VCSAction[] getActions(ListSelectionModel selectionModel) {
+ return getActions(getDisplayedEntries(selectionModel));
+ }
+
+ @Override
+ public String toString() {
+ return super.toString() + "<name:" + name + ", size:" + (getRowCount()) + '>';
+ }
+
+ //===================================================================================================//
+ // === delegate methods =============================================================================//
+ //===================================================================================================//
+
+ public List<VCSEntry> getEntries() {
+ return delegate.getEntries();
+ }
+
+ public List<VCSEntry> filter(VCSAction action, List<VCSEntry> entries) {
+ return delegate.filter(action, entries);
+ }
+
+ public List<VCSEntry> filter(VCSConnexion connexion, List<VCSEntry> entries) {
+ return delegate.filter(connexion, entries);
+ }
+
+ public List<VCSEntry> filter(VCSEntryLocation location, List<VCSEntry> entries) {
+ return delegate.filter(location, entries);
+ }
+
+ public List<VCSEntry> filter(VCSState state, List<VCSEntry> entries) {
+ return delegate.filter(state, entries);
+ }
+
+ public List<VCSEntry> filter(ListSelectionModel selectionModel, List<VCSEntry> entries) {
+ return delegate.filter(selectionModel, entries);
+ }
+
+ public void populate(VCSConnexion connexion, long timestamp) throws VCSException {
+ delegate.populate(connexion, timestamp);
+ updateEntries();
+ }
+
+ public void populate(VCSConnexion connexion, List<String> relativeLocalPaths, VCSEntryLocation location, long timestamp) throws VCSException {
+ delegate.populate(connexion, relativeLocalPaths, location, timestamp);
+ updateEntries();
+ }
+
+ public void populate(VCSEntryLocation location, VCSEntry[] states) {
+ clear();
+ this.location = location;
+ delegate.populate(location, states);
+ updateEntries();
+ }
+
+ public void refresh(List<VCSEntry> entries, long timestamp) throws IllegalStateException {
+ delegate.refresh(entries, timestamp);
+ updateEntries();
+ }
+
+ public VCSAction[] getActions(List<VCSEntry> entries) {
+ return delegate.getActions(entries);
+ }
+
+ public VCSState[] getStates(List<VCSEntry> entries) {
+ return delegate.getStates(entries);
+ }
+
+ public void clear() {
+ delegate.clear();
+ displayedEntries.clear();
+ fireTableDataChanged();
+ }
+
+ protected void updateEntries() {
+ displayedEntries.clear();
+ displayedEntries.addAll(filter(location, delegate.getEntries()));
+ fireTableDataChanged();
+ }
+}
\ No newline at end of file
Deleted: trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/model/ConfirmUIModel.java
===================================================================
--- trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/model/ConfirmUIModel.java 2008-04-05 20:43:39 UTC (rev 371)
+++ trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/model/ConfirmUIModel.java 2008-04-06 13:06:51 UTC (rev 399)
@@ -1,65 +0,0 @@
-/**
- * # #% Copyright (C) 2008 Code Lutin, Tony Chemit
- * 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, write to the Free Software Foundation, Inc., 59 Temple Place
- * - Suite 330, Boston, MA 02111-1307, USA.
- * # #%
- */
-package org.codelutin.vcs.ui.model;
-
-import org.codelutin.vcs.VCSAction;
-import org.codelutin.vcs.VCSEntry;
-import org.codelutin.vcs.VCSEntryLocation;
-import static org.codelutin.vcs.ui.VCSUIConstants.ACTION_PROPERTY_CHANGED;
-import static org.codelutin.vcs.ui.VCSUIConstants.MESSAGE_HISTORY_PROPERTY_CHANGED;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * Model of a repository
- *
- * @author chemit
- */
-public class ConfirmUIModel extends AbstractUIModel {
-
- /** history of commit messages */
- protected List<String> commitMessages;
-
- /** current action to fired */
- protected VCSAction action;
-
- public VCSAction getAction() {
- return action;
- }
-
- public List<String> getCommitMessages() {
- if (commitMessages == null) {
- commitMessages = new ArrayList<String>();
- }
- return commitMessages;
- }
-
- public void addCommitMessage(String commitMessage) {
- if (commitMessage != null && !commitMessage.isEmpty() && !getCommitMessages().contains(commitMessage)) {
- // add message in history
- getCommitMessages().add(commitMessage);
- firePropertyChange(MESSAGE_HISTORY_PROPERTY_CHANGED, null, commitMessage);
- }
- }
-
- public void init(VCSAction action, VCSEntryLocation location, VCSEntry[] states) {
- this.action = action;
- model.clear();
- model.populate(location, states);
- // never propagate old action, since need always the property changed
- firePropertyChange(ACTION_PROPERTY_CHANGED, null, action);
- }
-}
\ No newline at end of file
Copied: trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/model/ConfirmUIModel.java (from rev 398, trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/model/ConfirmUIModel.java)
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/model/ConfirmUIModel.java (rev 0)
+++ trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/model/ConfirmUIModel.java 2008-04-06 13:06:51 UTC (rev 399)
@@ -0,0 +1,59 @@
+/**
+ * # #% Copyright (C) 2008 Code Lutin, Tony Chemit
+ * 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, write to the Free Software Foundation, Inc., 59 Temple Place
+ * - Suite 330, Boston, MA 02111-1307, USA.
+ * # #%
+ */
+package org.codelutin.vcs.ui.model;
+
+import org.codelutin.vcs.VCSEntry;
+import org.codelutin.vcs.type.VCSAction;
+import org.codelutin.vcs.type.VCSEntryLocation;
+import static org.codelutin.vcs.ui.VCSUIConstants.MESSAGE_HISTORY_PROPERTY_CHANGED;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Model of a repository
+ *
+ * @author chemit
+ */
+public class ConfirmUIModel extends AbstractUIModel {
+
+ /** history of commit messages */
+ protected List<String> commitMessages;
+
+
+ public List<String> getCommitMessages() {
+ if (commitMessages == null) {
+ commitMessages = new ArrayList<String>();
+ }
+ return commitMessages;
+ }
+
+ public void addCommitMessage(String commitMessage) {
+ if (commitMessage != null && !commitMessage.isEmpty() && !getCommitMessages().contains(commitMessage)) {
+ // add message in history
+ getCommitMessages().add(commitMessage);
+ firePropertyChange(MESSAGE_HISTORY_PROPERTY_CHANGED, null, commitMessage);
+ }
+ }
+
+ public void init(VCSAction action, VCSEntryLocation location, VCSEntry[] states) {
+ // always reset action in order to allow propagation of action changed
+ this.action = null;
+ model.clear();
+ model.populate(location, states);
+ setAction(action);
+ }
+
+}
\ No newline at end of file
Deleted: trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/model/DiffPanelUIModel.java
===================================================================
--- trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/model/DiffPanelUIModel.java 2008-04-05 20:43:39 UTC (rev 371)
+++ trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/model/DiffPanelUIModel.java 2008-04-06 13:06:51 UTC (rev 399)
@@ -1,157 +0,0 @@
-/**
- * # #% Copyright (C) 2008 Code Lutin, Tony Chemit
- * 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, write to the Free Software Foundation, Inc., 59 Temple Place
- * - Suite 330, Boston, MA 02111-1307, USA.
- * # #%
- */
-package org.codelutin.vcs.ui.model;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.codelutin.vcs.VCSAction;
-import org.codelutin.vcs.VCSEntry;
-import org.codelutin.vcs.VCSHandler;
-
-import java.beans.PropertyChangeListener;
-import java.beans.PropertyChangeSupport;
-import java.net.URL;
-
-/**
- * Model of a diff panel (remote content vs local content
- *
- * @author chemit
- */
-public class DiffPanelUIModel {
-
- /** to use log facility, just put in your code: log.info(\"...\"); */
- static protected final Log log = LogFactory.getLog(DiffPanelUIModel.class);
-
- /** local root : wroking copy */
- protected URL leftRoot;
-
- /** remote root : remote url */
- protected URL rightRoot;
-
- /** vcs handler to use (lazy instanciation) */
- protected VCSHandler handler;
-
- /** map of models */
- protected VCSEntry model;
-
- /** support for change properties support */
- protected PropertyChangeSupport changeSupport;
-
- /** local content */
- protected String leftContent;
-
- /** remote content */
- protected String rightContent;
-
- /** current action to fired */
- protected VCSAction action;
-
- public DiffPanelUIModel() {
- }
-
- public DiffPanelUIModel(VCSHandler handler, URL leftRoot, URL rightRoot) {
- this.handler = handler;
- this.leftRoot = leftRoot;
- this.rightRoot = rightRoot;
- }
-
- public VCSHandler getHandler() {
- return handler;
- }
-
- public URL getLeftRoot() {
- return leftRoot;
- }
-
- public URL getRightRoot() {
- return rightRoot;
- }
-
- public String getLeftContent() {
- return leftContent;
- }
-
- public String getRightContent() {
- return rightContent;
- }
-
- public void setLeftContent(String leftContent) {
- this.leftContent = leftContent;
- }
-
- public void setLeftRoot(URL leftRoot) {
- this.leftRoot = leftRoot;
- }
-
- public void setRightContent(String rightContent) {
- this.rightContent = rightContent;
- }
-
- public void setRightRoot(URL rightRoot) {
- this.rightRoot = rightRoot;
- }
-
- public synchronized void addPropertyChangeListener(String propertyName, PropertyChangeListener listener) {
- if (listener == null) {
- return;
- }
- if (changeSupport == null) {
- changeSupport = new PropertyChangeSupport(this);
- }
- changeSupport.addPropertyChangeListener(propertyName, listener);
- }
-
- public synchronized void addPropertyChangeListener(PropertyChangeListener listener) {
- if (listener == null) {
- return;
- }
- if (changeSupport == null) {
- changeSupport = new PropertyChangeSupport(this);
- }
- changeSupport.addPropertyChangeListener(listener);
- }
-
- public synchronized void removePropertyChangeListener(PropertyChangeListener listener) {
- if (listener == null || changeSupport == null) {
- return;
- }
- changeSupport.removePropertyChangeListener(listener);
- }
-
- public synchronized void removePropertyChangeListeners() {
- if (changeSupport == null) {
- return;
- }
- for (PropertyChangeListener listener : getPropertyChangeListeners()) {
- changeSupport.removePropertyChangeListener(listener);
- }
- }
-
- public synchronized PropertyChangeListener[] getPropertyChangeListeners() {
- if (changeSupport == null) {
- return new PropertyChangeListener[0];
- }
- return changeSupport.getPropertyChangeListeners();
- }
-
- public void firePropertyChange(String propertyName, Object oldValue, Object newValue) {
- if (changeSupport == null || (oldValue == null && newValue == null) ||
- (oldValue != null && oldValue.equals(newValue))) {
- return;
- }
- changeSupport.firePropertyChange(propertyName, oldValue, newValue);
- }
-
-}
\ No newline at end of file
Copied: trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/model/DiffPanelUIModel.java (from rev 398, trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/model/DiffPanelUIModel.java)
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/model/DiffPanelUIModel.java (rev 0)
+++ trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/model/DiffPanelUIModel.java 2008-04-06 13:06:51 UTC (rev 399)
@@ -0,0 +1,157 @@
+/**
+ * # #% Copyright (C) 2008 Code Lutin, Tony Chemit
+ * 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, write to the Free Software Foundation, Inc., 59 Temple Place
+ * - Suite 330, Boston, MA 02111-1307, USA.
+ * # #%
+ */
+package org.codelutin.vcs.ui.model;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.codelutin.vcs.type.VCSAction;
+import org.codelutin.vcs.VCSEntry;
+import org.codelutin.vcs.VCSHandler;
+
+import java.beans.PropertyChangeListener;
+import java.beans.PropertyChangeSupport;
+import java.net.URL;
+
+/**
+ * Model of a diff panel (remote content vs local content
+ *
+ * @author chemit
+ */
+public class DiffPanelUIModel {
+
+ /** to use log facility, just put in your code: log.info(\"...\"); */
+ static protected final Log log = LogFactory.getLog(DiffPanelUIModel.class);
+
+ /** local root : wroking copy */
+ protected URL leftRoot;
+
+ /** remote root : remote url */
+ protected URL rightRoot;
+
+ /** vcs handler to use (lazy instanciation) */
+ protected VCSHandler handler;
+
+ /** map of models */
+ protected VCSEntry model;
+
+ /** support for change properties support */
+ protected PropertyChangeSupport changeSupport;
+
+ /** local content */
+ protected String leftContent;
+
+ /** remote content */
+ protected String rightContent;
+
+ /** current action to fired */
+ protected VCSAction action;
+
+ public DiffPanelUIModel() {
+ }
+
+ public DiffPanelUIModel(VCSHandler handler, URL leftRoot, URL rightRoot) {
+ this.handler = handler;
+ this.leftRoot = leftRoot;
+ this.rightRoot = rightRoot;
+ }
+
+ public VCSHandler getHandler() {
+ return handler;
+ }
+
+ public URL getLeftRoot() {
+ return leftRoot;
+ }
+
+ public URL getRightRoot() {
+ return rightRoot;
+ }
+
+ public String getLeftContent() {
+ return leftContent;
+ }
+
+ public String getRightContent() {
+ return rightContent;
+ }
+
+ public void setLeftContent(String leftContent) {
+ this.leftContent = leftContent;
+ }
+
+ public void setLeftRoot(URL leftRoot) {
+ this.leftRoot = leftRoot;
+ }
+
+ public void setRightContent(String rightContent) {
+ this.rightContent = rightContent;
+ }
+
+ public void setRightRoot(URL rightRoot) {
+ this.rightRoot = rightRoot;
+ }
+
+ public synchronized void addPropertyChangeListener(String propertyName, PropertyChangeListener listener) {
+ if (listener == null) {
+ return;
+ }
+ if (changeSupport == null) {
+ changeSupport = new PropertyChangeSupport(this);
+ }
+ changeSupport.addPropertyChangeListener(propertyName, listener);
+ }
+
+ public synchronized void addPropertyChangeListener(PropertyChangeListener listener) {
+ if (listener == null) {
+ return;
+ }
+ if (changeSupport == null) {
+ changeSupport = new PropertyChangeSupport(this);
+ }
+ changeSupport.addPropertyChangeListener(listener);
+ }
+
+ public synchronized void removePropertyChangeListener(PropertyChangeListener listener) {
+ if (listener == null || changeSupport == null) {
+ return;
+ }
+ changeSupport.removePropertyChangeListener(listener);
+ }
+
+ public synchronized void removePropertyChangeListeners() {
+ if (changeSupport == null) {
+ return;
+ }
+ for (PropertyChangeListener listener : getPropertyChangeListeners()) {
+ changeSupport.removePropertyChangeListener(listener);
+ }
+ }
+
+ public synchronized PropertyChangeListener[] getPropertyChangeListeners() {
+ if (changeSupport == null) {
+ return new PropertyChangeListener[0];
+ }
+ return changeSupport.getPropertyChangeListeners();
+ }
+
+ public void firePropertyChange(String propertyName, Object oldValue, Object newValue) {
+ if (changeSupport == null || (oldValue == null && newValue == null) ||
+ (oldValue != null && oldValue.equals(newValue))) {
+ return;
+ }
+ changeSupport.firePropertyChange(propertyName, oldValue, newValue);
+ }
+
+}
\ No newline at end of file
Deleted: trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/model/DiffUIModel.java
===================================================================
--- trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/model/DiffUIModel.java 2008-04-05 20:43:39 UTC (rev 371)
+++ trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/model/DiffUIModel.java 2008-04-06 13:06:51 UTC (rev 399)
@@ -1,65 +0,0 @@
-/**
- * # #% Copyright (C) 2008 Code Lutin, Tony Chemit
- * 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, write to the Free Software Foundation, Inc., 59 Temple Place
- * - Suite 330, Boston, MA 02111-1307, USA.
- * # #%
- */
-package org.codelutin.vcs.ui.model;
-
-import org.codelutin.vcs.VCSAction;
-import org.codelutin.vcs.VCSEntry;
-import org.codelutin.vcs.VCSEntryLocation;
-import org.codelutin.vcs.ui.VCSUIConstants;
-
-/**
- * Model of a repository
- *
- * @author chemit
- */
-public class DiffUIModel extends AbstractUIModel {
-
-
- /** current file displayed */
- protected VCSEntry fileModel;
-
- /** current action to fired */
- protected VCSAction action;
-
- private VCSEntryLocation location;
-
- public void setLocation(VCSEntryLocation location) {
- VCSEntryLocation oldLocation = this.location;
- getModel().setLocation(location);
- this.location = location;
- firePropertyChange(VCSUIConstants.TAB_PROPERTY_CHANGED, oldLocation, location);
- }
-
-
- public void setFileModel(VCSEntry fileModel) {
- VCSEntry oldFileModel = this.fileModel;
- this.fileModel = fileModel;
- firePropertyChange(VCSUIConstants.TAB_PROPERTY_CHANGED, oldFileModel, fileModel);
- }
-
- public void doAllAction(VCSAction action) {
- this.action = action;
- firePropertyChange(action.name().toLowerCase() + "All", null, model);
- }
-
- public void doAction(VCSAction action) {
- this.action = action;
- firePropertyChange(action.name().toLowerCase(), null, model);
- }
-
- public VCSEntryLocation getLocation() {
- return location;
- }
-}
\ No newline at end of file
Copied: trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/model/DiffUIModel.java (from rev 398, trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/model/DiffUIModel.java)
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/model/DiffUIModel.java (rev 0)
+++ trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/model/DiffUIModel.java 2008-04-06 13:06:51 UTC (rev 399)
@@ -0,0 +1,39 @@
+/**
+ * # #% Copyright (C) 2008 Code Lutin, Tony Chemit
+ * 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, write to the Free Software Foundation, Inc., 59 Temple Place
+ * - Suite 330, Boston, MA 02111-1307, USA.
+ * # #%
+ */
+package org.codelutin.vcs.ui.model;
+
+import org.codelutin.vcs.VCSEntry;
+import org.codelutin.vcs.ui.VCSUIConstants;
+
+/**
+ * Model of a repository
+ *
+ * @author chemit
+ */
+public class DiffUIModel extends AbstractTabUIModel {
+
+ /** current file displayed */
+ protected VCSEntry fileModel;
+
+ public void setFileModel(VCSEntry fileModel) {
+ VCSEntry oldFileModel = this.fileModel;
+ this.fileModel = fileModel;
+ firePropertyChange(VCSUIConstants.TAB_PROPERTY_CHANGED, oldFileModel, fileModel);
+ }
+
+ public VCSEntry getFileModel() {
+ return fileModel;
+ }
+}
\ No newline at end of file
Deleted: trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/model/SimpleVCSEntriesTableModelImpl.java
===================================================================
--- trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/model/SimpleVCSEntriesTableModelImpl.java 2008-04-05 20:43:39 UTC (rev 371)
+++ trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/model/SimpleVCSEntriesTableModelImpl.java 2008-04-06 13:06:51 UTC (rev 399)
@@ -1,52 +0,0 @@
-/**
- * # #% Copyright (C) 2008 Code Lutin, Tony Chemit
- * 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, write to the Free Software Foundation, Inc., 59 Temple Place
- * - Suite 330, Boston, MA 02111-1307, USA.
- * # #%
- */
-package org.codelutin.vcs.ui.model;
-
-import org.codelutin.vcs.VCSEntry;
-import org.codelutin.vcs.VCSState;
-import org.codelutin.vcs.ui.VCSUIConstants;
-
-/** @author chemit */
-public class SimpleVCSEntriesTableModelImpl extends AbstractVCSEntriesTableModel {
-
- private static final long serialVersionUID = -6397327068709720165L;
-
- protected SimpleVCSEntriesTableModelImpl(String name) {
-
- super(name, VCSUIConstants.SIMPLE_COLUMNS_NAMES);
- }
-
- public Object getValueAt(int rowIndex, int columnIndex) {
- if (getRowCount() == 0) {
- return null;
- }
- VCSEntry item = displayedEntries.get(rowIndex);
- Object result = null;
- if (columnIndex == 0) {
- // get module
- result = item.getRelativeLocalPath();
- } else if (columnIndex == 1) {
- // get file
- result = item.getFile().getName();
- } else if (columnIndex == 2) {
- // get status
- VCSState state = item.getState();
- result = state == null ? null : state.libelle();
- }
- return result;
- }
-
-
-}
Copied: trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/model/SimpleVCSEntriesTableModelImpl.java (from rev 398, trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/model/SimpleVCSEntriesTableModelImpl.java)
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/model/SimpleVCSEntriesTableModelImpl.java (rev 0)
+++ trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/model/SimpleVCSEntriesTableModelImpl.java 2008-04-06 13:06:51 UTC (rev 399)
@@ -0,0 +1,52 @@
+/**
+ * # #% Copyright (C) 2008 Code Lutin, Tony Chemit
+ * 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, write to the Free Software Foundation, Inc., 59 Temple Place
+ * - Suite 330, Boston, MA 02111-1307, USA.
+ * # #%
+ */
+package org.codelutin.vcs.ui.model;
+
+import org.codelutin.vcs.VCSEntry;
+import org.codelutin.vcs.type.VCSState;
+import org.codelutin.vcs.ui.VCSUIConstants;
+
+/** @author chemit */
+public class SimpleVCSEntriesTableModelImpl extends AbstractVCSEntriesTableModel {
+
+ private static final long serialVersionUID = -6397327068709720165L;
+
+ protected SimpleVCSEntriesTableModelImpl(String name) {
+
+ super(name, VCSUIConstants.SIMPLE_COLUMNS_NAMES);
+ }
+
+ public Object getValueAt(int rowIndex, int columnIndex) {
+ if (getRowCount() == 0) {
+ return null;
+ }
+ VCSEntry item = displayedEntries.get(rowIndex);
+ Object result = null;
+ if (columnIndex == 0) {
+ // get module
+ result = item.getRelativeLocalPath();
+ } else if (columnIndex == 1) {
+ // get file
+ result = item.getFile().getName();
+ } else if (columnIndex == 2) {
+ // get status
+ VCSState state = item.getState();
+ result = state == null ? null : state.libelle();
+ }
+ return result;
+ }
+
+
+}
Deleted: trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/model/SynchUIModel.java
===================================================================
--- trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/model/SynchUIModel.java 2008-04-05 20:43:39 UTC (rev 371)
+++ trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/model/SynchUIModel.java 2008-04-06 13:06:51 UTC (rev 399)
@@ -1,42 +0,0 @@
-/**
- * # #% Copyright (C) 2008 Code Lutin, Tony Chemit
- * 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, write to the Free Software Foundation, Inc., 59 Temple Place
- * - Suite 330, Boston, MA 02111-1307, USA.
- * # #%
- */
-package org.codelutin.vcs.ui.model;
-
-import org.codelutin.vcs.VCSAction;
-import org.codelutin.vcs.VCSEntryLocation;
-import org.codelutin.vcs.ui.VCSUIConstants;
-
-/**
- * Model of a repository
- *
- * @author chemit
- */
-public class SynchUIModel extends AbstractUIModel {
-
- /** current action to be fired */
- protected VCSAction action;
-
- public void setLocation(VCSEntryLocation location) {
- VCSEntryLocation oldLocation = getModel().getLocation();
- getModel().setLocation(location);
- firePropertyChange(VCSUIConstants.TAB_PROPERTY_CHANGED, oldLocation, location);
- }
-
- public void doAllAction(VCSAction action) {
- this.action = action;
- firePropertyChange(action.name().toLowerCase() + "All", null, model);
- }
-
-}
Copied: trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/model/SynchUIModel.java (from rev 398, trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/model/SynchUIModel.java)
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/model/SynchUIModel.java (rev 0)
+++ trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/model/SynchUIModel.java 2008-04-06 13:06:51 UTC (rev 399)
@@ -0,0 +1,32 @@
+/**
+ * # #% Copyright (C) 2008 Code Lutin, Tony Chemit
+ * 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, write to the Free Software Foundation, Inc., 59 Temple Place
+ * - Suite 330, Boston, MA 02111-1307, USA.
+ * # #%
+ */
+package org.codelutin.vcs.ui.model;
+
+import org.codelutin.vcs.type.VCSAction;
+
+/**
+ * Model of a repository
+ *
+ * @author chemit
+ */
+public class SynchUIModel extends AbstractTabUIModel {
+
+ public void doAllAction(VCSAction action) {
+
+ setAction(action);
+ firePropertyChange(action.name().toLowerCase() + "All", null, model);
+ }
+
+}
1
0
r398 - in trunk/lutinvcs: . lutinvcs-core/src/main/java/org/codelutin/vcs/ui lutinvcs-core/src/main/java/org/codelutin/vcs/ui/handler lutinvcs-core/src/main/java/org/codelutin/vcs/ui/model lutinvcs-ui/src/main/java/org/codelutin/vcs/ui lutinvcs-ui/src/test/java/org/codelutin/vcs/ui
by tchemit@users.labs.libre-entreprise.org 06 Apr '08
by tchemit@users.labs.libre-entreprise.org 06 Apr '08
06 Apr '08
Author: tchemit
Date: 2008-04-06 13:05:53 +0000 (Sun, 06 Apr 2008)
New Revision: 398
Added:
trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/AbstractDiffUI.java
trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/AbstractSynchUI.java
trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/AbstractTabUI.java
trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/AbstractVCSPopup.java
trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/VCSInitializer.java
trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/handler/AbstractTabUIHandler.java
trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/model/AbstractTabUIModel.java
Modified:
trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/AbstractUI.java
trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/VCSUIConstants.java
trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/handler/AbstractConfirmUIHandler.java
trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/handler/AbstractDiffUIHandler.java
trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/handler/AbstractSynchUIHandler.java
trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/handler/AbstractUIHandler.java
trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/model/AbstractUIModel.java
trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/model/ConfirmUIModel.java
trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/model/DiffUIModel.java
trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/model/SynchUIModel.java
trunk/lutinvcs/lutinvcs-ui/src/main/java/org/codelutin/vcs/ui/DiffUIHandler.java
trunk/lutinvcs/lutinvcs-ui/src/main/java/org/codelutin/vcs/ui/SynchUIHandler.java
trunk/lutinvcs/lutinvcs-ui/src/main/java/org/codelutin/vcs/ui/VCSPopupAction.java
trunk/lutinvcs/lutinvcs-ui/src/main/java/org/codelutin/vcs/ui/VCSUIFactory.java
trunk/lutinvcs/lutinvcs-ui/src/test/java/org/codelutin/vcs/ui/UITest.java
trunk/lutinvcs/pom.xml
Log:
new module : ui-pre-jaxx
Added: trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/AbstractDiffUI.java
===================================================================
--- trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/AbstractDiffUI.java (rev 0)
+++ trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/AbstractDiffUI.java 2008-04-06 13:05:53 UTC (rev 398)
@@ -0,0 +1,64 @@
+/**
+ * # #% Copyright (C) 2008 Code Lutin, Tony Chemit
+ * 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, write to the Free Software Foundation, Inc., 59 Temple Place
+ * - Suite 330, Boston, MA 02111-1307, USA.
+ * # #%
+ */
+package org.codelutin.vcs.ui;
+
+import org.codelutin.vcs.type.VCSAction;
+import org.codelutin.vcs.ui.handler.AbstractDiffUIHandler;
+import org.codelutin.vcs.ui.handler.AbstractTabUIHandler;
+import org.codelutin.vcs.ui.model.AbstractTabUIModel;
+import org.codelutin.vcs.ui.model.DiffUIModel;
+
+import javax.swing.JButton;
+import javax.swing.JTable;
+
+/** @author chemit */
+public abstract class AbstractDiffUI extends AbstractTabUI {
+
+ public abstract JButton getNextDiff();
+
+ public abstract JButton getPreviousDiff();
+
+ public AbstractDiffUI() {
+ super();
+ }
+
+ public AbstractDiffUI(AbstractTabUIHandler handler, AbstractTabUIModel model) {
+ super(handler, model);
+ }
+
+ public DiffUIModel getModel() {
+ return (DiffUIModel) model;
+ }
+
+ protected AbstractDiffUIHandler getHandler() {
+ return (AbstractDiffUIHandler) handler;
+ }
+
+ protected void selectFile(JTable table) {
+ getModel().setFileModel(model.getModel().getDisplayedEntries(table.getSelectionModel()).get(0));
+ }
+
+ protected void doAction(VCSAction action) {
+ getHandler().doAction(action, getModel().getFileModel());
+ }
+
+ protected void gotoNextDiff() {
+ getHandler().gotoNextDiff();
+ }
+
+ protected void gotoPreviousDiff() {
+ getHandler().gotoPreviousDiff();
+ }
+}
Added: trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/AbstractSynchUI.java
===================================================================
--- trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/AbstractSynchUI.java (rev 0)
+++ trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/AbstractSynchUI.java 2008-04-06 13:05:53 UTC (rev 398)
@@ -0,0 +1,80 @@
+/**
+ * # #% Copyright (C) 2008 Code Lutin, Tony Chemit
+ * 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, write to the Free Software Foundation, Inc., 59 Temple Place
+ * - Suite 330, Boston, MA 02111-1307, USA.
+ * # #%
+ */
+package org.codelutin.vcs.ui;
+
+import org.codelutin.vcs.type.VCSAction;
+import org.codelutin.vcs.type.VCSEntryLocation;
+import org.codelutin.vcs.ui.handler.AbstractSynchUIHandler;
+import org.codelutin.vcs.ui.model.SynchUIModel;
+
+import javax.swing.JButton;
+import java.awt.CardLayout;
+
+/** @author chemit */
+public abstract class AbstractSynchUI extends AbstractTabUI {
+
+ public abstract JButton getRefreshAll();
+
+ public abstract JButton getDiffAll();
+
+ public abstract JButton getUpdateAll();
+
+ public abstract JButton getCommitAll();
+
+ public abstract JButton getRevertAll();
+
+ public abstract JButton getDeleteAll();
+
+ public abstract AbstractVCSPopup getAllPopup();
+
+ public abstract AbstractVCSPopup getLocalPopup();
+
+ public abstract AbstractVCSPopup getRemotePopup();
+
+
+ public AbstractSynchUI() {
+ super();
+ }
+
+ public AbstractSynchUI(AbstractSynchUIHandler handler, SynchUIModel model) {
+ super(handler, model);
+ }
+
+ public SynchUIModel getModel() {
+ return (SynchUIModel) model;
+ }
+
+ protected AbstractSynchUIHandler getHandler() {
+ return (AbstractSynchUIHandler) handler;
+ }
+
+ protected void doAllAction(VCSAction action) {
+ getModel().doAllAction(action);
+ }
+
+ public AbstractVCSPopup getPopup(VCSEntryLocation modelName) {
+ switch (modelName) {
+ case ALL:
+ return getAllPopup();
+ case LOCAL:
+ return getLocalPopup();
+ case REMOTE:
+ return getRemotePopup();
+ case UNKNOW:
+ break;
+ }
+ throw new IllegalStateException("no popup found for " + modelName);
+ }
+}
\ No newline at end of file
Added: trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/AbstractTabUI.java
===================================================================
--- trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/AbstractTabUI.java (rev 0)
+++ trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/AbstractTabUI.java 2008-04-06 13:05:53 UTC (rev 398)
@@ -0,0 +1,95 @@
+/**
+ * # #% Copyright (C) 2008 Code Lutin, Tony Chemit
+ * 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, write to the Free Software Foundation, Inc., 59 Temple Place
+ * - Suite 330, Boston, MA 02111-1307, USA.
+ * # #%
+ */
+package org.codelutin.vcs.ui;
+
+import org.codelutin.vcs.type.VCSEntryLocation;
+import org.codelutin.vcs.ui.handler.AbstractTabUIHandler;
+import org.codelutin.vcs.ui.model.AbstractTabUIModel;
+
+import javax.swing.JPanel;
+import javax.swing.JScrollPane;
+import javax.swing.JTable;
+import javax.swing.JToggleButton;
+import java.awt.CardLayout;
+
+/** @author chemit */
+public abstract class AbstractTabUI extends AbstractUI {
+
+ public abstract JToggleButton getAllTab();
+
+ public abstract JToggleButton getLocalTab();
+
+ public abstract JToggleButton getRemoteTab();
+
+ public abstract JScrollPane getAllContent();
+
+ public abstract JScrollPane getLocalContent();
+
+ public abstract JScrollPane getRemoteContent();
+
+ public abstract JTable getAllTable();
+
+ public abstract JTable getLocalTable();
+
+ public abstract JTable getRemoteTable();
+
+ public abstract JPanel getPreview();
+
+ public abstract CardLayout getCardLayout();
+
+ public AbstractTabUI(AbstractTabUIHandler handler, AbstractTabUIModel model) {
+ super(handler, model);
+ }
+
+ public AbstractTabUI() {
+ // for jaxx but never used
+ super();
+ }
+
+ public AbstractTabUIModel getModel() {
+ return (AbstractTabUIModel) model;
+ }
+
+ protected AbstractTabUIHandler getHandler() {
+ return (AbstractTabUIHandler) handler;
+ }
+
+ @Override
+ public void setVisible(boolean b) {
+ if (handler.getLocation() == VCSEntryLocation.UNKNOW) {
+ // first launch, no tab model selected,choose one
+ getAllTab().doClick();
+ }
+ super.setVisible(b);
+ }
+
+ public JTable getTable(VCSEntryLocation modelName) {
+ switch (modelName) {
+ case ALL:
+ return getAllTable();
+ case LOCAL:
+ return getLocalTable();
+ case REMOTE:
+ return getRemoteTable();
+ case UNKNOW:
+ break;
+ }
+ throw new IllegalStateException("no table found for " + modelName);
+ }
+
+ protected void setLocation(VCSEntryLocation location) {
+ getModel().setLocation(location);
+ }
+}
Modified: trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/AbstractUI.java
===================================================================
--- trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/AbstractUI.java 2008-04-06 13:05:33 UTC (rev 397)
+++ trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/AbstractUI.java 2008-04-06 13:05:53 UTC (rev 398)
@@ -35,10 +35,6 @@
UIHelper.setQuitAction(this);
}
- public AbstractUI getUi() {
- return this;
- }
-
public AbstractUIModel getModel() {
return model;
}
Added: trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/AbstractVCSPopup.java
===================================================================
--- trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/AbstractVCSPopup.java (rev 0)
+++ trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/AbstractVCSPopup.java 2008-04-06 13:05:53 UTC (rev 398)
@@ -0,0 +1,48 @@
+/**
+ * # #% Copyright (C) 2008 Code Lutin, Tony Chemit
+ * 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, write to the Free Software Foundation, Inc., 59 Temple Place
+ * - Suite 330, Boston, MA 02111-1307, USA.
+ * # #%
+ */
+package org.codelutin.vcs.ui;
+
+import org.codelutin.vcs.ui.handler.VCSAbsractAction;
+import org.codelutin.vcs.type.VCSAction;
+
+import javax.swing.JMenuItem;
+import java.awt.event.ActionEvent;
+
+/** @author chemit */
+public abstract class AbstractVCSPopup extends javax.swing.JPopupMenu {/* begin raw body code */
+ protected VCSAbsractAction dispatchAction;
+
+ public abstract JMenuItem getRefresh();
+
+ public abstract JMenuItem getDiff();
+
+ public abstract JMenuItem getUpdate();
+
+ public abstract JMenuItem getCommit();
+
+ public abstract JMenuItem getRevert();
+
+ public abstract JMenuItem getDelete();
+
+ protected void setDispatchAction(VCSAbsractAction action) {
+ this.dispatchAction = action;
+ }
+
+ protected void doAction(VCSAction action, JMenuItem item) {
+ dispatchAction.setAction(action);
+ ActionEvent e = new ActionEvent(item, 1, action.name());
+ dispatchAction.actionPerformed(e);
+ }
+}
Added: trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/VCSInitializer.java
===================================================================
--- trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/VCSInitializer.java (rev 0)
+++ trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/VCSInitializer.java 2008-04-06 13:05:53 UTC (rev 398)
@@ -0,0 +1,44 @@
+/**
+ * # #% Copyright (C) 2008 Code Lutin, Tony Chemit
+ * 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, write to the Free Software Foundation, Inc., 59 Temple Place
+ * - Suite 330, Boston, MA 02111-1307, USA.
+ * # #%
+ */
+package org.codelutin.vcs.ui;
+
+import jaxx.reflect.ClassDescriptorLoader;
+import jaxx.tags.TagManager;
+import jaxx.tags.swing.JPopupMenuHandler;
+import jaxx.tags.swing.JWindowHandler;
+
+import java.beans.Introspector;
+
+public class VCSInitializer implements jaxx.spi.Initializer {
+
+ public void initialize() {
+ String[] searchPath = Introspector.getBeanInfoSearchPath();
+ String[] newSearchPath = new String[searchPath.length + 1];
+ System.arraycopy(searchPath, 0, newSearchPath, 0, searchPath.length);
+ newSearchPath[newSearchPath.length - 1] = "jaxx.beaninfos";
+
+ Introspector.setBeanInfoSearchPath(newSearchPath);
+
+ TagManager.registerTag("org.codelutin.vcs.ui.*", "JVCSPopup", new DefaultObjectHandler(ClassDescriptorLoader.getClassDescriptor(JPopupMenuHandler.class)));
+
+ TagManager.registerBean(ClassDescriptorLoader.getClassDescriptor(AbstractSynchUI.class), JWindowHandler.class);
+ TagManager.registerBean(ClassDescriptorLoader.getClassDescriptor(AbstractVCSPopup.class), JPopupMenuHandler.class);
+
+ //TagManager.registerBean(ClassDescriptorLoader.getClassDescriptor(AbstractUI.class), JDialog.class);
+
+ //TagManager.registerDefaultNamespace("AbstractUI", "javax.swing.*");
+
+ }
+}
\ No newline at end of file
Modified: trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/VCSUIConstants.java
===================================================================
--- trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/VCSUIConstants.java 2008-04-06 13:05:33 UTC (rev 397)
+++ trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/VCSUIConstants.java 2008-04-06 13:05:53 UTC (rev 398)
@@ -26,29 +26,15 @@
n_("lutinvcs.status")
};
- /** model name for synchronize all tab ui */
+ /** model name for synchronize ui */
public static final String SYNCH_MODEL_PROPERTY = "modelSynch";
- public static final String SYNCH_ALL_MODEL_PROPERTY = "modelSynchAll";
-
- /** model name for synchronize local tab ui */
- public static final String SYNCH_LOCAL_MODEL_PROPERTY = "modelSynchLocal";
-
- /** model name for synchronize remote tab ui */
- public static final String SYNCH_REMOTE_MODEL_PROPERTY = "modelSynchRemote";
-
- /** model name for diff all tab ui */
- public static final String DIFF_ALL_MODEL_PROPERTY = "modelDiffAll";
-
- /** model name for diff local tab ui */
- public static final String DIFF_LOCAL_MODEL_PROPERTY = "modelDiffLocal";
-
- /** model name for diff remote tab ui */
- public static final String DIFF_REMOTE_MODEL_PROPERTY = "modelDiffRemote";
-
- /** model name for diff remote tab ui */
+ /** model name for confirm ui */
public static final String CONFIRM_MODEL_PROPERTY = "modelConfirm";
+ /** model name for diff ui */
+ public static final String DIFF_MODEL_PROPERTY = "modelConfirm";
+
public static final String ACTION_PROPERTY_CHANGED = "action";
public static final String MESSAGE_HISTORY_PROPERTY_CHANGED = "historyMessage";
Modified: trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/handler/AbstractConfirmUIHandler.java
===================================================================
--- trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/handler/AbstractConfirmUIHandler.java 2008-04-06 13:05:33 UTC (rev 397)
+++ trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/handler/AbstractConfirmUIHandler.java 2008-04-06 13:05:53 UTC (rev 398)
@@ -14,8 +14,9 @@
*/
package org.codelutin.vcs.ui.handler;
+import org.codelutin.vcs.VCSEntry;
import org.codelutin.vcs.type.VCSAction;
-import org.codelutin.vcs.VCSEntry;
+import org.codelutin.vcs.ui.AbstractUI;
import org.codelutin.vcs.ui.VCSUIConstants;
import org.codelutin.vcs.ui.model.AbstractVCSEntriesTableModel;
import org.codelutin.vcs.ui.model.ConfirmUIModel;
@@ -28,7 +29,7 @@
*
* @author chemit
*/
-public abstract class AbstractConfirmUIHandler extends AbstractUIHandler<ConfirmUIModel> {
+public abstract class AbstractConfirmUIHandler extends AbstractUIHandler<ConfirmUIModel, AbstractUI> {
protected abstract void updateUI();
Modified: trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/handler/AbstractDiffUIHandler.java
===================================================================
--- trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/handler/AbstractDiffUIHandler.java 2008-04-06 13:05:33 UTC (rev 397)
+++ trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/handler/AbstractDiffUIHandler.java 2008-04-06 13:05:53 UTC (rev 398)
@@ -14,41 +14,31 @@
*/
package org.codelutin.vcs.ui.handler;
+import org.codelutin.vcs.VCSEntry;
import org.codelutin.vcs.type.VCSAction;
-import org.codelutin.vcs.VCSEntry;
+import org.codelutin.vcs.type.VCSEntryLocation;
+import org.codelutin.vcs.ui.AbstractDiffUI;
import org.codelutin.vcs.ui.VCSUIConstants;
-import org.codelutin.vcs.ui.model.AbstractVCSEntriesTableModel;
import org.codelutin.vcs.ui.model.DiffUIModel;
import java.beans.PropertyChangeEvent;
/** @author chemit */
-public abstract class AbstractDiffUIHandler extends AbstractUIHandler<DiffUIModel> {
+public abstract class AbstractDiffUIHandler<U extends AbstractDiffUI> extends AbstractTabUIHandler<DiffUIModel, U> {
public void propertyChange(PropertyChangeEvent evt) {
//if (log.isDebugEnabled()) {
log.info(evt.getPropertyName() + " old:" + evt.getOldValue() + ", new:" + evt.getNewValue());
//}
+
String action = evt.getPropertyName();
-
- if (VCSUIConstants.TAB_PROPERTY_CHANGED.equals(action)) {
- doSelectTab((AbstractVCSEntriesTableModel) evt.getNewValue());
+ if (VCSUIConstants.FILE_PROPERTY_CHANGED.equals(action)) {
+ doSelectFile((VCSEntry) evt.getNewValue());
} else {
- if (VCSUIConstants.FILE_PROPERTY_CHANGED.equals(action)) {
- doSelectFile((VCSEntry) evt.getNewValue());
- } else {
- try {
- VCSAction vcsAction = VCSAction.valueOf(action.toUpperCase());
- doAction(vcsAction, (VCSEntry) evt.getNewValue());
- } catch (IllegalArgumentException e) {
- // ignore ite
- }
- }
+ super.propertyChange(evt);
}
}
- public abstract void doSelectTab(AbstractVCSEntriesTableModel action);
-
public abstract void doSelectFile(VCSEntry model);
public abstract void doAction(VCSAction action, VCSEntry model);
@@ -57,4 +47,21 @@
public abstract void gotoPreviousDiff();
+ public void doSelectLocation(VCSEntryLocation location) {
+ log.info(location);
+
+ getUi().getCardLayout().show(getUi().getPreview(), location.name().toLowerCase() + "Content");
+ //VCSAction[] actions = getModel().getModel().getActions((ListSelectionModel) null);
+ /*List<String> acts = new ArrayList<String>();
+ for (VCSAction action : actions) {
+ acts.add(action.name().toLowerCase());
+ } */
+ /*boolean hasActions = actions.length > 0;
+ getUi().getDiffAll().setEnabled(hasActions && acts.contains("diff"));
+ getUi().getUpdateAll().setEnabled(hasActions && acts.contains("update"));
+ getUi().getCommitAll().setEnabled(hasActions && acts.contains("commit"));
+ getUi().getRevertAll().setEnabled(hasActions && acts.contains("revert"));
+ getUi().getDeleteAll().setEnabled(hasActions && acts.contains("delete"));
+ getUi().getRefreshAll().setEnabled(hasActions);*/
+ }
}
\ No newline at end of file
Modified: trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/handler/AbstractSynchUIHandler.java
===================================================================
--- trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/handler/AbstractSynchUIHandler.java 2008-04-06 13:05:33 UTC (rev 397)
+++ trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/handler/AbstractSynchUIHandler.java 2008-04-06 13:05:53 UTC (rev 398)
@@ -16,37 +16,34 @@
import org.codelutin.vcs.type.VCSAction;
import org.codelutin.vcs.type.VCSEntryLocation;
-import org.codelutin.vcs.ui.VCSUIConstants;
+import org.codelutin.vcs.ui.AbstractSynchUI;
import org.codelutin.vcs.ui.model.SynchUIModel;
-import java.beans.PropertyChangeEvent;
+import javax.swing.ListSelectionModel;
+import java.util.ArrayList;
+import java.util.List;
/** @author chemit */
-public abstract class AbstractSynchUIHandler extends AbstractUIHandler<SynchUIModel> {
+public abstract class AbstractSynchUIHandler<U extends AbstractSynchUI> extends AbstractTabUIHandler<SynchUIModel, U> {
- public void propertyChange(PropertyChangeEvent evt) {
- //if (log.isDebugEnabled()) {
- log.info(evt.getPropertyName() + " old:" + evt.getOldValue() + ", new:" + evt.getNewValue());
- //}
- String action = evt.getPropertyName();
+ public abstract void doAllAction(VCSAction action);
- if (VCSUIConstants.TAB_PROPERTY_CHANGED.equals(action)) {
- doSelectLocation((VCSEntryLocation) evt.getNewValue());
- } else if (action.endsWith("All")) {
- try {
- String actionName = action.substring(0, action.length() - 3);
- VCSAction vcsAction = VCSAction.valueOf(actionName.toUpperCase());
- doAllAction(vcsAction);
- } catch (IllegalArgumentException e) {
- // ignore it ?
- }
+ public void doSelectLocation(VCSEntryLocation location) {
+
+ super.doSelectLocation(location);
+
+ VCSAction[] actions = getModel().getModel().getActions((ListSelectionModel) null);
+ List<String> acts = new ArrayList<String>();
+ for (VCSAction action : actions) {
+ acts.add(action.name().toLowerCase());
}
+ boolean hasActions = actions.length > 0;
+ getUi().getDiffAll().setEnabled(hasActions && acts.contains("diff"));
+ getUi().getUpdateAll().setEnabled(hasActions && acts.contains("update"));
+ getUi().getCommitAll().setEnabled(hasActions && acts.contains("commit"));
+ getUi().getRevertAll().setEnabled(hasActions && acts.contains("revert"));
+ getUi().getDeleteAll().setEnabled(hasActions && acts.contains("delete"));
+ getUi().getRefreshAll().setEnabled(hasActions);
}
- //public abstract void doSelectAction(VCSAction action);
-
- public abstract void doAllAction(VCSAction action);
-
- public abstract void doSelectLocation(VCSEntryLocation action);
-
}
Copied: trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/handler/AbstractTabUIHandler.java (from rev 378, trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/handler/AbstractSynchUIHandler.java)
===================================================================
--- trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/handler/AbstractTabUIHandler.java (rev 0)
+++ trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/handler/AbstractTabUIHandler.java 2008-04-06 13:05:53 UTC (rev 398)
@@ -0,0 +1,59 @@
+/**
+ * # #% Copyright (C) 2008 Code Lutin, Tony Chemit
+ * 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, write to the Free Software Foundation, Inc., 59 Temple Place
+ * - Suite 330, Boston, MA 02111-1307, USA.
+ * # #%
+ */
+package org.codelutin.vcs.ui.handler;
+
+import org.codelutin.vcs.type.VCSEntryLocation;
+import org.codelutin.vcs.ui.AbstractTabUI;
+import org.codelutin.vcs.ui.VCSUIConstants;
+import org.codelutin.vcs.ui.model.AbstractTabUIModel;
+
+import javax.swing.ListSelectionModel;
+import java.beans.PropertyChangeEvent;
+
+/** @author chemit */
+public abstract class AbstractTabUIHandler<M extends AbstractTabUIModel, U extends AbstractTabUI> extends AbstractUIHandler<M, U> {
+
+ protected abstract void initTab(VCSEntryLocation location);
+
+ @Override
+ public void init() {
+ super.init();
+ initTab(VCSEntryLocation.ALL);
+ initTab(VCSEntryLocation.LOCAL);
+ initTab(VCSEntryLocation.REMOTE);
+ }
+
+ public ListSelectionModel getSelectionModel() {
+ return getUi().getTable(getLocation()).getSelectionModel();
+ }
+
+ public void propertyChange(PropertyChangeEvent evt) {
+ //if (log.isDebugEnabled()) {
+ log.info(evt.getPropertyName() + " old:" + evt.getOldValue() + ", new:" + evt.getNewValue());
+ //}
+ String action = evt.getPropertyName();
+
+ if (VCSUIConstants.TAB_PROPERTY_CHANGED.equals(action)) {
+ doSelectLocation((VCSEntryLocation) evt.getNewValue());
+ }
+ }
+
+ public void doSelectLocation(VCSEntryLocation location) {
+ log.info(location);
+ getUi().getCardLayout().show(getUi().getPreview(), location.name().toLowerCase() + "Content");
+
+ }
+
+}
\ No newline at end of file
Modified: trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/handler/AbstractUIHandler.java
===================================================================
--- trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/handler/AbstractUIHandler.java 2008-04-06 13:05:33 UTC (rev 397)
+++ trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/handler/AbstractUIHandler.java 2008-04-06 13:05:53 UTC (rev 398)
@@ -18,20 +18,21 @@
import org.apache.commons.logging.LogFactory;
import org.codelutin.vcs.VCSFactory;
import org.codelutin.vcs.runner.VCSActionManager;
+import org.codelutin.vcs.type.VCSEntryLocation;
+import org.codelutin.vcs.ui.AbstractUI;
import org.codelutin.vcs.ui.model.AbstractUIModel;
-import javax.swing.JDialog;
import javax.swing.ListSelectionModel;
import java.beans.PropertyChangeListener;
/** @author chemit */
-public abstract class AbstractUIHandler<M extends AbstractUIModel> implements PropertyChangeListener {
+public abstract class AbstractUIHandler<M extends AbstractUIModel, U extends AbstractUI> implements PropertyChangeListener {
protected static Log log = LogFactory.getLog(AbstractUIHandler.class);
public abstract M getModel();
- public abstract JDialog getUi();
+ public abstract U getUi();
public abstract ListSelectionModel getSelectionModel();
@@ -42,6 +43,10 @@
getModel().addPropertyChangeListener(this);
}
+ public VCSEntryLocation getLocation() {
+ return getModel().getModel().getLocation();
+ }
+
protected VCSActionManager getActionManager() {
return VCSFactory.getActionManager();
}
Copied: trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/model/AbstractTabUIModel.java (from rev 378, trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/model/SynchUIModel.java)
===================================================================
--- trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/model/AbstractTabUIModel.java (rev 0)
+++ trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/model/AbstractTabUIModel.java 2008-04-06 13:05:53 UTC (rev 398)
@@ -0,0 +1,33 @@
+/**
+ * # #% Copyright (C) 2008 Code Lutin, Tony Chemit
+ * 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, write to the Free Software Foundation, Inc., 59 Temple Place
+ * - Suite 330, Boston, MA 02111-1307, USA.
+ * # #%
+ */
+package org.codelutin.vcs.ui.model;
+
+import org.codelutin.vcs.type.VCSEntryLocation;
+import org.codelutin.vcs.ui.VCSUIConstants;
+
+/**
+ * Model of a repository
+ *
+ * @author chemit
+ */
+public class AbstractTabUIModel extends AbstractUIModel {
+
+ public void setLocation(VCSEntryLocation location) {
+ VCSEntryLocation oldLocation = getModel().getLocation();
+ getModel().setLocation(location);
+ firePropertyChange(VCSUIConstants.TAB_PROPERTY_CHANGED, oldLocation, location);
+ }
+
+}
\ No newline at end of file
Modified: trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/model/AbstractUIModel.java
===================================================================
--- trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/model/AbstractUIModel.java 2008-04-06 13:05:33 UTC (rev 397)
+++ trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/model/AbstractUIModel.java 2008-04-06 13:05:53 UTC (rev 398)
@@ -19,7 +19,9 @@
import org.codelutin.vcs.VCSConnexion;
import org.codelutin.vcs.VCSEntry;
import org.codelutin.vcs.type.VCSEntryLocation;
+import org.codelutin.vcs.type.VCSAction;
import org.codelutin.vcs.VCSException;
+import org.codelutin.vcs.ui.VCSUIConstants;
import java.beans.PropertyChangeListener;
import java.beans.PropertyChangeSupport;
@@ -31,6 +33,9 @@
/** to use log facility, just put in your code: log.info(\"...\"); */
static protected final Log log = LogFactory.getLog(AbstractUIModel.class);
+ /** current action to be fired */
+ protected VCSAction action;
+
/** support for change properties support */
protected PropertyChangeSupport changeSupport;
@@ -60,6 +65,16 @@
getModel().refresh(entries, System.nanoTime());
}
+ public VCSAction getAction() {
+ return action;
+ }
+
+ public void setAction(VCSAction action) {
+ VCSAction oldAction = this.action;
+ this.action = action;
+ firePropertyChange(VCSUIConstants.ACTION_PROPERTY_CHANGED, oldAction, action);
+ }
+
public synchronized void addPropertyChangeListener(String propertyName, PropertyChangeListener listener) {
if (listener == null) {
return;
Modified: trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/model/ConfirmUIModel.java
===================================================================
--- trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/model/ConfirmUIModel.java 2008-04-06 13:05:33 UTC (rev 397)
+++ trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/model/ConfirmUIModel.java 2008-04-06 13:05:53 UTC (rev 398)
@@ -14,10 +14,9 @@
*/
package org.codelutin.vcs.ui.model;
-import org.codelutin.vcs.type.VCSAction;
import org.codelutin.vcs.VCSEntry;
+import org.codelutin.vcs.type.VCSAction;
import org.codelutin.vcs.type.VCSEntryLocation;
-import static org.codelutin.vcs.ui.VCSUIConstants.ACTION_PROPERTY_CHANGED;
import static org.codelutin.vcs.ui.VCSUIConstants.MESSAGE_HISTORY_PROPERTY_CHANGED;
import java.util.ArrayList;
@@ -33,13 +32,7 @@
/** history of commit messages */
protected List<String> commitMessages;
- /** current action to fired */
- protected VCSAction action;
- public VCSAction getAction() {
- return action;
- }
-
public List<String> getCommitMessages() {
if (commitMessages == null) {
commitMessages = new ArrayList<String>();
@@ -56,10 +49,11 @@
}
public void init(VCSAction action, VCSEntryLocation location, VCSEntry[] states) {
- this.action = action;
+ // always reset action in order to allow propagation of action changed
+ this.action = null;
model.clear();
model.populate(location, states);
- // never propagate old action, since need always the property changed
- firePropertyChange(ACTION_PROPERTY_CHANGED, null, action);
+ setAction(action);
}
+
}
\ No newline at end of file
Modified: trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/model/DiffUIModel.java
===================================================================
--- trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/model/DiffUIModel.java 2008-04-06 13:05:33 UTC (rev 397)
+++ trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/model/DiffUIModel.java 2008-04-06 13:05:53 UTC (rev 398)
@@ -14,9 +14,7 @@
*/
package org.codelutin.vcs.ui.model;
-import org.codelutin.vcs.type.VCSAction;
import org.codelutin.vcs.VCSEntry;
-import org.codelutin.vcs.type.VCSEntryLocation;
import org.codelutin.vcs.ui.VCSUIConstants;
/**
@@ -24,42 +22,18 @@
*
* @author chemit
*/
-public class DiffUIModel extends AbstractUIModel {
+public class DiffUIModel extends AbstractTabUIModel {
-
/** current file displayed */
protected VCSEntry fileModel;
- /** current action to fired */
- protected VCSAction action;
-
- private VCSEntryLocation location;
-
- public void setLocation(VCSEntryLocation location) {
- VCSEntryLocation oldLocation = this.location;
- getModel().setLocation(location);
- this.location = location;
- firePropertyChange(VCSUIConstants.TAB_PROPERTY_CHANGED, oldLocation, location);
- }
-
-
public void setFileModel(VCSEntry fileModel) {
VCSEntry oldFileModel = this.fileModel;
this.fileModel = fileModel;
firePropertyChange(VCSUIConstants.TAB_PROPERTY_CHANGED, oldFileModel, fileModel);
}
- public void doAllAction(VCSAction action) {
- this.action = action;
- firePropertyChange(action.name().toLowerCase() + "All", null, model);
+ public VCSEntry getFileModel() {
+ return fileModel;
}
-
- public void doAction(VCSAction action) {
- this.action = action;
- firePropertyChange(action.name().toLowerCase(), null, model);
- }
-
- public VCSEntryLocation getLocation() {
- return location;
- }
}
\ No newline at end of file
Modified: trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/model/SynchUIModel.java
===================================================================
--- trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/model/SynchUIModel.java 2008-04-06 13:05:33 UTC (rev 397)
+++ trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/model/SynchUIModel.java 2008-04-06 13:05:53 UTC (rev 398)
@@ -15,27 +15,17 @@
package org.codelutin.vcs.ui.model;
import org.codelutin.vcs.type.VCSAction;
-import org.codelutin.vcs.type.VCSEntryLocation;
-import org.codelutin.vcs.ui.VCSUIConstants;
/**
* Model of a repository
*
* @author chemit
*/
-public class SynchUIModel extends AbstractUIModel {
+public class SynchUIModel extends AbstractTabUIModel {
- /** current action to be fired */
- protected VCSAction action;
-
- public void setLocation(VCSEntryLocation location) {
- VCSEntryLocation oldLocation = getModel().getLocation();
- getModel().setLocation(location);
- firePropertyChange(VCSUIConstants.TAB_PROPERTY_CHANGED, oldLocation, location);
- }
-
public void doAllAction(VCSAction action) {
- this.action = action;
+
+ setAction(action);
firePropertyChange(action.name().toLowerCase() + "All", null, model);
}
Modified: trunk/lutinvcs/lutinvcs-ui/src/main/java/org/codelutin/vcs/ui/DiffUIHandler.java
===================================================================
--- trunk/lutinvcs/lutinvcs-ui/src/main/java/org/codelutin/vcs/ui/DiffUIHandler.java 2008-04-06 13:05:33 UTC (rev 397)
+++ trunk/lutinvcs/lutinvcs-ui/src/main/java/org/codelutin/vcs/ui/DiffUIHandler.java 2008-04-06 13:05:53 UTC (rev 398)
@@ -14,48 +14,46 @@
*/
package org.codelutin.vcs.ui;
-import org.codelutin.vcs.type.VCSAction;
import org.codelutin.vcs.VCSEntry;
+import org.codelutin.vcs.type.VCSAction;
+import org.codelutin.vcs.type.VCSEntryLocation;
import org.codelutin.vcs.ui.handler.AbstractDiffUIHandler;
-import org.codelutin.vcs.ui.model.AbstractVCSEntriesTableModel;
import org.codelutin.vcs.ui.model.DiffUIModel;
-import javax.swing.ListSelectionModel;
-
/** @author chemit */
-public class DiffUIHandler extends AbstractDiffUIHandler {
+public class DiffUIHandler extends AbstractDiffUIHandler<JDiffUI> {
- protected final JDiffUI ui;
+ protected final AbstractDiffUI ui;
public DiffUIHandler() {
this.ui = new JDiffUI(this);
}
public JDiffUI getUi() {
- return ui;
+ return (JDiffUI) ui;
}
public DiffUIModel getModel() {
return ui.getModel();
}
- public ListSelectionModel getSelectionModel() {
- AbstractVCSEntriesTableModel tabModel = getModel().getModel();
- return tabModel == null ? null : ui.getTable(tabModel.getLocation().name().toLowerCase()).getSelectionModel();
+ protected void initTab(VCSEntryLocation location) {
+ //TODO
}
- public void doSelectTab(AbstractVCSEntriesTableModel action) {
- }
-
public void doSelectFile(VCSEntry model) {
+ //TODO
}
public void doAction(VCSAction action, VCSEntry model) {
+ //TODO
}
public void gotoNextDiff() {
+ //TODO
}
public void gotoPreviousDiff() {
+ //TODO
}
}
Modified: trunk/lutinvcs/lutinvcs-ui/src/main/java/org/codelutin/vcs/ui/SynchUIHandler.java
===================================================================
--- trunk/lutinvcs/lutinvcs-ui/src/main/java/org/codelutin/vcs/ui/SynchUIHandler.java 2008-04-06 13:05:33 UTC (rev 397)
+++ trunk/lutinvcs/lutinvcs-ui/src/main/java/org/codelutin/vcs/ui/SynchUIHandler.java 2008-04-06 13:05:53 UTC (rev 398)
@@ -1,7 +1,7 @@
package org.codelutin.vcs.ui;
-import org.codelutin.vcs.type.VCSAction;
import org.codelutin.vcs.VCSEntry;
+import org.codelutin.vcs.type.VCSAction;
import org.codelutin.vcs.type.VCSEntryLocation;
import org.codelutin.vcs.ui.handler.AbstractSynchUIHandler;
import org.codelutin.vcs.ui.model.AbstractVCSEntriesTableModel;
@@ -15,7 +15,7 @@
import java.util.List;
/** @author chemit */
-public class SynchUIHandler extends AbstractSynchUIHandler {
+public class SynchUIHandler extends AbstractSynchUIHandler<JSynchUI> {
protected final JSynchUI ui;
@@ -27,22 +27,10 @@
return ui;
}
- @Override
- public void init() {
- super.init();
- initTab(VCSEntryLocation.ALL);
- initTab(VCSEntryLocation.LOCAL);
- initTab(VCSEntryLocation.REMOTE);
- }
-
public SynchUIModel getModel() {
return ui.getModel();
}
- public ListSelectionModel getSelectionModel() {
- return ui.getTable(getModel().getModel().getLocation().name().toLowerCase()).getSelectionModel();
- }
-
public void doAllAction(VCSAction action) {
AbstractVCSEntriesTableModel model = getModel().getModel();
log.info(action + " : " + model);
@@ -73,48 +61,27 @@
}
}
-
- public void doSelectLocation(VCSEntryLocation location) {
- log.info(location);
-
- ui.cardLayout.show(ui.preview, location.name().toLowerCase() + "Content");
- VCSAction[] actions = getModel().getModel().getActions((ListSelectionModel) null);
- List<String> acts = new ArrayList<String>();
- for (VCSAction action : actions) {
- acts.add(action.name().toLowerCase());
- }
- boolean hasActions = actions.length > 0;
- ui.getDiffAll().setEnabled(hasActions && acts.contains("diff"));
- ui.getUpdateAll().setEnabled(hasActions && acts.contains("update"));
- ui.getCommitAll().setEnabled(hasActions && acts.contains("commit"));
- ui.getRevertAll().setEnabled(hasActions && acts.contains("revert"));
- ui.getDeleteAll().setEnabled(hasActions && acts.contains("delete"));
- ui.getRefreshAll().setEnabled(hasActions);
- }
-
- private void initTab(VCSEntryLocation location) {
- String s = location.name().toLowerCase();
- JTable table = ui.getTable(s);
+ protected void initTab(VCSEntryLocation location) {
+ JTable table = getUi().getTable(location);
AbstractVCSEntriesTableModel fileStatesModel = getModel().getModel();
table.setModel(fileStatesModel);
- table.addMouseListener(new ListMouseListener(ui, fileStatesModel, s));
- JVCSPopup jvcsPopup = ui.getPopup(s);
+ table.addMouseListener(new ListMouseListener(ui, fileStatesModel, location));
+ AbstractVCSPopup jvcsPopup = getUi().getPopup(location);
jvcsPopup.setDispatchAction(new VCSPopupAction(ui, location));
}
- private class ListMouseListener extends MouseAdapter {
+ protected static class ListMouseListener extends MouseAdapter {
private final AbstractVCSEntriesTableModel model;
private final ListSelectionModel selectionModel;
private final JTable jTable;
- private final JVCSPopup jPopupMenu;
+ private final AbstractVCSPopup jPopupMenu;
- public ListMouseListener(JSynchUI ui, AbstractVCSEntriesTableModel model, String modelName) {
+ public ListMouseListener(AbstractSynchUI ui, AbstractVCSEntriesTableModel model, VCSEntryLocation modelName) {
this.model = model;
jPopupMenu = ui.getPopup(modelName);
-
jTable = ui.getTable(modelName);
selectionModel = jTable.getSelectionModel();
}
Modified: trunk/lutinvcs/lutinvcs-ui/src/main/java/org/codelutin/vcs/ui/VCSPopupAction.java
===================================================================
--- trunk/lutinvcs/lutinvcs-ui/src/main/java/org/codelutin/vcs/ui/VCSPopupAction.java 2008-04-06 13:05:33 UTC (rev 397)
+++ trunk/lutinvcs/lutinvcs-ui/src/main/java/org/codelutin/vcs/ui/VCSPopupAction.java 2008-04-06 13:05:53 UTC (rev 398)
@@ -35,16 +35,16 @@
protected VCSEntryLocation location;
protected transient ListSelectionModel selectionModel;
- protected transient JSynchUI ui;
+ protected transient AbstractTabUI ui;
protected AbstractVCSEntriesTableModel tableModel;
- public VCSPopupAction(JSynchUI ui, VCSEntryLocation location) {
+ public VCSPopupAction(AbstractTabUI ui, VCSEntryLocation location) {
super();
this.ui = ui;
this.location = location;
//this.selectionModel = ui.getHandler().getSelectionModel();
- this.selectionModel = ui.getTable(location.name().toLowerCase()).getSelectionModel();
+ this.selectionModel = ui.getTable(location).getSelectionModel();
tableModel = ui.getModel().getModel();
}
Modified: trunk/lutinvcs/lutinvcs-ui/src/main/java/org/codelutin/vcs/ui/VCSUIFactory.java
===================================================================
--- trunk/lutinvcs/lutinvcs-ui/src/main/java/org/codelutin/vcs/ui/VCSUIFactory.java 2008-04-06 13:05:33 UTC (rev 397)
+++ trunk/lutinvcs/lutinvcs-ui/src/main/java/org/codelutin/vcs/ui/VCSUIFactory.java 2008-04-06 13:05:53 UTC (rev 398)
@@ -28,16 +28,16 @@
protected static Map<Class<? extends AbstractUIHandler>, AbstractUIHandler> cache;
- protected static JSynchUI synchUI;
- protected static JDiffUI diffUI;
+ protected static AbstractTabUI synchUI;
+ protected static AbstractDiffUI diffUI;
protected static JConfirmUI confirmUI;
- public static JSynchUI newSynchUI() {
+ public static AbstractSynchUI newSynchUI() {
SynchUIHandler result = newHandler(SynchUIHandler.class);
return result.getUi();
}
- public static JDiffUI newDiffUI() {
+ public static AbstractDiffUI newDiffUI() {
DiffUIHandler result = newHandler(DiffUIHandler.class);
return result.getUi();
}
Modified: trunk/lutinvcs/lutinvcs-ui/src/test/java/org/codelutin/vcs/ui/UITest.java
===================================================================
--- trunk/lutinvcs/lutinvcs-ui/src/test/java/org/codelutin/vcs/ui/UITest.java 2008-04-06 13:05:33 UTC (rev 397)
+++ trunk/lutinvcs/lutinvcs-ui/src/test/java/org/codelutin/vcs/ui/UITest.java 2008-04-06 13:05:53 UTC (rev 398)
@@ -44,7 +44,7 @@
try {
connexion.open();
- JSynchUI ui = VCSUIFactory.newSynchUI();
+ AbstractSynchUI ui = VCSUIFactory.newSynchUI();
fillSynchModel(connexion, ui.getModel(), 20, "trunk", "local/", "remote/");
Modified: trunk/lutinvcs/pom.xml
===================================================================
--- trunk/lutinvcs/pom.xml 2008-04-06 13:05:33 UTC (rev 397)
+++ trunk/lutinvcs/pom.xml 2008-04-06 13:05:53 UTC (rev 398)
@@ -24,6 +24,7 @@
<module>lutinvcs-provider-mock</module>
<module>lutinvcs-provider-cvs</module>
<module>lutinvcs-provider-svn</module>
+ <module>lutinvcs-ui-pre-jaxx</module>
<module>lutinvcs-ui-jaxx</module>
<module>lutinvcs-ui</module>
</modules>
@@ -215,6 +216,11 @@
</dependency>
<dependency>
<groupId>lutinlib.vcs</groupId>
+ <artifactId>lutinvcs-ui-pre-jaxx</artifactId>
+ <version>${current.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>lutinlib.vcs</groupId>
<artifactId>lutinvcs-ui-jaxx</artifactId>
<version>${current.version}</version>
</dependency>
1
0
r397 - in trunk/lutinvcs/lutinvcs-ui-jaxx: . src/main/uimodel/org/codelutin/vcs/ui
by tchemit@users.labs.libre-entreprise.org 06 Apr '08
by tchemit@users.labs.libre-entreprise.org 06 Apr '08
06 Apr '08
Author: tchemit
Date: 2008-04-06 13:05:33 +0000 (Sun, 06 Apr 2008)
New Revision: 397
Modified:
trunk/lutinvcs/lutinvcs-ui-jaxx/pom.xml
trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JConfirmUI.jaxx
trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JDiffUI.jaxx
trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JSynchUI.jaxx
trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JVCSPopup.jaxx
Log:
new module : ui-pre-jaxx
Modified: trunk/lutinvcs/lutinvcs-ui-jaxx/pom.xml
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-jaxx/pom.xml 2008-04-06 13:05:15 UTC (rev 396)
+++ trunk/lutinvcs/lutinvcs-ui-jaxx/pom.xml 2008-04-06 13:05:33 UTC (rev 397)
@@ -89,10 +89,15 @@
<scope>compile</scope>
</dependency>
<dependency>
+ <groupId>lutinlib.vcs</groupId>
+ <artifactId>lutinvcs-ui-pre-jaxx</artifactId>
+ <scope>compile</scope>
+ </dependency>
+ <!--dependency>
<groupId>lutinlib</groupId>
<artifactId>jaxx</artifactId>
<scope>compile</scope>
- </dependency>
+ </dependency-->
</dependencies>
</project>
Modified: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JConfirmUI.jaxx
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JConfirmUI.jaxx 2008-04-06 13:05:15 UTC (rev 396)
+++ trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JConfirmUI.jaxx 2008-04-06 13:05:33 UTC (rev 397)
@@ -7,10 +7,11 @@
import org.codelutin.vcs.ui.model.ConfirmUIModel ;
public JConfirmUI(AbstractConfirmUIHandler handler) {
+
super(handler,new ConfirmUIModel());
Action acceptAction= new AbstractAction("accept") {
- private static final long serialVersionUID = -869095664995763055L;
+ private static final long serialVersionUID = 1L;
public void actionPerformed(ActionEvent e) {
getHandler().doAction(getCommitMessage().getText(),getModel().getModel());
}
@@ -18,10 +19,12 @@
accept.setAction((acceptAction));
}
+ @Override
protected AbstractConfirmUIHandler getHandler() {
return (AbstractConfirmUIHandler) super.getHandler();
}
+ @Override
public ConfirmUIModel getModel() {
return (ConfirmUIModel) super.getModel();
}
@@ -80,3 +83,4 @@
</row>
</Table>
</org.codelutin.vcs.ui.AbstractUI>
+
\ No newline at end of file
Modified: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JDiffUI.jaxx
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JDiffUI.jaxx 2008-04-06 13:05:15 UTC (rev 396)
+++ trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JDiffUI.jaxx 2008-04-06 13:05:33 UTC (rev 397)
@@ -1,74 +1,14 @@
-<JDialog title='lutinvcs.diff.title' id='diffui' defaultCloseOperation='DISPOSE_ON_CLOSE'>
+<org.codelutin.vcs.ui.AbstractDiffUI title='lutinvcs.diff.title' id='diffui' defaultCloseOperation='DISPOSE_ON_CLOSE'>
<style source="common.css"/>
<script>
-
import org.codelutin.vcs.type.VCSAction;
import org.codelutin.vcs.type.VCSEntryLocation;
- import org.codelutin.vcs.ui.handler.AbstractDiffUIHandler;
- import org.codelutin.vcs.ui.VCSUIConstants;
- protected AbstractDiffUIHandler handler;
-
- public JTable getTable(String modelName) {
- return (JTable) get$objectMap().get(modelName+"Table");
+ public JDiffUI(org.codelutin.vcs.ui.handler.AbstractDiffUIHandler handler) {
+ super(handler,new org.codelutin.vcs.ui.model.DiffUIModel());
}
-
- @Override
- public void setVisible(boolean b) {
- if (getModel().getLocation() == null) {
- // first launch, no tab model selected,choose one
- allTab.doClick();
- }
- super.setVisible(b);
- }
-
- public JDiffUI(AbstractDiffUIHandler handler) {
- this.handler =handler;
- }
-
- protected AbstractDiffUIHandler getHandler() {
- return handler;
- }
-
- protected void setHandler(AbstractDiffUIHandler handler) {
- this.handler = handler;
- }
-
- protected void selectTab(VCSEntryLocation location) {
- getModel().setLocation(location);
- }
-
- protected void selectFile(JTable table) {
- //model.setFileModel(model.getModel().getData(table.getSelectionModel())[0]);
- }
-
- protected void doAction(VCSAction action) {
- model.doAction(action);
- }
-
- protected void gotoNextDiff() {
- handler.gotoNextDiff();
- }
-
- protected void gotoPreviousDiff() {
- handler.gotoPreviousDiff();
- }
-
- Action quitAction;
- JRootPane rootPane = diffui.getRootPane();
- //rootPane.setDefaultButton(quit);
- quitAction = new AbstractAction("quit") {
- private static final long serialVersionUID = -869095664995763057L;
- public void actionPerformed(ActionEvent e) {
- diffui.dispose();
- }
- };
- rootPane.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke("ESCAPE"),"quit");
- rootPane.getActionMap().put("quit", quitAction);
</script>
- <org.codelutin.vcs.ui.model.DiffUIModel id="model"/>
-
<java.awt.CardLayout id='cardLayout'/>
<Table>
@@ -78,15 +18,15 @@
<JToggleButton id='allTab' selected='true' buttonGroup='tabs' mnemonic="A"
toolTipText="lutinvcs.tabs.diff.tooltip.all"
icon='{createImageIcon("remote_vs_local.png")}'
- onActionPerformed='selectTab(VCSEntryLocation.ALL)'/>
+ onActionPerformed='setLocation(VCSEntryLocation.ALL)'/>
<JToggleButton id='localTab' selected='false' buttonGroup='tabs' mnemonic="L"
toolTipText="lutinvcs.tabs.diff.tooltip.local"
icon='{createImageIcon("local_vs_local.png")}'
- onActionPerformed='selectTab(VCSEntryLocation.LOCAL)'/>
+ onActionPerformed='setLocation(VCSEntryLocation.LOCAL)'/>
<JToggleButton id='remoteTab' selected='false' buttonGroup='tabs' mnemonic="R"
icon='{createImageIcon("remote_vs_remote.png")}'
toolTipText="lutinvcs.tabs.diff.tooltip.remote"
- onActionPerformed='selectTab(VCSEntryLocation.REMOTE)'/>
+ onActionPerformed='setLocation(VCSEntryLocation.REMOTE)'/>
<JButton id='nextDiff' toolTipText="lutinvcs.action.tooltip.nextDiff"
@@ -135,23 +75,5 @@
</JPanel>
</cell>
</row>
- <!--row>
- <cell fill='both'>
- <JToolBar>
- <Table insets='0,0,0,0'>
- <row fill='both' anchor='west'>
- <cell fill='both' weightx='2'>
- <JLabel id="label"/>
- </cell>
- </row>
- <row fill='both' anchor='east'>
- <cell fill='both'>
- <JProgressBar id="progress"/>
- </cell>
- </row>
- </Table>
- </JToolBar>
- </cell>
- </row-->
</Table>
-</JDialog>
+</org.codelutin.vcs.ui.AbstractDiffUI>
Modified: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JSynchUI.jaxx
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JSynchUI.jaxx 2008-04-06 13:05:15 UTC (rev 396)
+++ trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JSynchUI.jaxx 2008-04-06 13:05:33 UTC (rev 397)
@@ -1,61 +1,23 @@
-<org.codelutin.vcs.ui.AbstractUI title='lutinvcs.synch.title' modal="true" defaultCloseOperation='DISPOSE_ON_CLOSE'>
+<org.codelutin.vcs.ui.AbstractSynchUI title='lutinvcs.synch.title' modal="true" id='synchui'
+ defaultCloseOperation='DISPOSE_ON_CLOSE'>
<style source="common.css"/>
<script>
-
import org.codelutin.vcs.type.VCSAction;
import org.codelutin.vcs.type.VCSEntryLocation;
- import org.codelutin.vcs.ui.handler.AbstractSynchUIHandler;
- import org.codelutin.vcs.ui.model.SynchUIModel;
- public JSynchUI(AbstractSynchUIHandler handler) {
- super(handler,new SynchUIModel());
+ public JSynchUI(org.codelutin.vcs.ui.handler.AbstractSynchUIHandler handler) {
+ super(handler,new org.codelutin.vcs.ui.model.SynchUIModel());
}
-
- @Override
- protected AbstractSynchUIHandler getHandler() {
- return (AbstractSynchUIHandler) handler;
- }
-
- @Override
- public SynchUIModel getModel() {
- return (SynchUIModel) super.getModel();
- }
-
- @Override
- public void setVisible(boolean b) {
- if (getModel().getModel().getLocation() == VCSEntryLocation.UNKNOW) {
- // first launch, no tab model selected,choose one
- allTab.doClick();
- }
- super.setVisible(b);
- }
- public JTable getTable(String modelName) {
- return (JTable) get$objectMap().get(modelName+"Table");
- }
-
- public JVCSPopup getPopup(String modelName) {
- return (JVCSPopup) get$objectMap().get(modelName+"Popup");
- }
-
- protected void setLocation(VCSEntryLocation location) {
- getModel().setLocation(location);
- }
-
- protected void doAllAction(VCSAction action) {
- getModel().doAllAction(action);
- }
+ add(table);
</script>
- <!--org.codelutin.vcs.ui.model.SynchUIModel id="model"/-->
-
<java.awt.CardLayout id='cardLayout'/>
- <JPopupMenu enabled='false'>
- </JPopupMenu>
+ <!--JPopupMenu enabled='false'/-->
<org.codelutin.vcs.ui.JVCSPopup id="allPopup"/>
<org.codelutin.vcs.ui.JVCSPopup id="localPopup"/>
<org.codelutin.vcs.ui.JVCSPopup id="remotePopup"/>
- <Table>
+ <Table id='table'>
<row fill='both'>
<cell fill='both' weightx='1'>
<JToolBar>
@@ -110,4 +72,4 @@
</cell>
</row>
</Table>
-</org.codelutin.vcs.ui.AbstractUI>
+</org.codelutin.vcs.ui.AbstractSynchUI>
\ No newline at end of file
Modified: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JVCSPopup.jaxx
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JVCSPopup.jaxx 2008-04-06 13:05:15 UTC (rev 396)
+++ trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JVCSPopup.jaxx 2008-04-06 13:05:33 UTC (rev 397)
@@ -1,4 +1,4 @@
-<JPopupMenu>
+<org.codelutin.vcs.ui.AbstractVCSPopup>
<script>
import org.codelutin.vcs.type.VCSAction;
import org.codelutin.vcs.ui.handler.VCSAbsractAction;
@@ -14,12 +14,12 @@
ActionEvent e = new ActionEvent( item,1,action.name());
dispatchAction.actionPerformed(e);
}
- add(refresh);
+ /*add(refresh);
add(diff);
add(update);
add(commit);
add(revert);
- add(delete);
+ add(delete);*/
</script>
<JMenuItem id='refresh' text='{_("lutinvcs.action.refresh")}' toolTipText='{_("lutinvcs.action.tooltip.refresh")}'
icon='{createImageIcon("autoRefresh.png")}' onActionPerformed='doAction(VCSAction.REFRESH,refresh)'/>
@@ -33,4 +33,4 @@
icon='{createImageIcon("rollback.png")}' onActionPerformed='doAction(VCSAction.REVERT,revert)'/>
<JMenuItem id='delete' text='{_("lutinvcs.action.delete")}' toolTipText='{_("lutinvcs.action.tooltip.delete")}'
icon='{createImageIcon("remove.png")}' onActionPerformed='doAction(VCSAction.DELETE,delete)'/>
-</JPopupMenu>
\ No newline at end of file
+</org.codelutin.vcs.ui.AbstractVCSPopup>
\ No newline at end of file
1
0
06 Apr '08
Author: tchemit
Date: 2008-04-06 13:05:15 +0000 (Sun, 06 Apr 2008)
New Revision: 396
Added:
trunk/lutinvcs/lutinvcs-ui-pre-jaxx/
trunk/lutinvcs/lutinvcs-ui-pre-jaxx/LICENSE.txt
trunk/lutinvcs/lutinvcs-ui-pre-jaxx/changelog
trunk/lutinvcs/lutinvcs-ui-pre-jaxx/pom.xml
trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/
trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/
trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/
trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/
trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/
trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/
trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/
trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/resources/
trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/resources/META-INF/
trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/resources/META-INF/services/
trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/resources/META-INF/services/jaxx.spi.Initializer
trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/resources/META-INF/services/org.apache.commons.logging.LogFactory
trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/resources/i18n/
trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/resources/i18n/lutinvcs-ui-pre-jaxx-fr_FR.properties
trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/resources/i18n/lutinvcs-ui-pref-jaxx-en_GB.properties
trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/site/
trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/site/fr/
trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/site/fr/rst/
trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/site/fr/rst/devel/
trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/site/fr/rst/devel/index.rst
trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/site/fr/rst/index.rst
trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/site/fr/rst/todo.rst
trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/site/site_fr.xml
trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/test/
trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/test/java/
trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/test/java/org/
trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/test/java/org/codelutin/
trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/test/java/org/codelutin/vcs/
trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/test/resources/
trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/test/resources/log4j.properties
Log:
new module : ui-pre-jaxx
Added: trunk/lutinvcs/lutinvcs-ui-pre-jaxx/LICENSE.txt
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-pre-jaxx/LICENSE.txt (rev 0)
+++ trunk/lutinvcs/lutinvcs-ui-pre-jaxx/LICENSE.txt 2008-04-06 13:05:15 UTC (rev 396)
@@ -0,0 +1,280 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.) You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ GNU GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+ 1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+ 2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections
+ 1 and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+ 5. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+ 6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+ END OF TERMS AND CONDITIONS
Added: trunk/lutinvcs/lutinvcs-ui-pre-jaxx/changelog
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-pre-jaxx/changelog (rev 0)
+++ trunk/lutinvcs/lutinvcs-ui-pre-jaxx/changelog 2008-04-06 13:05:15 UTC (rev 396)
@@ -0,0 +1,57 @@
+ver-0-26 poussin 2007????
+ * bug in concat(Object [] ...), better array type now work
+ * add unaccent in StringUtil
+
+ver-0-25 poussin 20070425
+ * add StringUtil.toArrayXXX(String ... s) methodes
+ * use generic
+
+ver-0-24 poussin
+ * ArgumentsParser have 1 as repetitionMax by default
+ * ArgumentsParser use jdk 1.5 syntaxe (..., <>)
+
+ver-0-23 poussin 20061004
+ * move i18n in lutinutil
+ * add method Resource.getConfigProperties(String, Properties) to chains
+ properties
+
+ver-0-22 poussin 20060913
+ * use Generics in CategorisedListenerSet
+ * add org.codelutin.log package (LutinLog, ...)
+ * remove org.codelutin.util.Log
+
+ver-0-21 poussin 20060907
+
+ * Add TransformedList
+ * Add FileUtil.getTempFile(String):File
+ * add FileUtil.getFile():File that prompt user
+ * add FileUtil.getDirectory(): String that prompt user
+ * add FileUtil.copyRecursively(File, File, String ... patternFilter)
+ * add ZipUtil class to compress/uncompress zip file
+ * Transparente*Reference accept null object
+
+ver-0-17 thimel 20050610
+
+ * Ajout de BoundedList et BoundedListOutOfBoundsException
+
+ver-0-16 poussin 20050526
+
+ * Ajout de la methode getConfigProperties dans Resource
+
+ver-0-9 poussin 20040728
+
+ * Ajout de methode isJar, isZip, dans Resource
+
+ver-0-3 poussin 20040405
+
+ * utilisation de maven pour la gestion du projet
+ * Ajout de ExceptionUtil
+
+ver-0-2 poussin 20031021
+
+ * ajout du parser d'argument, ArgumentsParser
+ * ajout de StringUtil
+
+ver-0-1
+
+ * premier version contient seulement Resource
Added: trunk/lutinvcs/lutinvcs-ui-pre-jaxx/pom.xml
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-pre-jaxx/pom.xml (rev 0)
+++ trunk/lutinvcs/lutinvcs-ui-pre-jaxx/pom.xml 2008-04-06 13:05:15 UTC (rev 396)
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>lutinlib.vcs</groupId>
+ <artifactId>lutinvcs</artifactId>
+ <version>0.1-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>lutinvcs-ui-pre-jaxx</artifactId>
+ <name>Lutinvcs ui pre-jaxx</name>
+
+ <packaging>jar</packaging>
+ <version>0.1-SNAPSHOT</version>
+ <description>Lutin vcs library ui pre jaxx</description>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>lutinplugin</groupId>
+ <artifactId>maven-i18n-plugin</artifactId>
+ <executions>
+ <execution>
+ <phase>process-classes</phase>
+ <goals>
+ <goal>parserJava</goal>
+ <goal>gen</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
+ <!--Librairies-->
+ <dependencies>
+ <dependency>
+ <groupId>lutinlib.vcs</groupId>
+ <artifactId>lutinvcs-api</artifactId>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>lutinlib</groupId>
+ <artifactId>jaxx</artifactId>
+ <scope>compile</scope>
+ </dependency>
+ </dependencies>
+</project>
Added: trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/resources/META-INF/services/jaxx.spi.Initializer
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/resources/META-INF/services/jaxx.spi.Initializer (rev 0)
+++ trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/resources/META-INF/services/jaxx.spi.Initializer 2008-04-06 13:05:15 UTC (rev 396)
@@ -0,0 +1 @@
+org.codelutin.vcs.ui.VCSInitializer
\ No newline at end of file
Added: trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/resources/META-INF/services/org.apache.commons.logging.LogFactory
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/resources/META-INF/services/org.apache.commons.logging.LogFactory (rev 0)
+++ trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/resources/META-INF/services/org.apache.commons.logging.LogFactory 2008-04-06 13:05:15 UTC (rev 396)
@@ -0,0 +1 @@
+org.codelutin.util.LutinLogFactory
\ No newline at end of file
Added: trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/resources/i18n/lutinvcs-ui-pre-jaxx-fr_FR.properties
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/resources/i18n/lutinvcs-ui-pre-jaxx-fr_FR.properties (rev 0)
+++ trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/resources/i18n/lutinvcs-ui-pre-jaxx-fr_FR.properties 2008-04-06 13:05:15 UTC (rev 396)
@@ -0,0 +1,4 @@
+lutinvcs.error.thread.action=
+lutinvcs.file=Fichier
+lutinvcs.module=Module
+lutinvcs.status=Status
Added: trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/resources/i18n/lutinvcs-ui-pref-jaxx-en_GB.properties
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/resources/i18n/lutinvcs-ui-pref-jaxx-en_GB.properties (rev 0)
+++ trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/resources/i18n/lutinvcs-ui-pref-jaxx-en_GB.properties 2008-04-06 13:05:15 UTC (rev 396)
@@ -0,0 +1,4 @@
+lutinvcs.error.thread.action=
+lutinvcs.file=File
+lutinvcs.module=Module
+lutinvcs.status=Status
Added: trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/site/fr/rst/devel/index.rst
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/site/fr/rst/devel/index.rst (rev 0)
+++ trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/site/fr/rst/devel/index.rst 2008-04-06 13:05:15 UTC (rev 396)
@@ -0,0 +1,5 @@
+===================
+Lutin vcs core dev
+===================
+
+TODO
Added: trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/site/fr/rst/index.rst
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/site/fr/rst/index.rst (rev 0)
+++ trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/site/fr/rst/index.rst 2008-04-06 13:05:15 UTC (rev 396)
@@ -0,0 +1,5 @@
+==============
+Lutin vcs core
+==============
+
+TODO
\ No newline at end of file
Added: trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/site/fr/rst/todo.rst
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/site/fr/rst/todo.rst (rev 0)
+++ trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/site/fr/rst/todo.rst 2008-04-06 13:05:15 UTC (rev 396)
@@ -0,0 +1,4 @@
+======================
+Lutinvcs - core - TODO
+======================
+
Added: trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/site/site_fr.xml
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/site/site_fr.xml (rev 0)
+++ trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/site/site_fr.xml 2008-04-06 13:05:15 UTC (rev 396)
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<project name="simexplorer-si">
+
+ <skin>
+ <groupId>lutinlib</groupId>
+ <artifactId>lutin-site-skin</artifactId>
+ <version>0.1</version>
+ </skin>
+
+ <bannerLeft>
+ <name>Système d'information - SimExplorer</name>
+ </bannerLeft>
+
+ <bannerRight>
+ <src>
+ http://www.codelutin.com/images/lutinorange-codelutin.png
+ </src>
+ <href>http://www.codelutin.com</href>
+ </bannerRight>
+
+ <poweredBy>
+ <logo href="http://docutils.sourceforge.net/rst.html"
+ img="/images/restructuredtext-logo.png" name="reStructuredText"/>
+ </poweredBy>
+
+ <body>
+ <menu name="Common Links" inherit="top"/>
+ <menu ref="parent"/>
+ <menu ref="reports"/>
+
+ <menu name="Liens">
+ <item href="http://java.sun.com/j2se"
+ name="Le site Java de Sun">
+ </item>
+ </menu>
+ </body>
+</project>
Added: trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/test/resources/log4j.properties
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/test/resources/log4j.properties (rev 0)
+++ trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/test/resources/log4j.properties 2008-04-06 13:05:15 UTC (rev 396)
@@ -0,0 +1,9 @@
+# Global logging configuration
+log4j.rootLogger=ERROR, stdout
+# Console output...
+log4j.appender.stdout=org.apache.log4j.ConsoleAppender
+log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
+log4j.appender.stdout.layout.ConversionPattern=%5p [%t] (%F:%L) %M - %m%n
+#log4j.appender.stdout.layout.ConversionPattern=%%c=%c %%C=%C %%d=%d %%F=%F %%l=%l %%L=%L %%m=%m %%M=%M %%p=%p %%r=%r %%t=%t %%x=%x %%X=%X
+# package level
+log4j.logger.org.codelutin=INFO
1
0
r395 - trunk/lutinvcs/lutinvcs-provider-svn/src/main/java/org/codelutin/vcs
by tchemit@users.labs.libre-entreprise.org 06 Apr '08
by tchemit@users.labs.libre-entreprise.org 06 Apr '08
06 Apr '08
Author: tchemit
Date: 2008-04-06 13:03:34 +0000 (Sun, 06 Apr 2008)
New Revision: 395
Modified:
trunk/lutinvcs/lutinvcs-provider-svn/src/main/java/org/codelutin/vcs/SVNProvider.java
Log:
static method
Modified: trunk/lutinvcs/lutinvcs-provider-svn/src/main/java/org/codelutin/vcs/SVNProvider.java
===================================================================
--- trunk/lutinvcs/lutinvcs-provider-svn/src/main/java/org/codelutin/vcs/SVNProvider.java 2008-04-06 10:22:49 UTC (rev 394)
+++ trunk/lutinvcs/lutinvcs-provider-svn/src/main/java/org/codelutin/vcs/SVNProvider.java 2008-04-06 13:03:34 UTC (rev 395)
@@ -56,7 +56,7 @@
* @return <code>true</code> if connection is ok,<code>false</code> otherwise.
* @throws org.codelutin.vcs.VCSException if could not compute the SVNURL
*/
- public boolean testAnonymousConnection(String url) throws VCSException {
+ public static boolean testAnonymousConnection(String url) throws VCSException {
boolean result = true;
SVNRepository repository = getAnonymousConnection(url);
1
0
r394 - in trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs: event type
by tchemit@users.labs.libre-entreprise.org 06 Apr '08
by tchemit@users.labs.libre-entreprise.org 06 Apr '08
06 Apr '08
Author: tchemit
Date: 2008-04-06 10:22:49 +0000 (Sun, 06 Apr 2008)
New Revision: 394
Added:
trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/event/package.html
trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/type/package.html
Log:
javadoc
Added: trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/event/package.html
===================================================================
--- trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/event/package.html (rev 0)
+++ trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/event/package.html 2008-04-06 10:22:49 UTC (rev 394)
@@ -0,0 +1,8 @@
+<html>
+<body>
+<h1>Lutin vcs api event</h1>
+Ensemble des events.
+<br/>
+On retrouve dans ce paquetage, tout ce qui concerne les �v�nements.
+</body>
+</html>
\ No newline at end of file
Copied: trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/type/package.html (from rev 379, trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/package.html)
===================================================================
--- trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/type/package.html (rev 0)
+++ trunk/lutinvcs/lutinvcs-api/src/main/java/org/codelutin/vcs/type/package.html 2008-04-06 10:22:49 UTC (rev 394)
@@ -0,0 +1,8 @@
+<html>
+<body>
+<h1>Lutin vcs api type</h1>
+Ensemble des types enum�r�s .
+<br/>
+On retrouve dans ce paquetage, uniquement des �num�rations.
+</body>
+</html>
\ No newline at end of file
1
0