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
- 1440 discussions
Author: tchemit
Date: 2008-04-13 08:59:59 +0000 (Sun, 13 Apr 2008)
New Revision: 459
Added:
tags/stable/
Log:
tag before storm...
1
0
r458 - in trunk/lutinvcs: . lutinvcs-all lutinvcs-core lutinvcs-provider-cvs lutinvcs-provider-mock lutinvcs-provider-svn lutinvcs-ui-common lutinvcs-ui-jaxx
by tchemit@users.labs.libre-entreprise.org 13 Apr '08
by tchemit@users.labs.libre-entreprise.org 13 Apr '08
13 Apr '08
Author: tchemit
Date: 2008-04-13 08:26:38 +0000 (Sun, 13 Apr 2008)
New Revision: 458
Modified:
trunk/lutinvcs/lutinvcs-all/pom.xml
trunk/lutinvcs/lutinvcs-core/pom.xml
trunk/lutinvcs/lutinvcs-provider-cvs/pom.xml
trunk/lutinvcs/lutinvcs-provider-mock/pom.xml
trunk/lutinvcs/lutinvcs-provider-svn/pom.xml
trunk/lutinvcs/lutinvcs-ui-common/pom.xml
trunk/lutinvcs/lutinvcs-ui-jaxx/pom.xml
trunk/lutinvcs/pom.xml
Log:
utilisation groupId coh?\195?\169rent correspondant au paquetage java (org.codelutin.vcs) + domaine internet (codelutin.org)
Modified: trunk/lutinvcs/lutinvcs-all/pom.xml
===================================================================
--- trunk/lutinvcs/lutinvcs-all/pom.xml 2008-04-13 07:55:46 UTC (rev 457)
+++ trunk/lutinvcs/lutinvcs-all/pom.xml 2008-04-13 08:26:38 UTC (rev 458)
@@ -5,8 +5,8 @@
<modelVersion>4.0.0</modelVersion>
<parent>
- <groupId>lutinlib.vcs</groupId>
- <artifactId>lutinvcs</artifactId>
+ <groupId>org.codelutin.vcs</groupId>
+ <artifactId>pom</artifactId>
<version>${current.version}</version>
</parent>
@@ -19,12 +19,12 @@
<dependencies>
<dependency>
- <groupId>lutinlib.vcs</groupId>
+ <groupId>org.codelutin.vcs</groupId>
<artifactId>lutinvcs-core</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
- <groupId>lutinlib.vcs</groupId>
+ <groupId>org.codelutin.vcs</groupId>
<artifactId>lutinvcs-all-providers</artifactId>
<scope>compile</scope>
</dependency>
@@ -44,7 +44,7 @@
<scope>compile</scope>
</dependency-->
<dependency>
- <groupId>lutinlib.vcs</groupId>
+ <groupId>org.codelutin.vcs</groupId>
<artifactId>lutinvcs-ui-jaxx</artifactId>
<scope>compile</scope>
</dependency>
Modified: trunk/lutinvcs/lutinvcs-core/pom.xml
===================================================================
--- trunk/lutinvcs/lutinvcs-core/pom.xml 2008-04-13 07:55:46 UTC (rev 457)
+++ trunk/lutinvcs/lutinvcs-core/pom.xml 2008-04-13 08:26:38 UTC (rev 458)
@@ -5,8 +5,8 @@
<modelVersion>4.0.0</modelVersion>
<parent>
- <groupId>lutinlib.vcs</groupId>
- <artifactId>lutinvcs</artifactId>
+ <groupId>org.codelutin.vcs</groupId>
+ <artifactId>pom</artifactId>
<version>${current.version}</version>
</parent>
Modified: trunk/lutinvcs/lutinvcs-provider-cvs/pom.xml
===================================================================
--- trunk/lutinvcs/lutinvcs-provider-cvs/pom.xml 2008-04-13 07:55:46 UTC (rev 457)
+++ trunk/lutinvcs/lutinvcs-provider-cvs/pom.xml 2008-04-13 08:26:38 UTC (rev 458)
@@ -5,8 +5,8 @@
<modelVersion>4.0.0</modelVersion>
<parent>
- <groupId>lutinlib.vcs</groupId>
- <artifactId>lutinvcs</artifactId>
+ <groupId>org.codelutin.vcs</groupId>
+ <artifactId>pom</artifactId>
<version>${current.version}</version>
</parent>
@@ -37,7 +37,7 @@
<dependencies>
<dependency>
- <groupId>lutinlib.vcs</groupId>
+ <groupId>org.codelutin.vcs</groupId>
<artifactId>lutinvcs-core</artifactId>
<scope>compile</scope>
</dependency>
Modified: trunk/lutinvcs/lutinvcs-provider-mock/pom.xml
===================================================================
--- trunk/lutinvcs/lutinvcs-provider-mock/pom.xml 2008-04-13 07:55:46 UTC (rev 457)
+++ trunk/lutinvcs/lutinvcs-provider-mock/pom.xml 2008-04-13 08:26:38 UTC (rev 458)
@@ -5,8 +5,8 @@
<modelVersion>4.0.0</modelVersion>
<parent>
- <groupId>lutinlib.vcs</groupId>
- <artifactId>lutinvcs</artifactId>
+ <groupId>org.codelutin.vcs</groupId>
+ <artifactId>pom</artifactId>
<version>${current.version}</version>
</parent>
@@ -37,7 +37,7 @@
<dependencies>
<dependency>
- <groupId>lutinlib.vcs</groupId>
+ <groupId>org.codelutin.vcs</groupId>
<artifactId>lutinvcs-core</artifactId>
<scope>compile</scope>
</dependency>
Modified: trunk/lutinvcs/lutinvcs-provider-svn/pom.xml
===================================================================
--- trunk/lutinvcs/lutinvcs-provider-svn/pom.xml 2008-04-13 07:55:46 UTC (rev 457)
+++ trunk/lutinvcs/lutinvcs-provider-svn/pom.xml 2008-04-13 08:26:38 UTC (rev 458)
@@ -5,8 +5,8 @@
<modelVersion>4.0.0</modelVersion>
<parent>
- <groupId>lutinlib.vcs</groupId>
- <artifactId>lutinvcs</artifactId>
+ <groupId>org.codelutin.vcs</groupId>
+ <artifactId>pom</artifactId>
<version>${current.version}</version>
</parent>
@@ -37,7 +37,7 @@
<dependencies>
<dependency>
- <groupId>lutinlib.vcs</groupId>
+ <groupId>org.codelutin.vcs</groupId>
<artifactId>lutinvcs-core</artifactId>
<scope>compile</scope>
</dependency>
Modified: trunk/lutinvcs/lutinvcs-ui-common/pom.xml
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-common/pom.xml 2008-04-13 07:55:46 UTC (rev 457)
+++ trunk/lutinvcs/lutinvcs-ui-common/pom.xml 2008-04-13 08:26:38 UTC (rev 458)
@@ -5,8 +5,8 @@
<modelVersion>4.0.0</modelVersion>
<parent>
- <groupId>lutinlib.vcs</groupId>
- <artifactId>lutinvcs</artifactId>
+ <groupId>org.codelutin.vcs</groupId>
+ <artifactId>pom</artifactId>
<version>${current.version}</version>
</parent>
@@ -37,7 +37,7 @@
<dependencies>
<dependency>
- <groupId>lutinlib.vcs</groupId>
+ <groupId>org.codelutin.vcs</groupId>
<artifactId>lutinvcs-core</artifactId>
<scope>compile</scope>
</dependency>
Modified: trunk/lutinvcs/lutinvcs-ui-jaxx/pom.xml
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-jaxx/pom.xml 2008-04-13 07:55:46 UTC (rev 457)
+++ trunk/lutinvcs/lutinvcs-ui-jaxx/pom.xml 2008-04-13 08:26:38 UTC (rev 458)
@@ -5,8 +5,8 @@
<modelVersion>4.0.0</modelVersion>
<parent>
- <groupId>lutinlib.vcs</groupId>
- <artifactId>lutinvcs</artifactId>
+ <groupId>org.codelutin.vcs</groupId>
+ <artifactId>pom</artifactId>
<version>${current.version}</version>
</parent>
@@ -83,7 +83,7 @@
<dependencies>
<dependency>
- <groupId>lutinlib.vcs</groupId>
+ <groupId>org.codelutin.vcs</groupId>
<artifactId>lutinvcs-ui-common</artifactId>
<scope>compile</scope>
</dependency>
Modified: trunk/lutinvcs/pom.xml
===================================================================
--- trunk/lutinvcs/pom.xml 2008-04-13 07:55:46 UTC (rev 457)
+++ trunk/lutinvcs/pom.xml 2008-04-13 08:26:38 UTC (rev 458)
@@ -15,8 +15,8 @@
<version>2.3</version>
</parent>
- <groupId>lutinlib.vcs</groupId>
- <artifactId>lutinvcs</artifactId>
+ <groupId>org.codelutin.vcs</groupId>
+ <artifactId>pom</artifactId>
<modules>
<module>lutinvcs-core</module>
@@ -62,8 +62,8 @@
<!-- current version -->
<current.version>0.1-SNAPSHOT</current.version>
- <common.groupId>lutinlib.vcs</common.groupId>
- <common.artifactId>lutinvcs</common.artifactId>
+ <common.groupId>org.codelutin.vcs</common.groupId>
+ <common.artifactId>pom</common.artifactId>
<!-- par defaut, mode non verbeux -->
<!--maven.verbose>false</maven.verbose-->
@@ -132,7 +132,7 @@
</configuration>
<dependencies>
<dependency>
- <groupId>lutinlib.vcs</groupId>
+ <groupId>${common.groupId}</groupId>
<artifactId>lutinvcs-ui-common</artifactId>
<scope>compile</scope>
<version>${current.version}</version>
@@ -247,11 +247,11 @@
<artifactId>lutinvcs-ui-jaxx</artifactId>
<version>${current.version}</version>
</dependency>
- <dependency>
+ <!--dependency>
<groupId>${common.groupId}</groupId>
<artifactId>lutinvcs-ui</artifactId>
<version>${current.version}</version>
- </dependency>
+ </dependency-->
<dependency>
<groupId>${common.groupId}</groupId>
<artifactId>lutinvcs-provider-mock</artifactId>
1
0
13 Apr '08
Author: tchemit
Date: 2008-04-13 07:55:46 +0000 (Sun, 13 Apr 2008)
New Revision: 457
Added:
trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/action/
trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/action/ChangeLocationAction.java
trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/action/ConfirmAction.java
trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/action/DiffAction.java
trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/action/HelpAction.java
trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/action/ShowMessagesAction.java
trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/action/TabUIAction.java
trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/util/AbstractUIAction.java
trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/action-add.png
trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/action-commit.png
trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/action-delete.png
trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/action-diff-next.png
trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/action-diff-prev.png
trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/action-diff.png
trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/action-help.png
trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/action-refresh.png
trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/action-revert.png
trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/action-showmessages.png
trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/action-update.png
Removed:
trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/add.png
trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/commit.png
trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/delete.png
trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/diff-next.png
trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/diff-prev.png
trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/diff.png
trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/help.png
trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/recent_msgs.png
trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/refresh.png
trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/revert.png
trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/update.png
Modified:
trunk/lutinvcs/lutinvcs-all/pom.xml
trunk/lutinvcs/lutinvcs-core/pom.xml
trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/VCSEntries.java
trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/type/VCSEntryLocation.java
trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/util/VCSEntriesImpl.java
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-common/src/main/java/org/codelutin/vcs/ui/ConfirmUI.java
trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/DiffUI.java
trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/SynchUI.java
trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/handler/ConfirmUIHandler.java
trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/handler/DiffUIHandler.java
trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/handler/SynchUIHandler.java
trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/model/ConfirmUIModel.java
trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/model/DiffUIModel.java
trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/util/AbstractTabUI.java
trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/util/AbstractTabUIHandler.java
trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/util/AbstractUI.java
trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/util/AbstractUIHandler.java
trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/util/AbstractVCSEntriesTableModel.java
trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/util/UIHelper.java
trunk/lutinvcs/lutinvcs-ui-common/src/main/resources/i18n/lutinvcs-ui-common-en_GB.properties
trunk/lutinvcs/lutinvcs-ui-common/src/main/resources/i18n/lutinvcs-ui-common-fr_FR.properties
trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/i18n/lutinvcs-ui-jaxx-en_GB.properties
trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/i18n/lutinvcs-ui-jaxx-fr_FR.properties
trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JaxxConfirmUI.jaxx
trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JaxxDiffUI.jaxx
trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JaxxSynchUI.jaxx
trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/common.css
trunk/lutinvcs/pom.xml
Log:
ui continues...
Modified: trunk/lutinvcs/lutinvcs-all/pom.xml
===================================================================
--- trunk/lutinvcs/lutinvcs-all/pom.xml 2008-04-11 19:52:14 UTC (rev 456)
+++ trunk/lutinvcs/lutinvcs-all/pom.xml 2008-04-13 07:55:46 UTC (rev 457)
@@ -17,24 +17,6 @@
<version>${current.version}</version>
<description>Lutinvcs all modules</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>
-
<dependencies>
<dependency>
<groupId>lutinlib.vcs</groupId>
@@ -43,6 +25,11 @@
</dependency>
<dependency>
<groupId>lutinlib.vcs</groupId>
+ <artifactId>lutinvcs-all-providers</artifactId>
+ <scope>compile</scope>
+ </dependency>
+ <!--dependency>
+ <groupId>lutinlib.vcs</groupId>
<artifactId>lutinvcs-provider-mock</artifactId>
<scope>compile</scope>
</dependency>
@@ -55,7 +42,7 @@
<groupId>lutinlib.vcs</groupId>
<artifactId>lutinvcs-provider-cvs</artifactId>
<scope>compile</scope>
- </dependency>
+ </dependency-->
<dependency>
<groupId>lutinlib.vcs</groupId>
<artifactId>lutinvcs-ui-jaxx</artifactId>
Modified: trunk/lutinvcs/lutinvcs-core/pom.xml
===================================================================
--- trunk/lutinvcs/lutinvcs-core/pom.xml 2008-04-11 19:52:14 UTC (rev 456)
+++ trunk/lutinvcs/lutinvcs-core/pom.xml 2008-04-13 07:55:46 UTC (rev 457)
@@ -34,12 +34,4 @@
</plugin>
</plugins>
</build>
-
- <dependencies>
- <dependency>
- <groupId>lutinlib.vcs</groupId>
- <artifactId>lutinvcs-api</artifactId>
- <scope>compile</scope>
- </dependency>
- </dependencies>
</project>
Modified: trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/VCSEntries.java
===================================================================
--- trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/VCSEntries.java 2008-04-11 19:52:14 UTC (rev 456)
+++ trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/VCSEntries.java 2008-04-13 07:55:46 UTC (rev 457)
@@ -19,6 +19,7 @@
import org.codelutin.vcs.type.VCSState;
import java.util.List;
+import java.util.EnumMap;
/**
* Contract of list of VCSEntry.
@@ -78,20 +79,22 @@
void refresh(long timestamp, List<VCSEntry> entries) throws IllegalStateException;
/**
+ * //TODO update javadoc, use efficient algo
* obtain the array of all {@link VCSAction} found in the given entries
*
* @param entries entries to scan
* @return array of {@link VCSAction} found in entires
*/
- VCSAction[] getActions(List<VCSEntry> entries);
+ EnumMap<VCSAction, Integer> countActions(List<VCSEntry> entries);
/**
+ * //TODO update javadoc,...
* obtain the array of all {@link VCSState} found in the given entries
*
* @param entries entries to scan
* @return array of {@link VCSState found in entires
*/
- VCSState[] getStates(List<VCSEntry> entries);
+ EnumMap<VCSState, Integer> countStates(List<VCSEntry> entries);
/** clear the internal list of entries. */
void clear();
Modified: trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/type/VCSEntryLocation.java
===================================================================
--- trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/type/VCSEntryLocation.java 2008-04-11 19:52:14 UTC (rev 456)
+++ trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/type/VCSEntryLocation.java 2008-04-13 07:55:46 UTC (rev 457)
@@ -31,35 +31,32 @@
* <li>{@link #REMOTE} : if entryis only on remote</li>
* <p/>
* </ul>
- * VCSAction represents an action that can be realized on a file in working
- * copy or on remote repository.
- * <p/>
- * Each <code>VCSAction</code> has 4 properties :
- * <ul>
- * <li>libelle : i18n to be used for this action</li>
- * <li>visible : flag to say if action should be visible in ui</li>
- * <li>backup : flag to say if this action need backup</li>
- * <li>write : flag to say if this action need write access to repository</li>
- * </ul>
*
* @author chemit
*/
@org.codelutin.i18n.I18nable
public enum VCSEntryLocation {
- ALL(n_("lutinvcs.location.all")),
- LOCAL(n_("lutinvcs.location.local")),
- REMOTE(n_("lutinvcs.location.remote")),
- UNKNOW(n_("lutinvcs.location.unknown"));
+ ALL(n_("lutinvcs.location.all.libelle"), n_("lutinvcs.location.all.tip")),
+ LOCAL(n_("lutinvcs.location.local.libelle"), n_("lutinvcs.location.local.tip")),
+ REMOTE(n_("lutinvcs.location.remote.libelle"), n_("lutinvcs.location.remote.tip")),
+ UNKNOW(n_("lutinvcs.location.unknown.libelle"), n_("lutinvcs.location.unknow.tip"));
/** libelle of location */
private final String libelle;
+ private final String tip;
+
public String getLibelle() {
return _(libelle);
}
- VCSEntryLocation(String libelle) {
+ public String getTip() {
+ return _(tip);
+ }
+
+ VCSEntryLocation(String libelle, String tip) {
this.libelle = libelle;
+ this.tip = tip;
}
}
\ No newline at end of file
Modified: trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/util/VCSEntriesImpl.java
===================================================================
--- trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/util/VCSEntriesImpl.java 2008-04-11 19:52:14 UTC (rev 456)
+++ trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/util/VCSEntriesImpl.java 2008-04-13 07:55:46 UTC (rev 457)
@@ -22,10 +22,12 @@
import org.codelutin.vcs.type.VCSEntryLocation;
import org.codelutin.vcs.type.VCSState;
+import java.io.File;
import java.util.ArrayList;
import java.util.Arrays;
+import java.util.EnumMap;
+import java.util.EnumSet;
import java.util.List;
-import java.io.File;
/** @author chemit */
public class VCSEntriesImpl implements VCSEntries {
@@ -145,8 +147,23 @@
}
- public VCSAction[] getActions(List<VCSEntry> entries) {
- List<VCSAction> result = new ArrayList<VCSAction>();
+ public EnumMap<VCSAction, Integer> countActions(List<VCSEntry> entries) {
+ EnumSet<VCSAction> set = EnumSet.allOf(VCSAction.class);
+ EnumMap<VCSAction, Integer> map = new EnumMap<VCSAction, Integer>(VCSAction.class);
+ int[] tmp = new int[set.size()];
+ for (VCSEntry entry : entries) {
+ if (entry.getState() != null) {
+ for (VCSAction action : entry.getState().getActions()) {
+ tmp[action.ordinal()]++;
+ }
+ }
+ }
+ for (VCSAction vcsAction : set) {
+ int index = vcsAction.ordinal();
+ map.put(vcsAction, tmp[index]);
+ }
+ return map;
+ /*List<VCSAction> result = new ArrayList<VCSAction>();
for (VCSState vcsFileState : getStates(entries)) {
List<VCSAction> action = vcsFileState.getActions();
for (VCSAction vcsAction : action) {
@@ -155,10 +172,25 @@
}
}
}
- return result.toArray(new VCSAction[result.size()]);
+ return result.toArray(new VCSAction[result.size()]);*/
}
- public VCSState[] getStates(List<VCSEntry> entries) {
+ public EnumMap<VCSState, Integer> countStates(List<VCSEntry> entries) {
+ EnumSet<VCSState> set = EnumSet.allOf(VCSState.class);
+ EnumMap<VCSState, Integer> map = new EnumMap<VCSState, Integer>(VCSState.class);
+ int[] tmp = new int[set.size()];
+ for (VCSEntry entry : entries) {
+ VCSState state = entry.getState();
+ if (state != null) {
+ tmp[state.ordinal()]++;
+ }
+ }
+ for (VCSState state : set) {
+ int index = state.ordinal();
+ map.put(state, tmp[index]);
+ }
+ return map;
+ /*
List<VCSState> result = new ArrayList<VCSState>();
for (VCSEntry entry : entries) {
VCSState state = entry.getState();
@@ -167,6 +199,7 @@
}
}
return result.toArray(new VCSState[result.size()]);
+ */
}
protected List<String> transformToLocal(List<String> relativeRemotePath) {
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-11 19:52:14 UTC (rev 456)
+++ trunk/lutinvcs/lutinvcs-core/src/main/resources/i18n/lutinvcs-core-en_GB.properties 2008-04-13 07:55:46 UTC (rev 457)
@@ -14,10 +14,14 @@
lutinvcs.error.provider.init.connexion=could not instanciate connexion {0}, for provider {1}, reason\: {2}
lutinvcs.error.provider.init.handler=could not instanciate handler {0}, for provider {1}, reason\: {2}
lutinvcs.error.thread.action=
-lutinvcs.location.all=All
-lutinvcs.location.local=Local
-lutinvcs.location.remote=Remote
-lutinvcs.location.unknown=Unknow
+lutinvcs.location.all.libelle=all
+lutinvcs.location.all.tip=Show both local and remote files
+lutinvcs.location.local.libelle=local
+lutinvcs.location.local.tip=Show local files
+lutinvcs.location.remote.libelle=remote
+lutinvcs.location.remote.tip=Show remote files
+lutinvcs.location.unknow.tip=Show unknown files...
+lutinvcs.location.unknown.libelle=Unknow
lutinvcs.state.missing=missing
lutinvcs.state.modified=modified
lutinvcs.state.outofdate=out of date
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-11 19:52:14 UTC (rev 456)
+++ trunk/lutinvcs/lutinvcs-core/src/main/resources/i18n/lutinvcs-core-fr_FR.properties 2008-04-13 07:55:46 UTC (rev 457)
@@ -1,9 +1,9 @@
lutinvcs.action.add=Ajouter
-lutinvcs.action.changeLog=journal des changements
+lutinvcs.action.changeLog=Journal des changements
lutinvcs.action.checkout=R\u00E9cup\u00E9rer
-lutinvcs.action.commit=Commiter
+lutinvcs.action.commit=Publier
lutinvcs.action.delete=Supprimer
-lutinvcs.action.diff=voir les diff\u00E9rences
+lutinvcs.action.diff=Voir les diff\u00E9rences
lutinvcs.action.overwriteAndUpdate=Update
lutinvcs.action.refresh=Rafra\u00EEchir
lutinvcs.action.revert=Annuler les modifications
@@ -14,16 +14,20 @@
lutinvcs.error.provider.init.connexion=Erreur lors de l''instanciation de la connexion {0}, provider {1}, cause\: {2}
lutinvcs.error.provider.init.handler=Erreur lors de l''instanciation du handler {0}, provider {1}, cause\: {2}
lutinvcs.error.thread.action=
-lutinvcs.location.all=All
-lutinvcs.location.local=Local
-lutinvcs.location.remote=Remote
-lutinvcs.location.unknown=Unknow
+lutinvcs.location.all.libelle=Tout
+lutinvcs.location.all.tip=Voir tous les fichiers locaux et distants
+lutinvcs.location.local.libelle=Local
+lutinvcs.location.local.tip=Voir uniquement les fichiers locaux
+lutinvcs.location.remote.libelle=Distant
+lutinvcs.location.remote.tip=Voir uniquement les fichiers distants
+lutinvcs.location.unknow.tip=Voir uniquement les fichiers de type inconnu...
+lutinvcs.location.unknown.libelle=Unknow
lutinvcs.state.missing=non pr\u00E9sent
lutinvcs.state.modified=modifi\u00E9
lutinvcs.state.outofdate=obsol\u00E8te
lutinvcs.state.outofdateAndModified=modifi\u00E9 et obsol\u00E8te
lutinvcs.state.removed=supprim\u00E9
lutinvcs.state.unknown=\u00E9tat inconnu
-lutinvcs.state.unversionned=non versionn\u00E9
-lutinvcs.state.unversionnedOrMissing=non versionn\u00E9 ou non pr\u00E9sent localement
+lutinvcs.state.unversionned=non publi\u00E9
+lutinvcs.state.unversionnedOrMissing=non publi\u00E9 ou non pr\u00E9sent localement
lutinvcs.state.uptodate=fichier \u00E0 jour
Modified: trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/ConfirmUI.java
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/ConfirmUI.java 2008-04-11 19:52:14 UTC (rev 456)
+++ trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/ConfirmUI.java 2008-04-13 07:55:46 UTC (rev 457)
@@ -14,9 +14,16 @@
*/
package org.codelutin.vcs.ui;
+import org.codelutin.vcs.ui.action.ShowMessagesAction;
+
+import javax.swing.AbstractAction;
import javax.swing.AbstractButton;
+import javax.swing.DefaultListModel;
+import javax.swing.DefaultListSelectionModel;
import javax.swing.JLabel;
+import javax.swing.JList;
import javax.swing.JPanel;
+import javax.swing.JPopupMenu;
import javax.swing.JScrollPane;
import javax.swing.JTextArea;
import javax.swing.JToolBar;
@@ -40,8 +47,16 @@
public abstract AbstractButton getAccept();
+ public abstract JPopupMenu getPopup();
+
+ public abstract JList getMessages();
+
+ public abstract DefaultListSelectionModel getMessageSelectionModel();
+
+ public abstract DefaultListModel getMessageModel();
+
public void doAccept() {
- getHandler().doAction(getCommitMessage().getText(), getHandler().getModel().getEntriesModel());
+ getHandler().doAction(getHandler().getCurrentMessage(), getHandler().getModel().getEntriesModel());
}
@Override
@@ -52,7 +67,7 @@
super.setVisible(b);
}
- protected void showLastMessages() {
- getHandler().showLastMessages();
+ protected AbstractAction createShowMessagesAction() {
+ return ShowMessagesAction.createAction(this);
}
}
Modified: trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/DiffUI.java
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/DiffUI.java 2008-04-11 19:52:14 UTC (rev 456)
+++ trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/DiffUI.java 2008-04-13 07:55:46 UTC (rev 457)
@@ -14,9 +14,9 @@
*/
package org.codelutin.vcs.ui;
-import org.codelutin.vcs.VCSEntry;
-import org.codelutin.vcs.type.VCSAction;
+import org.codelutin.vcs.ui.action.DiffAction;
+import javax.swing.AbstractAction;
import javax.swing.AbstractButton;
/** @author chemit */
@@ -40,20 +40,7 @@
super.setVisible(b);
}
- protected void doSelectFile() {
- VCSEntry entry = getHandler().getSelectedEntry();
- getHandler().getModel().setFileModel(entry);
+ protected AbstractAction createDiffAction(boolean goUp) {
+ return DiffAction.createAction(goUp, this);
}
-
- protected void doAction(VCSAction action) {
- getHandler().doAction(action, getHandler().getModel().getFileModel());
- }
-
- protected void gotoNextDiff() {
- getHandler().gotoNextDiff();
- }
-
- protected void gotoPreviousDiff() {
- getHandler().gotoPreviousDiff();
- }
}
Modified: trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/SynchUI.java
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/SynchUI.java 2008-04-11 19:52:14 UTC (rev 456)
+++ trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/SynchUI.java 2008-04-13 07:55:46 UTC (rev 457)
@@ -14,8 +14,6 @@
*/
package org.codelutin.vcs.ui;
-import org.codelutin.vcs.type.VCSAction;
-
import javax.swing.AbstractButton;
import javax.swing.JPopupMenu;
@@ -56,7 +54,4 @@
super.setVisible(b);
}
- protected void doAction(VCSAction action, boolean useSelection) {
- getHandler().doAction(action, useSelection);
- }
}
\ No newline at end of file
Added: trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/action/ChangeLocationAction.java
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/action/ChangeLocationAction.java (rev 0)
+++ trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/action/ChangeLocationAction.java 2008-04-13 07:55:46 UTC (rev 457)
@@ -0,0 +1,62 @@
+/**
+ * # #% 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.action;
+
+import org.codelutin.vcs.type.VCSEntryLocation;
+import org.codelutin.vcs.ui.util.AbstractTabUI;
+import org.codelutin.vcs.ui.util.AbstractTabUIHandler;
+import org.codelutin.vcs.ui.util.UIHelper;
+
+import javax.swing.AbstractAction;
+import java.awt.event.ActionEvent;
+
+/** @author chemit */
+public class ChangeLocationAction extends org.codelutin.vcs.ui.util.AbstractUIAction<AbstractTabUIHandler<?, ?>> {
+
+ protected VCSEntryLocation location;
+
+ private static final long serialVersionUID = 1L;
+
+ public static AbstractAction createAction(VCSEntryLocation location, AbstractTabUI<?> ui) {
+ ChangeLocationAction action = new ChangeLocationAction(location);
+ action.setUi(ui);
+ return action;
+ }
+
+ public void actionPerformed(ActionEvent e) {
+ checkInit();
+ if (location == null) {
+ return;
+ }
+ getHandler().getModel().setLocation(getLocation());
+ }
+
+ protected VCSEntryLocation getLocation() {
+ return location;
+ }
+
+ protected void setLocation(VCSEntryLocation location) {
+ this.location = location;
+ }
+
+ protected ChangeLocationAction(VCSEntryLocation location) {
+ super(location.getLibelle(), UIHelper.createLocationIcon(location));
+ this.location = location;
+ putValue(SHORT_DESCRIPTION, location.getTip());
+ putValue(DISPLAYED_MNEMONIC_INDEX_KEY, 0);
+ putValue(MNEMONIC_KEY, (int) ((String) getValue(NAME)).charAt(0));
+ }
+
+}
Added: trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/action/ConfirmAction.java
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/action/ConfirmAction.java (rev 0)
+++ trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/action/ConfirmAction.java 2008-04-13 07:55:46 UTC (rev 457)
@@ -0,0 +1,78 @@
+/**
+ * # #% 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.action;
+
+import org.codelutin.vcs.type.VCSAction;
+import org.codelutin.vcs.ui.ConfirmUI;
+import org.codelutin.vcs.ui.handler.ConfirmUIHandler;
+import org.codelutin.vcs.ui.util.UIHelper;
+
+import javax.swing.AbstractAction;
+import java.awt.event.ActionEvent;
+
+/** @author chemit */
+public class ConfirmAction extends org.codelutin.vcs.ui.util.AbstractUIAction<ConfirmUIHandler> {
+
+ protected VCSAction action;
+
+ private static final long serialVersionUID = 1L;
+
+ public static AbstractAction createAction(VCSAction action, ConfirmUI ui) {
+ ConfirmAction action1 = new ConfirmAction(action);
+ action1.setUi(ui);
+ return action1;
+ }
+
+ public void actionPerformed(ActionEvent e) {
+ checkInit();
+ if (action == null) {
+ return;
+ }
+ switch (action) {
+ case CHANGELOG:
+ case DIFF:
+ case REFRESH:
+ return;
+ case CHECKOUT:
+ case OVERWRITE_AND_UPDATE:
+ case ADD:
+ case COMMIT:
+ case DELETE:
+ case REVERT:
+ case UPDATE:
+ ConfirmUIHandler handler = getHandler();
+ handler.doAction(getHandler().getUi().getCommitMessage().getText(), handler.getModel().getEntriesModel());
+ return;
+ }
+ throw new IllegalStateException("could not perform action for action " + action + " (" + this + ')');
+ }
+
+ protected VCSAction getAction() {
+ return action;
+ }
+
+ protected void setAction(VCSAction action) {
+ this.action = action;
+ }
+
+ protected ConfirmAction(VCSAction action) {
+ super(null, UIHelper.createActionIcon(action));
+ this.action = action;
+ //putValue(SHORT_DESCRIPTION, action.getTip());
+ putValue(DISPLAYED_MNEMONIC_INDEX_KEY, 0);
+ putValue(MNEMONIC_KEY, (int) (action.getLibelle()).charAt(0));
+ }
+
+}
\ No newline at end of file
Added: trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/action/DiffAction.java
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/action/DiffAction.java (rev 0)
+++ trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/action/DiffAction.java 2008-04-13 07:55:46 UTC (rev 457)
@@ -0,0 +1,62 @@
+/**
+ * # #% 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.action;
+
+import org.codelutin.vcs.ui.DiffUI;
+import org.codelutin.vcs.ui.handler.DiffUIHandler;
+import static org.codelutin.vcs.ui.util.UIHelper.createActionIcon;
+
+import javax.swing.AbstractAction;
+import java.awt.event.ActionEvent;
+
+/** @author chemit */
+public class DiffAction extends org.codelutin.vcs.ui.util.AbstractUIAction<DiffUIHandler> {
+
+ protected boolean goUp;
+
+ private static final long serialVersionUID = 1L;
+
+ public static AbstractAction createAction(boolean goUp, DiffUI ui) {
+ DiffAction action1 = new DiffAction(goUp);
+ action1.setUi(ui);
+ return action1;
+ }
+
+ public void actionPerformed(ActionEvent e) {
+ checkInit();
+ if (goUp) {
+ getHandler().gotoPreviousDiff();
+ } else {
+ getHandler().gotoNextDiff();
+ }
+ }
+
+ public boolean isGoUp() {
+ return goUp;
+ }
+
+ public void setGoUp(boolean goUp) {
+ this.goUp = goUp;
+ }
+
+ protected DiffAction(boolean goUp) {
+ super(null, createActionIcon("diff-" + (goUp ? "prev" : "next")));
+ this.goUp = goUp;
+ //putValue(SHORT_DESCRIPTION, action.getTip());
+ //putValue(DISPLAYED_MNEMONIC_INDEX_KEY, 0);
+ //putValue(MNEMONIC_KEY, (int) (action.getLibelle()).charAt(0));
+ }
+
+}
\ No newline at end of file
Added: trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/action/HelpAction.java
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/action/HelpAction.java (rev 0)
+++ trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/action/HelpAction.java 2008-04-13 07:55:46 UTC (rev 457)
@@ -0,0 +1,50 @@
+/**
+ * # #% 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.action;
+
+import static org.codelutin.i18n.I18n._;
+import org.codelutin.vcs.ui.util.AbstractUI;
+import org.codelutin.vcs.ui.util.AbstractUIHandler;
+import static org.codelutin.vcs.ui.util.UIHelper.createActionIcon;
+
+import javax.swing.AbstractAction;
+import java.awt.event.ActionEvent;
+
+/** @author chemit */
+public class HelpAction extends org.codelutin.vcs.ui.util.AbstractUIAction<AbstractUIHandler<?, ?>> {
+
+ public static <H extends AbstractUIHandler<?, ?>> AbstractAction createAction(AbstractUI<H> ui) {
+ HelpAction action = new HelpAction();
+ action.setUi(ui);
+ return action;
+ }
+
+ private static final long serialVersionUID = 1L;
+
+ public void actionPerformed(ActionEvent e) {
+ checkInit();
+ log.info("//TODO : " + this + ", " + ui);
+ }
+
+ protected HelpAction() {
+ super(_("lutinvcs.action.help.libelle"), createActionIcon("help"));
+ String name = (String) getValue(NAME);
+ putValue(DISPLAYED_MNEMONIC_INDEX_KEY, name.length() - 1);
+ putValue(ACCELERATOR_KEY, (int) name.charAt(name.length() - 1));
+ putValue(NAME, null);
+ putValue(SHORT_DESCRIPTION, _("lutinvcs.action.help.tip"));
+ }
+
+}
\ No newline at end of file
Added: trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/action/ShowMessagesAction.java
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/action/ShowMessagesAction.java (rev 0)
+++ trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/action/ShowMessagesAction.java 2008-04-13 07:55:46 UTC (rev 457)
@@ -0,0 +1,63 @@
+/**
+ * # #% 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.action;
+
+import static org.codelutin.i18n.I18n._;
+import org.codelutin.vcs.ui.ConfirmUI;
+import org.codelutin.vcs.ui.handler.ConfirmUIHandler;
+import org.codelutin.vcs.ui.util.UIHelper;
+
+import javax.swing.AbstractAction;
+import javax.swing.AbstractButton;
+import java.awt.event.ActionEvent;
+
+/** @author chemit */
+public class ShowMessagesAction extends org.codelutin.vcs.ui.util.AbstractUIAction<ConfirmUIHandler> {
+
+ private static final long serialVersionUID = 1L;
+
+ public static AbstractAction createAction(ConfirmUI ui) {
+ ShowMessagesAction action1 = new ShowMessagesAction();
+ action1.setUi(ui);
+ return action1;
+ }
+
+ public void actionPerformed(ActionEvent e) {
+ checkInit();
+
+ String currentMessage = getHandler().getCurrentMessage();
+
+ if (!getHandler().getModel().containsMessage(currentMessage)) {
+ // save currentmessage in special 0 row
+ getHandler().setMessage(0, false, true, currentMessage);
+ } else {
+ // select
+ getHandler().getUi().getMessageSelectionModel().setValueIsAdjusting(true);
+ getHandler().getUi().getMessages().setSelectedValue(currentMessage, true);
+ getHandler().getUi().getMessageSelectionModel().setValueIsAdjusting(false);
+ }
+
+ getHandler().getUi().getPopup().show((AbstractButton) e.getSource(), 0, 0);
+ //log.info("//TODO:" + this + " : " + messages.size());
+
+ }
+
+ protected ShowMessagesAction() {
+ super(null, UIHelper.createActionIcon("showmessages"));
+ putValue(SHORT_DESCRIPTION, _("lutinvcs.action.showmessages.tip"));
+ setEnabled(false);
+ }
+
+}
\ No newline at end of file
Added: trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/action/TabUIAction.java
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/action/TabUIAction.java (rev 0)
+++ trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/action/TabUIAction.java 2008-04-13 07:55:46 UTC (rev 457)
@@ -0,0 +1,98 @@
+/**
+ * # #% 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.action;
+
+import org.codelutin.vcs.VCSEntry;
+import org.codelutin.vcs.type.VCSAction;
+import org.codelutin.vcs.ui.util.AbstractTabUI;
+import org.codelutin.vcs.ui.util.AbstractTabUIHandler;
+import org.codelutin.vcs.ui.util.AbstractVCSEntriesTableModel;
+import org.codelutin.vcs.ui.util.UIHelper;
+
+import javax.swing.AbstractAction;
+import java.awt.event.ActionEvent;
+import java.util.List;
+
+/** @author chemit */
+public class TabUIAction extends org.codelutin.vcs.ui.util.AbstractUIAction<AbstractTabUIHandler<?, ?>> {
+
+ protected VCSAction action;
+ protected boolean useSelection;
+
+ private static final long serialVersionUID = 1L;
+
+ public static AbstractAction createAction(VCSAction action, boolean useSelection, AbstractTabUI<?> ui) {
+ TabUIAction action1 = new TabUIAction(action, useSelection);
+ action1.setUi(ui);
+ return action1;
+ }
+
+ public void actionPerformed(ActionEvent e) {
+ checkInit();
+ if (action == null) {
+ return;
+ }
+ AbstractTabUIHandler<?, ?> handler = getHandler();
+ AbstractVCSEntriesTableModel model = handler.getModel().getEntriesModel();
+ List<VCSEntry> entries = model.filter(action, model.getDisplayedEntries(useSelection ? handler.getSelectionModel() : null));
+ switch (action) {
+ case CHANGELOG:
+ //TODO
+ return;
+ case DIFF:
+ handler.showDiffUI(useSelection, model, entries);
+ return;
+ case REFRESH:
+ handler.doRefresh(model, entries, handler.getSelectionModel());
+ return;
+ case CHECKOUT:
+ case OVERWRITE_AND_UPDATE:
+ case ADD:
+ case COMMIT:
+ case DELETE:
+ case REVERT:
+ case UPDATE:
+ handler.showConfirmUI(action, model, entries);
+ return;
+ }
+ throw new IllegalStateException("could not perform action for action " + action + " (" + this + ')');
+ }
+
+ protected VCSAction getAction() {
+ return action;
+ }
+
+ protected boolean isUseSelection() {
+ return useSelection;
+ }
+
+ protected void setAction(VCSAction action) {
+ this.action = action;
+ }
+
+ protected void setUseSelection(boolean useSelection) {
+ this.useSelection = useSelection;
+ }
+
+ protected TabUIAction(VCSAction action, boolean useSelection) {
+ super(null, UIHelper.createActionIcon(action));
+ this.useSelection = useSelection;
+ this.action = action;
+ //putValue(SHORT_DESCRIPTION, action.getTip());
+ putValue(DISPLAYED_MNEMONIC_INDEX_KEY, 0);
+ putValue(MNEMONIC_KEY, (int) (action.getLibelle()).charAt(0));
+ }
+
+}
\ No newline at end of file
Modified: trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/handler/ConfirmUIHandler.java
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/handler/ConfirmUIHandler.java 2008-04-11 19:52:14 UTC (rev 456)
+++ trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/handler/ConfirmUIHandler.java 2008-04-13 07:55:46 UTC (rev 457)
@@ -14,14 +14,25 @@
*/
package org.codelutin.vcs.ui.handler;
+import static org.codelutin.i18n.I18n._;
import org.codelutin.vcs.VCSEntry;
import org.codelutin.vcs.type.VCSAction;
import org.codelutin.vcs.ui.ConfirmUI;
import org.codelutin.vcs.ui.model.ConfirmUIModel;
import org.codelutin.vcs.ui.util.AbstractUIHandler;
import org.codelutin.vcs.ui.util.AbstractVCSEntriesTableModel;
+import org.codelutin.vcs.ui.util.UIHelper;
+import javax.swing.DefaultListCellRenderer;
+import javax.swing.DefaultListModel;
+import javax.swing.JComponent;
+import javax.swing.JList;
import javax.swing.ListSelectionModel;
+import javax.swing.event.ListSelectionEvent;
+import javax.swing.event.ListSelectionListener;
+import javax.swing.event.PopupMenuEvent;
+import javax.swing.event.PopupMenuListener;
+import java.awt.Component;
import java.beans.PropertyChangeEvent;
import java.util.List;
@@ -33,8 +44,49 @@
ui.setHandler(this);
}
- public ListSelectionModel getSelectionModel() {
- return getUi().getContentTable().getSelectionModel();
+ @Override
+ public void init() {
+ super.init();
+ getUi().getMessageModel().addElement("");
+
+ getUi().getMessageSelectionModel().addListSelectionListener(new ListSelectionListener() {
+ public void valueChanged(ListSelectionEvent e) {
+ if (!e.getValueIsAdjusting() && getUi().getPopup().isVisible()) {
+ getUi().getCommitMessage().setText((String) getUi().getMessages().getSelectedValue());
+ }
+ }
+ });
+
+ getUi().getPopup().addPopupMenuListener(new PopupMenuListener() {
+
+ public void popupMenuWillBecomeVisible(PopupMenuEvent e) {
+ }
+
+ public void popupMenuWillBecomeInvisible(PopupMenuEvent e) {
+ reset();
+ }
+
+ public void popupMenuCanceled(PopupMenuEvent e) {
+ reset();
+ }
+
+ void reset() {
+ // reset special row 0 (to save message different than history)
+ setMessage(0, false, false, "");
+ if (log.isDebugEnabled()) {
+ log.debug(this);
+ }
+ }
+ });
+ getUi().getMessages().setCellRenderer(new DefaultListCellRenderer() {
+ public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) {
+ JComponent listCellRendererComponent = (JComponent) super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);
+ String s = value + "";
+ log.info(s);
+ listCellRendererComponent.setToolTipText(s.isEmpty() ? null : s.replaceAll("\\n", "<br>"));
+ return listCellRendererComponent;
+ }
+ });
}
public void propertyChange(PropertyChangeEvent evt) {
@@ -44,30 +96,73 @@
String action = evt.getPropertyName();
if (ConfirmUIModel.ACCEPT_PROPERTY_CHANGED.equals(action)) {
- updateUI();
+ afterActionChanged();
return;
}
-
if (ConfirmUIModel.MESSAGE_HISTORY_PROPERTY_CHANGED.equals(action)) {
- updateMessageUI();
+ afterMessagesChanged();
return;
}
-
- throw new IllegalStateException("unimplemented property changed : " + evt);
+ throw new IllegalStateException("unimplemented property changed : " + evt + " for " + this);
}
- protected void updateUI() {
+ protected void afterActionChanged() {
VCSAction action = getModel().getAction();
+ getUi().getActionLabel().setIcon(UIHelper.createActionIcon(action));
+ getUi().getToolbar().setVisible(action.isCommit());
getUi().getAccept().setText(action.getLibelle());
- getUi().getToolbar().setVisible(action.isCommit());
getUi().getHandler().getSelectionModel().setSelectionInterval(0, getModel().getEntriesModel().getRowCount() - 1);
}
- protected void updateMessageUI() {
- // update message history combo box ?
- getUi().getLastMessages().setEnabled(!getModel().getCommitMessages().isEmpty());
+ protected void afterSelectionChanged() {
+ VCSAction action = getModel().getAction();
+ int nb = UIHelper.countAction(action, getModel().getEntriesModel(), getUi().getHandler().getSelectionModel());
+ String msg;
+ String tip = null;
+ if (nb > 0) {
+ if (nb > 1) {
+ msg = _("lutinvcs.action.message", action.getLibelle(), nb);
+ tip = _("lutinvcs.action.confirm.tooltip", action.getLibelle(), nb);
+ } else {
+ msg = _("lutinvcs.action.message.one", action.getLibelle());
+ tip = _("lutinvcs.action.confirm.one.tooltip", action.getLibelle());
+ }
+ } else {
+ msg = _("lutinvcs.action.action.noselection", action.getLibelle());
+ }
+
+ getUi().getAccept().setEnabled(nb > 0);
+ getUi().getActionLabel().setText(msg);
+ getUi().getAccept().setToolTipText(tip);
}
+ protected void afterMessagesChanged() {
+ boolean empty = getModel().getCommitMessages().isEmpty();
+ getUi().getLastMessages().setEnabled(!empty);
+ if (!empty) {
+ setMessage(1, true, true, getUi().getCommitMessage().getText());
+ }
+ }
+
+ public String getCurrentMessage() {
+ return getUi().getCommitMessage().getText().trim();
+ }
+
+ public void setMessage(int pos, boolean insert, boolean select, String text) {
+ ListSelectionModel selectionModel = getUi().getMessageSelectionModel();
+ selectionModel.setValueIsAdjusting(true);
+ DefaultListModel listModel = getUi().getMessageModel();
+ if (insert) {
+ listModel.insertElementAt(text, pos);
+ } else {
+ listModel.setElementAt(text, pos);
+ }
+ if (select) {
+ selectionModel.setSelectionInterval(pos, pos);
+ }
+ selectionModel.setValueIsAdjusting(false);
+ }
+
public void doAction(String commitMessage, AbstractVCSEntriesTableModel model) {
VCSAction action = this.getModel().getAction();
@@ -75,6 +170,7 @@
List<VCSEntry> entries = model.filter(action, model.getDisplayedEntries(getSelectionModel()));
if (action.isCommit()) {
+
this.getModel().addCommitMessage(commitMessage);
} else {
@@ -91,7 +187,4 @@
getUi().dispose();
}
- public void showLastMessages() {
- log.info("//TODO: " + this);
- }
}
Modified: trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/handler/DiffUIHandler.java
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/handler/DiffUIHandler.java 2008-04-11 19:52:14 UTC (rev 456)
+++ trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/handler/DiffUIHandler.java 2008-04-13 07:55:46 UTC (rev 457)
@@ -14,19 +14,19 @@
*/
package org.codelutin.vcs.ui.handler;
+import static org.codelutin.i18n.I18n._;
import org.codelutin.vcs.VCSEntry;
import org.codelutin.vcs.type.VCSAction;
import org.codelutin.vcs.ui.DiffUI;
import org.codelutin.vcs.ui.model.DiffUIModel;
import org.codelutin.vcs.ui.util.AbstractTabUIHandler;
-import org.codelutin.vcs.ui.util.AbstractVCSEntriesTableModel;
+import javax.swing.AbstractButton;
import javax.swing.ListSelectionModel;
import javax.swing.event.ListSelectionEvent;
-import javax.swing.event.ListSelectionListener;
import java.beans.PropertyChangeEvent;
-import java.util.ArrayList;
-import java.util.List;
+import java.util.Collections;
+import java.util.EnumMap;
/** @author chemit */
public class DiffUIHandler extends AbstractTabUIHandler<DiffUIModel, DiffUI> {
@@ -42,67 +42,79 @@
log.debug(evt.getPropertyName() + " old:" + evt.getOldValue() + ", new:" + evt.getNewValue());
}
if (DiffUIModel.FILE_PROPERTY_CHANGED.equals(evt.getPropertyName())) {
- VCSEntry model = (VCSEntry) evt.getNewValue();
- boolean hasActions = false;
- List<VCSAction> actions = null;
- if (model != null) {
- actions = model.getState().getActions();
- hasActions = !actions.isEmpty();
- }
- DiffUI ui = getUi();
- updateAction(actions, hasActions, ui.getUpdate(), VCSAction.UPDATE);
- updateAction(actions, hasActions, ui.getRevert(), VCSAction.REVERT);
- updateAction(actions, hasActions, ui.getCommit(), VCSAction.COMMIT);
- ui.getRefresh().setEnabled(hasActions);
- } else {
- super.propertyChange(evt);
+ afterSelectionChanged();
+ return;
}
- }
-
- public void doSelectLocation() {
- AbstractVCSEntriesTableModel fileStatesModel = getModel().getEntriesModel();
- if (fileStatesModel.getRowCount() > 0) {
- getSelectionModel().addSelectionInterval(0, 0);
+ if (DiffUIModel.DIFF_PROPERTY_CHANGED.equals(evt.getPropertyName())) {
+ afterDiffAction();
+ return;
}
+ super.propertyChange(evt);
}
@Override
- public void init() {
- super.init();
- getUi().getContentTable().getSelectionModel().addListSelectionListener(new ListSelectionListener() {
- public void valueChanged(ListSelectionEvent e) {
- if (!e.getValueIsAdjusting()) {
- getModel().setFileModel(getSelectedEntry());
- }
+ public void valueChanged(ListSelectionEvent e) {
+ if (!e.getValueIsAdjusting()) {
+ // update model selected file ? TODO Is this really necessary,
+ ListSelectionModel selectionModel = (ListSelectionModel) e.getSource();
+ VCSEntry vcsEntry = null;
+ if (!selectionModel.isSelectionEmpty()) {
+ vcsEntry = getModel().getEntriesModel().getDisplayedEntry(selectionModel.getMinSelectionIndex());
}
- });
+ getModel().setFileModel(vcsEntry);
+ }
}
- public VCSEntry getSelectedEntry() {
- ListSelectionModel selectionModel = getSelectionModel();
- if (selectionModel.isSelectionEmpty()) {
- return null;
+ public void afterLocationChanged() {
+ if (getModel().getEntriesModel().getRowCount() > 0) {
+ // select first row
+ getSelectionModel().addSelectionInterval(0, 0);
}
- return getModel().getEntriesModel().getDisplayedEntry(selectionModel.getMinSelectionIndex());
}
- public void doAction(VCSAction action, VCSEntry file) {
- AbstractVCSEntriesTableModel model = getModel().getEntriesModel();
- List<VCSEntry> entries = new ArrayList<VCSEntry>(1);
- entries.add(file);
- //log.info(action + " : " + model);
- if (action == VCSAction.REFRESH) {
- doRefresh(model, entries, getSelectionModel());
- } else {
- doConfirm(action, model, entries);
- }
+ protected void afterSelectionChanged() {
+
+ VCSEntry vcsEntry = getModel().getFileModel();
+ EnumMap<VCSAction, Integer> actions = vcsEntry == null ? null : getModel().getEntriesModel().countActions(Collections.singletonList(vcsEntry));
+ boolean hasActions = actions != null && !actions.isEmpty();
+ DiffUI ui = getUi();
+ updateAction(actions, hasActions, ui.getUpdate(), VCSAction.UPDATE, vcsEntry);
+ updateAction(actions, hasActions, ui.getRevert(), VCSAction.REVERT, vcsEntry);
+ updateAction(actions, hasActions, ui.getCommit(), VCSAction.COMMIT, vcsEntry);
+ updateAction(actions, hasActions, ui.getRefresh(), VCSAction.REFRESH, vcsEntry);
+ //TODO init diff handler
}
+ protected void afterDiffAction() {
+ DiffUI ui = getUi();
+ boolean hasNext = getModel().hasNext();
+ boolean hasPrevious = getModel().hasPrevious();
+ log.info("//TODO :" + this + " next:" + hasNext + ", prev:" + hasPrevious);
+ ui.getNextDiff().setEnabled(hasNext);
+ ui.getPreviousDiff().setEnabled(hasPrevious);
+ ui.getNextDiff().setToolTipText(hasNext ? _("lutinvcs.action.nextdiff.tip") : null);
+ ui.getPreviousDiff().setToolTipText(hasPrevious ? _("lutinvcs.action.previousdiff.tip") : null);
+
+ //TODO init diff handler
+ }
+
public void gotoNextDiff() {
+ getModel().setDiff(getModel().getDiff() + 1);
log.info("//TODO :" + this);
}
public void gotoPreviousDiff() {
+ getModel().setDiff(getModel().getDiff() - 1);
log.info("//TODO :" + this);
}
+
+ protected void updateAction(EnumMap<VCSAction, Integer> actions, boolean hasActions, AbstractButton ui, VCSAction action, VCSEntry vcsEntry) {
+ super.updateAction(actions, hasActions, ui, action);
+ boolean useAction = hasActions && actions.containsKey(action) && actions.get(action) > 0;
+ String tip = null;
+ if (useAction) {
+ tip = _("lutinvcs.action.single.tip", action.getLibelle(), vcsEntry.getFile().getName());
+ }
+ ui.setToolTipText(tip);
+ }
}
Modified: trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/handler/SynchUIHandler.java
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/handler/SynchUIHandler.java 2008-04-11 19:52:14 UTC (rev 456)
+++ trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/handler/SynchUIHandler.java 2008-04-13 07:55:46 UTC (rev 457)
@@ -1,17 +1,18 @@
package org.codelutin.vcs.ui.handler;
-import org.codelutin.vcs.VCSEntry;
+import static org.codelutin.i18n.I18n._;
import org.codelutin.vcs.type.VCSAction;
import org.codelutin.vcs.ui.SynchUI;
import org.codelutin.vcs.ui.model.SynchUIModel;
import org.codelutin.vcs.ui.util.AbstractTabUIHandler;
-import org.codelutin.vcs.ui.util.AbstractVCSEntriesTableModel;
+import javax.swing.AbstractButton;
+import javax.swing.JPopupMenu;
+import javax.swing.JTable;
import javax.swing.ListSelectionModel;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
-import java.util.Arrays;
-import java.util.List;
+import java.util.EnumMap;
/** @author chemit */
public class SynchUIHandler extends AbstractTabUIHandler<SynchUIModel, SynchUI> {
@@ -24,81 +25,94 @@
@Override
public void init() {
super.init();
- getUi().getContentTable().addMouseListener(new ListMouseListener());
- }
- protected void doSelectLocation() {
+ getUi().getContentTable().addMouseListener(new MouseAdapter() {
+ JPopupMenu popup;
+ JTable table;
- List<VCSAction> actions = Arrays.asList(getModel().getEntriesModel().getActions((ListSelectionModel) null));
+ @Override
+ public void mousePressed(MouseEvent e) {
+ super.mousePressed(e);
+ showPopup(e);
+ }
- boolean hasActions = !actions.isEmpty();
- SynchUI ui = getUi();
- updateAction(actions, hasActions, ui.getDiffAll(), VCSAction.DIFF);
- updateAction(actions, hasActions, ui.getUpdateAll(), VCSAction.UPDATE);
- updateAction(actions, hasActions, ui.getRevertAll(), VCSAction.REVERT);
- updateAction(actions, hasActions, ui.getCommitAll(), VCSAction.COMMIT);
- updateAction(actions, hasActions, ui.getAddAll(), VCSAction.ADD);
- updateAction(actions, hasActions, ui.getDeleteAll(), VCSAction.DELETE);
- ui.getRefreshAll().setEnabled(hasActions);
- }
+ @Override
+ public void mouseReleased(MouseEvent e) {
+ super.mouseReleased(e);
+ showPopup(e);
+ }
- public void doAction(VCSAction action, boolean useSelection) {
- AbstractVCSEntriesTableModel model = getModel().getEntriesModel();
- log.info(action + " : " + model);
- ListSelectionModel selectionModel = getSelectionModel();
- List<VCSEntry> entries = model.filter(action, model.getDisplayedEntries(useSelection ? selectionModel : null));
+ void showPopup(MouseEvent e) {
+ if (e.isPopupTrigger() && !getTable().getSelectionModel().isSelectionEmpty()) {
+ getPopupMenu().show(getTable(), e.getX(), e.getY());
+ }
+ }
- if (action == VCSAction.REFRESH) {
- doRefresh(model, model.getEntries(), selectionModel);
- return;
- }
+ JPopupMenu getPopupMenu() {
+ return popup == null ? popup = getUi().getPopup() : popup;
+ }
- if (entries.isEmpty()) {
- // nothing to do
- return;
- }
- if (action == VCSAction.DIFF) {
- // show diff ui
- doDiff(useSelection, model, entries);
- return;
- }
+ JTable getTable() {
+ return table == null ? table = getUi().getContentTable() : table;
+ }
+ });
+ }
- doConfirm(action, model, entries);
+ protected void afterSelectionChanged() {
+ ListSelectionModel selectionModel = getSelectionModel();
+ EnumMap<VCSAction, Integer> actions = getModel().getEntriesModel().countActions(selectionModel);
+ boolean hasActions = !actions.isEmpty();
+ SynchUI ui = getUi();
+ int nbFiles = actions.get(VCSAction.REFRESH);
+ updateAction(actions, hasActions, ui.getDiff(), VCSAction.DIFF, false, nbFiles);
+ updateAction(actions, hasActions, ui.getUpdate(), VCSAction.UPDATE, false, nbFiles);
+ updateAction(actions, hasActions, ui.getRevert(), VCSAction.REVERT, false, nbFiles);
+ updateAction(actions, hasActions, ui.getCommit(), VCSAction.COMMIT, false, nbFiles);
+ updateAction(actions, hasActions, ui.getAdd(), VCSAction.ADD, false, nbFiles);
+ updateAction(actions, hasActions, ui.getDelete(), VCSAction.DELETE, false, nbFiles);
+ updateAction(actions, hasActions, ui.getRefresh(), VCSAction.REFRESH, false, nbFiles);
}
+ protected void afterLocationChanged() {
- protected class ListMouseListener extends MouseAdapter {
+ EnumMap<VCSAction, Integer> actions = getModel().getEntriesModel().countActions((ListSelectionModel) null);
+ boolean hasActions = !actions.isEmpty();
+ SynchUI ui = getUi();
+ // refresh actions is enabled on all files
+ int nbFiles = actions.get(VCSAction.REFRESH);
+ updateAction(actions, hasActions, ui.getDiffAll(), VCSAction.DIFF, true, nbFiles);
+ updateAction(actions, hasActions, ui.getUpdateAll(), VCSAction.UPDATE, true, nbFiles);
+ updateAction(actions, hasActions, ui.getRevertAll(), VCSAction.REVERT, true, nbFiles);
+ updateAction(actions, hasActions, ui.getCommitAll(), VCSAction.COMMIT, true, nbFiles);
+ updateAction(actions, hasActions, ui.getAddAll(), VCSAction.ADD, true, nbFiles);
+ updateAction(actions, hasActions, ui.getDeleteAll(), VCSAction.DELETE, true, nbFiles);
+ updateAction(actions, hasActions, ui.getRefreshAll(), VCSAction.REFRESH, true, nbFiles);
+ }
- @Override
- public void mousePressed(MouseEvent e) {
- super.mousePressed(e);
- if (e.isPopupTrigger() && !getSelectionModel().isSelectionEmpty()) {
- initPopup(e.getX(), e.getY(), getSelectionModel());
- }
- }
+ protected void updateAction(EnumMap<VCSAction, Integer> actions, boolean hasActions, AbstractButton ui, VCSAction action, boolean all, int nbFiles) {
- @Override
- public void mouseReleased(MouseEvent e) {
- super.mouseReleased(e);
- if (e.isPopupTrigger() && !getSelectionModel().isSelectionEmpty()) {
- initPopup(e.getX(), e.getY(), getSelectionModel());
+ super.updateAction(actions, hasActions, ui, action);
+ Integer nbEntries = actions.get(action);
+ boolean useAction = hasActions && actions.containsKey(action) && nbEntries > 0;
+ String tip = null;
+ if (useAction) {
+ if (all) {
+ if (nbEntries == 1) {
+ tip = _("lutinvcs.action.confirm.all.tip", action.getLibelle(), nbFiles);
+ } else {
+ tip = _("lutinvcs.action.confirm.alls.tip", action.getLibelle(), nbEntries, nbFiles);
+ }
+ } else {
+ if (nbEntries == 1) {
+ tip = _("lutinvcs.action.confirm.selected.tip", action.getLibelle(), nbFiles);
+ } else {
+ tip = _("lutinvcs.action.confirm.selecteds.tip", action.getLibelle(), nbEntries, nbFiles);
+ }
}
}
-
- protected void initPopup(int x, int y, ListSelectionModel selectionModel) {
-
- List<VCSAction> actions = Arrays.asList(getModel().getEntriesModel().getActions(selectionModel));
- boolean hasActions = !actions.isEmpty();
- SynchUI ui = getUi();
- updateAction(actions, hasActions, ui.getDiff(), VCSAction.DIFF);
- updateAction(actions, hasActions, ui.getUpdate(), VCSAction.UPDATE);
- updateAction(actions, hasActions, ui.getRevert(), VCSAction.REVERT);
- updateAction(actions, hasActions, ui.getCommit(), VCSAction.COMMIT);
- updateAction(actions, hasActions, ui.getAdd(), VCSAction.ADD);
- updateAction(actions, hasActions, ui.getDelete(), VCSAction.DELETE);
- ui.getRefresh().setEnabled(hasActions);
- // display popup
- ui.getPopup().show(ui.getContentTable(), x, y);
+ if (!all) {
+ ui.setText(action.getLibelle() + " (" + nbEntries + '/' + nbFiles + ')');
}
+ ui.setToolTipText(tip);
}
}
Modified: trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/model/ConfirmUIModel.java
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/model/ConfirmUIModel.java 2008-04-11 19:52:14 UTC (rev 456)
+++ trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/model/ConfirmUIModel.java 2008-04-13 07:55:46 UTC (rev 457)
@@ -29,13 +29,14 @@
*/
public class ConfirmUIModel extends AbstractUIModel {
+ public static final String ACCEPT_PROPERTY_CHANGED = "action";
+ public static final String MESSAGE_HISTORY_PROPERTY_CHANGED = "historyMessage";
+
/** history of commit messages */
protected List<String> commitMessages;
/** current action to be fired */
protected VCSAction action;
- public static final String ACCEPT_PROPERTY_CHANGED = "action";
- public static final String MESSAGE_HISTORY_PROPERTY_CHANGED = "historyMessage";
public List<String> getCommitMessages() {
if (commitMessages == null) {
@@ -48,11 +49,11 @@
return action;
}
- public void addCommitMessage(String commitMessage) {
- if (commitMessage != null && !commitMessage.isEmpty() && !getCommitMessages().contains(commitMessage)) {
+ public void addCommitMessage(String msg) {
+ if (!(msg == null || msg.isEmpty() || containsMessage(msg))) {
// add message in history
- getCommitMessages().add(commitMessage);
- firePropertyChange(MESSAGE_HISTORY_PROPERTY_CHANGED, null, commitMessage);
+ getCommitMessages().add(msg);
+ firePropertyChange(MESSAGE_HISTORY_PROPERTY_CHANGED, null, msg);
}
}
@@ -68,4 +69,7 @@
firePropertyChange(ACCEPT_PROPERTY_CHANGED, null, action);
}
+ public boolean containsMessage(String msg) {
+ return commitMessages != null && commitMessages.contains(msg);
+ }
}
\ No newline at end of file
Modified: trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/model/DiffUIModel.java
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/model/DiffUIModel.java 2008-04-11 19:52:14 UTC (rev 456)
+++ trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/model/DiffUIModel.java 2008-04-13 07:55:46 UTC (rev 457)
@@ -26,20 +26,57 @@
public class DiffUIModel extends AbstractTabUIModel {
public static final String FILE_PROPERTY_CHANGED = "file";
+ public static final String DIFF_PROPERTY_CHANGED = "diff";
/** current file displayed */
protected VCSEntry fileModel;
+ protected int nbDiffs;
+
+ protected Integer diff;
+
+ public VCSEntry getFileModel() {
+ return fileModel;
+ }
+
+ public int getNbDiffs() {
+ return nbDiffs;
+ }
+
+ public Integer getDiff() {
+ return diff;
+ }
+
+ public void setDiff(Integer diff) {
+ Integer oldDiff = this.diff;
+ this.diff = diff;
+ // always notify ui (so do not propagate old value
+ firePropertyChange(DIFF_PROPERTY_CHANGED, oldDiff, diff);
+ }
+
+ public void setNbDiffs(int nbDiffs) {
+ this.nbDiffs = nbDiffs;
+ // special reset of diff (to make sure, event will be propagate to ui;))
+ diff = -1;
+ setDiff(nbDiffs > 0 ? 0 : null);
+ }
+
+ public boolean hasNext() {
+ return diff != null && diff < nbDiffs;
+ }
+
+ public boolean hasPrevious() {
+ return diff != null && diff > 0;
+ }
+
public void setFileModel(VCSEntry fileModel) {
VCSEntry oldFileModel = this.fileModel;
this.fileModel = fileModel;
firePropertyChange(FILE_PROPERTY_CHANGED, oldFileModel, fileModel);
+ // TODO acquire diff and prepare DiffModel...
+ setNbDiffs(0);
}
- public VCSEntry getFileModel() {
- return fileModel;
- }
-
public void init(VCSEntryLocation location, VCSEntry[] states) {
getEntriesModel().clear();
getEntriesModel().populate(VCSEntryLocation.ALL, states);
Modified: trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/util/AbstractTabUI.java
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/util/AbstractTabUI.java 2008-04-11 19:52:14 UTC (rev 456)
+++ trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/util/AbstractTabUI.java 2008-04-13 07:55:46 UTC (rev 457)
@@ -14,25 +14,25 @@
*/
package org.codelutin.vcs.ui.util;
+import org.codelutin.vcs.type.VCSAction;
import org.codelutin.vcs.type.VCSEntryLocation;
+import org.codelutin.vcs.ui.action.ChangeLocationAction;
+import org.codelutin.vcs.ui.action.TabUIAction;
+import javax.swing.AbstractAction;
import javax.swing.AbstractButton;
import javax.swing.ButtonGroup;
-import javax.swing.ImageIcon;
-import javax.swing.JScrollPane;
-import javax.swing.JTable;
-import javax.swing.JToggleButton;
/** @author chemit */
public abstract class AbstractTabUI<H extends AbstractTabUIHandler<?, ?>> extends AbstractUI<H> {
public abstract ButtonGroup getTabs();
- public abstract JToggleButton getAllTab();
+ public abstract AbstractButton getAllTab();
- public abstract JToggleButton getLocalTab();
+ public abstract AbstractButton getLocalTab();
- public abstract JToggleButton getRemoteTab();
+ public abstract AbstractButton getRemoteTab();
public abstract AbstractButton getRefresh();
@@ -42,9 +42,6 @@
public abstract AbstractButton getRevert();
- public abstract AbstractButton getHelp();
-
-
public AbstractButton getButton(VCSEntryLocation modelName) {
switch (modelName) {
case ALL:
@@ -59,12 +56,12 @@
throw new IllegalStateException("no popup found for " + modelName);
}
- protected void setLocation(VCSEntryLocation location) {
- getHandler().getModel().setLocation(location);
+ protected AbstractAction createLocationAction(VCSEntryLocation location) {
+ return ChangeLocationAction.createAction(location, this);
}
- public ImageIcon createLocationIcon(VCSEntryLocation action) {
- return jaxx.runtime.UIHelper.createImageIcon("location-" + action.name().toLowerCase() + ".png");
+ protected AbstractAction createAction(VCSAction action, boolean useSelection) {
+ return TabUIAction.createAction(action, useSelection, this);
}
}
Modified: trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/util/AbstractTabUIHandler.java
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/util/AbstractTabUIHandler.java 2008-04-11 19:52:14 UTC (rev 456)
+++ trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/util/AbstractTabUIHandler.java 2008-04-13 07:55:46 UTC (rev 457)
@@ -21,9 +21,9 @@
import org.codelutin.vcs.ui.VCSUIFactory;
import javax.swing.AbstractButton;
-import javax.swing.JTable;
import javax.swing.ListSelectionModel;
import java.beans.PropertyChangeEvent;
+import java.util.EnumMap;
import java.util.List;
/** @author chemit */
@@ -33,39 +33,32 @@
super(ui, model);
}
- /*@Override
- public void init() {
- super.init();
- }*/
-
- public ListSelectionModel getSelectionModel() {
- return getUi().getContentTable().getSelectionModel();
- }
-
public void propertyChange(PropertyChangeEvent evt) {
if (log.isDebugEnabled()) {
log.debug(evt.getPropertyName() + " old:" + evt.getOldValue() + ", new:" + evt.getNewValue());
}
String action = evt.getPropertyName();
if (AbstractTabUIModel.LOCATION_PROPERTY_CHANGED.equals(action)) {
- doSelectLocation();
+ afterLocationChanged();
}
}
- protected abstract void doSelectLocation();
+ protected abstract void afterLocationChanged();
- protected void updateAction(List<VCSAction> actions, boolean hasActions, AbstractButton ui, VCSAction diff) {
- ui.setEnabled(hasActions && actions.contains(diff));
+
+ protected void updateAction(EnumMap<VCSAction, Integer> actions, boolean hasActions, AbstractButton ui, VCSAction action) {
+ ui.setEnabled(hasActions && actions.containsKey(action) && actions.get(action) > 0);
}
- protected void doConfirm(VCSAction action, AbstractVCSEntriesTableModel model, List<VCSEntry> entries) {
+ public void showConfirmUI(VCSAction action, AbstractVCSEntriesTableModel model, List<VCSEntry> entries) {
ConfirmUI confirmUI = VCSUIFactory.newConfirmUI();
log.info("nb files:" + entries.size());
confirmUI.getHandler().getModel().init(action, model.getLocation(), entries.toArray(new VCSEntry[entries.size()]));
+ confirmUI.getContentScroll().setEnabled(entries.size() > 1);
confirmUI.setVisible(true);
}
- protected void doDiff(boolean useSelection, AbstractVCSEntriesTableModel model, List<VCSEntry> entries) {
+ public void showDiffUI(boolean useSelection, AbstractVCSEntriesTableModel model, List<VCSEntry> entries) {
DiffUI diffUI = VCSUIFactory.newDiffUI();
if (!useSelection) {
// take all entries
@@ -73,14 +66,17 @@
}
log.info("nb entries:" + entries.size());
diffUI.getHandler().getModel().init(model.getLocation(), entries.toArray(new VCSEntry[entries.size()]));
+ diffUI.getContentScroll().setEnabled(entries.size() > 1);
diffUI.setVisible(true);
}
- protected void doRefresh(AbstractVCSEntriesTableModel model, List<VCSEntry> entries, ListSelectionModel selectionModel) {
+ public void doRefresh(AbstractVCSEntriesTableModel model, List<VCSEntry> entries, ListSelectionModel selectionModel) {
log.info(selectionModel);
selectionModel.clearSelection();
+ log.info("nb entries:" + entries.size());
// do refresh of all states
model.refresh(System.nanoTime(), entries);
}
+
}
\ No newline at end of file
Modified: trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/util/AbstractUI.java
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/util/AbstractUI.java 2008-04-11 19:52:14 UTC (rev 456)
+++ trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/util/AbstractUI.java 2008-04-13 07:55:46 UTC (rev 457)
@@ -14,7 +14,10 @@
*/
package org.codelutin.vcs.ui.util;
-import javax.swing.ImageIcon;
+import org.codelutin.vcs.ui.action.HelpAction;
+
+import javax.swing.AbstractAction;
+import javax.swing.AbstractButton;
import javax.swing.JScrollPane;
import javax.swing.JTable;
@@ -25,6 +28,8 @@
public abstract JTable getContentTable();
+ public abstract AbstractButton getHelp();
+
private H handler;
protected AbstractUI() {
@@ -39,12 +44,7 @@
this.handler = handler;
}
- protected void doHelp() {
- handler.doHelp();
+ protected AbstractAction createHelpAction() {
+ return HelpAction.createAction(this);
}
-
- public ImageIcon createActionIcon(org.codelutin.vcs.type.VCSAction action) {
- return jaxx.runtime.UIHelper.createImageIcon(action.name().toLowerCase() + ".png");
- }
-
}
Added: trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/util/AbstractUIAction.java
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/util/AbstractUIAction.java (rev 0)
+++ trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/util/AbstractUIAction.java 2008-04-13 07:55:46 UTC (rev 457)
@@ -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.util;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+/** @author chemit */
+public abstract class AbstractUIAction<H extends AbstractUIHandler<?, ?>> extends javax.swing.AbstractAction {
+
+ protected static Log log = LogFactory.getLog(AbstractUIAction.class);
+
+ protected transient AbstractUI<? extends H> ui;
+ protected transient H handler;
+
+ private static final long serialVersionUID = 1L;
+
+ protected AbstractUIAction(String name, javax.swing.Icon icon) {
+ super(name, icon);
+ }
+
+ protected H getHandler() {
+ checkInit();
+ if (handler == null) {
+ handler = ui.getHandler();
+ }
+ return handler;
+ }
+
+ protected void setUi(AbstractUI<? extends H> ui) {
+ this.ui = ui;
+ this.handler = null;
+ }
+
+ protected void checkInit() throws IllegalStateException {
+ if (handler == null && ui == null) {
+ throw new IllegalStateException("no handler, nor ui referenced in " + this);
+ }
+ }
+
+}
Modified: trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/util/AbstractUIHandler.java
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/util/AbstractUIHandler.java 2008-04-11 19:52:14 UTC (rev 456)
+++ trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/util/AbstractUIHandler.java 2008-04-13 07:55:46 UTC (rev 457)
@@ -22,10 +22,12 @@
import javax.swing.JTable;
import javax.swing.ListSelectionModel;
+import javax.swing.event.ListSelectionEvent;
+import javax.swing.event.ListSelectionListener;
import java.beans.PropertyChangeListener;
/** @author chemit */
-public abstract class AbstractUIHandler<M extends AbstractUIModel, U extends AbstractUI<? extends AbstractUIHandler>> implements PropertyChangeListener {
+public abstract class AbstractUIHandler<M extends AbstractUIModel, U extends AbstractUI<? extends AbstractUIHandler>> implements PropertyChangeListener, ListSelectionListener {
protected static Log log = LogFactory.getLog(AbstractUIHandler.class);
@@ -35,13 +37,13 @@
/** model handled */
private M model;
+ protected abstract void afterSelectionChanged();
+
protected AbstractUIHandler(U ui, M model) {
this.ui = ui;
this.model = model;
}
- public abstract ListSelectionModel getSelectionModel();
-
public final U getUi() {
return ui;
}
@@ -50,11 +52,23 @@
return model;
}
+ public final ListSelectionModel getSelectionModel() {
+ return getUi().getContentTable().getSelectionModel();
+ }
+
+ public void valueChanged(ListSelectionEvent e) {
+ if (!e.getValueIsAdjusting()) {
+ // update popup states
+ afterSelectionChanged();
+ }
+ }
+
public void init() {
if (model == null) {
throw new IllegalStateException("no model was defined for " + this);
}
model.addPropertyChangeListener(this);
+ getUi().getContentTable().getSelectionModel().addListSelectionListener(this);
JTable table = getUi().getContentTable();
table.setModel(getModel().getEntriesModel());
// init table renderer
@@ -69,8 +83,4 @@
return VCSFactory.getActionManager();
}
-
- public void doHelp() {
- log.info("TODO " + this);
- }
}
Modified: trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/util/AbstractVCSEntriesTableModel.java
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/util/AbstractVCSEntriesTableModel.java 2008-04-11 19:52:14 UTC (rev 456)
+++ trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/util/AbstractVCSEntriesTableModel.java 2008-04-13 07:55:46 UTC (rev 457)
@@ -35,6 +35,7 @@
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
+import java.util.EnumMap;
/**
* Simple Table model to display list of VCSFileState
@@ -48,8 +49,6 @@
/** column names */
protected final String[] columnNames;
- protected VCSEntryLocation location = VCSEntryLocation.UNKNOW;
-
/** delegate model */
protected final transient VCSEntries delegate;
@@ -57,8 +56,10 @@
protected final transient List<VCSEntry> displayedEntries;
/** row sorter */
- protected transient TableRowSorter<TableModel> rowSorter;
+ protected final transient TableRowSorter<TableModel> rowSorter;
+ protected VCSEntryLocation location;
+
private static final long serialVersionUID = 4697917831388337369L;
@@ -69,6 +70,7 @@
this.displayedEntries = new ArrayList<VCSEntry>();
this.delegate = new VCSEntriesImpl();
this.rowSorter = new TableRowSorter<TableModel>(this);
+ this.location = VCSEntryLocation.UNKNOW;
}
public String getName() {
@@ -118,8 +120,8 @@
fireTableDataChanged();
}
- public VCSAction[] getActions(ListSelectionModel selectionModel) {
- return getActions(getDisplayedEntries(selectionModel));
+ public EnumMap<VCSAction, Integer> countActions(ListSelectionModel selectionModel) {
+ return countActions(getDisplayedEntries(selectionModel));
}
@Override
@@ -191,12 +193,12 @@
updateEntries();
}
- public VCSAction[] getActions(List<VCSEntry> entries) {
- return delegate.getActions(entries);
+ public EnumMap<VCSAction, Integer> countActions(List<VCSEntry> entries) {
+ return delegate.countActions(entries);
}
- public VCSState[] getStates(List<VCSEntry> entries) {
- return delegate.getStates(entries);
+ public EnumMap<VCSState, Integer> countStates(List<VCSEntry> entries) {
+ return delegate.countStates(entries);
}
public void clear() {
Modified: trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/util/UIHelper.java
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/util/UIHelper.java 2008-04-11 19:52:14 UTC (rev 456)
+++ trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/util/UIHelper.java 2008-04-13 07:55:46 UTC (rev 457)
@@ -14,6 +14,11 @@
*/
package org.codelutin.vcs.ui.util;
+import org.codelutin.vcs.VCSEntry;
+import org.codelutin.vcs.type.VCSAction;
+import org.codelutin.vcs.type.VCSState;
+import org.codelutin.vcs.type.VCSEntryLocation;
+
import javax.swing.AbstractAction;
import javax.swing.Action;
import javax.swing.JComponent;
@@ -21,8 +26,12 @@
import javax.swing.JRootPane;
import javax.swing.JTable;
import javax.swing.KeyStroke;
+import javax.swing.ListSelectionModel;
+import javax.swing.ImageIcon;
import java.awt.Color;
import java.awt.event.ActionEvent;
+import java.util.EnumMap;
+import java.util.EnumSet;
/**
* UI Helper methods
@@ -72,4 +81,64 @@
table.setRowSorter(((AbstractVCSEntriesTableModel) table.getModel()).getRowSorter());
}
+ public static int countAction(VCSAction action, AbstractVCSEntriesTableModel entries, ListSelectionModel selectionModel) {
+ EnumMap<VCSAction, Integer> map = countActions(EnumSet.of(action), entries, selectionModel);
+ if (map.isEmpty()) {
+ return 0;
+ } else {
+ return map.values().iterator().next();
+ }
+ }
+
+ public static EnumMap<VCSAction, Integer> countActions(EnumSet<VCSAction> set, AbstractVCSEntriesTableModel entries, ListSelectionModel selectionModel) {
+ if (set == null) {
+ set = EnumSet.allOf(VCSAction.class);
+ }
+ EnumMap<VCSAction, Integer> map = new EnumMap<VCSAction, Integer>(VCSAction.class);
+ int[] tmp = new int[VCSAction.values().length];
+ for (int i = 0, max = entries.getRowCount(); i < max; i++) {
+ if (selectionModel == null || selectionModel.isSelectedIndex(i)) {
+ VCSEntry entry = entries.getDisplayedEntry(i);
+ for (VCSAction action : entry.getState().getActions()) {
+ tmp[action.ordinal()]++;
+ }
+ }
+ }
+ for (VCSAction vcsAction : set) {
+ int index = vcsAction.ordinal();
+ map.put(vcsAction, tmp[index]);
+ }
+ return map;
+ }
+
+ public static EnumMap<VCSState, Integer> countStates(EnumSet<VCSState> set, AbstractVCSEntriesTableModel entries, ListSelectionModel selectionModel) {
+ if (set == null) {
+ set = EnumSet.allOf(VCSState.class);
+ }
+ EnumMap<VCSState, Integer> map = new EnumMap<VCSState, Integer>(VCSState.class);
+ int[] tmp = new int[VCSState.values().length];
+ for (int i = 0, max = entries.getRowCount(); i < max; i++) {
+ if (selectionModel == null || selectionModel.isSelectedIndex(i)) {
+ VCSEntry entry = entries.getDisplayedEntry(i);
+ tmp[entry.getState().ordinal()]++;
+ }
+ }
+ for (VCSState state : set) {
+ int index = state.ordinal();
+ map.put(state, tmp[index]);
+ }
+ return map;
+ }
+
+ public static ImageIcon createActionIcon(String name) {
+ return jaxx.runtime.UIHelper.createImageIcon("action-" + name + ".png");
+ }
+
+ public static ImageIcon createActionIcon(VCSAction location) {
+ return createActionIcon(location.name().toLowerCase());
+ }
+
+ public static ImageIcon createLocationIcon(VCSEntryLocation location) {
+ return jaxx.runtime.UIHelper.createImageIcon("location-" + location.name().toLowerCase() + ".png");
+ }
}
Modified: trunk/lutinvcs/lutinvcs-ui-common/src/main/resources/i18n/lutinvcs-ui-common-en_GB.properties
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-common/src/main/resources/i18n/lutinvcs-ui-common-en_GB.properties 2008-04-11 19:52:14 UTC (rev 456)
+++ trunk/lutinvcs/lutinvcs-ui-common/src/main/resources/i18n/lutinvcs-ui-common-en_GB.properties 2008-04-13 07:55:46 UTC (rev 457)
@@ -1,3 +1,18 @@
+lutinvcs.action.action.noselection=Action ''{0}'' (empty selection)
+lutinvcs.action.confirm.all.tip=Perform action ''{0}'' on the signle matching file amoung {1} file(s)
+lutinvcs.action.confirm.alls.tip=Perform action ''{0}'' on the {1} matching files amoung {2} files
+lutinvcs.action.confirm.one.tooltip=Perform action ''{0}}'' on selected file
+lutinvcs.action.confirm.selected.tip=Perform action ''{0}'' on the signle matching file amoung the {1} selected file(s)
+lutinvcs.action.confirm.selecteds.tip=Perform action ''{0}'' on the {1} matching files amoung the {2} selected files
+lutinvcs.action.confirm.tooltip=Perform action ''{0}}'' on {1} selected files
+lutinvcs.action.help.libelle=Help
+lutinvcs.action.help.tip=Obtain help
+lutinvcs.action.message=Action ''{0}'' ({1} selected files)
+lutinvcs.action.message.one=Action ''{0}'' (1 selected file)
+lutinvcs.action.nextdiff.tip=goto next diff
+lutinvcs.action.previousdiff.tip=goto previous diff
+lutinvcs.action.showmessages.tip=show previous commit messages
+lutinvcs.action.single.tip=Launch action ''{0}'' on selected file ''{1}''
lutinvcs.file=File
lutinvcs.module=Module
lutinvcs.status=Status
Modified: trunk/lutinvcs/lutinvcs-ui-common/src/main/resources/i18n/lutinvcs-ui-common-fr_FR.properties
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-common/src/main/resources/i18n/lutinvcs-ui-common-fr_FR.properties 2008-04-11 19:52:14 UTC (rev 456)
+++ trunk/lutinvcs/lutinvcs-ui-common/src/main/resources/i18n/lutinvcs-ui-common-fr_FR.properties 2008-04-13 07:55:46 UTC (rev 457)
@@ -1,3 +1,18 @@
+lutinvcs.action.action.noselection=Action ''{0}'' (aucune s\u00E9lection)
+lutinvcs.action.confirm.all.tip=Ex\u00E9cuter l''action ''{0}'' sur le seul fichier correspondant (parmis les {1} fichier(s)).
+lutinvcs.action.confirm.alls.tip=Ex\u00E9cuter l''action ''{0}'' sur les {1} fichiers correspondants (parmis les {2} fichiers).
+lutinvcs.action.confirm.one.tooltip=Ex\u00E9cuter l''action ''{0}'' sur le fichier s\u00E9lectionn\u00E9.
+lutinvcs.action.confirm.selected.tip=Ex\u00E9cuter l''action ''{0}'' sur le fichier correspondant parmi les {1} fichier(s) s\u00E9lectionn\u00E9(s).
+lutinvcs.action.confirm.selecteds.tip=Ex\u00E9cuter l''action ''{0}'' sur les {1} fichiers correspondants parmi les {2} fichiers s\u00E9lectionn\u00E9s.
+lutinvcs.action.confirm.tooltip=Ex\u00E9cuter l''action ''{0}'' sur les {1} fichiers s\u00E9lectionn\u00E9s.
+lutinvcs.action.help.libelle=Aide
+lutinvcs.action.help.tip=Obtenir de l'aide
+lutinvcs.action.message=Action ''{0}'' ({1} fichiers s\u00E9lectionn\u00E9s)
+lutinvcs.action.message.one=Action ''{0}'' (1 fichier s\u00E9lectionn\u00E9)
+lutinvcs.action.nextdiff.tip=voir la prochaine diff\u00E9rence
+lutinvcs.action.previousdiff.tip=voir la diff\u00E9rence pr\u00E9c\u00E9dente
+lutinvcs.action.showmessages.tip=voir les messages de publication pr\u00E9c\u00E9dents
+lutinvcs.action.single.tip=ex\u00E9cuter l''action ''{0}'' sur le fichier s\u00E9l\u00E9ctionn\u00E9 ''{1}''
lutinvcs.file=Fichier
lutinvcs.module=Module
lutinvcs.status=Status
Modified: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/i18n/lutinvcs-ui-jaxx-en_GB.properties
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/i18n/lutinvcs-ui-jaxx-en_GB.properties 2008-04-11 19:52:14 UTC (rev 456)
+++ trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/i18n/lutinvcs-ui-jaxx-en_GB.properties 2008-04-13 07:55:46 UTC (rev 457)
@@ -1,36 +1,4 @@
-lutinvcs.action.add=Add
-lutinvcs.action.commit=commit
-lutinvcs.action.delete=delete
-lutinvcs.action.diff=show diff
-lutinvcs.action.refresh=refresh
-lutinvcs.action.revert=revert
-lutinvcs.action.tooltip.add=add selected files
-lutinvcs.action.tooltip.addAll=add all files
-lutinvcs.action.tooltip.commit=commit selected files
-lutinvcs.action.tooltip.commitAll=commit all files
-lutinvcs.action.tooltip.delete=delete
-lutinvcs.action.tooltip.deleteAll=delete all files
-lutinvcs.action.tooltip.diff=show diff of selected files
-lutinvcs.action.tooltip.diffAll=show diff of all files
-lutinvcs.action.tooltip.help=Obtain help
-lutinvcs.action.tooltip.lastMessages=
-lutinvcs.action.tooltip.nextDiff=next diff
-lutinvcs.action.tooltip.previousDiff=previous diff
-lutinvcs.action.tooltip.refresh=refresh selected files
-lutinvcs.action.tooltip.refreshAll=refrsh all files
-lutinvcs.action.tooltip.revert=revert selected files
-lutinvcs.action.tooltip.revertAll=revert all files
-lutinvcs.action.tooltip.update=update selected files
-lutinvcs.action.tooltip.updateAll=update all files
-lutinvcs.action.update=update
lutinvcs.commit.message=Please fill a message for your commit
-lutinvcs.confirm.message=Message TODO
lutinvcs.confirm.title=Confirm UI
lutinvcs.diff.title=Diff UI
-lutinvcs.synch.title=Synch
-lutinvcs.tabs.all=all
-lutinvcs.tabs.local=local
-lutinvcs.tabs.remote=remote
-lutinvcs.tabs.tooltip.all=Show all files (local and remote)
-lutinvcs.tabs.tooltip.local=Show all local files
-lutinvcs.tabs.tooltip.remote=Show all remote files
+lutinvcs.synch.title=Synch UI
Modified: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/i18n/lutinvcs-ui-jaxx-fr_FR.properties
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/i18n/lutinvcs-ui-jaxx-fr_FR.properties 2008-04-11 19:52:14 UTC (rev 456)
+++ trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/i18n/lutinvcs-ui-jaxx-fr_FR.properties 2008-04-13 07:55:46 UTC (rev 457)
@@ -1,36 +1,4 @@
-lutinvcs.action.add=Ajouter
-lutinvcs.action.commit=committer
-lutinvcs.action.delete=supprimer
-lutinvcs.action.diff=voir les diff
-lutinvcs.action.refresh=rafra\u00EEchir
-lutinvcs.action.revert=annuler les modifications
-lutinvcs.action.tooltip.add=ajouter les fichiers s\u00E9lectionn\u00E9s
-lutinvcs.action.tooltip.addAll=ajouter tous les fichiers
-lutinvcs.action.tooltip.commit=commiter les fichiers s\u00E9lectionn\u00E9s
-lutinvcs.action.tooltip.commitAll=commiter tous les fichiers
-lutinvcs.action.tooltip.delete=supprimer les fichiers s\u00E9lectionn\u00E9s
-lutinvcs.action.tooltip.deleteAll=supprimer tous les fichiers
-lutinvcs.action.tooltip.diff=voir tous les fichiers s\u00E9lectionn\u00E9s
-lutinvcs.action.tooltip.diffAll=voir les diff\u00E9rences de tous les fichiers
-lutinvcs.action.tooltip.help=Obtenir de l'aide
-lutinvcs.action.tooltip.lastMessages=
-lutinvcs.action.tooltip.nextDiff=voir la prochaine diff\u00E9rence
-lutinvcs.action.tooltip.previousDiff=voir la diff\u00E9rence pr\u00E9c\u00E9dente
-lutinvcs.action.tooltip.refresh=rafra\u00EEchir tous les fichiers s\u00E9lectionn\u00E9s
-lutinvcs.action.tooltip.refreshAll=rafra\u00EEchir tous les fichiers
-lutinvcs.action.tooltip.revert=annuler les modifications sur les fichiers s\u00E9lectionn\u00E9s
-lutinvcs.action.tooltip.revertAll=annuler les modifications sur tous les fichiers
-lutinvcs.action.tooltip.update=mettre \u00E0 jour les fichiers s\u00E9lectionn\u00E9s
-lutinvcs.action.tooltip.updateAll=mettre \u00E0 jour tous les fichiers
-lutinvcs.action.update=mettre \u00E0 jour
-lutinvcs.commit.message=Renseigner le message de commit
-lutinvcs.confirm.message=Message TODO
+lutinvcs.commit.message=Renseigner le message de publication
lutinvcs.confirm.title=Confirm UI
lutinvcs.diff.title=Diff UI
-lutinvcs.synch.title=Synchronisation
-lutinvcs.tabs.all=all
-lutinvcs.tabs.local=local
-lutinvcs.tabs.remote=remote
-lutinvcs.tabs.tooltip.all=voir tous les fichiers modifi\u00E9s localement ou \u00E0 distance
-lutinvcs.tabs.tooltip.local=voir tous les fichiers locaux
-lutinvcs.tabs.tooltip.remote=voir tous les fichiers \u00E0 distance
+lutinvcs.synch.title=Synch UI
Copied: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/action-add.png (from rev 451, trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/add.png)
===================================================================
(Binary files differ)
Property changes on: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/action-add.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Copied: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/action-commit.png (from rev 440, trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/commit.png)
===================================================================
(Binary files differ)
Property changes on: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/action-commit.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Copied: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/action-delete.png (from rev 451, trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/delete.png)
===================================================================
(Binary files differ)
Property changes on: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/action-delete.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Copied: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/action-diff-next.png (from rev 440, trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/diff-next.png)
===================================================================
(Binary files differ)
Property changes on: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/action-diff-next.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Copied: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/action-diff-prev.png (from rev 440, trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/diff-prev.png)
===================================================================
(Binary files differ)
Property changes on: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/action-diff-prev.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Copied: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/action-diff.png (from rev 440, trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/diff.png)
===================================================================
(Binary files differ)
Property changes on: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/action-diff.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Copied: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/action-help.png (from rev 451, trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/help.png)
===================================================================
(Binary files differ)
Property changes on: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/action-help.png
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ application/octet-stream
Copied: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/action-refresh.png (from rev 452, trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/refresh.png)
===================================================================
(Binary files differ)
Property changes on: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/action-refresh.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Copied: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/action-revert.png (from rev 449, trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/revert.png)
===================================================================
(Binary files differ)
Property changes on: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/action-revert.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Copied: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/action-showmessages.png (from rev 440, trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/recent_msgs.png)
===================================================================
(Binary files differ)
Property changes on: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/action-showmessages.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Copied: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/action-update.png (from rev 440, trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/update.png)
===================================================================
(Binary files differ)
Property changes on: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/action-update.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Deleted: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/add.png
===================================================================
(Binary files differ)
Deleted: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/commit.png
===================================================================
(Binary files differ)
Deleted: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/delete.png
===================================================================
(Binary files differ)
Deleted: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/diff-next.png
===================================================================
(Binary files differ)
Deleted: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/diff-prev.png
===================================================================
(Binary files differ)
Deleted: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/diff.png
===================================================================
(Binary files differ)
Deleted: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/help.png
===================================================================
(Binary files differ)
Deleted: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/recent_msgs.png
===================================================================
(Binary files differ)
Deleted: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/refresh.png
===================================================================
(Binary files differ)
Deleted: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/revert.png
===================================================================
(Binary files differ)
Deleted: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/update.png
===================================================================
(Binary files differ)
Modified: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JaxxConfirmUI.jaxx
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JaxxConfirmUI.jaxx 2008-04-11 19:52:14 UTC (rev 456)
+++ trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JaxxConfirmUI.jaxx 2008-04-13 07:55:46 UTC (rev 457)
@@ -1,10 +1,24 @@
<ConfirmUI title='lutinvcs.confirm.title' defaultCloseOperation='DISPOSE_ON_CLOSE' modal='true'
resizable='false' height='300' width='400'>
<style source="common.css"/>
+ <JPopupMenu id="popup">
+ <JScrollPane styleClass='confirmScroll'>
+ <JList id='messages' model='{messageModel}' selectionModel='{messageSelectionModel}'/>
+ </JScrollPane>
+ </JPopupMenu>
<Table>
<row fill='both'>
<cell fill='both'>
- <JLabel id="actionLabel" text="lutinvcs.confirm.message"/>
+ <JToolBar>
+ <JLabel id="actionLabel"/>
+ <Table fill='both' insets='0,0,0,0'>
+ <row>
+ <cell fill='both'/>
+ </row>
+ </Table>
+ <!--JSeparator orientation="vertical"/-->
+ <JButton id='help' action='{createHelpAction()}'/>
+ </JToolBar>
</cell>
</row>
<row fill='both'>
@@ -19,15 +33,13 @@
<cell fill='both'/>
</row>
</Table>
- <JSeparator orientation="vertical"/>
- <JButton id='lastMessages' onActionPerformed='showLastMessages()'/>
- <JButton id='help' onActionPerformed='doHelp()'/>
+ <JButton id='lastMessages' action='{createShowMessagesAction()}'/>
</JToolBar>
</cell>
</row>
<row fill='both'>
<cell fill='both' columns='3' weightx='1'>
- <JScrollPane id="commitScroll" height='90' verticalScrollBarPolicy="20"
+ <JScrollPane id="commitScroll" height='90' styleClass='confirmScroll'
columnHeaderView="{tool}">
<JTextArea id="commitMessage" constructorParams="4,50"/>
</JScrollPane>
@@ -49,5 +61,7 @@
</cell>
</row>
</Table>
+ <DefaultListSelectionModel id='messageSelectionModel'/>
+ <DefaultListModel id='messageModel'/>
</ConfirmUI>
\ No newline at end of file
Modified: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JaxxDiffUI.jaxx
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JaxxDiffUI.jaxx 2008-04-11 19:52:14 UTC (rev 456)
+++ trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JaxxDiffUI.jaxx 2008-04-13 07:55:46 UTC (rev 457)
@@ -8,37 +8,33 @@
<row fill='both'>
<cell fill='both' weightx='1'>
<JToolBar>
- <JToggleButton id='allTab' onActionPerformed='setLocation(ALL)'/>
- <JToggleButton id='localTab' onActionPerformed='setLocation(LOCAL)'/>
- <JToggleButton id='remoteTab' onActionPerformed='setLocation(REMOTE)'/>
+ <JToggleButton id='allTab' action='{createLocationAction(ALL)}'/>
+ <JToggleButton id='localTab' action='{createLocationAction(LOCAL)}'/>
+ <JToggleButton id='remoteTab' action='{createLocationAction(REMOTE)}'/>
<JSeparator orientation="vertical"/>
-
- <JButton id='refresh' onActionPerformed='doAction(REFRESH)'/>
+ <JButton id='refresh' action='{createAction(REFRESH,true)}'/>
<JSeparator orientation="vertical"/>
-
- <JButton id='nextDiff' onActionPerformed='gotoNextDiff()'/>
- <JButton id='previousDiff' onActionPerformed='gotoPreviousDiff()'/>
+ <JButton id='nextDiff' action='{createDiffAction(false)}'/>
+ <JButton id='previousDiff' action='{createDiffAction(true)}'/>
<JSeparator orientation="vertical"/>
-
- <JButton id='update' onActionPerformed='doAction(UPDATE)'/>
- <JButton id='commit' onActionPerformed='doAction(COMMIT)'/>
- <JButton id='revert' onActionPerformed='doAction(REVERT)'/>
+ <JButton id='update' action='{createAction(UPDATE,true)}'/>
+ <JButton id='commit' action='{createAction(COMMIT,true)}'/>
+ <JButton id='revert' action='{createAction(REVERT,true)}'/>
<JSeparator orientation="vertical"/>
-
- <JButton id='help' onActionPerformed='doHelp()'/>
+ <JButton id='help' action='{createHelpAction()}'/>
</JToolBar>
</cell>
</row>
<row fill='both'>
<cell fill='both'>
<JScrollPane id='contentScroll' styleClass='diffScroll' height='100'>
- <JTable id="contentTable" styleClass='diffTable' onMouseClicked="doSelectFile()"/>
+ <JTable id="contentTable" styleClass='diffTable'/>
</JScrollPane>
</cell>
</row>
<row fill='both'>
<cell fill='both' weighty='1' weightx='1'>
- <JSplitPane id='splitPane2' orientation='horizontal' resizeWeight="0.5" dividerLocation="{0.5}">
+ <JSplitPane orientation='horizontal' resizeWeight="0.5" dividerLocation="{0.5}">
<JScrollPane id='remoteEditorScroll' styleClass='diffScroll'>
<JTextArea id="remoteEditorContent" editable='false'/>
</JScrollPane>
Modified: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JaxxSynchUI.jaxx
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JaxxSynchUI.jaxx 2008-04-11 19:52:14 UTC (rev 456)
+++ trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JaxxSynchUI.jaxx 2008-04-13 07:55:46 UTC (rev 457)
@@ -5,42 +5,36 @@
import static org.codelutin.vcs.type.VCSEntryLocation.*;
</script>
<JPopupMenu id="popup" invoker='{contentTable}'>
- <JMenuItem id='refresh' text='lutinvcs.action.refresh' onActionPerformed='doAction(REFRESH,true)'/>
- <JMenuItem id='diff' text='lutinvcs.action.diff' onActionPerformed='doAction(DIFF,true)'/>
+ <JMenuItem id='refresh' action='{createAction(REFRESH,true)}' font-size='10'/>
+ <JMenuItem id='diff' action='{createAction(DIFF,true)}' font-size='10'/>
<JSeparator/>
- <JMenuItem id='update' text='lutinvcs.action.update' onActionPerformed='doAction(UPDATE,true)'/>
- <JMenuItem id='revert' text='lutinvcs.action.revert' onActionPerformed='doAction(REVERT,true)'/>
+ <JMenuItem id='update' action='{createAction(UPDATE,true)}' font-size='10'/>
+ <JMenuItem id='revert' action='{createAction(REVERT,true)}' font-size='10'/>
<JSeparator/>
-
- <JMenuItem id='commit' text='lutinvcs.action.commit' onActionPerformed='doAction(COMMIT,true)'/>
- <JMenuItem id='add' text='lutinvcs.action.add' onActionPerformed='doAction(ADD,true)'/>
- <JMenuItem id='delete' text='lutinvcs.action.delete' onActionPerformed='doAction(DELETE,true)'/>
+ <JMenuItem id='commit' action='{createAction(COMMIT,true)}' font-size='10'/>
+ <JMenuItem id='add' action='{createAction(ADD,true)}' font-size='10'/>
+ <JMenuItem id='delete' action='{createAction(DELETE,true)}' font-size='10'/>
</JPopupMenu>
<Table id='table'>
<row fill='both'>
<cell fill='both' weightx='1'>
<JToolBar>
- <JToggleButton id='allTab' onActionPerformed='setLocation(ALL)'/>
- <JToggleButton id='localTab' onActionPerformed='setLocation(LOCAL)'/>
- <JToggleButton id='remoteTab' onActionPerformed='setLocation(REMOTE)'/>
-
+ <JToggleButton id='allTab' action='{createLocationAction(ALL)}'/>
+ <JToggleButton id='localTab' action='{createLocationAction(LOCAL)}'/>
+ <JToggleButton id='remoteTab' action='{createLocationAction(REMOTE)}'/>
<JSeparator orientation="vertical"/>
-
- <JButton id='refreshAll' onActionPerformed='doAction(REFRESH,false)'/>
- <JButton id='diffAll' onActionPerformed='doAction(DIFF,false)'/>
+ <JButton id='refreshAll' action='{createAction(REFRESH,false)}'/>
+ <JButton id='diffAll' action='{createAction(DIFF,false)}'/>
<JSeparator orientation="vertical"/>
-
- <JButton id='updateAll' onActionPerformed='doAction(UPDATE,false)'/>
- <JButton id='revertAll' onActionPerformed='doAction(REVERT,false)'/>
+ <JButton id='updateAll' action='{createAction(UPDATE,false)}'/>
+ <JButton id='revertAll' action='{createAction(REVERT,false)}'/>
<JSeparator orientation="vertical"/>
-
- <JButton id='commitAll' onActionPerformed='doAction(COMMIT,false)'/>
- <JButton id='addAll' onActionPerformed='doAction(ADD,false)'/>
- <JButton id='deleteAll' onActionPerformed='doAction(DELETE,false)'/>
+ <JButton id='commitAll' action='{createAction(COMMIT,false)}'/>
+ <JButton id='addAll' action='{createAction(ADD,false)}'/>
+ <JButton id='deleteAll' action='{createAction(DELETE,false)}'/>
<JSeparator orientation="vertical"/>
-
- <JButton id='help' onActionPerformed='doHelp()'/>
+ <JButton id='help' action='{createHelpAction()}'/>
</JToolBar>
</cell>
</row>
Modified: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/common.css
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/common.css 2008-04-11 19:52:14 UTC (rev 456)
+++ trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/common.css 2008-04-13 07:55:46 UTC (rev 457)
@@ -10,248 +10,65 @@
opaque: false;
borderPainted: false;
enabled: false;
- margin: 0;
+ margin: 0; /*font-size:10;*/
}
JToggleButton {
opaque: false;
borderPainted: false;
margin: 0;
+ selected: false;
+ font-size: 10;
}
-JMenuItem {
+JMenuItem, JMenu {
enabled: true;
}
-JMenu {
- enabled: true;
+JSeparator {
+ border: { null
}
-.smallSize {
- font-size: 9;
-}
+;
+opaque:false
-.updateTable {
- rowSelectionAllowed: true;
- /*autoResizeMode: auto_resize_all_columns;
- autoResizeMode: auto_resize_last_column;*/
- showVerticalLines: false;
- cellSelectionEnabled: false;
- rowMargin: 0;
- selectionMode: { ListSelectionModel . MULTIPLE_INTERVAL_SELECTION
-}
-
;
}
-.updateScroll {
+.updateScroll, .diffScroll, .confirmScroll {
verticalScrollBarPolicy: 20;
horizontalScrollBarPolicy: 31;
}
-.diffScroll {
- verticalScrollBarPolicy: 20;
- horizontalScrollBarPolicy: 31;
-}
-
-.diffTable {
- rowSelectionAllowed: true;
- /*autoResizeMode: auto_resize_all_columns;
- autoResizeMode: auto_resize_last_column;*/
+.updateTable, .confirmTable, .diffTable {
showVerticalLines: false;
cellSelectionEnabled: false;
+ rowSelectionAllowed: true;
rowMargin: 0;
- selectionMode: 0;
}
-#allTab {
- buttonGroup: tabs;
- mnemonic: A;
- selected: false;
- icon: { createLocationIcon( ALL )
+.updateTable, .confirmTable {
+ selectionMode: 2;
}
-;
-text:
-
-"lutinvcs.tabs.all"
-;
-toolTipText:
-
-"lutinvcs.tabs.tooltip.all"
-;
+.diffTable {
+ selectionMode: 0;
}
-#localTab {
+#allTab, #localTab, #remoteTab {
buttonGroup: tabs;
- mnemonic: L;
- selected: false;
- icon: { createLocationIcon( LOCAL )
}
-;
-text:
-
-"lutinvcs.tabs.local"
-;
-toolTipText:
-
-"lutinvcs.tabs.tooltip.local"
-;
+.smallSize {
+ font-size: 9;
}
-#remoteTab {
- buttonGroup: tabs;
- mnemonic: R;
- selected: false;
- icon: { createLocationIcon( REMOTE )
+#actionLabel, #actionCommitLabel {
+ font-size: 10;
}
-;
-text:
-
-"lutinvcs.tabs.remote"
-;
-toolTipText:
-
-"lutinvcs.tabs.tooltip.remote"
-;
-}
-
-#refresh, #refreshAll {
- icon: { createActionIcon( REFRESH )
-}
-
-;
-}
-
-#diff, #diffAll {
- icon: { createActionIcon( DIFF )
-}
-
-;
-}
-
-#update, #updateAll {
- icon: { createActionIcon( UPDATE )
-}
-
-;
-}
-
-#revert, #revertAll {
- icon: { createActionIcon( REVERT )
-}
-
-;
-}
-
-#commit, #commitAll {
- icon: { createActionIcon( COMMIT )
-}
-
-;
-}
-
-#add, #addAll {
- icon: { createActionIcon( ADD )
-}
-
-;
-}
-
-#delete, #deleteAll {
- icon: { createActionIcon( DELETE )
-}
-
-;
-}
-
-#refresh {
- toolTipText: "lutinvcs.action.tooltip.refresh";
-}
-
-#refreshAll {
- toolTipText: "lutinvcs.action.tooltip.refreshAll";
-}
-
-#diff {
- toolTipText: "lutinvcs.action.tooltip.diff";
-}
-
-#diffAll {
- toolTipText: "lutinvcs.action.tooltip.diffAll";
-}
-
-#update {
- toolTipText: "lutinvcs.action.tooltip.update";
-}
-
-#updateAll {
- toolTipText: "lutinvcs.action.tooltip.updateAll";
-}
-
-#revert {
- toolTipText: "lutinvcs.action.tooltip.revert";
-}
-
-#revertAll {
- toolTipText: "lutinvcs.action.tooltip.revertAll";
-}
-
-#commit {
- toolTipText: "lutinvcs.action.tooltip.commit";
-}
-
-#commitAll {
- toolTipText: "lutinvcs.action.tooltip.commitAll";
-}
-
-#add {
- toolTipText: "lutinvcs.action.tooltip.add";
-}
-
-#addAll {
- toolTipText: "lutinvcs.action.tooltip.addAll";
-}
-
-#delete {
- toolTipText: "lutinvcs.action.tooltip.delete";
-}
-
-#deleteAll {
- toolTipText: "lutinvcs.action.tooltip.deleteAll";
-}
-
-#help {
- toolTipText: "lutinvcs.action.tooltip.help";
- enabled: true;
- icon: { createImageIcon( "help.png" )
-}
-
-;
-}
-
-#nextDiff {
- toolTipText: "lutinvcs.action.tooltip.nextDiff";
- icon: { createImageIcon( "diff-next.png" )
-}
-
-;
-}
-
-#previousDiff {
- toolTipText: "lutinvcs.action.tooltip.previousDiff";
- icon: { createImageIcon( "diff-prev.png" )
-}
-
-;
-}
-
-#lastMessages {
- toolTipText: "lutinvcs.action.tooltip.lastMessages";
- icon: { createImageIcon( "recent_msgs.png" )
-}
-
-;
-}
\ No newline at end of file
+#messages {
+ fixedCellWidth: 300;
+ fixedCellHeight: 12;
+ visibleRowCount: 10;
+}
\ No newline at end of file
Modified: trunk/lutinvcs/pom.xml
===================================================================
--- trunk/lutinvcs/pom.xml 2008-04-11 19:52:14 UTC (rev 456)
+++ trunk/lutinvcs/pom.xml 2008-04-13 07:55:46 UTC (rev 457)
@@ -25,6 +25,7 @@
<module>lutinvcs-provider-svn</module>
<module>lutinvcs-ui-common</module>
<module>lutinvcs-ui-jaxx</module>
+ <module>lutinvcs-all-providers</module>
<module>lutinvcs-all</module>
</modules>
@@ -226,11 +227,11 @@
<artifactId>lutinutil</artifactId>
<version>0.30-SNAPSHOT</version>
</dependency>
- <dependency>
+ <!--dependency>
<groupId>${common.groupId}</groupId>
<artifactId>lutinvcs-api</artifactId>
<version>${current.version}</version>
- </dependency>
+ </dependency-->
<dependency>
<groupId>${common.groupId}</groupId>
<artifactId>lutinvcs-core</artifactId>
@@ -268,6 +269,11 @@
</dependency>
<dependency>
<groupId>${common.groupId}</groupId>
+ <artifactId>lutinvcs-all-providers</artifactId>
+ <version>${current.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>${common.groupId}</groupId>
<artifactId>lutinvcs-all</artifactId>
<version>${current.version}</version>
</dependency>
1
0
r456 - in trunk/lutinvcs: lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/handler lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/util lutinvcs-ui-jaxx/src/main/resources/i18n lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui
by tchemit@users.labs.libre-entreprise.org 11 Apr '08
by tchemit@users.labs.libre-entreprise.org 11 Apr '08
11 Apr '08
Author: tchemit
Date: 2008-04-11 19:52:14 +0000 (Fri, 11 Apr 2008)
New Revision: 456
Modified:
trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/ConfirmUI.java
trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/DiffUI.java
trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/handler/ConfirmUIHandler.java
trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/handler/DiffUIHandler.java
trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/handler/SynchUIHandler.java
trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/util/AbstractTabUI.java
trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/util/AbstractTabUIHandler.java
trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/util/AbstractUI.java
trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/util/AbstractUIHandler.java
trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/util/AbstractUIModel.java
trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/util/AbstractVCSEntriesTableModel.java
trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/util/UIHelper.java
trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/i18n/lutinvcs-ui-jaxx-en_GB.properties
trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/i18n/lutinvcs-ui-jaxx-fr_FR.properties
trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JaxxConfirmUI.jaxx
trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JaxxDiffUI.jaxx
trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JaxxSynchUI.jaxx
trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/common.css
Log:
add rowsorter supports in table + refactor ui code
Modified: trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/ConfirmUI.java
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/ConfirmUI.java 2008-04-11 19:47:08 UTC (rev 455)
+++ trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/ConfirmUI.java 2008-04-11 19:52:14 UTC (rev 456)
@@ -18,7 +18,6 @@
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
-import javax.swing.JTable;
import javax.swing.JTextArea;
import javax.swing.JToolBar;
@@ -37,10 +36,6 @@
public abstract JTextArea getCommitMessage();
- public abstract JScrollPane getContent();
-
- public abstract JTable getContentTable();
-
public abstract AbstractButton getLastMessages();
public abstract AbstractButton getAccept();
@@ -58,6 +53,6 @@
}
protected void showLastMessages() {
- //TODO
+ getHandler().showLastMessages();
}
}
Modified: trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/DiffUI.java
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/DiffUI.java 2008-04-11 19:47:08 UTC (rev 455)
+++ trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/DiffUI.java 2008-04-11 19:52:14 UTC (rev 456)
@@ -18,7 +18,6 @@
import org.codelutin.vcs.type.VCSAction;
import javax.swing.AbstractButton;
-import java.util.List;
/** @author chemit */
public abstract class DiffUI extends org.codelutin.vcs.ui.util.AbstractTabUI<org.codelutin.vcs.ui.handler.DiffUIHandler> {
@@ -27,12 +26,6 @@
public abstract AbstractButton getPreviousDiff();
- public void doSelectFile() {
- List<VCSEntry> entries = getHandler().getModel().getEntriesModel().getDisplayedEntries(getHandler().getSelectionModel());
- VCSEntry vcsEntry = entries.isEmpty() ? null : entries.get(0);
- getHandler().getModel().setFileModel(vcsEntry);
- }
-
@Override
public void setVisible(boolean b) {
if (b) {
@@ -41,12 +34,17 @@
button = getAllTab();
}
button.doClick();
- if (getTable(getHandler().getModel().getEntriesModel().getLocation()).getRowCount() > 0)
+ if (getContentTable().getRowCount() > 0)
getHandler().getSelectionModel().setSelectionInterval(0, 0);
}
super.setVisible(b);
}
+ protected void doSelectFile() {
+ VCSEntry entry = getHandler().getSelectedEntry();
+ getHandler().getModel().setFileModel(entry);
+ }
+
protected void doAction(VCSAction action) {
getHandler().doAction(action, getHandler().getModel().getFileModel());
}
Modified: trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/handler/ConfirmUIHandler.java
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/handler/ConfirmUIHandler.java 2008-04-11 19:47:08 UTC (rev 455)
+++ trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/handler/ConfirmUIHandler.java 2008-04-11 19:52:14 UTC (rev 456)
@@ -16,11 +16,10 @@
import org.codelutin.vcs.VCSEntry;
import org.codelutin.vcs.type.VCSAction;
+import org.codelutin.vcs.ui.ConfirmUI;
+import org.codelutin.vcs.ui.model.ConfirmUIModel;
import org.codelutin.vcs.ui.util.AbstractUIHandler;
import org.codelutin.vcs.ui.util.AbstractVCSEntriesTableModel;
-import org.codelutin.vcs.ui.util.UIHelper;
-import org.codelutin.vcs.ui.model.ConfirmUIModel;
-import org.codelutin.vcs.ui.ConfirmUI;
import javax.swing.ListSelectionModel;
import java.beans.PropertyChangeEvent;
@@ -57,14 +56,6 @@
throw new IllegalStateException("unimplemented property changed : " + evt);
}
- @Override
- public void init() {
- super.init();
- getUi().getContentTable().setModel(getModel().getEntriesModel());
- // init table renderer
- UIHelper.installVCSTableUI(getUi().getContentTable());
- }
-
protected void updateUI() {
VCSAction action = getModel().getAction();
getUi().getAccept().setText(action.getLibelle());
@@ -98,8 +89,9 @@
// dispose ui
getUi().dispose();
-
}
-
+ public void showLastMessages() {
+ log.info("//TODO: " + this);
+ }
}
Modified: trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/handler/DiffUIHandler.java
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/handler/DiffUIHandler.java 2008-04-11 19:47:08 UTC (rev 455)
+++ trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/handler/DiffUIHandler.java 2008-04-11 19:52:14 UTC (rev 456)
@@ -16,16 +16,11 @@
import org.codelutin.vcs.VCSEntry;
import org.codelutin.vcs.type.VCSAction;
-import org.codelutin.vcs.type.VCSEntryLocation;
-import org.codelutin.vcs.ui.VCSUIFactory;
import org.codelutin.vcs.ui.DiffUI;
import org.codelutin.vcs.ui.model.DiffUIModel;
-import org.codelutin.vcs.ui.ConfirmUI;
import org.codelutin.vcs.ui.util.AbstractTabUIHandler;
import org.codelutin.vcs.ui.util.AbstractVCSEntriesTableModel;
-import org.codelutin.vcs.ui.util.UIHelper;
-import javax.swing.JTable;
import javax.swing.ListSelectionModel;
import javax.swing.event.ListSelectionEvent;
import javax.swing.event.ListSelectionListener;
@@ -43,94 +38,71 @@
@Override
public void propertyChange(PropertyChangeEvent evt) {
- //if (log.isDebugEnabled()) {
- log.info(evt.getPropertyName() + " old:" + evt.getOldValue() + ", new:" + evt.getNewValue());
- //}
-
- String action = evt.getPropertyName();
- if (DiffUIModel.FILE_PROPERTY_CHANGED.equals(action)) {
- doSelectFile((VCSEntry) evt.getNewValue());
+ if (log.isDebugEnabled()) {
+ log.debug(evt.getPropertyName() + " old:" + evt.getOldValue() + ", new:" + evt.getNewValue());
+ }
+ if (DiffUIModel.FILE_PROPERTY_CHANGED.equals(evt.getPropertyName())) {
+ VCSEntry model = (VCSEntry) evt.getNewValue();
+ boolean hasActions = false;
+ List<VCSAction> actions = null;
+ if (model != null) {
+ actions = model.getState().getActions();
+ hasActions = !actions.isEmpty();
+ }
+ DiffUI ui = getUi();
+ updateAction(actions, hasActions, ui.getUpdate(), VCSAction.UPDATE);
+ updateAction(actions, hasActions, ui.getRevert(), VCSAction.REVERT);
+ updateAction(actions, hasActions, ui.getCommit(), VCSAction.COMMIT);
+ ui.getRefresh().setEnabled(hasActions);
} else {
super.propertyChange(evt);
}
}
- @Override
- public void doSelectLocation(VCSEntryLocation location) {
-
- super.doSelectLocation(location);
-
+ public void doSelectLocation() {
AbstractVCSEntriesTableModel fileStatesModel = getModel().getEntriesModel();
if (fileStatesModel.getRowCount() > 0) {
getSelectionModel().addSelectionInterval(0, 0);
- } else {
- getSelectionModel().clearSelection();
}
}
- protected void initTab(VCSEntryLocation location) {
- JTable table = getUi().getTable(location);
- final AbstractVCSEntriesTableModel fileStatesModel = getModel().getEntriesModel();
- table.setModel(fileStatesModel);
- table.getSelectionModel().addListSelectionListener(new ListSelectionListener() {
+ @Override
+ public void init() {
+ super.init();
+ getUi().getContentTable().getSelectionModel().addListSelectionListener(new ListSelectionListener() {
public void valueChanged(ListSelectionEvent e) {
if (!e.getValueIsAdjusting()) {
- getUi().doSelectFile();
+ getModel().setFileModel(getSelectedEntry());
}
}
});
- // init table renderer
- UIHelper.installVCSTableUI(table);
}
- public void doSelectFile(VCSEntry model) {
-
- boolean hasActions = false;
- List<String> acts = new ArrayList<String>();
-
- if (model != null) {
- List<VCSAction> actions = model.getState().getActions();
- for (VCSAction action : actions) {
- acts.add(action.name().toLowerCase());
- }
- hasActions = !actions.isEmpty();
+ public VCSEntry getSelectedEntry() {
+ ListSelectionModel selectionModel = getSelectionModel();
+ if (selectionModel.isSelectionEmpty()) {
+ return null;
}
- getUi().getUpdate().setEnabled(hasActions && acts.contains("update"));
- getUi().getCommit().setEnabled(hasActions && acts.contains("commit"));
- getUi().getRevert().setEnabled(hasActions && acts.contains("revert"));
- getUi().getRefresh().setEnabled(hasActions);
+ return getModel().getEntriesModel().getDisplayedEntry(selectionModel.getMinSelectionIndex());
}
public void doAction(VCSAction action, VCSEntry file) {
AbstractVCSEntriesTableModel model = getModel().getEntriesModel();
List<VCSEntry> entries = new ArrayList<VCSEntry>(1);
entries.add(file);
- log.info(action + " : " + model);
- ListSelectionModel selectionModel = getSelectionModel();
+ //log.info(action + " : " + model);
if (action == VCSAction.REFRESH) {
- selectionModel.clearSelection();
- // do refresh of all states
- log.info("refresh :" + model.getRowCount());
- model.refresh(System.nanoTime(), entries);
+ doRefresh(model, entries, getSelectionModel());
} else {
-
- log.info("files to treate :" + entries.size());
-
- ConfirmUI confirmUI = VCSUIFactory.newConfirmUI();
-
- confirmUI.getHandler().getModel().init(action, model.getLocation(), entries.toArray(new VCSEntry[entries.size()]));
-
- confirmUI.setVisible(true);
- //TODO SynchModel should listener for modification on ActionManagerQueue thread
- log.info("TODO refresh states for files...");
+ doConfirm(action, model, entries);
}
}
public void gotoNextDiff() {
- //TODO
+ log.info("//TODO :" + this);
}
public void gotoPreviousDiff() {
- //TODO
+ log.info("//TODO :" + this);
}
}
Modified: trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/handler/SynchUIHandler.java
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/handler/SynchUIHandler.java 2008-04-11 19:47:08 UTC (rev 455)
+++ trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/handler/SynchUIHandler.java 2008-04-11 19:52:14 UTC (rev 456)
@@ -2,21 +2,15 @@
import org.codelutin.vcs.VCSEntry;
import org.codelutin.vcs.type.VCSAction;
-import org.codelutin.vcs.type.VCSEntryLocation;
-import org.codelutin.vcs.ui.VCSUIFactory;
-import org.codelutin.vcs.ui.ConfirmUI;
import org.codelutin.vcs.ui.SynchUI;
import org.codelutin.vcs.ui.model.SynchUIModel;
-import org.codelutin.vcs.ui.DiffUI;
import org.codelutin.vcs.ui.util.AbstractTabUIHandler;
import org.codelutin.vcs.ui.util.AbstractVCSEntriesTableModel;
-import org.codelutin.vcs.ui.util.UIHelper;
-import javax.swing.JTable;
import javax.swing.ListSelectionModel;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
-import java.util.ArrayList;
+import java.util.Arrays;
import java.util.List;
/** @author chemit */
@@ -28,131 +22,83 @@
}
@Override
- public void doSelectLocation(VCSEntryLocation location) {
+ public void init() {
+ super.init();
+ getUi().getContentTable().addMouseListener(new ListMouseListener());
+ }
- super.doSelectLocation(location);
+ protected void doSelectLocation() {
- VCSAction[] actions = getModel().getEntriesModel().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().getAddAll().setEnabled(hasActions && acts.contains("add"));
- getUi().getDeleteAll().setEnabled(hasActions && acts.contains("delete"));
- getUi().getRefreshAll().setEnabled(hasActions);
+ List<VCSAction> actions = Arrays.asList(getModel().getEntriesModel().getActions((ListSelectionModel) null));
+
+ boolean hasActions = !actions.isEmpty();
+ SynchUI ui = getUi();
+ updateAction(actions, hasActions, ui.getDiffAll(), VCSAction.DIFF);
+ updateAction(actions, hasActions, ui.getUpdateAll(), VCSAction.UPDATE);
+ updateAction(actions, hasActions, ui.getRevertAll(), VCSAction.REVERT);
+ updateAction(actions, hasActions, ui.getCommitAll(), VCSAction.COMMIT);
+ updateAction(actions, hasActions, ui.getAddAll(), VCSAction.ADD);
+ updateAction(actions, hasActions, ui.getDeleteAll(), VCSAction.DELETE);
+ ui.getRefreshAll().setEnabled(hasActions);
}
public void doAction(VCSAction action, boolean useSelection) {
AbstractVCSEntriesTableModel model = getModel().getEntriesModel();
log.info(action + " : " + model);
ListSelectionModel selectionModel = getSelectionModel();
+ List<VCSEntry> entries = model.filter(action, model.getDisplayedEntries(useSelection ? selectionModel : null));
+
if (action == VCSAction.REFRESH) {
- selectionModel.clearSelection();
- // do refresh of all states
- log.info("refresh :" + model.getRowCount());
- model.refresh(System.nanoTime(), model.getEntries());
- } else {
- List<VCSEntry> entries = model.filter(action, model.getDisplayedEntries(useSelection ? selectionModel : null));
- if (entries.isEmpty()) {
- // nothing to do
- return;
- }
- if (action == VCSAction.DIFF) {
- // show diff ui
- DiffUI diffUI = VCSUIFactory.newDiffUI();
- List<VCSEntry> vcsEntryList;
- if (useSelection) {
- vcsEntryList = entries;
- } else {
- // take all entries
- vcsEntryList = model.filter(action, model.getEntries());
- }
- diffUI.getHandler().getModel().init(model.getLocation(), vcsEntryList.toArray(new VCSEntry[vcsEntryList.size()]));
- diffUI.setVisible(true);
- return;
- }
- log.info("files to treate :" + entries.size());
+ doRefresh(model, model.getEntries(), selectionModel);
+ return;
+ }
- ConfirmUI confirmUI = VCSUIFactory.newConfirmUI();
-
- confirmUI.getHandler().getModel().init(action, model.getLocation(), entries.toArray(new VCSEntry[entries.size()]));
-
- confirmUI.setVisible(true);
- //TODO SynchModel should listener for modification on ActionManagerQueue thread
- log.info("TODO refresh states for files...");
+ if (entries.isEmpty()) {
+ // nothing to do
+ return;
}
- }
+ if (action == VCSAction.DIFF) {
+ // show diff ui
+ doDiff(useSelection, model, entries);
+ return;
+ }
- protected void initTab(VCSEntryLocation location) {
- JTable table = getUi().getTable(location);
- AbstractVCSEntriesTableModel fileStatesModel = getModel().getEntriesModel();
- table.setModel(fileStatesModel);
- table.addMouseListener(new ListMouseListener(getUi(), fileStatesModel, location));
- // init table renderer
- UIHelper.installVCSTableUI(table);
+ doConfirm(action, model, entries);
}
+
protected class ListMouseListener extends MouseAdapter {
- private final AbstractVCSEntriesTableModel model;
-
- private final ListSelectionModel selectionModel;
-
- private final JTable jTable;
-
-
- public ListMouseListener(SynchUI ui, AbstractVCSEntriesTableModel model, VCSEntryLocation modelName) {
- this.model = model;
- jTable = ui.getTable(modelName);
- selectionModel = jTable.getSelectionModel();
- }
-
@Override
public void mousePressed(MouseEvent e) {
super.mousePressed(e);
- if (e.isPopupTrigger()) {
- initPopup(e.getX(), e.getY());
+ if (e.isPopupTrigger() && !getSelectionModel().isSelectionEmpty()) {
+ initPopup(e.getX(), e.getY(), getSelectionModel());
}
}
@Override
public void mouseReleased(MouseEvent e) {
super.mouseReleased(e);
- if (e.isPopupTrigger()) {
- initPopup(e.getX(), e.getY());
+ if (e.isPopupTrigger() && !getSelectionModel().isSelectionEmpty()) {
+ initPopup(e.getX(), e.getY(), getSelectionModel());
}
}
- @Override
- public void mouseClicked(MouseEvent e) {
- // nothing to do
- }
+ protected void initPopup(int x, int y, ListSelectionModel selectionModel) {
- protected void initPopup(int x, int y) {
- if (!selectionModel.isSelectionEmpty()) {
- List<String> acts = new ArrayList<String>();
- for (VCSAction action : model.getActions(selectionModel)) {
- acts.add(action.name().toLowerCase());
- }
- boolean hasActions = !acts.isEmpty();
-
- getUi().getPopup().setInvoker(jTable);
- getUi().getDiff().setEnabled(hasActions && acts.contains("diff"));
- getUi().getUpdate().setEnabled(hasActions && acts.contains("update"));
- getUi().getCommit().setEnabled(hasActions && acts.contains("commit"));
- getUi().getAdd().setEnabled(hasActions && acts.contains("add"));
- getUi().getDelete().setEnabled(hasActions && acts.contains("delete"));
- getUi().getRevert().setEnabled(hasActions && acts.contains("revert"));
- getUi().getRefresh().setEnabled(hasActions);
- getUi().getPopup().pack();
- // display popup
- getUi().getPopup().show(jTable, x, y);
- }
+ List<VCSAction> actions = Arrays.asList(getModel().getEntriesModel().getActions(selectionModel));
+ boolean hasActions = !actions.isEmpty();
+ SynchUI ui = getUi();
+ updateAction(actions, hasActions, ui.getDiff(), VCSAction.DIFF);
+ updateAction(actions, hasActions, ui.getUpdate(), VCSAction.UPDATE);
+ updateAction(actions, hasActions, ui.getRevert(), VCSAction.REVERT);
+ updateAction(actions, hasActions, ui.getCommit(), VCSAction.COMMIT);
+ updateAction(actions, hasActions, ui.getAdd(), VCSAction.ADD);
+ updateAction(actions, hasActions, ui.getDelete(), VCSAction.DELETE);
+ ui.getRefresh().setEnabled(hasActions);
+ // display popup
+ ui.getPopup().show(ui.getContentTable(), x, y);
}
}
}
Modified: trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/util/AbstractTabUI.java
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/util/AbstractTabUI.java 2008-04-11 19:47:08 UTC (rev 455)
+++ trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/util/AbstractTabUI.java 2008-04-11 19:52:14 UTC (rev 456)
@@ -17,13 +17,11 @@
import org.codelutin.vcs.type.VCSEntryLocation;
import javax.swing.AbstractButton;
-import javax.swing.JPanel;
+import javax.swing.ButtonGroup;
+import javax.swing.ImageIcon;
import javax.swing.JScrollPane;
import javax.swing.JTable;
import javax.swing.JToggleButton;
-import javax.swing.ButtonGroup;
-import javax.swing.ImageIcon;
-import java.awt.CardLayout;
/** @author chemit */
public abstract class AbstractTabUI<H extends AbstractTabUIHandler<?, ?>> extends AbstractUI<H> {
@@ -36,20 +34,6 @@
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 AbstractButton getRefresh();
public abstract AbstractButton getUpdate();
@@ -60,22 +44,7 @@
public abstract AbstractButton getHelp();
- public abstract CardLayout getCardLayout();
- 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);
- }
-
public AbstractButton getButton(VCSEntryLocation modelName) {
switch (modelName) {
case ALL:
Modified: trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/util/AbstractTabUIHandler.java
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/util/AbstractTabUIHandler.java 2008-04-11 19:47:08 UTC (rev 455)
+++ trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/util/AbstractTabUIHandler.java 2008-04-11 19:52:14 UTC (rev 456)
@@ -14,10 +14,17 @@
*/
package org.codelutin.vcs.ui.util;
-import org.codelutin.vcs.type.VCSEntryLocation;
+import org.codelutin.vcs.VCSEntry;
+import org.codelutin.vcs.type.VCSAction;
+import org.codelutin.vcs.ui.ConfirmUI;
+import org.codelutin.vcs.ui.DiffUI;
+import org.codelutin.vcs.ui.VCSUIFactory;
+import javax.swing.AbstractButton;
+import javax.swing.JTable;
import javax.swing.ListSelectionModel;
import java.beans.PropertyChangeEvent;
+import java.util.List;
/** @author chemit */
public abstract class AbstractTabUIHandler<M extends AbstractTabUIModel, U extends AbstractTabUI<? extends AbstractTabUIHandler>> extends AbstractUIHandler<M, U> {
@@ -26,35 +33,54 @@
super(ui, model);
}
- protected abstract void initTab(VCSEntryLocation location);
-
- @Override
+ /*@Override
public void init() {
super.init();
- getUi().getHelp().setEnabled(true);
- initTab(VCSEntryLocation.ALL);
- initTab(VCSEntryLocation.LOCAL);
- initTab(VCSEntryLocation.REMOTE);
- }
+ }*/
public ListSelectionModel getSelectionModel() {
- return getUi().getTable(getLocation()).getSelectionModel();
+ return getUi().getContentTable().getSelectionModel();
}
public void propertyChange(PropertyChangeEvent evt) {
- //if (log.isDebugEnabled()) {
- log.info(evt.getPropertyName() + " old:" + evt.getOldValue() + ", new:" + evt.getNewValue());
- //}
+ if (log.isDebugEnabled()) {
+ log.debug(evt.getPropertyName() + " old:" + evt.getOldValue() + ", new:" + evt.getNewValue());
+ }
String action = evt.getPropertyName();
-
if (AbstractTabUIModel.LOCATION_PROPERTY_CHANGED.equals(action)) {
- doSelectLocation((VCSEntryLocation) evt.getNewValue());
+ doSelectLocation();
}
}
- public void doSelectLocation(VCSEntryLocation location) {
- log.info(location);
- getUi().getCardLayout().show(getUi().getPreview(), "tab" + location.name().toLowerCase());
+ protected abstract void doSelectLocation();
+
+ protected void updateAction(List<VCSAction> actions, boolean hasActions, AbstractButton ui, VCSAction diff) {
+ ui.setEnabled(hasActions && actions.contains(diff));
}
+ protected void doConfirm(VCSAction action, AbstractVCSEntriesTableModel model, List<VCSEntry> entries) {
+ ConfirmUI confirmUI = VCSUIFactory.newConfirmUI();
+ log.info("nb files:" + entries.size());
+ confirmUI.getHandler().getModel().init(action, model.getLocation(), entries.toArray(new VCSEntry[entries.size()]));
+ confirmUI.setVisible(true);
+ }
+
+ protected void doDiff(boolean useSelection, AbstractVCSEntriesTableModel model, List<VCSEntry> entries) {
+ DiffUI diffUI = VCSUIFactory.newDiffUI();
+ if (!useSelection) {
+ // take all entries
+ entries = model.filter(VCSAction.DIFF, model.getEntries());
+ }
+ log.info("nb entries:" + entries.size());
+ diffUI.getHandler().getModel().init(model.getLocation(), entries.toArray(new VCSEntry[entries.size()]));
+ diffUI.setVisible(true);
+ }
+
+ protected void doRefresh(AbstractVCSEntriesTableModel model, List<VCSEntry> entries, ListSelectionModel selectionModel) {
+ log.info(selectionModel);
+ selectionModel.clearSelection();
+ // do refresh of all states
+ model.refresh(System.nanoTime(), entries);
+ }
+
}
\ No newline at end of file
Modified: trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/util/AbstractUI.java
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/util/AbstractUI.java 2008-04-11 19:47:08 UTC (rev 455)
+++ trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/util/AbstractUI.java 2008-04-11 19:52:14 UTC (rev 456)
@@ -15,10 +15,16 @@
package org.codelutin.vcs.ui.util;
import javax.swing.ImageIcon;
+import javax.swing.JScrollPane;
+import javax.swing.JTable;
/** @author chemit */
-public class AbstractUI<H extends AbstractUIHandler> extends javax.swing.JDialog {
+public abstract class AbstractUI<H extends AbstractUIHandler> extends javax.swing.JDialog {
+ public abstract JScrollPane getContentScroll();
+
+ public abstract JTable getContentTable();
+
private H handler;
protected AbstractUI() {
Modified: trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/util/AbstractUIHandler.java
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/util/AbstractUIHandler.java 2008-04-11 19:47:08 UTC (rev 455)
+++ trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/util/AbstractUIHandler.java 2008-04-11 19:52:14 UTC (rev 456)
@@ -20,6 +20,7 @@
import org.codelutin.vcs.runner.VCSActionManager;
import org.codelutin.vcs.type.VCSEntryLocation;
+import javax.swing.JTable;
import javax.swing.ListSelectionModel;
import java.beans.PropertyChangeListener;
@@ -28,7 +29,10 @@
protected static Log log = LogFactory.getLog(AbstractUIHandler.class);
+ /** ui handled */
private U ui;
+
+ /** model handled */
private M model;
protected AbstractUIHandler(U ui, M model) {
@@ -51,6 +55,10 @@
throw new IllegalStateException("no model was defined for " + this);
}
model.addPropertyChangeListener(this);
+ JTable table = getUi().getContentTable();
+ table.setModel(getModel().getEntriesModel());
+ // init table renderer
+ UIHelper.installVCSTableUI(table);
}
public VCSEntryLocation getLocation() {
Modified: trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/util/AbstractUIModel.java
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/util/AbstractUIModel.java 2008-04-11 19:47:08 UTC (rev 455)
+++ trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/util/AbstractUIModel.java 2008-04-11 19:52:14 UTC (rev 456)
@@ -26,13 +26,17 @@
import java.beans.PropertyChangeSupport;
import java.util.List;
-/** @author chemit */
+/**
+ * Abstract ui model, with property change support.
+ * <p/>
+ * Encapsulate an {@link AbstractVCSEntriesTableModel}.
+ *
+ * @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;
Modified: trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/util/AbstractVCSEntriesTableModel.java
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/util/AbstractVCSEntriesTableModel.java 2008-04-11 19:47:08 UTC (rev 455)
+++ trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/util/AbstractVCSEntriesTableModel.java 2008-04-11 19:52:14 UTC (rev 456)
@@ -30,7 +30,10 @@
import org.codelutin.vcs.util.VCSEntriesImpl;
import javax.swing.ListSelectionModel;
+import javax.swing.table.TableModel;
+import javax.swing.table.TableRowSorter;
import java.util.ArrayList;
+import java.util.Collections;
import java.util.List;
/**
@@ -53,14 +56,19 @@
/** displayed entries */
protected final transient List<VCSEntry> displayedEntries;
+ /** row sorter */
+ protected transient TableRowSorter<TableModel> rowSorter;
+
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();
+ this.rowSorter = new TableRowSorter<TableModel>(this);
}
public String getName() {
@@ -71,6 +79,10 @@
return location;
}
+ public TableRowSorter<TableModel> getRowSorter() {
+ return rowSorter;
+ }
+
public List<VCSEntry> getDisplayedEntries(ListSelectionModel selectionModel) {
return selectionModel == null ? new ArrayList<VCSEntry>(displayedEntries) : filter(selectionModel, displayedEntries);
}
@@ -115,6 +127,19 @@
return super.toString() + "<name:" + name + ", size:" + (getRowCount()) + '>';
}
+ public List<VCSEntry> filter(ListSelectionModel selectionModel, List<VCSEntry> entries) {
+ if (entries.isEmpty() || selectionModel.isSelectionEmpty()) {
+ return Collections.emptyList();
+ }
+ List<VCSEntry> list = new ArrayList<VCSEntry>();
+ for (int i = 0, max = entries.size(); i < max; i++) {
+ if (selectionModel.isSelectedIndex(i)) {
+ list.add(entries.get(rowSorter.convertRowIndexToModel(i)));
+ }
+ }
+ return list;
+ }
+
//===================================================================================================//
// === delegate methods =============================================================================//
//===================================================================================================//
@@ -139,10 +164,6 @@
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();
@@ -194,6 +215,6 @@
if (row < -1 || row > displayedEntries.size() - 1) {
throw new IllegalArgumentException("index " + row + " is out of bound [0," + (displayedEntries.size() - 1) + "]");
}
- return displayedEntries.get(row);
+ return displayedEntries.get(rowSorter.convertRowIndexToModel(row));
}
}
\ No newline at end of file
Modified: trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/util/UIHelper.java
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/util/UIHelper.java 2008-04-11 19:47:08 UTC (rev 455)
+++ trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/util/UIHelper.java 2008-04-11 19:52:14 UTC (rev 456)
@@ -31,6 +31,11 @@
*/
public class UIHelper {
+ /**
+ * Attach to <code>ui</code> an abort action,accessible by <code>ESC</code> key.
+ *
+ * @param ui ui
+ */
public static void setQuitAction(final JDialog ui) {
JRootPane rootPane = ui.getRootPane();
@@ -45,7 +50,13 @@
rootPane.getActionMap().put("quit", quitAction);
}
+ /**
+ * Prepare an table of VCSEntries.
+ *
+ * @param table table
+ */
public static void installVCSTableUI(JTable table) {
+ // attach renderer properties
table.putClientProperty("vcs.color.MODIFIED", new Color(0, 50, 160));
table.putClientProperty("vcs.color.OUT_OF_DATE_AND_MODIFIED", Color.RED);
table.putClientProperty("vcs.color.OUT_OF_DATE", new Color(10, 119, 0));
@@ -55,8 +66,10 @@
table.putClientProperty("vcs.color.IGNORED", new Color(114, 114, 56));
table.putClientProperty("vcs.color.REMOVED", new Color(97, 97, 97));
table.putClientProperty("vcs.color.MISSING", new Color(119, 56, 149));
-
+ // attach renderer to table
table.setDefaultRenderer(Object.class, VCSEntriesTableRenderer.get());
+ // attach row sorter to table
+ table.setRowSorter(((AbstractVCSEntriesTableModel) table.getModel()).getRowSorter());
}
}
Modified: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/i18n/lutinvcs-ui-jaxx-en_GB.properties
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/i18n/lutinvcs-ui-jaxx-en_GB.properties 2008-04-11 19:47:08 UTC (rev 455)
+++ trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/i18n/lutinvcs-ui-jaxx-en_GB.properties 2008-04-11 19:52:14 UTC (rev 456)
@@ -1,4 +1,3 @@
-lutinvcs.accept=Accept
lutinvcs.action.add=Add
lutinvcs.action.commit=commit
lutinvcs.action.delete=delete
Modified: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/i18n/lutinvcs-ui-jaxx-fr_FR.properties
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/i18n/lutinvcs-ui-jaxx-fr_FR.properties 2008-04-11 19:47:08 UTC (rev 455)
+++ trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/i18n/lutinvcs-ui-jaxx-fr_FR.properties 2008-04-11 19:52:14 UTC (rev 456)
@@ -1,4 +1,3 @@
-lutinvcs.accept=Accepter
lutinvcs.action.add=Ajouter
lutinvcs.action.commit=committer
lutinvcs.action.delete=supprimer
Modified: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JaxxConfirmUI.jaxx
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JaxxConfirmUI.jaxx 2008-04-11 19:47:08 UTC (rev 455)
+++ trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JaxxConfirmUI.jaxx 2008-04-11 19:52:14 UTC (rev 456)
@@ -19,8 +19,8 @@
<cell fill='both'/>
</row>
</Table>
- <JButton id='lastMessages' onActionPerformed='showLastMessages()'/>
<JSeparator orientation="vertical"/>
+ <JButton id='lastMessages' onActionPerformed='showLastMessages()'/>
<JButton id='help' onActionPerformed='doHelp()'/>
</JToolBar>
</cell>
@@ -38,7 +38,7 @@
</row>
<row>
<cell fill='both' weightx='1' weighty='1'>
- <JScrollPane id='content' styleClass='confirmScroll'>
+ <JScrollPane id='contentScroll' styleClass='confirmScroll'>
<JTable id="contentTable" styleClass='confirmTable'/>
</JScrollPane>
</cell>
@@ -46,7 +46,6 @@
<row>
<cell fill='both'>
<JButton id='accept' onActionPerformed='doAccept()'/>
- <!--JButton id='accept' text='lutinvcs.accept' onActionPerformed='doAccept()'/-->
</cell>
</row>
</Table>
Modified: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JaxxDiffUI.jaxx
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JaxxDiffUI.jaxx 2008-04-11 19:47:08 UTC (rev 455)
+++ trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JaxxDiffUI.jaxx 2008-04-11 19:52:14 UTC (rev 456)
@@ -4,8 +4,6 @@
import static org.codelutin.vcs.type.VCSAction.*;
import static org.codelutin.vcs.type.VCSEntryLocation.*;
</script>
- <java.awt.CardLayout id='cardLayout'/>
-
<Table>
<row fill='both'>
<cell fill='both' weightx='1'>
@@ -33,17 +31,9 @@
</row>
<row fill='both'>
<cell fill='both'>
- <JPanel id='preview' layout='{cardLayout}'>
- <JScrollPane id='allContent' styleClass='diffScroll' constraints='"taball"' height='100'>
- <JTable id="allTable" styleClass='diffTable' onMouseClicked="doSelectFile()"/>
- </JScrollPane>
- <JScrollPane id='localContent' styleClass='diffScroll' constraints='"tablocal"' height='100'>
- <JTable id="localTable" styleClass='diffTable' onMouseClicked="doSelectFile()"/>
- </JScrollPane>
- <JScrollPane id='remoteContent' styleClass='diffScroll' constraints='"tabremote"' height='100'>
- <JTable id="remoteTable" styleClass='diffTable' onMouseClicked="doSelectFile()"/>
- </JScrollPane>
- </JPanel>
+ <JScrollPane id='contentScroll' styleClass='diffScroll' height='100'>
+ <JTable id="contentTable" styleClass='diffTable' onMouseClicked="doSelectFile()"/>
+ </JScrollPane>
</cell>
</row>
<row fill='both'>
Modified: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JaxxSynchUI.jaxx
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JaxxSynchUI.jaxx 2008-04-11 19:47:08 UTC (rev 455)
+++ trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JaxxSynchUI.jaxx 2008-04-11 19:52:14 UTC (rev 456)
@@ -4,8 +4,7 @@
import static org.codelutin.vcs.type.VCSAction.*;
import static org.codelutin.vcs.type.VCSEntryLocation.*;
</script>
- <java.awt.CardLayout id='cardLayout'/>
- <JPopupMenu id="popup">
+ <JPopupMenu id="popup" invoker='{contentTable}'>
<JMenuItem id='refresh' text='lutinvcs.action.refresh' onActionPerformed='doAction(REFRESH,true)'/>
<JMenuItem id='diff' text='lutinvcs.action.diff' onActionPerformed='doAction(DIFF,true)'/>
<JSeparator/>
@@ -47,17 +46,9 @@
</row>
<row fill='both'>
<cell fill='both' weighty='1' weightx='2'>
- <JPanel id='preview' layout='{cardLayout}'>
- <JScrollPane id='allContent' styleClass='updateScroll' constraints='"taball"'>
- <JTable id="allTable" styleClass='updateTable'/>
- </JScrollPane>
- <JScrollPane id='localContent' styleClass='updateScroll' constraints='"tablocal"'>
- <JTable id="localTable" styleClass='updateTable'/>
- </JScrollPane>
- <JScrollPane id='remoteContent' styleClass='updateScroll' constraints='"tabremote"'>
- <JTable id="remoteTable" styleClass='updateTable'/>
- </JScrollPane>
- </JPanel>
+ <JScrollPane id='contentScroll' styleClass='updateScroll'>
+ <JTable id="contentTable" styleClass='updateTable'/>
+ </JScrollPane>
</cell>
</row>
</Table>
Modified: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/common.css
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/common.css 2008-04-11 19:47:08 UTC (rev 455)
+++ trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/common.css 2008-04-11 19:52:14 UTC (rev 456)
@@ -47,7 +47,6 @@
.updateScroll {
verticalScrollBarPolicy: 20;
horizontalScrollBarPolicy: 31;
- visible: false;
}
.diffScroll {
@@ -252,5 +251,7 @@
#lastMessages {
toolTipText: "lutinvcs.action.tooltip.lastMessages";
icon: { createImageIcon( "recent_msgs.png" )
-};
+}
+
+;
}
\ No newline at end of file
1
0
r455 - in trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs: . util
by tchemit@users.labs.libre-entreprise.org 11 Apr '08
by tchemit@users.labs.libre-entreprise.org 11 Apr '08
11 Apr '08
Author: tchemit
Date: 2008-04-11 19:47:08 +0000 (Fri, 11 Apr 2008)
New Revision: 455
Modified:
trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/VCSEntries.java
trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/util/VCSEntriesImpl.java
Log:
no selectionmodel operation in this module (since we used in table some rwoSorter, we can not do selectionModel filter operation here).
Modified: trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/VCSEntries.java
===================================================================
--- trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/VCSEntries.java 2008-04-11 06:42:57 UTC (rev 454)
+++ trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/VCSEntries.java 2008-04-11 19:47:08 UTC (rev 455)
@@ -18,11 +18,10 @@
import org.codelutin.vcs.type.VCSEntryLocation;
import org.codelutin.vcs.type.VCSState;
-import javax.swing.ListSelectionModel;
import java.util.List;
/**
- * Contract of list of VCSEntry
+ * Contract of list of VCSEntry.
*
* @author chemit
*/
@@ -132,15 +131,6 @@
List<VCSEntry> filter(VCSState state, List<VCSEntry> entries);
/**
- * obtain the list of all entries for a given selection model
- *
- * @param selectionModel filter from selection model
- * @param entries entries to filter
- * @return list of all entries for a given connexion
- */
- List<VCSEntry> filter(ListSelectionModel selectionModel, List<VCSEntry> entries);
-
- /**
* obtain the list of all entries for a given action
*
* @param action filter state
Modified: trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/util/VCSEntriesImpl.java
===================================================================
--- trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/util/VCSEntriesImpl.java 2008-04-11 06:42:57 UTC (rev 454)
+++ trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/util/VCSEntriesImpl.java 2008-04-11 19:47:08 UTC (rev 455)
@@ -22,11 +22,10 @@
import org.codelutin.vcs.type.VCSEntryLocation;
import org.codelutin.vcs.type.VCSState;
-import javax.swing.ListSelectionModel;
import java.util.ArrayList;
import java.util.Arrays;
-import java.util.Collections;
import java.util.List;
+import java.io.File;
/** @author chemit */
public class VCSEntriesImpl implements VCSEntries {
@@ -42,22 +41,22 @@
List<String> remoteFiles;
List<String> allFiles;
+ File directory = connexion.getWorkingCopy();
switch (location) {
-
case ALL:
- localFiles = connexion.getLocalStorageNames(connexion.getWorkingCopy());
- remoteFiles = transformToLocal(connexion.getRemoteStorageNames(connexion.getWorkingCopy()));
+ localFiles = connexion.getLocalStorageNames(directory);
+ remoteFiles = transformToLocal(connexion.getRemoteStorageNames(directory));
allFiles = connexion.getAllStorageNames(localFiles, remoteFiles);
populate(connexion, timestamp, VCSEntryLocation.LOCAL, localFiles);
populate(connexion, timestamp, VCSEntryLocation.REMOTE, remoteFiles);
populate(connexion, timestamp, VCSEntryLocation.ALL, allFiles);
break;
case LOCAL:
- localFiles = connexion.getLocalStorageNames(connexion.getWorkingCopy());
+ localFiles = connexion.getLocalStorageNames(directory);
populate(connexion, timestamp, VCSEntryLocation.LOCAL, localFiles);
break;
case REMOTE:
- remoteFiles = transformToLocal(connexion.getRemoteStorageNames(connexion.getWorkingCopy()));
+ remoteFiles = transformToLocal(connexion.getRemoteStorageNames(directory));
populate(connexion, timestamp, VCSEntryLocation.REMOTE, remoteFiles);
break;
case UNKNOW:
@@ -128,19 +127,6 @@
return result;
}
- public List<VCSEntry> filter(ListSelectionModel selectionModel, List<VCSEntry> entries) {
- if (entries.isEmpty() || selectionModel.isSelectionEmpty()) {
- return Collections.emptyList();
- }
- List<VCSEntry> list = new ArrayList<VCSEntry>();
- for (int i = 0, max = entries.size(); i < max; i++) {
- if (selectionModel.isSelectedIndex(i)) {
- list.add(entries.get(i));
- }
- }
- return list;
- }
-
public List<VCSEntry> filter(VCSAction action, List<VCSEntry> entries) {
List<VCSEntry> result = new ArrayList<VCSEntry>();
for (VCSEntry entry : entries) {
1
0
11 Apr '08
Author: tchemit
Date: 2008-04-11 06:42:57 +0000 (Fri, 11 Apr 2008)
New Revision: 454
Modified:
trunk/lutinvcs/lutinvcs-ui-jaxx/pom.xml
trunk/lutinvcs/pom.xml
Log:
use css
Modified: trunk/lutinvcs/lutinvcs-ui-jaxx/pom.xml
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-jaxx/pom.xml 2008-04-11 06:42:06 UTC (rev 453)
+++ trunk/lutinvcs/lutinvcs-ui-jaxx/pom.xml 2008-04-11 06:42:57 UTC (rev 454)
@@ -37,7 +37,7 @@
</goals>
</execution>
<execution>
- <id>CopyGenJavaVersSrcBuild</id>
+ <id>CopyJava</id>
<phase>validate</phase>
<configuration>
<tasks>
@@ -57,10 +57,6 @@
<plugin>
<groupId>lutinplugin</groupId>
<artifactId>maven-jaxx-plugin</artifactId>
- <configuration>
- <src>${maven.src.dir}/main/uimodel</src>
- <out>${maven.src.dir}/main/java</out>
- </configuration>
<executions>
<execution>
<goals>
@@ -68,26 +64,15 @@
</goals>
</execution>
</executions>
- <dependencies>
- <dependency>
- <groupId>lutinlib.vcs</groupId>
- <artifactId>lutinvcs-ui-common</artifactId>
- <scope>compile</scope>
- <version>${current.version}</version>
- </dependency>
- </dependencies>
</plugin>
<plugin>
<groupId>lutinplugin</groupId>
<artifactId>maven-i18n-plugin</artifactId>
- <configuration>
- <defaultBasedir>${maven.src.dir}/main/uimodel</defaultBasedir>
- </configuration>
<executions>
<execution>
<phase>compile</phase>
<goals>
- <goal>parserJaxx</goal>
+ <goal>parserJava</goal>
<goal>gen</goal>
</goals>
</execution>
Modified: trunk/lutinvcs/pom.xml
===================================================================
--- trunk/lutinvcs/pom.xml 2008-04-11 06:42:06 UTC (rev 453)
+++ trunk/lutinvcs/pom.xml 2008-04-11 06:42:57 UTC (rev 454)
@@ -124,6 +124,22 @@
<plugins>
<plugin>
<groupId>lutinplugin</groupId>
+ <artifactId>maven-jaxx-plugin</artifactId>
+ <configuration>
+ <src>${maven.src.dir}/main/uimodel</src>
+ <out>${maven.src.dir}/main/java</out>
+ </configuration>
+ <dependencies>
+ <dependency>
+ <groupId>lutinlib.vcs</groupId>
+ <artifactId>lutinvcs-ui-common</artifactId>
+ <scope>compile</scope>
+ <version>${current.version}</version>
+ </dependency>
+ </dependencies>
+ </plugin>
+ <plugin>
+ <groupId>lutinplugin</groupId>
<artifactId>maven-i18n-plugin</artifactId>
<configuration>
<bundles>
1
0
r453 - in trunk/lutinvcs/lutinvcs-ui-jaxx/src/main: resources/i18n uimodel/org/codelutin/vcs/ui
by tchemit@users.labs.libre-entreprise.org 11 Apr '08
by tchemit@users.labs.libre-entreprise.org 11 Apr '08
11 Apr '08
Author: tchemit
Date: 2008-04-11 06:42:06 +0000 (Fri, 11 Apr 2008)
New Revision: 453
Modified:
trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/i18n/lutinvcs-ui-jaxx-en_GB.properties
trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/i18n/lutinvcs-ui-jaxx-fr_FR.properties
trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JaxxConfirmUI.jaxx
trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JaxxDiffUI.jaxx
trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JaxxSynchUI.jaxx
trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/common.css
Log:
use css
Modified: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/i18n/lutinvcs-ui-jaxx-en_GB.properties
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/i18n/lutinvcs-ui-jaxx-en_GB.properties 2008-04-11 05:23:40 UTC (rev 452)
+++ trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/i18n/lutinvcs-ui-jaxx-en_GB.properties 2008-04-11 06:42:06 UTC (rev 453)
@@ -30,9 +30,6 @@
lutinvcs.diff.title=Diff UI
lutinvcs.synch.title=Synch
lutinvcs.tabs.all=all
-lutinvcs.tabs.diff.tooltip.all=both local and remote modifed files
-lutinvcs.tabs.diff.tooltip.local=only local modified files
-lutinvcs.tabs.diff.tooltip.remote=only remote modified files
lutinvcs.tabs.local=local
lutinvcs.tabs.remote=remote
lutinvcs.tabs.tooltip.all=Show all files (local and remote)
Modified: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/i18n/lutinvcs-ui-jaxx-fr_FR.properties
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/i18n/lutinvcs-ui-jaxx-fr_FR.properties 2008-04-11 05:23:40 UTC (rev 452)
+++ trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/i18n/lutinvcs-ui-jaxx-fr_FR.properties 2008-04-11 06:42:06 UTC (rev 453)
@@ -30,9 +30,6 @@
lutinvcs.diff.title=Diff UI
lutinvcs.synch.title=Synchronisation
lutinvcs.tabs.all=all
-lutinvcs.tabs.diff.tooltip.all=voir tous les fichiers modifi\u00E9s
-lutinvcs.tabs.diff.tooltip.local=voir les fichiers locaux modifi\u00E9es
-lutinvcs.tabs.diff.tooltip.remote=voir les fichiers distants modifi\u00E9s
lutinvcs.tabs.local=local
lutinvcs.tabs.remote=remote
lutinvcs.tabs.tooltip.all=voir tous les fichiers modifi\u00E9s localement ou \u00E0 distance
Modified: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JaxxConfirmUI.jaxx
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JaxxConfirmUI.jaxx 2008-04-11 05:23:40 UTC (rev 452)
+++ trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JaxxConfirmUI.jaxx 2008-04-11 06:42:06 UTC (rev 453)
@@ -19,9 +19,9 @@
<cell fill='both'/>
</row>
</Table>
- <JButton id='lastMessages' toolTipText="lutinvcs.action.tooltip.lastMessages"
- icon='{createImageIcon("recent_msgs.png")}'
- onActionPerformed='showLastMessages()'/>
+ <JButton id='lastMessages' onActionPerformed='showLastMessages()'/>
+ <JSeparator orientation="vertical"/>
+ <JButton id='help' onActionPerformed='doHelp()'/>
</JToolBar>
</cell>
</row>
@@ -45,7 +45,8 @@
</row>
<row>
<cell fill='both'>
- <JButton id='accept' text='lutinvcs.accept' onActionPerformed='doAccept()'/>
+ <JButton id='accept' onActionPerformed='doAccept()'/>
+ <!--JButton id='accept' text='lutinvcs.accept' onActionPerformed='doAccept()'/-->
</cell>
</row>
</Table>
Modified: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JaxxDiffUI.jaxx
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JaxxDiffUI.jaxx 2008-04-11 05:23:40 UTC (rev 452)
+++ trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JaxxDiffUI.jaxx 2008-04-11 06:42:06 UTC (rev 453)
@@ -10,43 +10,24 @@
<row fill='both'>
<cell fill='both' weightx='1'>
<JToolBar>
- <JToggleButton id='allTab' selected='false' buttonGroup='tabs' mnemonic="A"
- toolTipText="lutinvcs.tabs.diff.tooltip.all"
- icon='{createLocationIcon(ALL)}' onActionPerformed='setLocation(ALL)'/>
-
- <JToggleButton id='localTab' selected='false' buttonGroup='tabs' mnemonic="L"
- toolTipText="lutinvcs.tabs.diff.tooltip.local"
- icon='{createLocationIcon(LOCAL)}' onActionPerformed='setLocation(LOCAL)'/>
-
- <JToggleButton id='remoteTab' selected='false' buttonGroup='tabs' mnemonic="R"
- toolTipText="lutinvcs.tabs.diff.tooltip.remote"
- icon='{createLocationIcon(REMOTE)}' onActionPerformed='setLocation(REMOTE)'/>
+ <JToggleButton id='allTab' onActionPerformed='setLocation(ALL)'/>
+ <JToggleButton id='localTab' onActionPerformed='setLocation(LOCAL)'/>
+ <JToggleButton id='remoteTab' onActionPerformed='setLocation(REMOTE)'/>
<JSeparator orientation="vertical"/>
- <JButton id='refresh' toolTipText="lutinvcs.action.tooltip.refresh"
- icon='{createActionIcon(REFRESH)}' onActionPerformed='doAction(REFRESH)'/>
+ <JButton id='refresh' onActionPerformed='doAction(REFRESH)'/>
<JSeparator orientation="vertical"/>
- <JButton id='nextDiff' toolTipText="lutinvcs.action.tooltip.nextDiff"
- icon='{createImageIcon("diff-next.png")}' onActionPerformed='gotoNextDiff()'/>
-
- <JButton id='previousDiff' toolTipText="lutinvcs.action.tooltip.previousDiff"
- icon='{createImageIcon("diff-prev.png")}' onActionPerformed='gotoPreviousDiff()'/>
+ <JButton id='nextDiff' onActionPerformed='gotoNextDiff()'/>
+ <JButton id='previousDiff' onActionPerformed='gotoPreviousDiff()'/>
<JSeparator orientation="vertical"/>
-
- <JButton id='update' toolTipText="lutinvcs.action.tooltip.update"
- icon='{createActionIcon(UPDATE)}' onActionPerformed='doAction(UPDATE)'/>
- <JButton id='revert' toolTipText="lutinvcs.action.tooltip.revert"
- icon='{createActionIcon(REVERT)}' onActionPerformed='doAction(REVERT)'/>
- <!--JSeparator orientation="vertical"/-->
-
- <JButton id='commit' toolTipText="lutinvcs.action.tooltip.commit"
- icon='{createActionIcon(COMMIT)}' onActionPerformed='doAction(COMMIT)'/>
+ <JButton id='update' onActionPerformed='doAction(UPDATE)'/>
+ <JButton id='commit' onActionPerformed='doAction(COMMIT)'/>
+ <JButton id='revert' onActionPerformed='doAction(REVERT)'/>
<JSeparator orientation="vertical"/>
- <JButton id='help' toolTipText="lutinvcs.action.tooltip.help"
- icon='{createImageIcon("help.png")}' onActionPerformed='doHelp()'/>
+ <JButton id='help' onActionPerformed='doHelp()'/>
</JToolBar>
</cell>
</row>
Modified: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JaxxSynchUI.jaxx
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JaxxSynchUI.jaxx 2008-04-11 05:23:40 UTC (rev 452)
+++ trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JaxxSynchUI.jaxx 2008-04-11 06:42:06 UTC (rev 453)
@@ -5,55 +5,43 @@
import static org.codelutin.vcs.type.VCSEntryLocation.*;
</script>
<java.awt.CardLayout id='cardLayout'/>
- <!--JPopupMenu/-->
- <!--org.codelutin.vcs.ui.impl.JPopup id="allPopup"/>
- <org.codelutin.vcs.ui.impl.JPopup id="localPopup"/>
- <org.codelutin.vcs.ui.impl.JPopup id="remotePopup"/-->
+ <JPopupMenu id="popup">
+ <JMenuItem id='refresh' text='lutinvcs.action.refresh' onActionPerformed='doAction(REFRESH,true)'/>
+ <JMenuItem id='diff' text='lutinvcs.action.diff' onActionPerformed='doAction(DIFF,true)'/>
+ <JSeparator/>
+ <JMenuItem id='update' text='lutinvcs.action.update' onActionPerformed='doAction(UPDATE,true)'/>
+ <JMenuItem id='revert' text='lutinvcs.action.revert' onActionPerformed='doAction(REVERT,true)'/>
+ <JSeparator/>
+ <JMenuItem id='commit' text='lutinvcs.action.commit' onActionPerformed='doAction(COMMIT,true)'/>
+ <JMenuItem id='add' text='lutinvcs.action.add' onActionPerformed='doAction(ADD,true)'/>
+ <JMenuItem id='delete' text='lutinvcs.action.delete' onActionPerformed='doAction(DELETE,true)'/>
+ </JPopupMenu>
<Table id='table'>
<row fill='both'>
<cell fill='both' weightx='1'>
<JToolBar>
- <JToggleButton id='allTab' buttonGroup='tabs' text='lutinvcs.tabs.all' mnemonic="A"
- toolTipText="lutinvcs.tabs.tooltip.all"
- icon='{createLocationIcon(ALL)}' onActionPerformed='setLocation(ALL)'/>
+ <JToggleButton id='allTab' onActionPerformed='setLocation(ALL)'/>
+ <JToggleButton id='localTab' onActionPerformed='setLocation(LOCAL)'/>
+ <JToggleButton id='remoteTab' onActionPerformed='setLocation(REMOTE)'/>
- <JToggleButton id='localTab' selected='false' buttonGroup='tabs' text='lutinvcs.tabs.local'
- mnemonic="L" toolTipText="lutinvcs.tabs.tooltip.local"
- icon='{createLocationIcon(LOCAL)}' onActionPerformed='setLocation(LOCAL)'/>
-
- <JToggleButton id='remoteTab' selected='false' buttonGroup='tabs' text='lutinvcs.tabs.remote'
- mnemonic="R" toolTipText="lutinvcs.tabs.tooltip.remote"
- icon='{createLocationIcon(REMOTE)}' onActionPerformed='setLocation(REMOTE)'/>
<JSeparator orientation="vertical"/>
- <JButton id='refreshAll' toolTipText="lutinvcs.action.tooltip.refreshAll"
- icon='{createActionIcon(REFRESH)}' onActionPerformed='doAction(REFRESH,false)'/>
-
- <JButton id='diffAll' toolTipText="lutinvcs.action.tooltip.diffAll"
- icon='{createActionIcon(DIFF)}' onActionPerformed='doAction(DIFF,false)'/>
+ <JButton id='refreshAll' onActionPerformed='doAction(REFRESH,false)'/>
+ <JButton id='diffAll' onActionPerformed='doAction(DIFF,false)'/>
<JSeparator orientation="vertical"/>
- <JButton id='updateAll' toolTipText="lutinvcs.action.tooltip.updateAll"
- icon='{createActionIcon(UPDATE)}' onActionPerformed='doAction(UPDATE,false)'/>
-
- <JButton id='revertAll' toolTipText="lutinvcs.action.tooltip.revertAll"
- icon='{createActionIcon(REVERT)}' onActionPerformed='doAction(REVERT,false)'/>
+ <JButton id='updateAll' onActionPerformed='doAction(UPDATE,false)'/>
+ <JButton id='revertAll' onActionPerformed='doAction(REVERT,false)'/>
<JSeparator orientation="vertical"/>
- <JButton id='commitAll' toolTipText="lutinvcs.action.tooltip.commitAll"
- icon='{createActionIcon(COMMIT)}' onActionPerformed='doAction(COMMIT,false)'/>
-
- <JButton id='addAll' toolTipText="lutinvcs.action.tooltip.addAll"
- icon='{createActionIcon(ADD)}' onActionPerformed='doAction(ADD,false)'/>
-
- <JButton id='deleteAll' toolTipText="lutinvcs.action.tooltip.deleteAll"
- icon='{createActionIcon(DELETE)}' onActionPerformed='doAction(DELETE,false)'/>
+ <JButton id='commitAll' onActionPerformed='doAction(COMMIT,false)'/>
+ <JButton id='addAll' onActionPerformed='doAction(ADD,false)'/>
+ <JButton id='deleteAll' onActionPerformed='doAction(DELETE,false)'/>
<JSeparator orientation="vertical"/>
- <JButton id='help' toolTipText="lutinvcs.action.tooltip.help" icon='{createImageIcon("help.png")}'
- onActionPerformed='doHelp()'/>
+ <JButton id='help' onActionPerformed='doHelp()'/>
</JToolBar>
</cell>
</row>
@@ -72,32 +60,5 @@
</JPanel>
</cell>
</row>
- <row>
- <cell>
- <JPopupMenu id="popup">
- <JMenuItem id='refresh' text='lutinvcs.action.refresh' toolTipText='lutinvcs.action.tooltip.refresh'
- icon='{createActionIcon(REFRESH)}' onActionPerformed='doAction(REFRESH,true)'/>
-
- <JMenuItem id='diff' text='lutinvcs.action.diff' toolTipText='lutinvcs.action.tooltip.diff'
- icon='{createActionIcon(DIFF)}' onActionPerformed='doAction(DIFF,true)'/>
- <JSeparator/>
- <JMenuItem id='update' text='lutinvcs.action.update' toolTipText='lutinvcs.action.tooltip.update'
- icon='{createActionIcon(UPDATE)}' onActionPerformed='doAction(UPDATE,true)'/>
- <JMenuItem id='revert' text='lutinvcs.action.revert' toolTipText='lutinvcs.action.tooltip.revert'
- icon='{createActionIcon(REVERT)}' onActionPerformed='doAction(REVERT,true)'/>
- <JSeparator/>
-
- <JMenuItem id='commit' text='lutinvcs.action.commit' toolTipText='lutinvcs.action.tooltip.commit'
- icon='{createActionIcon(COMMIT)}' onActionPerformed='doAction(COMMIT,true)'/>
-
- <JMenuItem id='add' text='lutinvcs.action.add' toolTipText='lutinvcs.action.tooltip.add'
- icon='{createActionIcon(ADD)}' onActionPerformed='doAction(ADD,true)'/>
-
- <JMenuItem id='delete' text='lutinvcs.action.delete' toolTipText='lutinvcs.action.tooltip.delete'
- icon='{createActionIcon(DELETE)}' onActionPerformed='doAction(DELETE,true)'/>
-
- </JPopupMenu>
- </cell>
- </row>
</Table>
</SynchUI>
\ No newline at end of file
Modified: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/common.css
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/common.css 2008-04-11 05:23:40 UTC (rev 452)
+++ trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/common.css 2008-04-11 06:42:06 UTC (rev 453)
@@ -63,4 +63,194 @@
cellSelectionEnabled: false;
rowMargin: 0;
selectionMode: 0;
+}
+
+#allTab {
+ buttonGroup: tabs;
+ mnemonic: A;
+ selected: false;
+ icon: { createLocationIcon( ALL )
+}
+
+;
+text:
+
+"lutinvcs.tabs.all"
+;
+toolTipText:
+
+"lutinvcs.tabs.tooltip.all"
+;
+}
+
+#localTab {
+ buttonGroup: tabs;
+ mnemonic: L;
+ selected: false;
+ icon: { createLocationIcon( LOCAL )
+}
+
+;
+text:
+
+"lutinvcs.tabs.local"
+;
+toolTipText:
+
+"lutinvcs.tabs.tooltip.local"
+;
+}
+
+#remoteTab {
+ buttonGroup: tabs;
+ mnemonic: R;
+ selected: false;
+ icon: { createLocationIcon( REMOTE )
+}
+
+;
+text:
+
+"lutinvcs.tabs.remote"
+;
+toolTipText:
+
+"lutinvcs.tabs.tooltip.remote"
+;
+}
+
+#refresh, #refreshAll {
+ icon: { createActionIcon( REFRESH )
+}
+
+;
+}
+
+#diff, #diffAll {
+ icon: { createActionIcon( DIFF )
+}
+
+;
+}
+
+#update, #updateAll {
+ icon: { createActionIcon( UPDATE )
+}
+
+;
+}
+
+#revert, #revertAll {
+ icon: { createActionIcon( REVERT )
+}
+
+;
+}
+
+#commit, #commitAll {
+ icon: { createActionIcon( COMMIT )
+}
+
+;
+}
+
+#add, #addAll {
+ icon: { createActionIcon( ADD )
+}
+
+;
+}
+
+#delete, #deleteAll {
+ icon: { createActionIcon( DELETE )
+}
+
+;
+}
+
+#refresh {
+ toolTipText: "lutinvcs.action.tooltip.refresh";
+}
+
+#refreshAll {
+ toolTipText: "lutinvcs.action.tooltip.refreshAll";
+}
+
+#diff {
+ toolTipText: "lutinvcs.action.tooltip.diff";
+}
+
+#diffAll {
+ toolTipText: "lutinvcs.action.tooltip.diffAll";
+}
+
+#update {
+ toolTipText: "lutinvcs.action.tooltip.update";
+}
+
+#updateAll {
+ toolTipText: "lutinvcs.action.tooltip.updateAll";
+}
+
+#revert {
+ toolTipText: "lutinvcs.action.tooltip.revert";
+}
+
+#revertAll {
+ toolTipText: "lutinvcs.action.tooltip.revertAll";
+}
+
+#commit {
+ toolTipText: "lutinvcs.action.tooltip.commit";
+}
+
+#commitAll {
+ toolTipText: "lutinvcs.action.tooltip.commitAll";
+}
+
+#add {
+ toolTipText: "lutinvcs.action.tooltip.add";
+}
+
+#addAll {
+ toolTipText: "lutinvcs.action.tooltip.addAll";
+}
+
+#delete {
+ toolTipText: "lutinvcs.action.tooltip.delete";
+}
+
+#deleteAll {
+ toolTipText: "lutinvcs.action.tooltip.deleteAll";
+}
+
+#help {
+ toolTipText: "lutinvcs.action.tooltip.help";
+ enabled: true;
+ icon: { createImageIcon( "help.png" )
+}
+
+;
+}
+
+#nextDiff {
+ toolTipText: "lutinvcs.action.tooltip.nextDiff";
+ icon: { createImageIcon( "diff-next.png" )
+}
+
+;
+}
+
+#previousDiff {
+ toolTipText: "lutinvcs.action.tooltip.previousDiff";
+ icon: { createImageIcon( "diff-prev.png" )
+}
+
+;
+}
+
+#lastMessages {
+ toolTipText: "lutinvcs.action.tooltip.lastMessages";
+ icon: { createImageIcon( "recent_msgs.png" )
+};
}
\ No newline at end of file
1
0
r452 - in trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources: i18n icons
by tchemit@users.labs.libre-entreprise.org 11 Apr '08
by tchemit@users.labs.libre-entreprise.org 11 Apr '08
11 Apr '08
Author: tchemit
Date: 2008-04-11 05:23:40 +0000 (Fri, 11 Apr 2008)
New Revision: 452
Added:
trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/refresh.png
Removed:
trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/autoRefresh.png
Modified:
trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/i18n/lutinvcs-ui-jaxx-en_GB.properties
trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/i18n/lutinvcs-ui-jaxx-fr_FR.properties
Log:
ui improvement
Modified: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/i18n/lutinvcs-ui-jaxx-en_GB.properties
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/i18n/lutinvcs-ui-jaxx-en_GB.properties 2008-04-11 05:22:47 UTC (rev 451)
+++ trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/i18n/lutinvcs-ui-jaxx-en_GB.properties 2008-04-11 05:23:40 UTC (rev 452)
@@ -1,15 +1,19 @@
lutinvcs.accept=Accept
+lutinvcs.action.add=Add
lutinvcs.action.commit=commit
lutinvcs.action.delete=delete
lutinvcs.action.diff=show diff
lutinvcs.action.refresh=refresh
lutinvcs.action.revert=revert
+lutinvcs.action.tooltip.add=add selected files
+lutinvcs.action.tooltip.addAll=add all files
lutinvcs.action.tooltip.commit=commit selected files
lutinvcs.action.tooltip.commitAll=commit all files
lutinvcs.action.tooltip.delete=delete
lutinvcs.action.tooltip.deleteAll=delete all files
lutinvcs.action.tooltip.diff=show diff of selected files
lutinvcs.action.tooltip.diffAll=show diff of all files
+lutinvcs.action.tooltip.help=Obtain help
lutinvcs.action.tooltip.lastMessages=
lutinvcs.action.tooltip.nextDiff=next diff
lutinvcs.action.tooltip.previousDiff=previous diff
Modified: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/i18n/lutinvcs-ui-jaxx-fr_FR.properties
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/i18n/lutinvcs-ui-jaxx-fr_FR.properties 2008-04-11 05:22:47 UTC (rev 451)
+++ trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/i18n/lutinvcs-ui-jaxx-fr_FR.properties 2008-04-11 05:23:40 UTC (rev 452)
@@ -1,15 +1,19 @@
lutinvcs.accept=Accepter
+lutinvcs.action.add=Ajouter
lutinvcs.action.commit=committer
lutinvcs.action.delete=supprimer
lutinvcs.action.diff=voir les diff
lutinvcs.action.refresh=rafra\u00EEchir
lutinvcs.action.revert=annuler les modifications
+lutinvcs.action.tooltip.add=ajouter les fichiers s\u00E9lectionn\u00E9s
+lutinvcs.action.tooltip.addAll=ajouter tous les fichiers
lutinvcs.action.tooltip.commit=commiter les fichiers s\u00E9lectionn\u00E9s
lutinvcs.action.tooltip.commitAll=commiter tous les fichiers
lutinvcs.action.tooltip.delete=supprimer les fichiers s\u00E9lectionn\u00E9s
lutinvcs.action.tooltip.deleteAll=supprimer tous les fichiers
lutinvcs.action.tooltip.diff=voir tous les fichiers s\u00E9lectionn\u00E9s
lutinvcs.action.tooltip.diffAll=voir les diff\u00E9rences de tous les fichiers
+lutinvcs.action.tooltip.help=Obtenir de l'aide
lutinvcs.action.tooltip.lastMessages=
lutinvcs.action.tooltip.nextDiff=voir la prochaine diff\u00E9rence
lutinvcs.action.tooltip.previousDiff=voir la diff\u00E9rence pr\u00E9c\u00E9dente
Deleted: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/autoRefresh.png
===================================================================
(Binary files differ)
Copied: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/refresh.png (from rev 440, trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/autoRefresh.png)
===================================================================
(Binary files differ)
Property changes on: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/refresh.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
1
0
r451 - in trunk/lutinvcs: lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui lutinvcs-ui-jaxx/src/main/resources/icons
by tchemit@users.labs.libre-entreprise.org 11 Apr '08
by tchemit@users.labs.libre-entreprise.org 11 Apr '08
11 Apr '08
Author: tchemit
Date: 2008-04-11 05:22:47 +0000 (Fri, 11 Apr 2008)
New Revision: 451
Added:
trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/add.png
trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/delete.png
trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/help.png
trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/refresh2.png
Removed:
trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/refresh.png
Modified:
trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/SynchUI.java
Log:
ui improvement
Modified: trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/SynchUI.java
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/SynchUI.java 2008-04-11 05:22:01 UTC (rev 450)
+++ trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/SynchUI.java 2008-04-11 05:22:47 UTC (rev 451)
@@ -30,12 +30,18 @@
public abstract AbstractButton getCommitAll();
- public abstract AbstractButton getRevertAll();
+ public abstract AbstractButton getAddAll();
public abstract AbstractButton getDeleteAll();
+ public abstract AbstractButton getRevertAll();
+
public abstract AbstractButton getDiff();
+ public abstract AbstractButton getAdd();
+
+ public abstract AbstractButton getDelete();
+
public abstract JPopupMenu getPopup();
@Override
Added: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/add.png
===================================================================
(Binary files differ)
Property changes on: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/add.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/delete.png
===================================================================
(Binary files differ)
Property changes on: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/delete.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/help.png
===================================================================
(Binary files differ)
Property changes on: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/help.png
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ application/octet-stream
Deleted: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/refresh.png
===================================================================
(Binary files differ)
Copied: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/refresh2.png (from rev 440, trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/refresh.png)
===================================================================
(Binary files differ)
Property changes on: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/refresh2.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
1
0
r450 - in trunk/lutinvcs: lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/handler lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/util lutinvcs-ui-jaxx/src/main/resources/icons lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui
by tchemit@users.labs.libre-entreprise.org 11 Apr '08
by tchemit@users.labs.libre-entreprise.org 11 Apr '08
11 Apr '08
Author: tchemit
Date: 2008-04-11 05:22:01 +0000 (Fri, 11 Apr 2008)
New Revision: 450
Added:
trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/location-all.png
trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/location-local.png
trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/location-remote.png
Removed:
trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/local_vs_local.png
trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/remote_vs_local.png
trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/remote_vs_remote.png
Modified:
trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/handler/DiffUIHandler.java
trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/handler/SynchUIHandler.java
trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/util/AbstractTabUI.java
trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/util/AbstractTabUIHandler.java
trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/util/AbstractUI.java
trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/util/AbstractUIHandler.java
trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JaxxDiffUI.jaxx
trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JaxxSynchUI.jaxx
Log:
ui improvement
Modified: trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/handler/DiffUIHandler.java
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/handler/DiffUIHandler.java 2008-04-11 05:00:17 UTC (rev 449)
+++ trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/handler/DiffUIHandler.java 2008-04-11 05:22:01 UTC (rev 450)
@@ -98,7 +98,6 @@
getUi().getUpdate().setEnabled(hasActions && acts.contains("update"));
getUi().getCommit().setEnabled(hasActions && acts.contains("commit"));
getUi().getRevert().setEnabled(hasActions && acts.contains("revert"));
- getUi().getDelete().setEnabled(hasActions && acts.contains("delete"));
getUi().getRefresh().setEnabled(hasActions);
}
Modified: trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/handler/SynchUIHandler.java
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/handler/SynchUIHandler.java 2008-04-11 05:00:17 UTC (rev 449)
+++ trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/handler/SynchUIHandler.java 2008-04-11 05:22:01 UTC (rev 450)
@@ -42,6 +42,7 @@
getUi().getUpdateAll().setEnabled(hasActions && acts.contains("update"));
getUi().getCommitAll().setEnabled(hasActions && acts.contains("commit"));
getUi().getRevertAll().setEnabled(hasActions && acts.contains("revert"));
+ getUi().getAddAll().setEnabled(hasActions && acts.contains("add"));
getUi().getDeleteAll().setEnabled(hasActions && acts.contains("delete"));
getUi().getRefreshAll().setEnabled(hasActions);
}
@@ -144,8 +145,9 @@
getUi().getDiff().setEnabled(hasActions && acts.contains("diff"));
getUi().getUpdate().setEnabled(hasActions && acts.contains("update"));
getUi().getCommit().setEnabled(hasActions && acts.contains("commit"));
+ getUi().getAdd().setEnabled(hasActions && acts.contains("add"));
+ getUi().getDelete().setEnabled(hasActions && acts.contains("delete"));
getUi().getRevert().setEnabled(hasActions && acts.contains("revert"));
- getUi().getDelete().setEnabled(hasActions && acts.contains("delete"));
getUi().getRefresh().setEnabled(hasActions);
getUi().getPopup().pack();
// display popup
Modified: trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/util/AbstractTabUI.java
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/util/AbstractTabUI.java 2008-04-11 05:00:17 UTC (rev 449)
+++ trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/util/AbstractTabUI.java 2008-04-11 05:22:01 UTC (rev 450)
@@ -22,6 +22,7 @@
import javax.swing.JTable;
import javax.swing.JToggleButton;
import javax.swing.ButtonGroup;
+import javax.swing.ImageIcon;
import java.awt.CardLayout;
/** @author chemit */
@@ -57,7 +58,7 @@
public abstract AbstractButton getRevert();
- public abstract AbstractButton getDelete();
+ public abstract AbstractButton getHelp();
public abstract CardLayout getCardLayout();
@@ -92,4 +93,9 @@
protected void setLocation(VCSEntryLocation location) {
getHandler().getModel().setLocation(location);
}
+
+ public ImageIcon createLocationIcon(VCSEntryLocation action) {
+ return jaxx.runtime.UIHelper.createImageIcon("location-" + action.name().toLowerCase() + ".png");
+ }
+
}
Modified: trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/util/AbstractTabUIHandler.java
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/util/AbstractTabUIHandler.java 2008-04-11 05:00:17 UTC (rev 449)
+++ trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/util/AbstractTabUIHandler.java 2008-04-11 05:22:01 UTC (rev 450)
@@ -31,6 +31,7 @@
@Override
public void init() {
super.init();
+ getUi().getHelp().setEnabled(true);
initTab(VCSEntryLocation.ALL);
initTab(VCSEntryLocation.LOCAL);
initTab(VCSEntryLocation.REMOTE);
Modified: trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/util/AbstractUI.java
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/util/AbstractUI.java 2008-04-11 05:00:17 UTC (rev 449)
+++ trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/util/AbstractUI.java 2008-04-11 05:22:01 UTC (rev 450)
@@ -14,6 +14,8 @@
*/
package org.codelutin.vcs.ui.util;
+import javax.swing.ImageIcon;
+
/** @author chemit */
public class AbstractUI<H extends AbstractUIHandler> extends javax.swing.JDialog {
@@ -31,4 +33,12 @@
this.handler = handler;
}
+ protected void doHelp() {
+ handler.doHelp();
+ }
+
+ public ImageIcon createActionIcon(org.codelutin.vcs.type.VCSAction action) {
+ return jaxx.runtime.UIHelper.createImageIcon(action.name().toLowerCase() + ".png");
+ }
+
}
Modified: trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/util/AbstractUIHandler.java
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/util/AbstractUIHandler.java 2008-04-11 05:00:17 UTC (rev 449)
+++ trunk/lutinvcs/lutinvcs-ui-common/src/main/java/org/codelutin/vcs/ui/util/AbstractUIHandler.java 2008-04-11 05:22:01 UTC (rev 450)
@@ -62,4 +62,7 @@
}
+ public void doHelp() {
+ log.info("TODO " + this);
+ }
}
Deleted: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/local_vs_local.png
===================================================================
(Binary files differ)
Copied: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/location-all.png (from rev 440, trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/remote_vs_local.png)
===================================================================
(Binary files differ)
Property changes on: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/location-all.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Copied: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/location-local.png (from rev 440, trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/local_vs_local.png)
===================================================================
(Binary files differ)
Property changes on: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/location-local.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Copied: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/location-remote.png (from rev 440, trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/remote_vs_remote.png)
===================================================================
(Binary files differ)
Property changes on: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/location-remote.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Deleted: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/remote_vs_local.png
===================================================================
(Binary files differ)
Deleted: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/icons/remote_vs_remote.png
===================================================================
(Binary files differ)
Modified: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JaxxDiffUI.jaxx
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JaxxDiffUI.jaxx 2008-04-11 05:00:17 UTC (rev 449)
+++ trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JaxxDiffUI.jaxx 2008-04-11 05:22:01 UTC (rev 450)
@@ -1,5 +1,9 @@
<DiffUI title='lutinvcs.diff.title' modal="true" defaultCloseOperation='DISPOSE_ON_CLOSE' height='600' width='500'>
<style source="common.css"/>
+ <script>
+ import static org.codelutin.vcs.type.VCSAction.*;
+ import static org.codelutin.vcs.type.VCSEntryLocation.*;
+ </script>
<java.awt.CardLayout id='cardLayout'/>
<Table>
@@ -8,44 +12,41 @@
<JToolBar>
<JToggleButton id='allTab' selected='false' buttonGroup='tabs' mnemonic="A"
toolTipText="lutinvcs.tabs.diff.tooltip.all"
- icon='{createImageIcon("remote_vs_local.png")}'
- onActionPerformed='setLocation(org.codelutin.vcs.type.VCSEntryLocation.ALL)'/>
+ icon='{createLocationIcon(ALL)}' onActionPerformed='setLocation(ALL)'/>
<JToggleButton id='localTab' selected='false' buttonGroup='tabs' mnemonic="L"
toolTipText="lutinvcs.tabs.diff.tooltip.local"
- icon='{createImageIcon("local_vs_local.png")}'
- onActionPerformed='setLocation(org.codelutin.vcs.type.VCSEntryLocation.LOCAL)'/>
+ icon='{createLocationIcon(LOCAL)}' onActionPerformed='setLocation(LOCAL)'/>
<JToggleButton id='remoteTab' selected='false' buttonGroup='tabs' mnemonic="R"
- icon='{createImageIcon("remote_vs_remote.png")}'
toolTipText="lutinvcs.tabs.diff.tooltip.remote"
- onActionPerformed='setLocation(org.codelutin.vcs.type.VCSEntryLocation.REMOTE)'/>
+ icon='{createLocationIcon(REMOTE)}' onActionPerformed='setLocation(REMOTE)'/>
+ <JSeparator orientation="vertical"/>
+ <JButton id='refresh' toolTipText="lutinvcs.action.tooltip.refresh"
+ icon='{createActionIcon(REFRESH)}' onActionPerformed='doAction(REFRESH)'/>
+ <JSeparator orientation="vertical"/>
+
<JButton id='nextDiff' toolTipText="lutinvcs.action.tooltip.nextDiff"
icon='{createImageIcon("diff-next.png")}' onActionPerformed='gotoNextDiff()'/>
<JButton id='previousDiff' toolTipText="lutinvcs.action.tooltip.previousDiff"
icon='{createImageIcon("diff-prev.png")}' onActionPerformed='gotoPreviousDiff()'/>
+ <JSeparator orientation="vertical"/>
- <JButton id='refresh' toolTipText="lutinvcs.action.tooltip.refresh"
- icon='{createImageIcon("autoRefresh.png")}'
- onActionPerformed='doAction(org.codelutin.vcs.type.VCSAction.REFRESH)'/>
<JButton id='update' toolTipText="lutinvcs.action.tooltip.update"
- icon='{createImageIcon("update.png")}'
- onActionPerformed='doAction(org.codelutin.vcs.type.VCSAction.UPDATE)'/>
+ icon='{createActionIcon(UPDATE)}' onActionPerformed='doAction(UPDATE)'/>
+ <JButton id='revert' toolTipText="lutinvcs.action.tooltip.revert"
+ icon='{createActionIcon(REVERT)}' onActionPerformed='doAction(REVERT)'/>
+ <!--JSeparator orientation="vertical"/-->
<JButton id='commit' toolTipText="lutinvcs.action.tooltip.commit"
- icon='{createImageIcon("commit.png")}'
- onActionPerformed='doAction(org.codelutin.vcs.type.VCSAction.COMMIT)'/>
+ icon='{createActionIcon(COMMIT)}' onActionPerformed='doAction(COMMIT)'/>
+ <JSeparator orientation="vertical"/>
- <JButton id='revert' toolTipText="lutinvcs.action.tooltip.revert"
- icon='{createImageIcon("rollback.png")}'
- onActionPerformed='doAction(org.codelutin.vcs.type.VCSAction.REVERT)'/>
-
- <JButton id='delete' toolTipText="lutinvcs.action.tooltip.delete"
- icon='{createImageIcon("remove.png")}'
- onActionPerformed='doAction(org.codelutin.vcs.type.VCSAction.DELETE)'/>
+ <JButton id='help' toolTipText="lutinvcs.action.tooltip.help"
+ icon='{createImageIcon("help.png")}' onActionPerformed='doHelp()'/>
</JToolBar>
</cell>
</row>
Modified: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JaxxSynchUI.jaxx
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JaxxSynchUI.jaxx 2008-04-11 05:00:17 UTC (rev 449)
+++ trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JaxxSynchUI.jaxx 2008-04-11 05:22:01 UTC (rev 450)
@@ -1,6 +1,9 @@
<SynchUI title='lutinvcs.synch.title' defaultCloseOperation='DISPOSE_ON_CLOSE'>
<style source="common.css"/>
-
+ <script>
+ import static org.codelutin.vcs.type.VCSAction.*;
+ import static org.codelutin.vcs.type.VCSEntryLocation.*;
+ </script>
<java.awt.CardLayout id='cardLayout'/>
<!--JPopupMenu/-->
<!--org.codelutin.vcs.ui.impl.JPopup id="allPopup"/>
@@ -14,39 +17,43 @@
<JToolBar>
<JToggleButton id='allTab' buttonGroup='tabs' text='lutinvcs.tabs.all' mnemonic="A"
toolTipText="lutinvcs.tabs.tooltip.all"
- onActionPerformed='setLocation(org.codelutin.vcs.type.VCSEntryLocation.ALL)'/>
+ icon='{createLocationIcon(ALL)}' onActionPerformed='setLocation(ALL)'/>
<JToggleButton id='localTab' selected='false' buttonGroup='tabs' text='lutinvcs.tabs.local'
mnemonic="L" toolTipText="lutinvcs.tabs.tooltip.local"
- onActionPerformed='setLocation(org.codelutin.vcs.type.VCSEntryLocation.LOCAL)'/>
+ icon='{createLocationIcon(LOCAL)}' onActionPerformed='setLocation(LOCAL)'/>
<JToggleButton id='remoteTab' selected='false' buttonGroup='tabs' text='lutinvcs.tabs.remote'
mnemonic="R" toolTipText="lutinvcs.tabs.tooltip.remote"
- onActionPerformed='setLocation(org.codelutin.vcs.type.VCSEntryLocation.REMOTE)'/>
+ icon='{createLocationIcon(REMOTE)}' onActionPerformed='setLocation(REMOTE)'/>
+ <JSeparator orientation="vertical"/>
<JButton id='refreshAll' toolTipText="lutinvcs.action.tooltip.refreshAll"
- icon='{createImageIcon("autoRefresh.png")}'
- onActionPerformed='doAction(org.codelutin.vcs.type.VCSAction.REFRESH,false)'/>
+ icon='{createActionIcon(REFRESH)}' onActionPerformed='doAction(REFRESH,false)'/>
<JButton id='diffAll' toolTipText="lutinvcs.action.tooltip.diffAll"
- icon='{createImageIcon("diff.png")}'
- onActionPerformed='doAction(org.codelutin.vcs.type.VCSAction.DIFF,false)'/>
+ icon='{createActionIcon(DIFF)}' onActionPerformed='doAction(DIFF,false)'/>
+ <JSeparator orientation="vertical"/>
<JButton id='updateAll' toolTipText="lutinvcs.action.tooltip.updateAll"
- icon='{createImageIcon("update.png")}'
- onActionPerformed='doAction(org.codelutin.vcs.type.VCSAction.UPDATE,false)'/>
+ icon='{createActionIcon(UPDATE)}' onActionPerformed='doAction(UPDATE,false)'/>
+ <JButton id='revertAll' toolTipText="lutinvcs.action.tooltip.revertAll"
+ icon='{createActionIcon(REVERT)}' onActionPerformed='doAction(REVERT,false)'/>
+ <JSeparator orientation="vertical"/>
+
<JButton id='commitAll' toolTipText="lutinvcs.action.tooltip.commitAll"
- icon='{createImageIcon("commit.png")}'
- onActionPerformed='doAction(org.codelutin.vcs.type.VCSAction.COMMIT,false)'/>
+ icon='{createActionIcon(COMMIT)}' onActionPerformed='doAction(COMMIT,false)'/>
- <JButton id='revertAll' toolTipText="lutinvcs.action.tooltip.revertAll"
- icon='{createImageIcon("rollback.png")}'
- onActionPerformed='doAction(org.codelutin.vcs.type.VCSAction.REVERT,false)'/>
+ <JButton id='addAll' toolTipText="lutinvcs.action.tooltip.addAll"
+ icon='{createActionIcon(ADD)}' onActionPerformed='doAction(ADD,false)'/>
<JButton id='deleteAll' toolTipText="lutinvcs.action.tooltip.deleteAll"
- icon='{createImageIcon("remove.png")}'
- onActionPerformed='doAction(org.codelutin.vcs.type.VCSAction.DELETE,false)'/>
+ icon='{createActionIcon(DELETE)}' onActionPerformed='doAction(DELETE,false)'/>
+ <JSeparator orientation="vertical"/>
+
+ <JButton id='help' toolTipText="lutinvcs.action.tooltip.help" icon='{createImageIcon("help.png")}'
+ onActionPerformed='doHelp()'/>
</JToolBar>
</cell>
</row>
@@ -69,28 +76,26 @@
<cell>
<JPopupMenu id="popup">
<JMenuItem id='refresh' text='lutinvcs.action.refresh' toolTipText='lutinvcs.action.tooltip.refresh'
- icon='{createImageIcon("autoRefresh.png")}'
- onActionPerformed='doAction(org.codelutin.vcs.type.VCSAction.REFRESH,true)'/>
+ icon='{createActionIcon(REFRESH)}' onActionPerformed='doAction(REFRESH,true)'/>
<JMenuItem id='diff' text='lutinvcs.action.diff' toolTipText='lutinvcs.action.tooltip.diff'
- icon='{createImageIcon("diff.png")}'
- onActionPerformed='doAction(org.codelutin.vcs.type.VCSAction.DIFF,true)'/>
-
+ icon='{createActionIcon(DIFF)}' onActionPerformed='doAction(DIFF,true)'/>
+ <JSeparator/>
<JMenuItem id='update' text='lutinvcs.action.update' toolTipText='lutinvcs.action.tooltip.update'
- icon='{createImageIcon("update.png")}'
- onActionPerformed='doAction(org.codelutin.vcs.type.VCSAction.UPDATE,true)'/>
+ icon='{createActionIcon(UPDATE)}' onActionPerformed='doAction(UPDATE,true)'/>
+ <JMenuItem id='revert' text='lutinvcs.action.revert' toolTipText='lutinvcs.action.tooltip.revert'
+ icon='{createActionIcon(REVERT)}' onActionPerformed='doAction(REVERT,true)'/>
+ <JSeparator/>
<JMenuItem id='commit' text='lutinvcs.action.commit' toolTipText='lutinvcs.action.tooltip.commit'
- icon='{createImageIcon("commit.png")}'
- onActionPerformed='doAction(org.codelutin.vcs.type.VCSAction.COMMIT,true)'/>
+ icon='{createActionIcon(COMMIT)}' onActionPerformed='doAction(COMMIT,true)'/>
- <JMenuItem id='revert' text='lutinvcs.action.revert' toolTipText='lutinvcs.action.tooltip.revert'
- icon='{createImageIcon("rollback.png")}'
- onActionPerformed='doAction(org.codelutin.vcs.type.VCSAction.REVERT,true)'/>
+ <JMenuItem id='add' text='lutinvcs.action.add' toolTipText='lutinvcs.action.tooltip.add'
+ icon='{createActionIcon(ADD)}' onActionPerformed='doAction(ADD,true)'/>
<JMenuItem id='delete' text='lutinvcs.action.delete' toolTipText='lutinvcs.action.tooltip.delete'
- icon='{createImageIcon("remove.png")}'
- onActionPerformed='doAction(org.codelutin.vcs.type.VCSAction.DELETE,true)'/>
+ icon='{createActionIcon(DELETE)}' onActionPerformed='doAction(DELETE,true)'/>
+
</JPopupMenu>
</cell>
</row>
1
0