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
r409 - trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui
by tchemitï¼ users.labs.libre-entreprise.org 06 Apr '08
by tchemitï¼ users.labs.libre-entreprise.org 06 Apr '08
06 Apr '08
Author: tchemit
Date: 2008-04-06 17:14:47 +0000 (Sun, 06 Apr 2008)
New Revision: 409
Modified:
trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JConfirmUI.jaxx
trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JDiffUI.jaxx
trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JSynchUI.jaxx
Log:
use default constructor for ui since we use ServiceLoader
Modified: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JConfirmUI.jaxx
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JConfirmUI.jaxx 2008-04-06 17:14:14 UTC (rev 408)
+++ trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JConfirmUI.jaxx 2008-04-06 17:14:47 UTC (rev 409)
@@ -1,11 +1,11 @@
<AbstractConfirmUI title='lutinvcs.confirm.title' defaultCloseOperation='DISPOSE_ON_CLOSE' modal='true'
resizable='false' height='300' width='400'>
<style source="common.css"/>
- <script>
+ <!--script>
public JConfirmUI(org.codelutin.vcs.ui.handler.AbstractConfirmUIHandler handler) {
super(handler);
}
- </script>
+ </script-->
<Table>
<row fill='both'>
<cell fill='both'>
@@ -44,7 +44,8 @@
<row>
<cell fill='both' weightx='1' weighty='1'>
<JScrollPane id='content' styleClass='confirmScroll'>
- <JTable id="contentTable" styleClass='confirmTable' model="{getModel().getEntriesModel()}"/>
+ <JTable id="contentTable" styleClass='confirmTable'/>
+ <!--JTable id="contentTable" styleClass='confirmTable' model="{getModel().getEntriesModel()}"/-->
</JScrollPane>
</cell>
</row>
Modified: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JDiffUI.jaxx
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JDiffUI.jaxx 2008-04-06 17:14:14 UTC (rev 408)
+++ trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JDiffUI.jaxx 2008-04-06 17:14:47 UTC (rev 409)
@@ -1,14 +1,13 @@
<AbstractDiffUI title='lutinvcs.diff.title' id='diffui' defaultCloseOperation='DISPOSE_ON_CLOSE'>
<style source="common.css"/>
- <script>
+ <!--script>
import org.codelutin.vcs.type.VCSAction;
import org.codelutin.vcs.type.VCSEntryLocation;
- public JDiffUI(org.codelutin.vcs.ui.handler.AbstractDiffUIHandler handler) {
+ /*public JDiffUI(org.codelutin.vcs.ui.handler.AbstractDiffUIHandler handler) {
super(handler);
- }
- </script>
-
+ }*/
+ </script-->
<java.awt.CardLayout id='cardLayout'/>
<Table>
@@ -18,42 +17,42 @@
<JToggleButton id='allTab' selected='true' buttonGroup='tabs' mnemonic="A"
toolTipText="lutinvcs.tabs.diff.tooltip.all"
icon='{createImageIcon("remote_vs_local.png")}'
- onActionPerformed='setLocation(VCSEntryLocation.ALL)'/>
+ onActionPerformed='setLocation(org.codelutin.vcs.type.VCSEntryLocation.ALL)'/>
<JToggleButton id='localTab' selected='false' buttonGroup='tabs' mnemonic="L"
toolTipText="lutinvcs.tabs.diff.tooltip.local"
icon='{createImageIcon("local_vs_local.png")}'
- onActionPerformed='setLocation(VCSEntryLocation.LOCAL)'/>
+ onActionPerformed='setLocation(org.codelutin.vcs.type.VCSEntryLocation.LOCAL)'/>
<JToggleButton id='remoteTab' selected='false' buttonGroup='tabs' mnemonic="R"
icon='{createImageIcon("remote_vs_remote.png")}'
toolTipText="lutinvcs.tabs.diff.tooltip.remote"
- onActionPerformed='setLocation(VCSEntryLocation.REMOTE)'/>
+ onActionPerformed='setLocation(org.codelutin.vcs.type.VCSEntryLocation.REMOTE)'/>
<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-previous.png")}' onActionPerformed='gotoPreviousDiff()'/>
+ icon='{createImageIcon("diff-prev.png")}' onActionPerformed='gotoPreviousDiff()'/>
<JButton id='refresh' toolTipText="lutinvcs.action.tooltip.refresh"
icon='{createImageIcon("autoRefresh.png")}'
- onActionPerformed='doAction(VCSAction.REFRESH)'/>
+ onActionPerformed='doAction(org.codelutin.vcs.type.VCSAction.REFRESH)'/>
<JButton id='update' toolTipText="lutinvcs.action.tooltip.update"
icon='{createImageIcon("update.png")}'
- onActionPerformed='doAction(VCSAction.UPDATE)'/>
+ onActionPerformed='doAction(org.codelutin.vcs.type.VCSAction.UPDATE)'/>
<JButton id='commit' toolTipText="lutinvcs.action.tooltip.commit"
icon='{createImageIcon("commit.png")}'
- onActionPerformed='doAction(VCSAction.COMMIT)'/>
+ onActionPerformed='doAction(org.codelutin.vcs.type.VCSAction.COMMIT)'/>
<JButton id='revert' toolTipText="lutinvcs.action.tooltip.revert"
icon='{createImageIcon("rollback.png")}'
- onActionPerformed='doAction(VCSAction.REVERT)'/>
+ onActionPerformed='doAction(org.codelutin.vcs.type.VCSAction.REVERT)'/>
<JButton id='delete' toolTipText="lutinvcs.action.tooltip.delete"
icon='{createImageIcon("remove.png")}'
- onActionPerformed='doAction(VCSAction.DELETE)'/>
+ onActionPerformed='doAction(org.codelutin.vcs.type.VCSAction.DELETE)'/>
</JToolBar>
</cell>
</row>
Modified: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JSynchUI.jaxx
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JSynchUI.jaxx 2008-04-06 17:14:14 UTC (rev 408)
+++ trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JSynchUI.jaxx 2008-04-06 17:14:47 UTC (rev 409)
@@ -1,14 +1,13 @@
<AbstractSynchUI title='lutinvcs.synch.title' modal="true" defaultCloseOperation='DISPOSE_ON_CLOSE'>
<style source="common.css"/>
- <script>
+ <!--script>
import org.codelutin.vcs.type.VCSAction;
import org.codelutin.vcs.type.VCSEntryLocation;
- public JSynchUI(org.codelutin.vcs.ui.handler.AbstractSynchUIHandler handler) {
+ /*public JSynchUI(org.codelutin.vcs.ui.handler.AbstractSynchUIHandler handler) {
super(handler);
- }
- </script>
-
+ }*/
+ </script-->
<java.awt.CardLayout id='cardLayout'/>
<JVCSPopup id="allPopup"/>
@@ -22,38 +21,39 @@
<JToggleButton id='allTab' buttonGroup='tabs' text='lutinvcs.tabs.all' mnemonic="A"
toolTipText="lutinvcs.tabs.tooltip.all"
- onActionPerformed='setLocation(VCSEntryLocation.ALL)'/>
+ onActionPerformed='setLocation(org.codelutin.vcs.type.VCSEntryLocation.ALL)'/>
<JToggleButton id='localTab' selected='false' buttonGroup='tabs' text='lutinvcs.tabs.local'
mnemonic="L" toolTipText="lutinvcs.tabs.tooltip.local"
- onActionPerformed='setLocation(VCSEntryLocation.LOCAL)'/>
+ onActionPerformed='setLocation(org.codelutin.vcs.type.VCSEntryLocation.LOCAL)'/>
<JToggleButton id='remoteTab' selected='false' buttonGroup='tabs' text='lutinvcs.tabs.remote'
mnemonic="R" toolTipText="lutinvcs.tabs.tooltip.remote"
- onActionPerformed='setLocation(VCSEntryLocation.REMOTE)'/>
+ onActionPerformed='setLocation(org.codelutin.vcs.type.VCSEntryLocation.REMOTE)'/>
<JButton id='refreshAll' toolTipText="lutinvcs.action.tooltip.refreshAll"
icon='{createImageIcon("autoRefresh.png")}'
- onActionPerformed='doAction(VCSAction.REFRESH,false)'/>
+ onActionPerformed='doAction(org.codelutin.vcs.type.VCSAction.REFRESH,false)'/>
<JButton id='diffAll' toolTipText="lutinvcs.action.tooltip.diffAll"
- icon='{createImageIcon("diff.png")}' onActionPerformed='doAction(VCSAction.DIFF,false)'/>
+ icon='{createImageIcon("diff.png")}'
+ onActionPerformed='doAction(org.codelutin.vcs.type.VCSAction.DIFF,false)'/>
<JButton id='updateAll' toolTipText="lutinvcs.action.tooltip.updateAll"
icon='{createImageIcon("update.png")}'
- onActionPerformed='doAction(VCSAction.UPDATE,false)'/>
+ onActionPerformed='doAction(org.codelutin.vcs.type.VCSAction.UPDATE,false)'/>
<JButton id='commitAll' toolTipText="lutinvcs.action.tooltip.commitAll"
icon='{createImageIcon("commit.png")}'
- onActionPerformed='doAction(VCSAction.COMMIT,false)'/>
+ onActionPerformed='doAction(org.codelutin.vcs.type.VCSAction.COMMIT,false)'/>
<JButton id='revertAll' toolTipText="lutinvcs.action.tooltip.revertAll"
icon='{createImageIcon("rollback.png")}'
- onActionPerformed='doAction(VCSAction.REVERT,false)'/>
+ onActionPerformed='doAction(org.codelutin.vcs.type.VCSAction.REVERT,false)'/>
<JButton id='deleteAll' toolTipText="lutinvcs.action.tooltip.deleteAll"
icon='{createImageIcon("remove.png")}'
- onActionPerformed='doAction(VCSAction.DELETE,false)'/>
+ onActionPerformed='doAction(org.codelutin.vcs.type.VCSAction.DELETE,false)'/>
</JToolBar>
</cell>
</row>
1
0
r408 - in trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources: . META-INF META-INF/services
by tchemitï¼ users.labs.libre-entreprise.org 06 Apr '08
by tchemitï¼ users.labs.libre-entreprise.org 06 Apr '08
06 Apr '08
Author: tchemit
Date: 2008-04-06 17:14:14 +0000 (Sun, 06 Apr 2008)
New Revision: 408
Added:
trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/META-INF/
trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/META-INF/services/
trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/META-INF/services/org.codelutin.vcs.ui.AbstractUI
Log:
add ui from jaxx as service :)
Added: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/META-INF/services/org.codelutin.vcs.ui.AbstractUI
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/META-INF/services/org.codelutin.vcs.ui.AbstractUI (rev 0)
+++ trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/resources/META-INF/services/org.codelutin.vcs.ui.AbstractUI 2008-04-06 17:14:14 UTC (rev 408)
@@ -0,0 +1,3 @@
+org.codelutin.vcs.ui.JConfirmUI
+org.codelutin.vcs.ui.JSynchUI
+org.codelutin.vcs.ui.JDiffUI
\ No newline at end of file
1
0
r407 - in trunk/lutinvcs: lutinvcs-ui/src/main/java/org/codelutin/vcs/ui lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/handler lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/model
by tchemitï¼ users.labs.libre-entreprise.org 06 Apr '08
by tchemitï¼ users.labs.libre-entreprise.org 06 Apr '08
06 Apr '08
Author: tchemit
Date: 2008-04-06 15:16:51 +0000 (Sun, 06 Apr 2008)
New Revision: 407
Removed:
trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/VCSUIConstants.java
trunk/lutinvcs/lutinvcs-ui/src/main/java/org/codelutin/vcs/ui/VCSPopupAction.java
Modified:
trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JConfirmUI.jaxx
trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JDiffUI.jaxx
trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JSynchUI.jaxx
trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/AbstractConfirmUI.java
trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/AbstractDiffUI.java
trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/AbstractSynchUI.java
trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/AbstractTabUI.java
trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/AbstractVCSPopup.java
trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/UIHelper.java
trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/VCSInitializer.java
trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/handler/AbstractConfirmUIHandler.java
trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/handler/AbstractDiffUIHandler.java
trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/handler/AbstractSynchUIHandler.java
trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/handler/AbstractTabUIHandler.java
trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/handler/AbstractUIHandler.java
trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/model/AbstractTabUIModel.java
trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/model/AbstractUIModel.java
trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/model/AbstractVCSEntriesTableModel.java
trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/model/ConfirmUIModel.java
trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/model/DiffPanelUIModel.java
trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/model/DiffUIModel.java
trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/model/SimpleVCSEntriesTableModelImpl.java
trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/model/SynchUIModel.java
trunk/lutinvcs/lutinvcs-ui/src/main/java/org/codelutin/vcs/ui/ConfirmUIHandler.java
trunk/lutinvcs/lutinvcs-ui/src/main/java/org/codelutin/vcs/ui/SynchUIHandler.java
Log:
improve ui design
Modified: trunk/lutinvcs/lutinvcs-ui/src/main/java/org/codelutin/vcs/ui/ConfirmUIHandler.java
===================================================================
--- trunk/lutinvcs/lutinvcs-ui/src/main/java/org/codelutin/vcs/ui/ConfirmUIHandler.java 2008-04-06 13:54:13 UTC (rev 406)
+++ trunk/lutinvcs/lutinvcs-ui/src/main/java/org/codelutin/vcs/ui/ConfirmUIHandler.java 2008-04-06 15:16:51 UTC (rev 407)
@@ -45,7 +45,7 @@
VCSAction action = ui.getModel().getAction();
ui.getAccept().setText(action.getLibelle());
ui.getToolbar().setVisible(action.isCommit());
- ui.getHandler().getSelectionModel().setSelectionInterval(0, getModel().getModel().getRowCount() - 1);
+ ui.getHandler().getSelectionModel().setSelectionInterval(0, getModel().getEntriesModel().getRowCount() - 1);
}
protected void updateMessageUI() {
Modified: trunk/lutinvcs/lutinvcs-ui/src/main/java/org/codelutin/vcs/ui/SynchUIHandler.java
===================================================================
--- trunk/lutinvcs/lutinvcs-ui/src/main/java/org/codelutin/vcs/ui/SynchUIHandler.java 2008-04-06 13:54:13 UTC (rev 406)
+++ trunk/lutinvcs/lutinvcs-ui/src/main/java/org/codelutin/vcs/ui/SynchUIHandler.java 2008-04-06 15:16:51 UTC (rev 407)
@@ -4,11 +4,13 @@
import org.codelutin.vcs.type.VCSAction;
import org.codelutin.vcs.type.VCSEntryLocation;
import org.codelutin.vcs.ui.handler.AbstractSynchUIHandler;
+import org.codelutin.vcs.ui.handler.VCSAbsractAction;
import org.codelutin.vcs.ui.model.AbstractVCSEntriesTableModel;
import org.codelutin.vcs.ui.model.SynchUIModel;
import javax.swing.JTable;
import javax.swing.ListSelectionModel;
+import java.awt.event.ActionEvent;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.util.ArrayList;
@@ -32,7 +34,15 @@
}
public void doAllAction(VCSAction action) {
- AbstractVCSEntriesTableModel model = getModel().getModel();
+ doAction(action, false);
+ }
+
+ public void doSelectAction(VCSAction action) {
+ doAction(action, true);
+ }
+
+ public void doAction(VCSAction action, boolean useSelection) {
+ AbstractVCSEntriesTableModel model = getModel().getEntriesModel();
log.info(action + " : " + model);
ListSelectionModel selectionModel = getSelectionModel();
if (action == VCSAction.REFRESH) {
@@ -41,7 +51,7 @@
log.info("refresh :" + model.getRowCount());
model.refresh(model.getEntries(), System.nanoTime());
} else {
- List<VCSEntry> entries = model.filter(action, model.getDisplayedEntries(null));
+ List<VCSEntry> entries = model.filter(action, model.getDisplayedEntries(useSelection ? selectionModel : null));
if (entries.isEmpty()) {
// nothing to do
return;
@@ -63,11 +73,18 @@
protected void initTab(VCSEntryLocation location) {
JTable table = getUi().getTable(location);
- AbstractVCSEntriesTableModel fileStatesModel = getModel().getModel();
+ AbstractVCSEntriesTableModel fileStatesModel = getModel().getEntriesModel();
table.setModel(fileStatesModel);
table.addMouseListener(new ListMouseListener(ui, fileStatesModel, location));
AbstractVCSPopup jvcsPopup = getUi().getPopup(location);
- jvcsPopup.setDispatchAction(new VCSPopupAction(ui, location));
+ //jvcsPopup.setDispatchAction(new VCSPopupAction(this, location));
+ jvcsPopup.setDispatchAction(new VCSAbsractAction() {
+ private static final long serialVersionUID = 8622118724992019898L;
+
+ public void actionPerformed(ActionEvent e) {
+ doSelectAction(action);
+ }
+ });
}
protected static class ListMouseListener extends MouseAdapter {
Deleted: trunk/lutinvcs/lutinvcs-ui/src/main/java/org/codelutin/vcs/ui/VCSPopupAction.java
===================================================================
--- trunk/lutinvcs/lutinvcs-ui/src/main/java/org/codelutin/vcs/ui/VCSPopupAction.java 2008-04-06 13:54:13 UTC (rev 406)
+++ trunk/lutinvcs/lutinvcs-ui/src/main/java/org/codelutin/vcs/ui/VCSPopupAction.java 2008-04-06 15:16:51 UTC (rev 407)
@@ -1,70 +0,0 @@
-/**
- * # #% Copyright (C) 2008 Code Lutin, Tony Chemit
- * This program is free software; you
- * can redistribute it and/or modify it under the terms of the GNU General
- * Public License as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version. This program is
- * distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
- * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- * PARTICULAR PURPOSE. See the GNU General Public License for more details. You
- * should have received a copy of the GNU General Public License along with this
- * program; if not, write to the Free Software Foundation, Inc., 59 Temple Place
- * - Suite 330, Boston, MA 02111-1307, USA.
- * # #%
- */
-package org.codelutin.vcs.ui;
-
-import org.codelutin.vcs.type.VCSAction;
-import org.codelutin.vcs.VCSEntry;
-import org.codelutin.vcs.type.VCSEntryLocation;
-import org.codelutin.vcs.ui.handler.VCSAbsractAction;
-import org.codelutin.vcs.ui.model.AbstractVCSEntriesTableModel;
-
-import javax.swing.ListSelectionModel;
-import java.awt.event.ActionEvent;
-import java.util.List;
-
-/**
- * Action of a clik inside the popup menu
- *
- * @author chemit
- */
-public class VCSPopupAction extends VCSAbsractAction {
- private static final long serialVersionUID = -1983061535956510913L;
-
- protected VCSEntryLocation location;
- protected transient ListSelectionModel selectionModel;
-
- protected transient AbstractTabUI ui;
-
- protected AbstractVCSEntriesTableModel tableModel;
-
- public VCSPopupAction(AbstractTabUI ui, VCSEntryLocation location) {
- super();
- this.ui = ui;
- this.location = location;
- //this.selectionModel = ui.getHandler().getSelectionModel();
- this.selectionModel = ui.getTable(location).getSelectionModel();
- tableModel = ui.getModel().getModel();
- }
-
- public void actionPerformed(ActionEvent e) {
- // select only lines for this action inside already selected lines
- List<VCSEntry> entries = tableModel.filter(action, tableModel.getDisplayedEntries(selectionModel));
- log.info("action: " + action + ", files to treate :" + entries.size() + " " + selectionModel);
- if (action == VCSAction.DIFF) {
- // show diff ui
- ui.getModel().refresh(entries);
-
- } else if (action == VCSAction.REFRESH) {
- // refresh ui, and update list if needed
-
- } else {
- // show confirm action ui
- AbstractConfirmUI confirmUI = VCSUIFactory.newConfirmUI();
- confirmUI.getModel().init(action, tableModel.getLocation(), entries.toArray(new VCSEntry[entries.size()]));
- confirmUI.getHandler().getSelectionModel().setSelectionInterval(0, entries.size() - 1);
- confirmUI.setVisible(true);
- }
- }
-}
Modified: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JConfirmUI.jaxx
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JConfirmUI.jaxx 2008-04-06 13:54:13 UTC (rev 406)
+++ trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JConfirmUI.jaxx 2008-04-06 15:16:51 UTC (rev 407)
@@ -2,12 +2,9 @@
resizable='false' height='300' width='400'>
<style source="common.css"/>
<script>
- import org.codelutin.vcs.type.VCSAction;
-
public JConfirmUI(org.codelutin.vcs.ui.handler.AbstractConfirmUIHandler handler) {
super(handler);
}
-
</script>
<Table>
<row fill='both'>
@@ -27,8 +24,7 @@
<cell fill='both'/>
</row>
</Table>
- <JButton id='lastMessages'
- toolTipText="lutinvcs.action.tooltip.lastMessages"
+ <JButton id='lastMessages' toolTipText="lutinvcs.action.tooltip.lastMessages"
icon='{createImageIcon("recent_msgs.png")}'
onActionPerformed='showLastMessages()'/>
</JToolBar>
@@ -48,7 +44,7 @@
<row>
<cell fill='both' weightx='1' weighty='1'>
<JScrollPane id='content' styleClass='confirmScroll'>
- <JTable id="contentTable" styleClass='confirmTable' model="{getModel().getModel()}"/>
+ <JTable id="contentTable" styleClass='confirmTable' model="{getModel().getEntriesModel()}"/>
</JScrollPane>
</cell>
</row>
Modified: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JDiffUI.jaxx
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JDiffUI.jaxx 2008-04-06 13:54:13 UTC (rev 406)
+++ trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JDiffUI.jaxx 2008-04-06 15:16:51 UTC (rev 407)
@@ -60,17 +60,14 @@
<row fill='both'>
<cell fill='both' weighty='1' weightx='2'>
<JPanel id='preview' layout='{cardLayout}'>
- <JScrollPane id='allContent' styleClass='diffScroll' constraints='"modelSynchAll"'>
- <JTable id="allTable" styleClass='diffTable'
- onMouseClicked="selectFile(allTable)"/>
+ <JScrollPane id='allContent' styleClass='diffScroll' constraints='"taball"'>
+ <JTable id="allTable" styleClass='diffTable' onMouseClicked="selectFile()"/>
</JScrollPane>
- <JScrollPane id='localContent' styleClass='diffScroll' constraints='"modelSynchLocal"'>
- <JTable id="localTable" styleClass='diffTable'
- onMouseClicked="selectFile(localTable)"/>
+ <JScrollPane id='localContent' styleClass='diffScroll' constraints='"tablocal"'>
+ <JTable id="localTable" styleClass='diffTable' onMouseClicked="selectFile()"/>
</JScrollPane>
- <JScrollPane id='remoteContent' styleClass='diffScroll' constraints='"modelSynchRemote"'
- onMouseClicked="selectFile(remoteTable)">
- <JTable id="remoteTable" styleClass='diffTable'/>
+ <JScrollPane id='remoteContent' styleClass='diffScroll' constraints='"tabremote"'>
+ <JTable id="remoteTable" styleClass='diffTable' onMouseClicked="selectFile()"/>
</JScrollPane>
</JPanel>
</cell>
Modified: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JSynchUI.jaxx
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JSynchUI.jaxx 2008-04-06 13:54:13 UTC (rev 406)
+++ trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JSynchUI.jaxx 2008-04-06 15:16:51 UTC (rev 407)
@@ -1,5 +1,4 @@
-<AbstractSynchUI title='lutinvcs.synch.title' modal="true" id='synchui'
- defaultCloseOperation='DISPOSE_ON_CLOSE'>
+<AbstractSynchUI title='lutinvcs.synch.title' modal="true" defaultCloseOperation='DISPOSE_ON_CLOSE'>
<style source="common.css"/>
<script>
import org.codelutin.vcs.type.VCSAction;
@@ -8,65 +7,66 @@
public JSynchUI(org.codelutin.vcs.ui.handler.AbstractSynchUIHandler handler) {
super(handler);
}
- //add(table);
</script>
<java.awt.CardLayout id='cardLayout'/>
+ <JVCSPopup id="allPopup"/>
+ <JVCSPopup id="localPopup"/>
+ <JVCSPopup id="remotePopup"/>
<Table id='table'>
<row fill='both'>
<cell fill='both' weightx='1'>
<JToolBar>
- <!--JPopupMenu enabled='false'/-->
- <org.codelutin.vcs.ui.JVCSPopup id="allPopup"/>
- <org.codelutin.vcs.ui.JVCSPopup id="localPopup"/>
- <org.codelutin.vcs.ui.JVCSPopup id="remotePopup"/>
+
<JToggleButton id='allTab' buttonGroup='tabs' text='lutinvcs.tabs.all' mnemonic="A"
toolTipText="lutinvcs.tabs.tooltip.all"
onActionPerformed='setLocation(VCSEntryLocation.ALL)'/>
+
<JToggleButton id='localTab' selected='false' buttonGroup='tabs' text='lutinvcs.tabs.local'
mnemonic="L" toolTipText="lutinvcs.tabs.tooltip.local"
onActionPerformed='setLocation(VCSEntryLocation.LOCAL)'/>
+
<JToggleButton id='remoteTab' selected='false' buttonGroup='tabs' text='lutinvcs.tabs.remote'
mnemonic="R" toolTipText="lutinvcs.tabs.tooltip.remote"
onActionPerformed='setLocation(VCSEntryLocation.REMOTE)'/>
<JButton id='refreshAll' toolTipText="lutinvcs.action.tooltip.refreshAll"
icon='{createImageIcon("autoRefresh.png")}'
- onActionPerformed='doAllAction(VCSAction.REFRESH)'/>
+ onActionPerformed='doAction(VCSAction.REFRESH,false)'/>
<JButton id='diffAll' toolTipText="lutinvcs.action.tooltip.diffAll"
- icon='{createImageIcon("diff.png")}' onActionPerformed='doAllAction(VCSAction.DIFF)'/>
+ icon='{createImageIcon("diff.png")}' onActionPerformed='doAction(VCSAction.DIFF,false)'/>
<JButton id='updateAll' toolTipText="lutinvcs.action.tooltip.updateAll"
icon='{createImageIcon("update.png")}'
- onActionPerformed='doAllAction(VCSAction.UPDATE)'/>
+ onActionPerformed='doAction(VCSAction.UPDATE,false)'/>
<JButton id='commitAll' toolTipText="lutinvcs.action.tooltip.commitAll"
icon='{createImageIcon("commit.png")}'
- onActionPerformed='doAllAction(VCSAction.COMMIT)'/>
+ onActionPerformed='doAction(VCSAction.COMMIT,false)'/>
<JButton id='revertAll' toolTipText="lutinvcs.action.tooltip.revertAll"
icon='{createImageIcon("rollback.png")}'
- onActionPerformed='doAllAction(VCSAction.REVERT)'/>
+ onActionPerformed='doAction(VCSAction.REVERT,false)'/>
<JButton id='deleteAll' toolTipText="lutinvcs.action.tooltip.deleteAll"
icon='{createImageIcon("remove.png")}'
- onActionPerformed='doAllAction(VCSAction.DELETE)'/>
+ onActionPerformed='doAction(VCSAction.DELETE,false)'/>
</JToolBar>
</cell>
</row>
<row fill='both'>
<cell fill='both' weighty='1' weightx='2'>
<JPanel id='preview' layout='{cardLayout}'>
- <JScrollPane id='allContent' styleClass='updateScroll' constraints='"modelSynchAll"'>
+ <JScrollPane id='allContent' styleClass='updateScroll' constraints='"taball"'>
<JTable id="allTable" styleClass='updateTable'/>
</JScrollPane>
- <JScrollPane id='localContent' styleClass='updateScroll' constraints='"modelSynchLocal"'>
+ <JScrollPane id='localContent' styleClass='updateScroll' constraints='"tablocal"'>
<JTable id="localTable" styleClass='updateTable'/>
</JScrollPane>
- <JScrollPane id='remoteContent' styleClass='updateScroll' constraints='"modelSynchRemote"'>
+ <JScrollPane id='remoteContent' styleClass='updateScroll' constraints='"tabremote"'>
<JTable id="remoteTable" styleClass='updateTable'/>
</JScrollPane>
</JPanel>
Modified: trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/AbstractConfirmUI.java
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/AbstractConfirmUI.java 2008-04-06 13:54:13 UTC (rev 406)
+++ trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/AbstractConfirmUI.java 2008-04-06 15:16:51 UTC (rev 407)
@@ -16,8 +16,6 @@
import jaxx.runtime.swing.Table;
import org.codelutin.vcs.ui.handler.AbstractConfirmUIHandler;
-import org.codelutin.vcs.ui.handler.AbstractUIHandler;
-import org.codelutin.vcs.ui.model.AbstractUIModel;
import org.codelutin.vcs.ui.model.ConfirmUIModel;
import javax.swing.JButton;
@@ -68,10 +66,18 @@
}
public void doAccept() {
- getHandler().doAction(getCommitMessage().getText(), getModel().getModel());
+ getHandler().doAction(getCommitMessage().getText(), getModel().getEntriesModel());
}
protected void showLastMessages() {
}
+
+ @Override
+ public void setVisible(boolean b) {
+ if (b) {
+ getAccept().setEnabled(getModel().getEntriesModel().getRowCount() > 0);
+ }
+ super.setVisible(b);
+ }
}
Modified: trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/AbstractDiffUI.java
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/AbstractDiffUI.java 2008-04-06 13:54:13 UTC (rev 406)
+++ trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/AbstractDiffUI.java 2008-04-06 15:16:51 UTC (rev 407)
@@ -20,7 +20,6 @@
import org.codelutin.vcs.ui.model.DiffUIModel;
import javax.swing.JButton;
-import javax.swing.JTable;
/** @author chemit */
public abstract class AbstractDiffUI extends AbstractTabUI {
@@ -37,16 +36,18 @@
super(handler, new DiffUIModel());
}
+ @Override
public DiffUIModel getModel() {
return (DiffUIModel) model;
}
+ @Override
protected AbstractDiffUIHandler getHandler() {
return (AbstractDiffUIHandler) handler;
}
- protected void selectFile(JTable table) {
- getModel().setFileModel(model.getModel().getDisplayedEntries(table.getSelectionModel()).get(0));
+ protected void selectFile() {
+ getModel().setFileModel(model.getEntriesModel().getDisplayedEntries(getHandler().getSelectionModel()).get(0));
}
protected void doAction(VCSAction action) {
Modified: trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/AbstractSynchUI.java
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/AbstractSynchUI.java 2008-04-06 13:54:13 UTC (rev 406)
+++ trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/AbstractSynchUI.java 2008-04-06 15:16:51 UTC (rev 407)
@@ -20,7 +20,6 @@
import org.codelutin.vcs.ui.model.SynchUIModel;
import javax.swing.JButton;
-import java.awt.CardLayout;
/** @author chemit */
public abstract class AbstractSynchUI extends AbstractTabUI {
@@ -52,18 +51,16 @@
super(handler, new SynchUIModel());
}
+ @Override
public SynchUIModel getModel() {
return (SynchUIModel) model;
}
+ @Override
protected AbstractSynchUIHandler getHandler() {
return (AbstractSynchUIHandler) handler;
}
- protected void doAllAction(VCSAction action) {
- getModel().doAllAction(action);
- }
-
public AbstractVCSPopup getPopup(VCSEntryLocation modelName) {
switch (modelName) {
case ALL:
@@ -77,4 +74,8 @@
}
throw new IllegalStateException("no popup found for " + modelName);
}
+
+ protected void doAction(VCSAction action, boolean useSelection) {
+ getHandler().doAction(action, useSelection);
+ }
}
\ No newline at end of file
Modified: trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/AbstractTabUI.java
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/AbstractTabUI.java 2008-04-06 13:54:13 UTC (rev 406)
+++ trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/AbstractTabUI.java 2008-04-06 15:16:51 UTC (rev 407)
@@ -49,15 +49,14 @@
public abstract CardLayout getCardLayout();
- public AbstractTabUI(AbstractTabUIHandler handler, AbstractTabUIModel model) {
- super(handler, model);
- }
-
public AbstractTabUI() {
- // for jaxx but never used
super();
}
+ public AbstractTabUI(AbstractTabUIHandler handler, AbstractTabUIModel model) {
+ super(handler, model);
+ }
+
public AbstractTabUIModel getModel() {
return (AbstractTabUIModel) model;
}
Modified: trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/AbstractVCSPopup.java
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/AbstractVCSPopup.java 2008-04-06 13:54:13 UTC (rev 406)
+++ trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/AbstractVCSPopup.java 2008-04-06 15:16:51 UTC (rev 407)
@@ -14,8 +14,8 @@
*/
package org.codelutin.vcs.ui;
+import org.codelutin.vcs.type.VCSAction;
import org.codelutin.vcs.ui.handler.VCSAbsractAction;
-import org.codelutin.vcs.type.VCSAction;
import javax.swing.JMenuItem;
import java.awt.event.ActionEvent;
@@ -46,4 +46,5 @@
ActionEvent e = new ActionEvent(item, 1, action.name());
dispatchAction.actionPerformed(e);
}
+
}
Modified: trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/UIHelper.java
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/UIHelper.java 2008-04-06 13:54:13 UTC (rev 406)
+++ trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/UIHelper.java 2008-04-06 15:16:51 UTC (rev 407)
@@ -14,11 +14,11 @@
*/
package org.codelutin.vcs.ui;
+import javax.swing.AbstractAction;
+import javax.swing.Action;
+import javax.swing.JComponent;
import javax.swing.JDialog;
import javax.swing.JRootPane;
-import javax.swing.Action;
-import javax.swing.AbstractAction;
-import javax.swing.JComponent;
import javax.swing.KeyStroke;
import java.awt.event.ActionEvent;
@@ -28,9 +28,9 @@
* @author chemit
*/
public class UIHelper {
+
public static void setQuitAction(final JDialog ui) {
JRootPane rootPane = ui.getRootPane();
- //rootPane.setDefaultButton(accept);
Action quitAction = new AbstractAction("quit") {
private static final long serialVersionUID = -869095664995763057L;
Modified: trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/VCSInitializer.java
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/VCSInitializer.java 2008-04-06 13:54:13 UTC (rev 406)
+++ trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/VCSInitializer.java 2008-04-06 15:16:51 UTC (rev 407)
@@ -34,6 +34,7 @@
TagManager.registerDefaultNamespace("AbstractSynchUI", "org.codelutin.vcs.ui.*");
TagManager.registerDefaultNamespace("AbstractDiffUI", "org.codelutin.vcs.ui.*");
TagManager.registerDefaultNamespace("AbstractVCSPopup", "org.codelutin.vcs.ui.*");
+ TagManager.registerDefaultNamespace("JVCSPopup", "org.codelutin.vcs.ui.*");
}
}
\ No newline at end of file
Deleted: trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/VCSUIConstants.java
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/VCSUIConstants.java 2008-04-06 13:54:13 UTC (rev 406)
+++ trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/VCSUIConstants.java 2008-04-06 15:16:51 UTC (rev 407)
@@ -1,67 +0,0 @@
-/**
- * # #% Copyright (C) 2008 Code Lutin, Tony Chemit
- * This program is free software; you
- * can redistribute it and/or modify it under the terms of the GNU General
- * Public License as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version. This program is
- * distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
- * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- * PARTICULAR PURPOSE. See the GNU General Public License for more details. You
- * should have received a copy of the GNU General Public License along with this
- * program; if not, write to the Free Software Foundation, Inc., 59 Temple Place
- * - Suite 330, Boston, MA 02111-1307, USA.
- * # #%
- */
-package org.codelutin.vcs.ui;
-
-import static org.codelutin.i18n.I18n.n_;
-
-/** @author chemit */
-public class VCSUIConstants {
-
- /** columns names for a simple table model with module, file and status */
- public static final String[] SIMPLE_COLUMNS_NAMES = new String[]{
- n_("lutinvcs.module"),
- n_("lutinvcs.file"),
- n_("lutinvcs.status")
- };
-
- /** model name for synchronize ui */
- public static final String SYNCH_MODEL_PROPERTY = "modelSynch";
-
- /** model name for confirm ui */
- public static final String CONFIRM_MODEL_PROPERTY = "modelConfirm";
-
- /** model name for diff ui */
- public static final String DIFF_MODEL_PROPERTY = "modelConfirm";
-
- public static final String ACTION_PROPERTY_CHANGED = "action";
-
- public static final String MESSAGE_HISTORY_PROPERTY_CHANGED = "historyMessage";
-
- public static final String FILE_PROPERTY_CHANGED = "file";
-
- public static final String NEXT_DIFF_PROPERTY_CHANGED = "nextDiff";
-
- public static final String PREVIOUS_DIFF_PROPERTY_CHANGED = "previousDiff";
-
- public static final String REFRESH_PROPERTY_CHANGED = "refresh";
-
- public static final String TAB_PROPERTY_CHANGED = "tab";
-
- public static final String DIFF_ALL_PROPERTY_CHANGED = "diffAll";
-
- public static final String COMMIT_ALL_PROPERTY_CHANGED = "commitAll";
-
- public static final String UPDATE_ALL_PROPERTY_CHANGED = "updateAll";
-
- public static final String REVERT_ALL_PROPERTY_CHANGED = "revertAll";
-
- public static final String DIFF_PROPERTY_CHANGED = "diff";
-
- public static final String COMMIT_PROPERTY_CHANGED = "commit";
-
- public static final String UPDATE_PROPERTY_CHANGED = "update";
-
- public static final String REVERT_PROPERTY_CHANGED = "revert";
-}
Modified: trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/handler/AbstractConfirmUIHandler.java
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/handler/AbstractConfirmUIHandler.java 2008-04-06 13:54:13 UTC (rev 406)
+++ trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/handler/AbstractConfirmUIHandler.java 2008-04-06 15:16:51 UTC (rev 407)
@@ -17,7 +17,6 @@
import org.codelutin.vcs.VCSEntry;
import org.codelutin.vcs.type.VCSAction;
import org.codelutin.vcs.ui.AbstractUI;
-import org.codelutin.vcs.ui.VCSUIConstants;
import org.codelutin.vcs.ui.model.AbstractVCSEntriesTableModel;
import org.codelutin.vcs.ui.model.ConfirmUIModel;
@@ -41,12 +40,12 @@
}
String action = evt.getPropertyName();
- if (VCSUIConstants.ACTION_PROPERTY_CHANGED.equals(action)) {
+ if (ConfirmUIModel.ACCEPT_PROPERTY_CHANGED.equals(action)) {
updateUI();
return;
}
- if (VCSUIConstants.MESSAGE_HISTORY_PROPERTY_CHANGED.equals(action)) {
+ if (ConfirmUIModel.MESSAGE_HISTORY_PROPERTY_CHANGED.equals(action)) {
updateMessageUI();
return;
}
Modified: trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/handler/AbstractDiffUIHandler.java
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/handler/AbstractDiffUIHandler.java 2008-04-06 13:54:13 UTC (rev 406)
+++ trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/handler/AbstractDiffUIHandler.java 2008-04-06 15:16:51 UTC (rev 407)
@@ -18,7 +18,6 @@
import org.codelutin.vcs.type.VCSAction;
import org.codelutin.vcs.type.VCSEntryLocation;
import org.codelutin.vcs.ui.AbstractDiffUI;
-import org.codelutin.vcs.ui.VCSUIConstants;
import org.codelutin.vcs.ui.model.DiffUIModel;
import java.beans.PropertyChangeEvent;
@@ -32,7 +31,7 @@
//}
String action = evt.getPropertyName();
- if (VCSUIConstants.FILE_PROPERTY_CHANGED.equals(action)) {
+ if (DiffUIModel.FILE_PROPERTY_CHANGED.equals(action)) {
doSelectFile((VCSEntry) evt.getNewValue());
} else {
super.propertyChange(evt);
Modified: trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/handler/AbstractSynchUIHandler.java
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/handler/AbstractSynchUIHandler.java 2008-04-06 13:54:13 UTC (rev 406)
+++ trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/handler/AbstractSynchUIHandler.java 2008-04-06 15:16:51 UTC (rev 407)
@@ -26,13 +26,13 @@
/** @author chemit */
public abstract class AbstractSynchUIHandler<U extends AbstractSynchUI> extends AbstractTabUIHandler<SynchUIModel, U> {
- public abstract void doAllAction(VCSAction action);
+ public abstract void doAction(VCSAction action, boolean useSelect);
public void doSelectLocation(VCSEntryLocation location) {
super.doSelectLocation(location);
- VCSAction[] actions = getModel().getModel().getActions((ListSelectionModel) null);
+ VCSAction[] actions = getModel().getEntriesModel().getActions((ListSelectionModel) null);
List<String> acts = new ArrayList<String>();
for (VCSAction action : actions) {
acts.add(action.name().toLowerCase());
Modified: trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/handler/AbstractTabUIHandler.java
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/handler/AbstractTabUIHandler.java 2008-04-06 13:54:13 UTC (rev 406)
+++ trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/handler/AbstractTabUIHandler.java 2008-04-06 15:16:51 UTC (rev 407)
@@ -16,7 +16,6 @@
import org.codelutin.vcs.type.VCSEntryLocation;
import org.codelutin.vcs.ui.AbstractTabUI;
-import org.codelutin.vcs.ui.VCSUIConstants;
import org.codelutin.vcs.ui.model.AbstractTabUIModel;
import javax.swing.ListSelectionModel;
@@ -45,14 +44,14 @@
//}
String action = evt.getPropertyName();
- if (VCSUIConstants.TAB_PROPERTY_CHANGED.equals(action)) {
+ if (AbstractTabUIModel.LOCATION_PROPERTY_CHANGED.equals(action)) {
doSelectLocation((VCSEntryLocation) evt.getNewValue());
}
}
public void doSelectLocation(VCSEntryLocation location) {
log.info(location);
- getUi().getCardLayout().show(getUi().getPreview(), location.name().toLowerCase() + "Content");
+ getUi().getCardLayout().show(getUi().getPreview(), "tab" + location.name().toLowerCase());
}
Modified: trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/handler/AbstractUIHandler.java
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/handler/AbstractUIHandler.java 2008-04-06 13:54:13 UTC (rev 406)
+++ trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/handler/AbstractUIHandler.java 2008-04-06 15:16:51 UTC (rev 407)
@@ -44,7 +44,7 @@
}
public VCSEntryLocation getLocation() {
- return getModel().getModel().getLocation();
+ return getModel().getEntriesModel().getLocation();
}
protected VCSActionManager getActionManager() {
Modified: trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/model/AbstractTabUIModel.java
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/model/AbstractTabUIModel.java 2008-04-06 13:54:13 UTC (rev 406)
+++ trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/model/AbstractTabUIModel.java 2008-04-06 15:16:51 UTC (rev 407)
@@ -15,19 +15,20 @@
package org.codelutin.vcs.ui.model;
import org.codelutin.vcs.type.VCSEntryLocation;
-import org.codelutin.vcs.ui.VCSUIConstants;
/**
- * Model of a repository
+ * Abstract for a dialog with location information (says one tab by location type (except UNKNOW type of course...)
*
* @author chemit
*/
public class AbstractTabUIModel extends AbstractUIModel {
+ public static final String LOCATION_PROPERTY_CHANGED = "location";
+
public void setLocation(VCSEntryLocation location) {
- VCSEntryLocation oldLocation = getModel().getLocation();
- getModel().setLocation(location);
- firePropertyChange(VCSUIConstants.TAB_PROPERTY_CHANGED, oldLocation, location);
+ VCSEntryLocation oldLocation = getEntriesModel().getLocation();
+ getEntriesModel().setLocation(location);
+ firePropertyChange(LOCATION_PROPERTY_CHANGED, oldLocation, location);
}
}
\ No newline at end of file
Modified: trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/model/AbstractUIModel.java
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/model/AbstractUIModel.java 2008-04-06 13:54:13 UTC (rev 406)
+++ trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/model/AbstractUIModel.java 2008-04-06 15:16:51 UTC (rev 407)
@@ -18,10 +18,8 @@
import org.apache.commons.logging.LogFactory;
import org.codelutin.vcs.VCSConnexion;
import org.codelutin.vcs.VCSEntry;
-import org.codelutin.vcs.type.VCSEntryLocation;
-import org.codelutin.vcs.type.VCSAction;
import org.codelutin.vcs.VCSException;
-import org.codelutin.vcs.ui.VCSUIConstants;
+import org.codelutin.vcs.type.VCSEntryLocation;
import java.beans.PropertyChangeListener;
import java.beans.PropertyChangeSupport;
@@ -33,48 +31,36 @@
/** to use log facility, just put in your code: log.info(\"...\"); */
static protected final Log log = LogFactory.getLog(AbstractUIModel.class);
- /** current action to be fired */
- protected VCSAction action;
/** support for change properties support */
protected PropertyChangeSupport changeSupport;
- protected final AbstractVCSEntriesTableModel model;
+ protected final AbstractVCSEntriesTableModel entriesModel;
protected AbstractUIModel() {
- model = new SimpleVCSEntriesTableModelImpl(getClass().getSimpleName());
+ entriesModel = new SimpleVCSEntriesTableModelImpl(getClass().getSimpleName());
}
- public AbstractVCSEntriesTableModel getModel() {
- return model;
+ public AbstractVCSEntriesTableModel getEntriesModel() {
+ return entriesModel;
}
public void populate(VCSConnexion connexion) throws VCSException {
- getModel().populate(connexion, System.nanoTime());
+ getEntriesModel().populate(connexion, System.nanoTime());
}
public void populate(VCSConnexion connexion, List<String> relativeLocalPaths, VCSEntryLocation location) throws VCSException {
- getModel().populate(connexion, relativeLocalPaths, location, System.nanoTime());
+ getEntriesModel().populate(connexion, relativeLocalPaths, location, System.nanoTime());
}
public void populate(VCSEntryLocation location, VCSEntry[] datas) {
- getModel().populate(location, datas);
+ getEntriesModel().populate(location, datas);
}
public void refresh(List<VCSEntry> entries) {
- getModel().refresh(entries, System.nanoTime());
+ getEntriesModel().refresh(entries, System.nanoTime());
}
- public VCSAction getAction() {
- return action;
- }
-
- public void setAction(VCSAction action) {
- VCSAction oldAction = this.action;
- this.action = action;
- firePropertyChange(VCSUIConstants.ACTION_PROPERTY_CHANGED, oldAction, action);
- }
-
public synchronized void addPropertyChangeListener(String propertyName, PropertyChangeListener listener) {
if (listener == null) {
return;
Modified: trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/model/AbstractVCSEntriesTableModel.java
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/model/AbstractVCSEntriesTableModel.java 2008-04-06 13:54:13 UTC (rev 406)
+++ trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/model/AbstractVCSEntriesTableModel.java 2008-04-06 15:16:51 UTC (rev 407)
@@ -20,12 +20,12 @@
package org.codelutin.vcs.ui.model;
import static org.codelutin.i18n.I18n._;
-import org.codelutin.vcs.type.VCSAction;
import org.codelutin.vcs.VCSConnexion;
import org.codelutin.vcs.VCSEntries;
import org.codelutin.vcs.VCSEntry;
+import org.codelutin.vcs.VCSException;
+import org.codelutin.vcs.type.VCSAction;
import org.codelutin.vcs.type.VCSEntryLocation;
-import org.codelutin.vcs.VCSException;
import org.codelutin.vcs.type.VCSState;
import org.codelutin.vcs.util.VCSEntriesImpl;
Modified: trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/model/ConfirmUIModel.java
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/model/ConfirmUIModel.java 2008-04-06 13:54:13 UTC (rev 406)
+++ trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/model/ConfirmUIModel.java 2008-04-06 15:16:51 UTC (rev 407)
@@ -17,13 +17,12 @@
import org.codelutin.vcs.VCSEntry;
import org.codelutin.vcs.type.VCSAction;
import org.codelutin.vcs.type.VCSEntryLocation;
-import static org.codelutin.vcs.ui.VCSUIConstants.MESSAGE_HISTORY_PROPERTY_CHANGED;
import java.util.ArrayList;
import java.util.List;
/**
- * Model of a repository
+ * Model of a a confirmation of action on entries (single type of action possible)
*
* @author chemit
*/
@@ -32,6 +31,10 @@
/** 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) {
@@ -40,6 +43,10 @@
return commitMessages;
}
+ public VCSAction getAction() {
+ return action;
+ }
+
public void addCommitMessage(String commitMessage) {
if (commitMessage != null && !commitMessage.isEmpty() && !getCommitMessages().contains(commitMessage)) {
// add message in history
@@ -49,11 +56,15 @@
}
public void init(VCSAction action, VCSEntryLocation location, VCSEntry[] states) {
- // always reset action in order to allow propagation of action changed
- this.action = null;
- model.clear();
- model.populate(location, states);
+ getEntriesModel().clear();
+ getEntriesModel().populate(location, states);
setAction(action);
}
+ public void setAction(VCSAction action) {
+ this.action = action;
+ // null oldValue to ensure propagation of changed
+ firePropertyChange(ACCEPT_PROPERTY_CHANGED, null, action);
+ }
+
}
\ No newline at end of file
Modified: trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/model/DiffPanelUIModel.java
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/model/DiffPanelUIModel.java 2008-04-06 13:54:13 UTC (rev 406)
+++ trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/model/DiffPanelUIModel.java 2008-04-06 15:16:51 UTC (rev 407)
@@ -16,9 +16,9 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.codelutin.vcs.type.VCSAction;
import org.codelutin.vcs.VCSEntry;
import org.codelutin.vcs.VCSHandler;
+import org.codelutin.vcs.type.VCSAction;
import java.beans.PropertyChangeListener;
import java.beans.PropertyChangeSupport;
@@ -31,7 +31,6 @@
*/
public class DiffPanelUIModel {
- /** to use log facility, just put in your code: log.info(\"...\"); */
static protected final Log log = LogFactory.getLog(DiffPanelUIModel.class);
/** local root : wroking copy */
Modified: trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/model/DiffUIModel.java
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/model/DiffUIModel.java 2008-04-06 13:54:13 UTC (rev 406)
+++ trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/model/DiffUIModel.java 2008-04-06 15:16:51 UTC (rev 407)
@@ -15,7 +15,6 @@
package org.codelutin.vcs.ui.model;
import org.codelutin.vcs.VCSEntry;
-import org.codelutin.vcs.ui.VCSUIConstants;
/**
* Model of a repository
@@ -24,13 +23,15 @@
*/
public class DiffUIModel extends AbstractTabUIModel {
+ public static final String FILE_PROPERTY_CHANGED = "file";
+
/** current file displayed */
protected VCSEntry fileModel;
public void setFileModel(VCSEntry fileModel) {
VCSEntry oldFileModel = this.fileModel;
this.fileModel = fileModel;
- firePropertyChange(VCSUIConstants.TAB_PROPERTY_CHANGED, oldFileModel, fileModel);
+ firePropertyChange(FILE_PROPERTY_CHANGED, oldFileModel, fileModel);
}
public VCSEntry getFileModel() {
Modified: trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/model/SimpleVCSEntriesTableModelImpl.java
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/model/SimpleVCSEntriesTableModelImpl.java 2008-04-06 13:54:13 UTC (rev 406)
+++ trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/model/SimpleVCSEntriesTableModelImpl.java 2008-04-06 15:16:51 UTC (rev 407)
@@ -16,16 +16,21 @@
import org.codelutin.vcs.VCSEntry;
import org.codelutin.vcs.type.VCSState;
-import org.codelutin.vcs.ui.VCSUIConstants;
/** @author chemit */
public class SimpleVCSEntriesTableModelImpl extends AbstractVCSEntriesTableModel {
private static final long serialVersionUID = -6397327068709720165L;
- protected SimpleVCSEntriesTableModelImpl(String name) {
+ /** columns names for a simple table model with module, file and status */
+ public static final String[] SIMPLE_COLUMNS_NAMES = new String[]{
+ org.codelutin.i18n.I18n.n_("lutinvcs.module"),
+ org.codelutin.i18n.I18n.n_("lutinvcs.file"),
+ org.codelutin.i18n.I18n.n_("lutinvcs.status")
+ };
- super(name, VCSUIConstants.SIMPLE_COLUMNS_NAMES);
+ public SimpleVCSEntriesTableModelImpl(String name) {
+ super(name, SIMPLE_COLUMNS_NAMES);
}
public Object getValueAt(int rowIndex, int columnIndex) {
Modified: trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/model/SynchUIModel.java
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/model/SynchUIModel.java 2008-04-06 13:54:13 UTC (rev 406)
+++ trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/model/SynchUIModel.java 2008-04-06 15:16:51 UTC (rev 407)
@@ -14,8 +14,6 @@
*/
package org.codelutin.vcs.ui.model;
-import org.codelutin.vcs.type.VCSAction;
-
/**
* Model of a repository
*
@@ -23,10 +21,5 @@
*/
public class SynchUIModel extends AbstractTabUIModel {
- public void doAllAction(VCSAction action) {
- setAction(action);
- firePropertyChange(action.name().toLowerCase() + "All", null, model);
- }
-
}
1
0
r406 - in trunk/lutinvcs: lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui
by tchemitï¼ users.labs.libre-entreprise.org 06 Apr '08
by tchemitï¼ users.labs.libre-entreprise.org 06 Apr '08
06 Apr '08
Author: tchemit
Date: 2008-04-06 13:54:13 +0000 (Sun, 06 Apr 2008)
New Revision: 406
Modified:
trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JConfirmUI.jaxx
trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JDiffUI.jaxx
trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JSynchUI.jaxx
trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/AbstractConfirmUI.java
trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/AbstractDiffUI.java
trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/AbstractSynchUI.java
Log:
model is instanciate in AbstractXXXUI
Modified: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JConfirmUI.jaxx
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JConfirmUI.jaxx 2008-04-06 13:47:28 UTC (rev 405)
+++ trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JConfirmUI.jaxx 2008-04-06 13:54:13 UTC (rev 406)
@@ -5,16 +5,8 @@
import org.codelutin.vcs.type.VCSAction;
public JConfirmUI(org.codelutin.vcs.ui.handler.AbstractConfirmUIHandler handler) {
- super(handler,new org.codelutin.vcs.ui.model.ConfirmUIModel());
- Action acceptAction = new AbstractAction("accept") {
- private static final long serialVersionUID = 1L;
-
- public void actionPerformed(ActionEvent e) {
- getHandler().doAction(getCommitMessage().getText(), getModel().getModel());
+ super(handler);
}
- };
- getAccept().setAction((acceptAction));
- }
</script>
<Table>
@@ -62,7 +54,7 @@
</row>
<row>
<cell fill='both'>
- <JButton id='accept' text='lutinvcs.accept'/>
+ <JButton id='accept' text='lutinvcs.accept' onActionPerformed='doAccept()'/>
</cell>
</row>
</Table>
Modified: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JDiffUI.jaxx
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JDiffUI.jaxx 2008-04-06 13:47:28 UTC (rev 405)
+++ trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JDiffUI.jaxx 2008-04-06 13:54:13 UTC (rev 406)
@@ -5,7 +5,7 @@
import org.codelutin.vcs.type.VCSEntryLocation;
public JDiffUI(org.codelutin.vcs.ui.handler.AbstractDiffUIHandler handler) {
- super(handler,new org.codelutin.vcs.ui.model.DiffUIModel());
+ super(handler);
}
</script>
Modified: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JSynchUI.jaxx
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JSynchUI.jaxx 2008-04-06 13:47:28 UTC (rev 405)
+++ trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JSynchUI.jaxx 2008-04-06 13:54:13 UTC (rev 406)
@@ -6,9 +6,9 @@
import org.codelutin.vcs.type.VCSEntryLocation;
public JSynchUI(org.codelutin.vcs.ui.handler.AbstractSynchUIHandler handler) {
- super(handler,new org.codelutin.vcs.ui.model.SynchUIModel());
+ super(handler);
}
- add(table);
+ //add(table);
</script>
<java.awt.CardLayout id='cardLayout'/>
Modified: trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/AbstractConfirmUI.java
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/AbstractConfirmUI.java 2008-04-06 13:47:28 UTC (rev 405)
+++ trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/AbstractConfirmUI.java 2008-04-06 13:54:13 UTC (rev 406)
@@ -53,8 +53,8 @@
public AbstractConfirmUI() {
}
- public AbstractConfirmUI(AbstractUIHandler handler, AbstractUIModel model) {
- super(handler, model);
+ public AbstractConfirmUI(AbstractConfirmUIHandler handler) {
+ super(handler, new ConfirmUIModel());
}
@Override
@@ -67,6 +67,10 @@
return (ConfirmUIModel) super.getModel();
}
+ public void doAccept() {
+ getHandler().doAction(getCommitMessage().getText(), getModel().getModel());
+ }
+
protected void showLastMessages() {
}
Modified: trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/AbstractDiffUI.java
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/AbstractDiffUI.java 2008-04-06 13:47:28 UTC (rev 405)
+++ trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/AbstractDiffUI.java 2008-04-06 13:54:13 UTC (rev 406)
@@ -17,7 +17,6 @@
import org.codelutin.vcs.type.VCSAction;
import org.codelutin.vcs.ui.handler.AbstractDiffUIHandler;
import org.codelutin.vcs.ui.handler.AbstractTabUIHandler;
-import org.codelutin.vcs.ui.model.AbstractTabUIModel;
import org.codelutin.vcs.ui.model.DiffUIModel;
import javax.swing.JButton;
@@ -34,8 +33,8 @@
super();
}
- public AbstractDiffUI(AbstractTabUIHandler handler, AbstractTabUIModel model) {
- super(handler, model);
+ public AbstractDiffUI(AbstractTabUIHandler handler) {
+ super(handler, new DiffUIModel());
}
public DiffUIModel getModel() {
Modified: trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/AbstractSynchUI.java
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/AbstractSynchUI.java 2008-04-06 13:47:28 UTC (rev 405)
+++ trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/AbstractSynchUI.java 2008-04-06 13:54:13 UTC (rev 406)
@@ -48,8 +48,8 @@
super();
}
- public AbstractSynchUI(AbstractSynchUIHandler handler, SynchUIModel model) {
- super(handler, model);
+ public AbstractSynchUI(AbstractSynchUIHandler handler) {
+ super(handler, new SynchUIModel());
}
public SynchUIModel getModel() {
1
0
r405 - in trunk/lutinvcs: lutinvcs-ui/src/main/java/org/codelutin/vcs/ui lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui
by tchemitï¼ users.labs.libre-entreprise.org 06 Apr '08
by tchemitï¼ users.labs.libre-entreprise.org 06 Apr '08
06 Apr '08
Author: tchemit
Date: 2008-04-06 13:47:28 +0000 (Sun, 06 Apr 2008)
New Revision: 405
Added:
trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/AbstractConfirmUI.java
Modified:
trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JConfirmUI.jaxx
trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JDiffUI.jaxx
trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JSynchUI.jaxx
trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JVCSPopup.jaxx
trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/AbstractVCSPopup.java
trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/VCSInitializer.java
trunk/lutinvcs/lutinvcs-ui/src/main/java/org/codelutin/vcs/ui/ConfirmUIHandler.java
trunk/lutinvcs/lutinvcs-ui/src/main/java/org/codelutin/vcs/ui/SynchUIHandler.java
trunk/lutinvcs/lutinvcs-ui/src/main/java/org/codelutin/vcs/ui/VCSPopupAction.java
trunk/lutinvcs/lutinvcs-ui/src/main/java/org/codelutin/vcs/ui/VCSUIFactory.java
Log:
new module : ui-pre-jaxx
Modified: trunk/lutinvcs/lutinvcs-ui/src/main/java/org/codelutin/vcs/ui/ConfirmUIHandler.java
===================================================================
--- trunk/lutinvcs/lutinvcs-ui/src/main/java/org/codelutin/vcs/ui/ConfirmUIHandler.java 2008-04-06 13:19:28 UTC (rev 404)
+++ trunk/lutinvcs/lutinvcs-ui/src/main/java/org/codelutin/vcs/ui/ConfirmUIHandler.java 2008-04-06 13:47:28 UTC (rev 405)
@@ -23,7 +23,7 @@
/** @author chemit */
public class ConfirmUIHandler extends AbstractConfirmUIHandler {
- protected final JConfirmUI ui;
+ protected final AbstractConfirmUI ui;
public ConfirmUIHandler() {
this.ui = new JConfirmUI(this);
@@ -33,7 +33,7 @@
return ui.getModel();
}
- public JConfirmUI getUi() {
+ public AbstractConfirmUI getUi() {
return ui;
}
Modified: trunk/lutinvcs/lutinvcs-ui/src/main/java/org/codelutin/vcs/ui/SynchUIHandler.java
===================================================================
--- trunk/lutinvcs/lutinvcs-ui/src/main/java/org/codelutin/vcs/ui/SynchUIHandler.java 2008-04-06 13:19:28 UTC (rev 404)
+++ trunk/lutinvcs/lutinvcs-ui/src/main/java/org/codelutin/vcs/ui/SynchUIHandler.java 2008-04-06 13:47:28 UTC (rev 405)
@@ -51,7 +51,7 @@
return;
}
log.info("files to treate :" + entries.size());
- JConfirmUI confirmUI = VCSUIFactory.newConfirmUI();
+ AbstractConfirmUI confirmUI = VCSUIFactory.newConfirmUI();
confirmUI.getModel().init(action, model.getLocation(), entries.toArray(new VCSEntry[entries.size()]));
Modified: trunk/lutinvcs/lutinvcs-ui/src/main/java/org/codelutin/vcs/ui/VCSPopupAction.java
===================================================================
--- trunk/lutinvcs/lutinvcs-ui/src/main/java/org/codelutin/vcs/ui/VCSPopupAction.java 2008-04-06 13:19:28 UTC (rev 404)
+++ trunk/lutinvcs/lutinvcs-ui/src/main/java/org/codelutin/vcs/ui/VCSPopupAction.java 2008-04-06 13:47:28 UTC (rev 405)
@@ -61,7 +61,7 @@
} else {
// show confirm action ui
- JConfirmUI confirmUI = VCSUIFactory.newConfirmUI();
+ AbstractConfirmUI confirmUI = VCSUIFactory.newConfirmUI();
confirmUI.getModel().init(action, tableModel.getLocation(), entries.toArray(new VCSEntry[entries.size()]));
confirmUI.getHandler().getSelectionModel().setSelectionInterval(0, entries.size() - 1);
confirmUI.setVisible(true);
Modified: trunk/lutinvcs/lutinvcs-ui/src/main/java/org/codelutin/vcs/ui/VCSUIFactory.java
===================================================================
--- trunk/lutinvcs/lutinvcs-ui/src/main/java/org/codelutin/vcs/ui/VCSUIFactory.java 2008-04-06 13:19:28 UTC (rev 404)
+++ trunk/lutinvcs/lutinvcs-ui/src/main/java/org/codelutin/vcs/ui/VCSUIFactory.java 2008-04-06 13:47:28 UTC (rev 405)
@@ -30,7 +30,7 @@
protected static AbstractTabUI synchUI;
protected static AbstractDiffUI diffUI;
- protected static JConfirmUI confirmUI;
+ protected static AbstractConfirmUI confirmUI;
public static AbstractSynchUI newSynchUI() {
SynchUIHandler result = newHandler(SynchUIHandler.class);
@@ -42,7 +42,7 @@
return result.getUi();
}
- public static JConfirmUI newConfirmUI() {
+ public static AbstractConfirmUI newConfirmUI() {
ConfirmUIHandler result = newHandler(ConfirmUIHandler.class);
return result.getUi();
}
Modified: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JConfirmUI.jaxx
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JConfirmUI.jaxx 2008-04-06 13:19:28 UTC (rev 404)
+++ trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JConfirmUI.jaxx 2008-04-06 13:47:28 UTC (rev 405)
@@ -1,37 +1,21 @@
-<org.codelutin.vcs.ui.AbstractUI title='lutinvcs.confirm.title' defaultCloseOperation='DISPOSE_ON_CLOSE' modal='true'
- resizable='false' height='300' width='400'>
+<AbstractConfirmUI title='lutinvcs.confirm.title' defaultCloseOperation='DISPOSE_ON_CLOSE' modal='true'
+ resizable='false' height='300' width='400'>
<style source="common.css"/>
<script>
import org.codelutin.vcs.type.VCSAction;
- import org.codelutin.vcs.ui.handler.AbstractConfirmUIHandler;
- import org.codelutin.vcs.ui.model.ConfirmUIModel ;
- public JConfirmUI(AbstractConfirmUIHandler handler) {
-
- super(handler,new ConfirmUIModel());
-
- Action acceptAction= new AbstractAction("accept") {
+ public JConfirmUI(org.codelutin.vcs.ui.handler.AbstractConfirmUIHandler handler) {
+ super(handler,new org.codelutin.vcs.ui.model.ConfirmUIModel());
+ Action acceptAction = new AbstractAction("accept") {
private static final long serialVersionUID = 1L;
+
public void actionPerformed(ActionEvent e) {
- getHandler().doAction(getCommitMessage().getText(),getModel().getModel());
+ getHandler().doAction(getCommitMessage().getText(), getModel().getModel());
}
};
- accept.setAction((acceptAction));
+ getAccept().setAction((acceptAction));
}
- @Override
- protected AbstractConfirmUIHandler getHandler() {
- return (AbstractConfirmUIHandler) super.getHandler();
- }
-
- @Override
- public ConfirmUIModel getModel() {
- return (ConfirmUIModel) super.getModel();
- }
-
- protected void showLastMessages() {
-
- }
</script>
<Table>
<row fill='both'>
@@ -82,5 +66,5 @@
</cell>
</row>
</Table>
-</org.codelutin.vcs.ui.AbstractUI>
+</AbstractConfirmUI>
\ No newline at end of file
Modified: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JDiffUI.jaxx
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JDiffUI.jaxx 2008-04-06 13:19:28 UTC (rev 404)
+++ trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JDiffUI.jaxx 2008-04-06 13:47:28 UTC (rev 405)
@@ -1,4 +1,4 @@
-<org.codelutin.vcs.ui.AbstractDiffUI title='lutinvcs.diff.title' id='diffui' defaultCloseOperation='DISPOSE_ON_CLOSE'>
+<AbstractDiffUI title='lutinvcs.diff.title' id='diffui' defaultCloseOperation='DISPOSE_ON_CLOSE'>
<style source="common.css"/>
<script>
import org.codelutin.vcs.type.VCSAction;
@@ -76,4 +76,4 @@
</cell>
</row>
</Table>
-</org.codelutin.vcs.ui.AbstractDiffUI>
+</AbstractDiffUI>
Modified: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JSynchUI.jaxx
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JSynchUI.jaxx 2008-04-06 13:19:28 UTC (rev 404)
+++ trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JSynchUI.jaxx 2008-04-06 13:47:28 UTC (rev 405)
@@ -1,5 +1,5 @@
-<org.codelutin.vcs.ui.AbstractSynchUI title='lutinvcs.synch.title' modal="true" id='synchui'
- defaultCloseOperation='DISPOSE_ON_CLOSE'>
+<AbstractSynchUI title='lutinvcs.synch.title' modal="true" id='synchui'
+ defaultCloseOperation='DISPOSE_ON_CLOSE'>
<style source="common.css"/>
<script>
import org.codelutin.vcs.type.VCSAction;
@@ -13,14 +13,15 @@
<java.awt.CardLayout id='cardLayout'/>
- <!--JPopupMenu enabled='false'/-->
- <org.codelutin.vcs.ui.JVCSPopup id="allPopup"/>
- <org.codelutin.vcs.ui.JVCSPopup id="localPopup"/>
- <org.codelutin.vcs.ui.JVCSPopup id="remotePopup"/>
+
<Table id='table'>
<row fill='both'>
<cell fill='both' weightx='1'>
<JToolBar>
+ <!--JPopupMenu enabled='false'/-->
+ <org.codelutin.vcs.ui.JVCSPopup id="allPopup"/>
+ <org.codelutin.vcs.ui.JVCSPopup id="localPopup"/>
+ <org.codelutin.vcs.ui.JVCSPopup id="remotePopup"/>
<JToggleButton id='allTab' buttonGroup='tabs' text='lutinvcs.tabs.all' mnemonic="A"
toolTipText="lutinvcs.tabs.tooltip.all"
onActionPerformed='setLocation(VCSEntryLocation.ALL)'/>
@@ -72,4 +73,4 @@
</cell>
</row>
</Table>
-</org.codelutin.vcs.ui.AbstractSynchUI>
\ No newline at end of file
+</AbstractSynchUI>
\ No newline at end of file
Modified: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JVCSPopup.jaxx
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JVCSPopup.jaxx 2008-04-06 13:19:28 UTC (rev 404)
+++ trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JVCSPopup.jaxx 2008-04-06 13:47:28 UTC (rev 405)
@@ -1,25 +1,13 @@
-<org.codelutin.vcs.ui.AbstractVCSPopup>
+<AbstractVCSPopup>
<script>
import org.codelutin.vcs.type.VCSAction;
- import org.codelutin.vcs.ui.handler.VCSAbsractAction;
- protected VCSAbsractAction dispatchAction;
-
- protected void setDispatchAction(VCSAbsractAction action) {
- this.dispatchAction=action;
- }
-
- protected void doAction(VCSAction action,JMenuItem item) {
- dispatchAction.setAction(action);
- ActionEvent e = new ActionEvent( item,1,action.name());
- dispatchAction.actionPerformed(e);
- }
- /*add(refresh);
+ add(refresh);
add(diff);
add(update);
add(commit);
add(revert);
- add(delete);*/
+ add(delete);
</script>
<JMenuItem id='refresh' text='{_("lutinvcs.action.refresh")}' toolTipText='{_("lutinvcs.action.tooltip.refresh")}'
icon='{createImageIcon("autoRefresh.png")}' onActionPerformed='doAction(VCSAction.REFRESH,refresh)'/>
@@ -33,4 +21,4 @@
icon='{createImageIcon("rollback.png")}' onActionPerformed='doAction(VCSAction.REVERT,revert)'/>
<JMenuItem id='delete' text='{_("lutinvcs.action.delete")}' toolTipText='{_("lutinvcs.action.tooltip.delete")}'
icon='{createImageIcon("remove.png")}' onActionPerformed='doAction(VCSAction.DELETE,delete)'/>
-</org.codelutin.vcs.ui.AbstractVCSPopup>
\ No newline at end of file
+</AbstractVCSPopup>
\ No newline at end of file
Added: trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/AbstractConfirmUI.java
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/AbstractConfirmUI.java (rev 0)
+++ trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/AbstractConfirmUI.java 2008-04-06 13:47:28 UTC (rev 405)
@@ -0,0 +1,73 @@
+/**
+ * # #% Copyright (C) 2008 Code Lutin, Tony Chemit
+ * This program is free software; you
+ * can redistribute it and/or modify it under the terms of the GNU General
+ * Public License as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version. This program is
+ * distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU General Public License for more details. You
+ * should have received a copy of the GNU General Public License along with this
+ * program; if not, write to the Free Software Foundation, Inc., 59 Temple Place
+ * - Suite 330, Boston, MA 02111-1307, USA.
+ * # #%
+ */
+package org.codelutin.vcs.ui;
+
+import jaxx.runtime.swing.Table;
+import org.codelutin.vcs.ui.handler.AbstractConfirmUIHandler;
+import org.codelutin.vcs.ui.handler.AbstractUIHandler;
+import org.codelutin.vcs.ui.model.AbstractUIModel;
+import org.codelutin.vcs.ui.model.ConfirmUIModel;
+
+import javax.swing.JButton;
+import javax.swing.JLabel;
+import javax.swing.JScrollPane;
+import javax.swing.JTable;
+import javax.swing.JTextArea;
+import javax.swing.JToolBar;
+
+/** @author chemit */
+public abstract class AbstractConfirmUI extends AbstractUI {
+
+ public abstract JLabel getActionLabel();
+
+ public abstract Table getToolbar();
+
+ public abstract JToolBar getTool();
+
+ public abstract JLabel getActionCommitLabel();
+
+ public abstract JButton getLastMessages();
+
+ public abstract JScrollPane getCommitScroll();
+
+ public abstract JTextArea getCommitMessage();
+
+ public abstract JScrollPane getContent();
+
+ public abstract JTable getContentTable();
+
+ public abstract JButton getAccept();
+
+ public AbstractConfirmUI() {
+ }
+
+ public AbstractConfirmUI(AbstractUIHandler handler, AbstractUIModel model) {
+ super(handler, model);
+ }
+
+ @Override
+ protected AbstractConfirmUIHandler getHandler() {
+ return (AbstractConfirmUIHandler) super.getHandler();
+ }
+
+ @Override
+ public ConfirmUIModel getModel() {
+ return (ConfirmUIModel) super.getModel();
+ }
+
+ protected void showLastMessages() {
+
+ }
+}
Modified: trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/AbstractVCSPopup.java
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/AbstractVCSPopup.java 2008-04-06 13:19:28 UTC (rev 404)
+++ trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/AbstractVCSPopup.java 2008-04-06 13:47:28 UTC (rev 405)
@@ -22,6 +22,7 @@
/** @author chemit */
public abstract class AbstractVCSPopup extends javax.swing.JPopupMenu {/* begin raw body code */
+
protected VCSAbsractAction dispatchAction;
public abstract JMenuItem getRefresh();
Modified: trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/VCSInitializer.java
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/VCSInitializer.java 2008-04-06 13:19:28 UTC (rev 404)
+++ trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/VCSInitializer.java 2008-04-06 13:47:28 UTC (rev 405)
@@ -19,27 +19,21 @@
import jaxx.tags.swing.JPopupMenuHandler;
import jaxx.tags.swing.JWindowHandler;
-import java.beans.Introspector;
-
public class VCSInitializer implements jaxx.spi.Initializer {
public void initialize() {
- String[] searchPath = Introspector.getBeanInfoSearchPath();
- String[] newSearchPath = new String[searchPath.length + 1];
- System.arraycopy(searchPath, 0, newSearchPath, 0, searchPath.length);
- newSearchPath[newSearchPath.length - 1] = "jaxx.beaninfos";
- Introspector.setBeanInfoSearchPath(newSearchPath);
-
- //TagManager.registerTag("org.codelutin.vcs.ui.*", "JVCSPopup", new jaxx.tags.DefaultObjectHandler(ClassDescriptorLoader.getClassDescriptor(JPopupMenuHandler.class)));
-
+ //TagManager.registerBean(ClassDescriptorLoader.getClassDescriptor(AbstractUI.class), JWindowHandler.class);
TagManager.registerBean(ClassDescriptorLoader.getClassDescriptor(AbstractVCSPopup.class), JPopupMenuHandler.class);
+ TagManager.registerBean(ClassDescriptorLoader.getClassDescriptor(AbstractConfirmUI.class), JWindowHandler.class);
+ TagManager.registerBean(ClassDescriptorLoader.getClassDescriptor(AbstractDiffUI.class), JWindowHandler.class);
TagManager.registerBean(ClassDescriptorLoader.getClassDescriptor(AbstractSynchUI.class), JWindowHandler.class);
- //TagManager.registerBean(ClassDescriptorLoader.getClassDescriptor(AbstractUI.class), JDialog.class);
+ TagManager.registerDefaultNamespace("AbstractConfirmUI", "org.codelutin.vcs.ui.*");
+ TagManager.registerDefaultNamespace("AbstractSynchUI", "org.codelutin.vcs.ui.*");
+ TagManager.registerDefaultNamespace("AbstractDiffUI", "org.codelutin.vcs.ui.*");
+ TagManager.registerDefaultNamespace("AbstractVCSPopup", "org.codelutin.vcs.ui.*");
- //TagManager.registerDefaultNamespace("AbstractUI", "javax.swing.*");
-
}
}
\ No newline at end of file
1
0
r404 - trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/resources/i18n
by tchemitï¼ users.labs.libre-entreprise.org 06 Apr '08
by tchemitï¼ users.labs.libre-entreprise.org 06 Apr '08
06 Apr '08
Author: tchemit
Date: 2008-04-06 13:19:28 +0000 (Sun, 06 Apr 2008)
New Revision: 404
Removed:
trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/resources/i18n/lutinvcs-ui-pref-jaxx-en_GB.properties
Log:
new module : ui-pre-jaxx
Deleted: trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/resources/i18n/lutinvcs-ui-pref-jaxx-en_GB.properties
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/resources/i18n/lutinvcs-ui-pref-jaxx-en_GB.properties 2008-04-06 13:18:58 UTC (rev 403)
+++ trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/resources/i18n/lutinvcs-ui-pref-jaxx-en_GB.properties 2008-04-06 13:19:28 UTC (rev 404)
@@ -1,4 +0,0 @@
-lutinvcs.error.thread.action=
-lutinvcs.file=File
-lutinvcs.module=Module
-lutinvcs.status=Status
1
0
r403 - in trunk/lutinvcs: lutinvcs-core/src/main/resources/i18n lutinvcs-ui-jaxx lutinvcs-ui-pre-jaxx lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui lutinvcs-ui-pre-jaxx/src/main/resources/i18n
by tchemitï¼ users.labs.libre-entreprise.org 06 Apr '08
by tchemitï¼ users.labs.libre-entreprise.org 06 Apr '08
06 Apr '08
Author: tchemit
Date: 2008-04-06 13:18:58 +0000 (Sun, 06 Apr 2008)
New Revision: 403
Added:
trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/resources/i18n/lutinvcs-ui-pre-jaxx-en_GB.properties
Modified:
trunk/lutinvcs/lutinvcs-core/src/main/resources/i18n/lutinvcs-core-en_GB.properties
trunk/lutinvcs/lutinvcs-core/src/main/resources/i18n/lutinvcs-core-fr_FR.properties
trunk/lutinvcs/lutinvcs-ui-jaxx/pom.xml
trunk/lutinvcs/lutinvcs-ui-pre-jaxx/
trunk/lutinvcs/lutinvcs-ui-pre-jaxx/pom.xml
trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/VCSInitializer.java
trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/resources/i18n/lutinvcs-ui-pre-jaxx-fr_FR.properties
Log:
new module : ui-pre-jaxx
Modified: trunk/lutinvcs/lutinvcs-core/src/main/resources/i18n/lutinvcs-core-en_GB.properties
===================================================================
--- trunk/lutinvcs/lutinvcs-core/src/main/resources/i18n/lutinvcs-core-en_GB.properties 2008-04-06 13:08:15 UTC (rev 402)
+++ trunk/lutinvcs/lutinvcs-core/src/main/resources/i18n/lutinvcs-core-en_GB.properties 2008-04-06 13:18:58 UTC (rev 403)
@@ -1,4 +1 @@
lutinvcs.error.thread.action=
-lutinvcs.file=File
-lutinvcs.module=Module
-lutinvcs.status=Status
Modified: trunk/lutinvcs/lutinvcs-core/src/main/resources/i18n/lutinvcs-core-fr_FR.properties
===================================================================
--- trunk/lutinvcs/lutinvcs-core/src/main/resources/i18n/lutinvcs-core-fr_FR.properties 2008-04-06 13:08:15 UTC (rev 402)
+++ trunk/lutinvcs/lutinvcs-core/src/main/resources/i18n/lutinvcs-core-fr_FR.properties 2008-04-06 13:18:58 UTC (rev 403)
@@ -1,4 +1 @@
lutinvcs.error.thread.action=
-lutinvcs.file=Fichier
-lutinvcs.module=Module
-lutinvcs.status=Status
Modified: trunk/lutinvcs/lutinvcs-ui-jaxx/pom.xml
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-jaxx/pom.xml 2008-04-06 13:08:15 UTC (rev 402)
+++ trunk/lutinvcs/lutinvcs-ui-jaxx/pom.xml 2008-04-06 13:18:58 UTC (rev 403)
@@ -60,7 +60,7 @@
</dependency-->
<dependency>
<groupId>lutinlib.vcs</groupId>
- <artifactId>lutinvcs-core</artifactId>
+ <artifactId>lutinvcs-ui-pre-jaxx</artifactId>
<scope>compile</scope>
<version>${current.version}</version>
</dependency>
Property changes on: trunk/lutinvcs/lutinvcs-ui-pre-jaxx
___________________________________________________________________
Name: svn:ignore
+ target
Modified: trunk/lutinvcs/lutinvcs-ui-pre-jaxx/pom.xml
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-pre-jaxx/pom.xml 2008-04-06 13:08:15 UTC (rev 402)
+++ trunk/lutinvcs/lutinvcs-ui-pre-jaxx/pom.xml 2008-04-06 13:18:58 UTC (rev 403)
@@ -39,7 +39,7 @@
<dependencies>
<dependency>
<groupId>lutinlib.vcs</groupId>
- <artifactId>lutinvcs-api</artifactId>
+ <artifactId>lutinvcs-core</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
Modified: trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/VCSInitializer.java
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/VCSInitializer.java 2008-04-06 13:08:15 UTC (rev 402)
+++ trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/VCSInitializer.java 2008-04-06 13:18:58 UTC (rev 403)
@@ -31,11 +31,12 @@
Introspector.setBeanInfoSearchPath(newSearchPath);
- TagManager.registerTag("org.codelutin.vcs.ui.*", "JVCSPopup", new DefaultObjectHandler(ClassDescriptorLoader.getClassDescriptor(JPopupMenuHandler.class)));
+ //TagManager.registerTag("org.codelutin.vcs.ui.*", "JVCSPopup", new jaxx.tags.DefaultObjectHandler(ClassDescriptorLoader.getClassDescriptor(JPopupMenuHandler.class)));
- TagManager.registerBean(ClassDescriptorLoader.getClassDescriptor(AbstractSynchUI.class), JWindowHandler.class);
TagManager.registerBean(ClassDescriptorLoader.getClassDescriptor(AbstractVCSPopup.class), JPopupMenuHandler.class);
+ TagManager.registerBean(ClassDescriptorLoader.getClassDescriptor(AbstractSynchUI.class), JWindowHandler.class);
+
//TagManager.registerBean(ClassDescriptorLoader.getClassDescriptor(AbstractUI.class), JDialog.class);
//TagManager.registerDefaultNamespace("AbstractUI", "javax.swing.*");
Added: trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/resources/i18n/lutinvcs-ui-pre-jaxx-en_GB.properties
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/resources/i18n/lutinvcs-ui-pre-jaxx-en_GB.properties (rev 0)
+++ trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/resources/i18n/lutinvcs-ui-pre-jaxx-en_GB.properties 2008-04-06 13:18:58 UTC (rev 403)
@@ -0,0 +1,3 @@
+lutinvcs.file=File
+lutinvcs.module=Module
+lutinvcs.status=Status
Modified: trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/resources/i18n/lutinvcs-ui-pre-jaxx-fr_FR.properties
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/resources/i18n/lutinvcs-ui-pre-jaxx-fr_FR.properties 2008-04-06 13:08:15 UTC (rev 402)
+++ trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/resources/i18n/lutinvcs-ui-pre-jaxx-fr_FR.properties 2008-04-06 13:18:58 UTC (rev 403)
@@ -1,4 +1,3 @@
-lutinvcs.error.thread.action=
lutinvcs.file=Fichier
lutinvcs.module=Module
lutinvcs.status=Status
1
0
r402 - trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs
by tchemitï¼ users.labs.libre-entreprise.org 06 Apr '08
by tchemitï¼ users.labs.libre-entreprise.org 06 Apr '08
06 Apr '08
Author: tchemit
Date: 2008-04-06 13:08:15 +0000 (Sun, 06 Apr 2008)
New Revision: 402
Removed:
trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/
Log:
new module : ui-pre-jaxx
1
0
r401 - in trunk/lutinvcs: lutinvcs-core/src/main/java/org/codelutin/vcs/ui lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui
by tchemitï¼ users.labs.libre-entreprise.org 06 Apr '08
by tchemitï¼ users.labs.libre-entreprise.org 06 Apr '08
06 Apr '08
Author: tchemit
Date: 2008-04-06 13:07:44 +0000 (Sun, 06 Apr 2008)
New Revision: 401
Added:
trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/package.html
Removed:
trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/package.html
Log:
new module : ui-pre-jaxx
Deleted: trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/package.html
===================================================================
--- trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/package.html 2008-04-06 13:07:15 UTC (rev 400)
+++ trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/package.html 2008-04-06 13:07:44 UTC (rev 401)
@@ -1,6 +0,0 @@
-<html>
-<body>
-<h1>Lutin vcs ui package</h1>
-TODO
-</body>
-</html>
\ No newline at end of file
Copied: trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/package.html (from rev 398, trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/package.html)
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/package.html (rev 0)
+++ trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/package.html 2008-04-06 13:07:44 UTC (rev 401)
@@ -0,0 +1,6 @@
+<html>
+<body>
+<h1>Lutin vcs ui package</h1>
+TODO
+</body>
+</html>
\ No newline at end of file
1
0
r400 - in trunk/lutinvcs: lutinvcs-core/src/main/java/org/codelutin/vcs/ui lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui
by tchemitï¼ users.labs.libre-entreprise.org 06 Apr '08
by tchemitï¼ users.labs.libre-entreprise.org 06 Apr '08
06 Apr '08
Author: tchemit
Date: 2008-04-06 13:07:15 +0000 (Sun, 06 Apr 2008)
New Revision: 400
Added:
trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/AbstractDiffUI.java
trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/AbstractSynchUI.java
trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/AbstractTabUI.java
trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/AbstractUI.java
trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/AbstractVCSPopup.java
trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/UIHelper.java
trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/VCSInitializer.java
trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/VCSUIConstants.java
Removed:
trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/AbstractDiffUI.java
trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/AbstractSynchUI.java
trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/AbstractTabUI.java
trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/AbstractUI.java
trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/AbstractVCSPopup.java
trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/UIHelper.java
trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/VCSInitializer.java
trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/VCSUIConstants.java
Log:
new module : ui-pre-jaxx
Deleted: trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/AbstractDiffUI.java
===================================================================
--- trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/AbstractDiffUI.java 2008-04-06 13:06:51 UTC (rev 399)
+++ trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/AbstractDiffUI.java 2008-04-06 13:07:15 UTC (rev 400)
@@ -1,64 +0,0 @@
-/**
- * # #% Copyright (C) 2008 Code Lutin, Tony Chemit
- * This program is free software; you
- * can redistribute it and/or modify it under the terms of the GNU General
- * Public License as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version. This program is
- * distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
- * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- * PARTICULAR PURPOSE. See the GNU General Public License for more details. You
- * should have received a copy of the GNU General Public License along with this
- * program; if not, write to the Free Software Foundation, Inc., 59 Temple Place
- * - Suite 330, Boston, MA 02111-1307, USA.
- * # #%
- */
-package org.codelutin.vcs.ui;
-
-import org.codelutin.vcs.type.VCSAction;
-import org.codelutin.vcs.ui.handler.AbstractDiffUIHandler;
-import org.codelutin.vcs.ui.handler.AbstractTabUIHandler;
-import org.codelutin.vcs.ui.model.AbstractTabUIModel;
-import org.codelutin.vcs.ui.model.DiffUIModel;
-
-import javax.swing.JButton;
-import javax.swing.JTable;
-
-/** @author chemit */
-public abstract class AbstractDiffUI extends AbstractTabUI {
-
- public abstract JButton getNextDiff();
-
- public abstract JButton getPreviousDiff();
-
- public AbstractDiffUI() {
- super();
- }
-
- public AbstractDiffUI(AbstractTabUIHandler handler, AbstractTabUIModel model) {
- super(handler, model);
- }
-
- public DiffUIModel getModel() {
- return (DiffUIModel) model;
- }
-
- protected AbstractDiffUIHandler getHandler() {
- return (AbstractDiffUIHandler) handler;
- }
-
- protected void selectFile(JTable table) {
- getModel().setFileModel(model.getModel().getDisplayedEntries(table.getSelectionModel()).get(0));
- }
-
- protected void doAction(VCSAction action) {
- getHandler().doAction(action, getModel().getFileModel());
- }
-
- protected void gotoNextDiff() {
- getHandler().gotoNextDiff();
- }
-
- protected void gotoPreviousDiff() {
- getHandler().gotoPreviousDiff();
- }
-}
Deleted: trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/AbstractSynchUI.java
===================================================================
--- trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/AbstractSynchUI.java 2008-04-06 13:06:51 UTC (rev 399)
+++ trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/AbstractSynchUI.java 2008-04-06 13:07:15 UTC (rev 400)
@@ -1,80 +0,0 @@
-/**
- * # #% Copyright (C) 2008 Code Lutin, Tony Chemit
- * This program is free software; you
- * can redistribute it and/or modify it under the terms of the GNU General
- * Public License as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version. This program is
- * distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
- * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- * PARTICULAR PURPOSE. See the GNU General Public License for more details. You
- * should have received a copy of the GNU General Public License along with this
- * program; if not, write to the Free Software Foundation, Inc., 59 Temple Place
- * - Suite 330, Boston, MA 02111-1307, USA.
- * # #%
- */
-package org.codelutin.vcs.ui;
-
-import org.codelutin.vcs.type.VCSAction;
-import org.codelutin.vcs.type.VCSEntryLocation;
-import org.codelutin.vcs.ui.handler.AbstractSynchUIHandler;
-import org.codelutin.vcs.ui.model.SynchUIModel;
-
-import javax.swing.JButton;
-import java.awt.CardLayout;
-
-/** @author chemit */
-public abstract class AbstractSynchUI extends AbstractTabUI {
-
- public abstract JButton getRefreshAll();
-
- public abstract JButton getDiffAll();
-
- public abstract JButton getUpdateAll();
-
- public abstract JButton getCommitAll();
-
- public abstract JButton getRevertAll();
-
- public abstract JButton getDeleteAll();
-
- public abstract AbstractVCSPopup getAllPopup();
-
- public abstract AbstractVCSPopup getLocalPopup();
-
- public abstract AbstractVCSPopup getRemotePopup();
-
-
- public AbstractSynchUI() {
- super();
- }
-
- public AbstractSynchUI(AbstractSynchUIHandler handler, SynchUIModel model) {
- super(handler, model);
- }
-
- public SynchUIModel getModel() {
- return (SynchUIModel) model;
- }
-
- protected AbstractSynchUIHandler getHandler() {
- return (AbstractSynchUIHandler) handler;
- }
-
- protected void doAllAction(VCSAction action) {
- getModel().doAllAction(action);
- }
-
- public AbstractVCSPopup getPopup(VCSEntryLocation modelName) {
- switch (modelName) {
- case ALL:
- return getAllPopup();
- case LOCAL:
- return getLocalPopup();
- case REMOTE:
- return getRemotePopup();
- case UNKNOW:
- break;
- }
- throw new IllegalStateException("no popup found for " + modelName);
- }
-}
\ No newline at end of file
Deleted: trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/AbstractTabUI.java
===================================================================
--- trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/AbstractTabUI.java 2008-04-06 13:06:51 UTC (rev 399)
+++ trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/AbstractTabUI.java 2008-04-06 13:07:15 UTC (rev 400)
@@ -1,95 +0,0 @@
-/**
- * # #% Copyright (C) 2008 Code Lutin, Tony Chemit
- * This program is free software; you
- * can redistribute it and/or modify it under the terms of the GNU General
- * Public License as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version. This program is
- * distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
- * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- * PARTICULAR PURPOSE. See the GNU General Public License for more details. You
- * should have received a copy of the GNU General Public License along with this
- * program; if not, write to the Free Software Foundation, Inc., 59 Temple Place
- * - Suite 330, Boston, MA 02111-1307, USA.
- * # #%
- */
-package org.codelutin.vcs.ui;
-
-import org.codelutin.vcs.type.VCSEntryLocation;
-import org.codelutin.vcs.ui.handler.AbstractTabUIHandler;
-import org.codelutin.vcs.ui.model.AbstractTabUIModel;
-
-import javax.swing.JPanel;
-import javax.swing.JScrollPane;
-import javax.swing.JTable;
-import javax.swing.JToggleButton;
-import java.awt.CardLayout;
-
-/** @author chemit */
-public abstract class AbstractTabUI extends AbstractUI {
-
- public abstract JToggleButton getAllTab();
-
- public abstract JToggleButton getLocalTab();
-
- public abstract JToggleButton getRemoteTab();
-
- public abstract JScrollPane getAllContent();
-
- public abstract JScrollPane getLocalContent();
-
- public abstract JScrollPane getRemoteContent();
-
- public abstract JTable getAllTable();
-
- public abstract JTable getLocalTable();
-
- public abstract JTable getRemoteTable();
-
- public abstract JPanel getPreview();
-
- public abstract CardLayout getCardLayout();
-
- public AbstractTabUI(AbstractTabUIHandler handler, AbstractTabUIModel model) {
- super(handler, model);
- }
-
- public AbstractTabUI() {
- // for jaxx but never used
- super();
- }
-
- public AbstractTabUIModel getModel() {
- return (AbstractTabUIModel) model;
- }
-
- protected AbstractTabUIHandler getHandler() {
- return (AbstractTabUIHandler) handler;
- }
-
- @Override
- public void setVisible(boolean b) {
- if (handler.getLocation() == VCSEntryLocation.UNKNOW) {
- // first launch, no tab model selected,choose one
- getAllTab().doClick();
- }
- super.setVisible(b);
- }
-
- public JTable getTable(VCSEntryLocation modelName) {
- switch (modelName) {
- case ALL:
- return getAllTable();
- case LOCAL:
- return getLocalTable();
- case REMOTE:
- return getRemoteTable();
- case UNKNOW:
- break;
- }
- throw new IllegalStateException("no table found for " + modelName);
- }
-
- protected void setLocation(VCSEntryLocation location) {
- getModel().setLocation(location);
- }
-}
Deleted: trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/AbstractUI.java
===================================================================
--- trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/AbstractUI.java 2008-04-06 13:06:51 UTC (rev 399)
+++ trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/AbstractUI.java 2008-04-06 13:07:15 UTC (rev 400)
@@ -1,47 +0,0 @@
-/**
- * # #% Copyright (C) 2008 Code Lutin, Tony Chemit
- * This program is free software; you
- * can redistribute it and/or modify it under the terms of the GNU General
- * Public License as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version. This program is
- * distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
- * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- * PARTICULAR PURPOSE. See the GNU General Public License for more details. You
- * should have received a copy of the GNU General Public License along with this
- * program; if not, write to the Free Software Foundation, Inc., 59 Temple Place
- * - Suite 330, Boston, MA 02111-1307, USA.
- * # #%
- */
-package org.codelutin.vcs.ui;
-
-import org.codelutin.vcs.ui.handler.AbstractUIHandler;
-import org.codelutin.vcs.ui.model.AbstractUIModel;
-
-/** @author chemit */
-public class AbstractUI extends javax.swing.JDialog {
-
- protected final AbstractUIModel model;
-
- protected final AbstractUIHandler handler;
-
- public AbstractUI() {
- // Jaxx always generate the default constructor, so need it, but DO NOT USE IT!
- throw new IllegalStateException("the default constructor can NOT be used!");
- }
-
- public AbstractUI(AbstractUIHandler handler, AbstractUIModel model) {
- this.handler = handler;
- this.model = model;
- UIHelper.setQuitAction(this);
- }
-
- public AbstractUIModel getModel() {
- return model;
- }
-
- protected AbstractUIHandler getHandler() {
- return handler;
- }
-
-
-}
Deleted: trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/AbstractVCSPopup.java
===================================================================
--- trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/AbstractVCSPopup.java 2008-04-06 13:06:51 UTC (rev 399)
+++ trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/AbstractVCSPopup.java 2008-04-06 13:07:15 UTC (rev 400)
@@ -1,48 +0,0 @@
-/**
- * # #% Copyright (C) 2008 Code Lutin, Tony Chemit
- * This program is free software; you
- * can redistribute it and/or modify it under the terms of the GNU General
- * Public License as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version. This program is
- * distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
- * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- * PARTICULAR PURPOSE. See the GNU General Public License for more details. You
- * should have received a copy of the GNU General Public License along with this
- * program; if not, write to the Free Software Foundation, Inc., 59 Temple Place
- * - Suite 330, Boston, MA 02111-1307, USA.
- * # #%
- */
-package org.codelutin.vcs.ui;
-
-import org.codelutin.vcs.ui.handler.VCSAbsractAction;
-import org.codelutin.vcs.type.VCSAction;
-
-import javax.swing.JMenuItem;
-import java.awt.event.ActionEvent;
-
-/** @author chemit */
-public abstract class AbstractVCSPopup extends javax.swing.JPopupMenu {/* begin raw body code */
- protected VCSAbsractAction dispatchAction;
-
- public abstract JMenuItem getRefresh();
-
- public abstract JMenuItem getDiff();
-
- public abstract JMenuItem getUpdate();
-
- public abstract JMenuItem getCommit();
-
- public abstract JMenuItem getRevert();
-
- public abstract JMenuItem getDelete();
-
- protected void setDispatchAction(VCSAbsractAction action) {
- this.dispatchAction = action;
- }
-
- protected void doAction(VCSAction action, JMenuItem item) {
- dispatchAction.setAction(action);
- ActionEvent e = new ActionEvent(item, 1, action.name());
- dispatchAction.actionPerformed(e);
- }
-}
Deleted: trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/UIHelper.java
===================================================================
--- trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/UIHelper.java 2008-04-06 13:06:51 UTC (rev 399)
+++ trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/UIHelper.java 2008-04-06 13:07:15 UTC (rev 400)
@@ -1,45 +0,0 @@
-/**
- * # #% Copyright (C) 2008 Code Lutin, Tony Chemit
- * This program is free software; you
- * can redistribute it and/or modify it under the terms of the GNU General
- * Public License as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version. This program is
- * distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
- * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- * PARTICULAR PURPOSE. See the GNU General Public License for more details. You
- * should have received a copy of the GNU General Public License along with this
- * program; if not, write to the Free Software Foundation, Inc., 59 Temple Place
- * - Suite 330, Boston, MA 02111-1307, USA.
- * # #%
- */
-package org.codelutin.vcs.ui;
-
-import javax.swing.JDialog;
-import javax.swing.JRootPane;
-import javax.swing.Action;
-import javax.swing.AbstractAction;
-import javax.swing.JComponent;
-import javax.swing.KeyStroke;
-import java.awt.event.ActionEvent;
-
-/**
- * UI Helper methods
- *
- * @author chemit
- */
-public class UIHelper {
- public static void setQuitAction(final JDialog ui) {
- JRootPane rootPane = ui.getRootPane();
- //rootPane.setDefaultButton(accept);
-
- Action quitAction = new AbstractAction("quit") {
- private static final long serialVersionUID = -869095664995763057L;
-
- public void actionPerformed(ActionEvent e) {
- ui.dispose();
- }
- };
- rootPane.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke("ESCAPE"), "quit");
- rootPane.getActionMap().put("quit", quitAction);
- }
-}
Deleted: trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/VCSInitializer.java
===================================================================
--- trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/VCSInitializer.java 2008-04-06 13:06:51 UTC (rev 399)
+++ trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/VCSInitializer.java 2008-04-06 13:07:15 UTC (rev 400)
@@ -1,44 +0,0 @@
-/**
- * # #% Copyright (C) 2008 Code Lutin, Tony Chemit
- * This program is free software; you
- * can redistribute it and/or modify it under the terms of the GNU General
- * Public License as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version. This program is
- * distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
- * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- * PARTICULAR PURPOSE. See the GNU General Public License for more details. You
- * should have received a copy of the GNU General Public License along with this
- * program; if not, write to the Free Software Foundation, Inc., 59 Temple Place
- * - Suite 330, Boston, MA 02111-1307, USA.
- * # #%
- */
-package org.codelutin.vcs.ui;
-
-import jaxx.reflect.ClassDescriptorLoader;
-import jaxx.tags.TagManager;
-import jaxx.tags.swing.JPopupMenuHandler;
-import jaxx.tags.swing.JWindowHandler;
-
-import java.beans.Introspector;
-
-public class VCSInitializer implements jaxx.spi.Initializer {
-
- public void initialize() {
- String[] searchPath = Introspector.getBeanInfoSearchPath();
- String[] newSearchPath = new String[searchPath.length + 1];
- System.arraycopy(searchPath, 0, newSearchPath, 0, searchPath.length);
- newSearchPath[newSearchPath.length - 1] = "jaxx.beaninfos";
-
- Introspector.setBeanInfoSearchPath(newSearchPath);
-
- TagManager.registerTag("org.codelutin.vcs.ui.*", "JVCSPopup", new DefaultObjectHandler(ClassDescriptorLoader.getClassDescriptor(JPopupMenuHandler.class)));
-
- TagManager.registerBean(ClassDescriptorLoader.getClassDescriptor(AbstractSynchUI.class), JWindowHandler.class);
- TagManager.registerBean(ClassDescriptorLoader.getClassDescriptor(AbstractVCSPopup.class), JPopupMenuHandler.class);
-
- //TagManager.registerBean(ClassDescriptorLoader.getClassDescriptor(AbstractUI.class), JDialog.class);
-
- //TagManager.registerDefaultNamespace("AbstractUI", "javax.swing.*");
-
- }
-}
\ No newline at end of file
Deleted: trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/VCSUIConstants.java
===================================================================
--- trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/VCSUIConstants.java 2008-04-06 13:06:51 UTC (rev 399)
+++ trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/VCSUIConstants.java 2008-04-06 13:07:15 UTC (rev 400)
@@ -1,67 +0,0 @@
-/**
- * # #% Copyright (C) 2008 Code Lutin, Tony Chemit
- * This program is free software; you
- * can redistribute it and/or modify it under the terms of the GNU General
- * Public License as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version. This program is
- * distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
- * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- * PARTICULAR PURPOSE. See the GNU General Public License for more details. You
- * should have received a copy of the GNU General Public License along with this
- * program; if not, write to the Free Software Foundation, Inc., 59 Temple Place
- * - Suite 330, Boston, MA 02111-1307, USA.
- * # #%
- */
-package org.codelutin.vcs.ui;
-
-import static org.codelutin.i18n.I18n.n_;
-
-/** @author chemit */
-public class VCSUIConstants {
-
- /** columns names for a simple table model with module, file and status */
- public static final String[] SIMPLE_COLUMNS_NAMES = new String[]{
- n_("lutinvcs.module"),
- n_("lutinvcs.file"),
- n_("lutinvcs.status")
- };
-
- /** model name for synchronize ui */
- public static final String SYNCH_MODEL_PROPERTY = "modelSynch";
-
- /** model name for confirm ui */
- public static final String CONFIRM_MODEL_PROPERTY = "modelConfirm";
-
- /** model name for diff ui */
- public static final String DIFF_MODEL_PROPERTY = "modelConfirm";
-
- public static final String ACTION_PROPERTY_CHANGED = "action";
-
- public static final String MESSAGE_HISTORY_PROPERTY_CHANGED = "historyMessage";
-
- public static final String FILE_PROPERTY_CHANGED = "file";
-
- public static final String NEXT_DIFF_PROPERTY_CHANGED = "nextDiff";
-
- public static final String PREVIOUS_DIFF_PROPERTY_CHANGED = "previousDiff";
-
- public static final String REFRESH_PROPERTY_CHANGED = "refresh";
-
- public static final String TAB_PROPERTY_CHANGED = "tab";
-
- public static final String DIFF_ALL_PROPERTY_CHANGED = "diffAll";
-
- public static final String COMMIT_ALL_PROPERTY_CHANGED = "commitAll";
-
- public static final String UPDATE_ALL_PROPERTY_CHANGED = "updateAll";
-
- public static final String REVERT_ALL_PROPERTY_CHANGED = "revertAll";
-
- public static final String DIFF_PROPERTY_CHANGED = "diff";
-
- public static final String COMMIT_PROPERTY_CHANGED = "commit";
-
- public static final String UPDATE_PROPERTY_CHANGED = "update";
-
- public static final String REVERT_PROPERTY_CHANGED = "revert";
-}
Copied: trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/AbstractDiffUI.java (from rev 398, trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/AbstractDiffUI.java)
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/AbstractDiffUI.java (rev 0)
+++ trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/AbstractDiffUI.java 2008-04-06 13:07:15 UTC (rev 400)
@@ -0,0 +1,64 @@
+/**
+ * # #% Copyright (C) 2008 Code Lutin, Tony Chemit
+ * This program is free software; you
+ * can redistribute it and/or modify it under the terms of the GNU General
+ * Public License as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version. This program is
+ * distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU General Public License for more details. You
+ * should have received a copy of the GNU General Public License along with this
+ * program; if not, write to the Free Software Foundation, Inc., 59 Temple Place
+ * - Suite 330, Boston, MA 02111-1307, USA.
+ * # #%
+ */
+package org.codelutin.vcs.ui;
+
+import org.codelutin.vcs.type.VCSAction;
+import org.codelutin.vcs.ui.handler.AbstractDiffUIHandler;
+import org.codelutin.vcs.ui.handler.AbstractTabUIHandler;
+import org.codelutin.vcs.ui.model.AbstractTabUIModel;
+import org.codelutin.vcs.ui.model.DiffUIModel;
+
+import javax.swing.JButton;
+import javax.swing.JTable;
+
+/** @author chemit */
+public abstract class AbstractDiffUI extends AbstractTabUI {
+
+ public abstract JButton getNextDiff();
+
+ public abstract JButton getPreviousDiff();
+
+ public AbstractDiffUI() {
+ super();
+ }
+
+ public AbstractDiffUI(AbstractTabUIHandler handler, AbstractTabUIModel model) {
+ super(handler, model);
+ }
+
+ public DiffUIModel getModel() {
+ return (DiffUIModel) model;
+ }
+
+ protected AbstractDiffUIHandler getHandler() {
+ return (AbstractDiffUIHandler) handler;
+ }
+
+ protected void selectFile(JTable table) {
+ getModel().setFileModel(model.getModel().getDisplayedEntries(table.getSelectionModel()).get(0));
+ }
+
+ protected void doAction(VCSAction action) {
+ getHandler().doAction(action, getModel().getFileModel());
+ }
+
+ protected void gotoNextDiff() {
+ getHandler().gotoNextDiff();
+ }
+
+ protected void gotoPreviousDiff() {
+ getHandler().gotoPreviousDiff();
+ }
+}
Copied: trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/AbstractSynchUI.java (from rev 398, trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/AbstractSynchUI.java)
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/AbstractSynchUI.java (rev 0)
+++ trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/AbstractSynchUI.java 2008-04-06 13:07:15 UTC (rev 400)
@@ -0,0 +1,80 @@
+/**
+ * # #% Copyright (C) 2008 Code Lutin, Tony Chemit
+ * This program is free software; you
+ * can redistribute it and/or modify it under the terms of the GNU General
+ * Public License as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version. This program is
+ * distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU General Public License for more details. You
+ * should have received a copy of the GNU General Public License along with this
+ * program; if not, write to the Free Software Foundation, Inc., 59 Temple Place
+ * - Suite 330, Boston, MA 02111-1307, USA.
+ * # #%
+ */
+package org.codelutin.vcs.ui;
+
+import org.codelutin.vcs.type.VCSAction;
+import org.codelutin.vcs.type.VCSEntryLocation;
+import org.codelutin.vcs.ui.handler.AbstractSynchUIHandler;
+import org.codelutin.vcs.ui.model.SynchUIModel;
+
+import javax.swing.JButton;
+import java.awt.CardLayout;
+
+/** @author chemit */
+public abstract class AbstractSynchUI extends AbstractTabUI {
+
+ public abstract JButton getRefreshAll();
+
+ public abstract JButton getDiffAll();
+
+ public abstract JButton getUpdateAll();
+
+ public abstract JButton getCommitAll();
+
+ public abstract JButton getRevertAll();
+
+ public abstract JButton getDeleteAll();
+
+ public abstract AbstractVCSPopup getAllPopup();
+
+ public abstract AbstractVCSPopup getLocalPopup();
+
+ public abstract AbstractVCSPopup getRemotePopup();
+
+
+ public AbstractSynchUI() {
+ super();
+ }
+
+ public AbstractSynchUI(AbstractSynchUIHandler handler, SynchUIModel model) {
+ super(handler, model);
+ }
+
+ public SynchUIModel getModel() {
+ return (SynchUIModel) model;
+ }
+
+ protected AbstractSynchUIHandler getHandler() {
+ return (AbstractSynchUIHandler) handler;
+ }
+
+ protected void doAllAction(VCSAction action) {
+ getModel().doAllAction(action);
+ }
+
+ public AbstractVCSPopup getPopup(VCSEntryLocation modelName) {
+ switch (modelName) {
+ case ALL:
+ return getAllPopup();
+ case LOCAL:
+ return getLocalPopup();
+ case REMOTE:
+ return getRemotePopup();
+ case UNKNOW:
+ break;
+ }
+ throw new IllegalStateException("no popup found for " + modelName);
+ }
+}
\ No newline at end of file
Copied: trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/AbstractTabUI.java (from rev 398, trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/AbstractTabUI.java)
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/AbstractTabUI.java (rev 0)
+++ trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/AbstractTabUI.java 2008-04-06 13:07:15 UTC (rev 400)
@@ -0,0 +1,95 @@
+/**
+ * # #% Copyright (C) 2008 Code Lutin, Tony Chemit
+ * This program is free software; you
+ * can redistribute it and/or modify it under the terms of the GNU General
+ * Public License as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version. This program is
+ * distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU General Public License for more details. You
+ * should have received a copy of the GNU General Public License along with this
+ * program; if not, write to the Free Software Foundation, Inc., 59 Temple Place
+ * - Suite 330, Boston, MA 02111-1307, USA.
+ * # #%
+ */
+package org.codelutin.vcs.ui;
+
+import org.codelutin.vcs.type.VCSEntryLocation;
+import org.codelutin.vcs.ui.handler.AbstractTabUIHandler;
+import org.codelutin.vcs.ui.model.AbstractTabUIModel;
+
+import javax.swing.JPanel;
+import javax.swing.JScrollPane;
+import javax.swing.JTable;
+import javax.swing.JToggleButton;
+import java.awt.CardLayout;
+
+/** @author chemit */
+public abstract class AbstractTabUI extends AbstractUI {
+
+ public abstract JToggleButton getAllTab();
+
+ public abstract JToggleButton getLocalTab();
+
+ public abstract JToggleButton getRemoteTab();
+
+ public abstract JScrollPane getAllContent();
+
+ public abstract JScrollPane getLocalContent();
+
+ public abstract JScrollPane getRemoteContent();
+
+ public abstract JTable getAllTable();
+
+ public abstract JTable getLocalTable();
+
+ public abstract JTable getRemoteTable();
+
+ public abstract JPanel getPreview();
+
+ public abstract CardLayout getCardLayout();
+
+ public AbstractTabUI(AbstractTabUIHandler handler, AbstractTabUIModel model) {
+ super(handler, model);
+ }
+
+ public AbstractTabUI() {
+ // for jaxx but never used
+ super();
+ }
+
+ public AbstractTabUIModel getModel() {
+ return (AbstractTabUIModel) model;
+ }
+
+ protected AbstractTabUIHandler getHandler() {
+ return (AbstractTabUIHandler) handler;
+ }
+
+ @Override
+ public void setVisible(boolean b) {
+ if (handler.getLocation() == VCSEntryLocation.UNKNOW) {
+ // first launch, no tab model selected,choose one
+ getAllTab().doClick();
+ }
+ super.setVisible(b);
+ }
+
+ public JTable getTable(VCSEntryLocation modelName) {
+ switch (modelName) {
+ case ALL:
+ return getAllTable();
+ case LOCAL:
+ return getLocalTable();
+ case REMOTE:
+ return getRemoteTable();
+ case UNKNOW:
+ break;
+ }
+ throw new IllegalStateException("no table found for " + modelName);
+ }
+
+ protected void setLocation(VCSEntryLocation location) {
+ getModel().setLocation(location);
+ }
+}
Copied: trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/AbstractUI.java (from rev 398, trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/AbstractUI.java)
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/AbstractUI.java (rev 0)
+++ trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/AbstractUI.java 2008-04-06 13:07:15 UTC (rev 400)
@@ -0,0 +1,47 @@
+/**
+ * # #% Copyright (C) 2008 Code Lutin, Tony Chemit
+ * This program is free software; you
+ * can redistribute it and/or modify it under the terms of the GNU General
+ * Public License as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version. This program is
+ * distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU General Public License for more details. You
+ * should have received a copy of the GNU General Public License along with this
+ * program; if not, write to the Free Software Foundation, Inc., 59 Temple Place
+ * - Suite 330, Boston, MA 02111-1307, USA.
+ * # #%
+ */
+package org.codelutin.vcs.ui;
+
+import org.codelutin.vcs.ui.handler.AbstractUIHandler;
+import org.codelutin.vcs.ui.model.AbstractUIModel;
+
+/** @author chemit */
+public class AbstractUI extends javax.swing.JDialog {
+
+ protected final AbstractUIModel model;
+
+ protected final AbstractUIHandler handler;
+
+ public AbstractUI() {
+ // Jaxx always generate the default constructor, so need it, but DO NOT USE IT!
+ throw new IllegalStateException("the default constructor can NOT be used!");
+ }
+
+ public AbstractUI(AbstractUIHandler handler, AbstractUIModel model) {
+ this.handler = handler;
+ this.model = model;
+ UIHelper.setQuitAction(this);
+ }
+
+ public AbstractUIModel getModel() {
+ return model;
+ }
+
+ protected AbstractUIHandler getHandler() {
+ return handler;
+ }
+
+
+}
Copied: trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/AbstractVCSPopup.java (from rev 398, trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/AbstractVCSPopup.java)
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/AbstractVCSPopup.java (rev 0)
+++ trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/AbstractVCSPopup.java 2008-04-06 13:07:15 UTC (rev 400)
@@ -0,0 +1,48 @@
+/**
+ * # #% Copyright (C) 2008 Code Lutin, Tony Chemit
+ * This program is free software; you
+ * can redistribute it and/or modify it under the terms of the GNU General
+ * Public License as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version. This program is
+ * distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU General Public License for more details. You
+ * should have received a copy of the GNU General Public License along with this
+ * program; if not, write to the Free Software Foundation, Inc., 59 Temple Place
+ * - Suite 330, Boston, MA 02111-1307, USA.
+ * # #%
+ */
+package org.codelutin.vcs.ui;
+
+import org.codelutin.vcs.ui.handler.VCSAbsractAction;
+import org.codelutin.vcs.type.VCSAction;
+
+import javax.swing.JMenuItem;
+import java.awt.event.ActionEvent;
+
+/** @author chemit */
+public abstract class AbstractVCSPopup extends javax.swing.JPopupMenu {/* begin raw body code */
+ protected VCSAbsractAction dispatchAction;
+
+ public abstract JMenuItem getRefresh();
+
+ public abstract JMenuItem getDiff();
+
+ public abstract JMenuItem getUpdate();
+
+ public abstract JMenuItem getCommit();
+
+ public abstract JMenuItem getRevert();
+
+ public abstract JMenuItem getDelete();
+
+ protected void setDispatchAction(VCSAbsractAction action) {
+ this.dispatchAction = action;
+ }
+
+ protected void doAction(VCSAction action, JMenuItem item) {
+ dispatchAction.setAction(action);
+ ActionEvent e = new ActionEvent(item, 1, action.name());
+ dispatchAction.actionPerformed(e);
+ }
+}
Copied: trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/UIHelper.java (from rev 398, trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/UIHelper.java)
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/UIHelper.java (rev 0)
+++ trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/UIHelper.java 2008-04-06 13:07:15 UTC (rev 400)
@@ -0,0 +1,45 @@
+/**
+ * # #% Copyright (C) 2008 Code Lutin, Tony Chemit
+ * This program is free software; you
+ * can redistribute it and/or modify it under the terms of the GNU General
+ * Public License as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version. This program is
+ * distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU General Public License for more details. You
+ * should have received a copy of the GNU General Public License along with this
+ * program; if not, write to the Free Software Foundation, Inc., 59 Temple Place
+ * - Suite 330, Boston, MA 02111-1307, USA.
+ * # #%
+ */
+package org.codelutin.vcs.ui;
+
+import javax.swing.JDialog;
+import javax.swing.JRootPane;
+import javax.swing.Action;
+import javax.swing.AbstractAction;
+import javax.swing.JComponent;
+import javax.swing.KeyStroke;
+import java.awt.event.ActionEvent;
+
+/**
+ * UI Helper methods
+ *
+ * @author chemit
+ */
+public class UIHelper {
+ public static void setQuitAction(final JDialog ui) {
+ JRootPane rootPane = ui.getRootPane();
+ //rootPane.setDefaultButton(accept);
+
+ Action quitAction = new AbstractAction("quit") {
+ private static final long serialVersionUID = -869095664995763057L;
+
+ public void actionPerformed(ActionEvent e) {
+ ui.dispose();
+ }
+ };
+ rootPane.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke("ESCAPE"), "quit");
+ rootPane.getActionMap().put("quit", quitAction);
+ }
+}
Copied: trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/VCSInitializer.java (from rev 398, trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/VCSInitializer.java)
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/VCSInitializer.java (rev 0)
+++ trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/VCSInitializer.java 2008-04-06 13:07:15 UTC (rev 400)
@@ -0,0 +1,44 @@
+/**
+ * # #% Copyright (C) 2008 Code Lutin, Tony Chemit
+ * This program is free software; you
+ * can redistribute it and/or modify it under the terms of the GNU General
+ * Public License as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version. This program is
+ * distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU General Public License for more details. You
+ * should have received a copy of the GNU General Public License along with this
+ * program; if not, write to the Free Software Foundation, Inc., 59 Temple Place
+ * - Suite 330, Boston, MA 02111-1307, USA.
+ * # #%
+ */
+package org.codelutin.vcs.ui;
+
+import jaxx.reflect.ClassDescriptorLoader;
+import jaxx.tags.TagManager;
+import jaxx.tags.swing.JPopupMenuHandler;
+import jaxx.tags.swing.JWindowHandler;
+
+import java.beans.Introspector;
+
+public class VCSInitializer implements jaxx.spi.Initializer {
+
+ public void initialize() {
+ String[] searchPath = Introspector.getBeanInfoSearchPath();
+ String[] newSearchPath = new String[searchPath.length + 1];
+ System.arraycopy(searchPath, 0, newSearchPath, 0, searchPath.length);
+ newSearchPath[newSearchPath.length - 1] = "jaxx.beaninfos";
+
+ Introspector.setBeanInfoSearchPath(newSearchPath);
+
+ TagManager.registerTag("org.codelutin.vcs.ui.*", "JVCSPopup", new DefaultObjectHandler(ClassDescriptorLoader.getClassDescriptor(JPopupMenuHandler.class)));
+
+ TagManager.registerBean(ClassDescriptorLoader.getClassDescriptor(AbstractSynchUI.class), JWindowHandler.class);
+ TagManager.registerBean(ClassDescriptorLoader.getClassDescriptor(AbstractVCSPopup.class), JPopupMenuHandler.class);
+
+ //TagManager.registerBean(ClassDescriptorLoader.getClassDescriptor(AbstractUI.class), JDialog.class);
+
+ //TagManager.registerDefaultNamespace("AbstractUI", "javax.swing.*");
+
+ }
+}
\ No newline at end of file
Copied: trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/VCSUIConstants.java (from rev 398, trunk/lutinvcs/lutinvcs-core/src/main/java/org/codelutin/vcs/ui/VCSUIConstants.java)
===================================================================
--- trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/VCSUIConstants.java (rev 0)
+++ trunk/lutinvcs/lutinvcs-ui-pre-jaxx/src/main/java/org/codelutin/vcs/ui/VCSUIConstants.java 2008-04-06 13:07:15 UTC (rev 400)
@@ -0,0 +1,67 @@
+/**
+ * # #% Copyright (C) 2008 Code Lutin, Tony Chemit
+ * This program is free software; you
+ * can redistribute it and/or modify it under the terms of the GNU General
+ * Public License as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version. This program is
+ * distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU General Public License for more details. You
+ * should have received a copy of the GNU General Public License along with this
+ * program; if not, write to the Free Software Foundation, Inc., 59 Temple Place
+ * - Suite 330, Boston, MA 02111-1307, USA.
+ * # #%
+ */
+package org.codelutin.vcs.ui;
+
+import static org.codelutin.i18n.I18n.n_;
+
+/** @author chemit */
+public class VCSUIConstants {
+
+ /** columns names for a simple table model with module, file and status */
+ public static final String[] SIMPLE_COLUMNS_NAMES = new String[]{
+ n_("lutinvcs.module"),
+ n_("lutinvcs.file"),
+ n_("lutinvcs.status")
+ };
+
+ /** model name for synchronize ui */
+ public static final String SYNCH_MODEL_PROPERTY = "modelSynch";
+
+ /** model name for confirm ui */
+ public static final String CONFIRM_MODEL_PROPERTY = "modelConfirm";
+
+ /** model name for diff ui */
+ public static final String DIFF_MODEL_PROPERTY = "modelConfirm";
+
+ public static final String ACTION_PROPERTY_CHANGED = "action";
+
+ public static final String MESSAGE_HISTORY_PROPERTY_CHANGED = "historyMessage";
+
+ public static final String FILE_PROPERTY_CHANGED = "file";
+
+ public static final String NEXT_DIFF_PROPERTY_CHANGED = "nextDiff";
+
+ public static final String PREVIOUS_DIFF_PROPERTY_CHANGED = "previousDiff";
+
+ public static final String REFRESH_PROPERTY_CHANGED = "refresh";
+
+ public static final String TAB_PROPERTY_CHANGED = "tab";
+
+ public static final String DIFF_ALL_PROPERTY_CHANGED = "diffAll";
+
+ public static final String COMMIT_ALL_PROPERTY_CHANGED = "commitAll";
+
+ public static final String UPDATE_ALL_PROPERTY_CHANGED = "updateAll";
+
+ public static final String REVERT_ALL_PROPERTY_CHANGED = "revertAll";
+
+ public static final String DIFF_PROPERTY_CHANGED = "diff";
+
+ public static final String COMMIT_PROPERTY_CHANGED = "commit";
+
+ public static final String UPDATE_PROPERTY_CHANGED = "update";
+
+ public static final String REVERT_PROPERTY_CHANGED = "revert";
+}
1
0