r397 - in trunk/lutinvcs/lutinvcs-ui-jaxx: . src/main/uimodel/org/codelutin/vcs/ui
Author: tchemit Date: 2008-04-06 13:05:33 +0000 (Sun, 06 Apr 2008) New Revision: 397 Modified: trunk/lutinvcs/lutinvcs-ui-jaxx/pom.xml trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JConfirmUI.jaxx trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JDiffUI.jaxx trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JSynchUI.jaxx trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JVCSPopup.jaxx Log: new module : ui-pre-jaxx Modified: trunk/lutinvcs/lutinvcs-ui-jaxx/pom.xml =================================================================== --- trunk/lutinvcs/lutinvcs-ui-jaxx/pom.xml 2008-04-06 13:05:15 UTC (rev 396) +++ trunk/lutinvcs/lutinvcs-ui-jaxx/pom.xml 2008-04-06 13:05:33 UTC (rev 397) @@ -89,10 +89,15 @@ <scope>compile</scope> </dependency> <dependency> + <groupId>lutinlib.vcs</groupId> + <artifactId>lutinvcs-ui-pre-jaxx</artifactId> + <scope>compile</scope> + </dependency> + <!--dependency> <groupId>lutinlib</groupId> <artifactId>jaxx</artifactId> <scope>compile</scope> - </dependency> + </dependency--> </dependencies> </project> Modified: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JConfirmUI.jaxx =================================================================== --- trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JConfirmUI.jaxx 2008-04-06 13:05:15 UTC (rev 396) +++ trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JConfirmUI.jaxx 2008-04-06 13:05:33 UTC (rev 397) @@ -7,10 +7,11 @@ import org.codelutin.vcs.ui.model.ConfirmUIModel ; public JConfirmUI(AbstractConfirmUIHandler handler) { + super(handler,new ConfirmUIModel()); Action acceptAction= new AbstractAction("accept") { - private static final long serialVersionUID = -869095664995763055L; + private static final long serialVersionUID = 1L; public void actionPerformed(ActionEvent e) { getHandler().doAction(getCommitMessage().getText(),getModel().getModel()); } @@ -18,10 +19,12 @@ accept.setAction((acceptAction)); } + @Override protected AbstractConfirmUIHandler getHandler() { return (AbstractConfirmUIHandler) super.getHandler(); } + @Override public ConfirmUIModel getModel() { return (ConfirmUIModel) super.getModel(); } @@ -80,3 +83,4 @@ </row> </Table> </org.codelutin.vcs.ui.AbstractUI> + \ No newline at end of file Modified: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JDiffUI.jaxx =================================================================== --- trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JDiffUI.jaxx 2008-04-06 13:05:15 UTC (rev 396) +++ trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JDiffUI.jaxx 2008-04-06 13:05:33 UTC (rev 397) @@ -1,74 +1,14 @@ -<JDialog title='lutinvcs.diff.title' id='diffui' defaultCloseOperation='DISPOSE_ON_CLOSE'> +<org.codelutin.vcs.ui.AbstractDiffUI title='lutinvcs.diff.title' id='diffui' defaultCloseOperation='DISPOSE_ON_CLOSE'> <style source="common.css"/> <script> - import org.codelutin.vcs.type.VCSAction; import org.codelutin.vcs.type.VCSEntryLocation; - import org.codelutin.vcs.ui.handler.AbstractDiffUIHandler; - import org.codelutin.vcs.ui.VCSUIConstants; - protected AbstractDiffUIHandler handler; - - public JTable getTable(String modelName) { - return (JTable) get$objectMap().get(modelName+"Table"); + public JDiffUI(org.codelutin.vcs.ui.handler.AbstractDiffUIHandler handler) { + super(handler,new org.codelutin.vcs.ui.model.DiffUIModel()); } - - @Override - public void setVisible(boolean b) { - if (getModel().getLocation() == null) { - // first launch, no tab model selected,choose one - allTab.doClick(); - } - super.setVisible(b); - } - - public JDiffUI(AbstractDiffUIHandler handler) { - this.handler =handler; - } - - protected AbstractDiffUIHandler getHandler() { - return handler; - } - - protected void setHandler(AbstractDiffUIHandler handler) { - this.handler = handler; - } - - protected void selectTab(VCSEntryLocation location) { - getModel().setLocation(location); - } - - protected void selectFile(JTable table) { - //model.setFileModel(model.getModel().getData(table.getSelectionModel())[0]); - } - - protected void doAction(VCSAction action) { - model.doAction(action); - } - - protected void gotoNextDiff() { - handler.gotoNextDiff(); - } - - protected void gotoPreviousDiff() { - handler.gotoPreviousDiff(); - } - - Action quitAction; - JRootPane rootPane = diffui.getRootPane(); - //rootPane.setDefaultButton(quit); - quitAction = new AbstractAction("quit") { - private static final long serialVersionUID = -869095664995763057L; - public void actionPerformed(ActionEvent e) { - diffui.dispose(); - } - }; - rootPane.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke("ESCAPE"),"quit"); - rootPane.getActionMap().put("quit", quitAction); </script> - <org.codelutin.vcs.ui.model.DiffUIModel id="model"/> - <java.awt.CardLayout id='cardLayout'/> <Table> @@ -78,15 +18,15 @@ <JToggleButton id='allTab' selected='true' buttonGroup='tabs' mnemonic="A" toolTipText="lutinvcs.tabs.diff.tooltip.all" icon='{createImageIcon("remote_vs_local.png")}' - onActionPerformed='selectTab(VCSEntryLocation.ALL)'/> + onActionPerformed='setLocation(VCSEntryLocation.ALL)'/> <JToggleButton id='localTab' selected='false' buttonGroup='tabs' mnemonic="L" toolTipText="lutinvcs.tabs.diff.tooltip.local" icon='{createImageIcon("local_vs_local.png")}' - onActionPerformed='selectTab(VCSEntryLocation.LOCAL)'/> + onActionPerformed='setLocation(VCSEntryLocation.LOCAL)'/> <JToggleButton id='remoteTab' selected='false' buttonGroup='tabs' mnemonic="R" icon='{createImageIcon("remote_vs_remote.png")}' toolTipText="lutinvcs.tabs.diff.tooltip.remote" - onActionPerformed='selectTab(VCSEntryLocation.REMOTE)'/> + onActionPerformed='setLocation(VCSEntryLocation.REMOTE)'/> <JButton id='nextDiff' toolTipText="lutinvcs.action.tooltip.nextDiff" @@ -135,23 +75,5 @@ </JPanel> </cell> </row> - <!--row> - <cell fill='both'> - <JToolBar> - <Table insets='0,0,0,0'> - <row fill='both' anchor='west'> - <cell fill='both' weightx='2'> - <JLabel id="label"/> - </cell> - </row> - <row fill='both' anchor='east'> - <cell fill='both'> - <JProgressBar id="progress"/> - </cell> - </row> - </Table> - </JToolBar> - </cell> - </row--> </Table> -</JDialog> +</org.codelutin.vcs.ui.AbstractDiffUI> Modified: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JSynchUI.jaxx =================================================================== --- trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JSynchUI.jaxx 2008-04-06 13:05:15 UTC (rev 396) +++ trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JSynchUI.jaxx 2008-04-06 13:05:33 UTC (rev 397) @@ -1,61 +1,23 @@ -<org.codelutin.vcs.ui.AbstractUI title='lutinvcs.synch.title' modal="true" defaultCloseOperation='DISPOSE_ON_CLOSE'> +<org.codelutin.vcs.ui.AbstractSynchUI title='lutinvcs.synch.title' modal="true" id='synchui' + defaultCloseOperation='DISPOSE_ON_CLOSE'> <style source="common.css"/> <script> - import org.codelutin.vcs.type.VCSAction; import org.codelutin.vcs.type.VCSEntryLocation; - import org.codelutin.vcs.ui.handler.AbstractSynchUIHandler; - import org.codelutin.vcs.ui.model.SynchUIModel; - public JSynchUI(AbstractSynchUIHandler handler) { - super(handler,new SynchUIModel()); + public JSynchUI(org.codelutin.vcs.ui.handler.AbstractSynchUIHandler handler) { + super(handler,new org.codelutin.vcs.ui.model.SynchUIModel()); } - - @Override - protected AbstractSynchUIHandler getHandler() { - return (AbstractSynchUIHandler) handler; - } - - @Override - public SynchUIModel getModel() { - return (SynchUIModel) super.getModel(); - } - - @Override - public void setVisible(boolean b) { - if (getModel().getModel().getLocation() == VCSEntryLocation.UNKNOW) { - // first launch, no tab model selected,choose one - allTab.doClick(); - } - super.setVisible(b); - } - public JTable getTable(String modelName) { - return (JTable) get$objectMap().get(modelName+"Table"); - } - - public JVCSPopup getPopup(String modelName) { - return (JVCSPopup) get$objectMap().get(modelName+"Popup"); - } - - protected void setLocation(VCSEntryLocation location) { - getModel().setLocation(location); - } - - protected void doAllAction(VCSAction action) { - getModel().doAllAction(action); - } + add(table); </script> - <!--org.codelutin.vcs.ui.model.SynchUIModel id="model"/--> - <java.awt.CardLayout id='cardLayout'/> - <JPopupMenu enabled='false'> - </JPopupMenu> + <!--JPopupMenu enabled='false'/--> <org.codelutin.vcs.ui.JVCSPopup id="allPopup"/> <org.codelutin.vcs.ui.JVCSPopup id="localPopup"/> <org.codelutin.vcs.ui.JVCSPopup id="remotePopup"/> - <Table> + <Table id='table'> <row fill='both'> <cell fill='both' weightx='1'> <JToolBar> @@ -110,4 +72,4 @@ </cell> </row> </Table> -</org.codelutin.vcs.ui.AbstractUI> +</org.codelutin.vcs.ui.AbstractSynchUI> \ No newline at end of file Modified: trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JVCSPopup.jaxx =================================================================== --- trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JVCSPopup.jaxx 2008-04-06 13:05:15 UTC (rev 396) +++ trunk/lutinvcs/lutinvcs-ui-jaxx/src/main/uimodel/org/codelutin/vcs/ui/JVCSPopup.jaxx 2008-04-06 13:05:33 UTC (rev 397) @@ -1,4 +1,4 @@ -<JPopupMenu> +<org.codelutin.vcs.ui.AbstractVCSPopup> <script> import org.codelutin.vcs.type.VCSAction; import org.codelutin.vcs.ui.handler.VCSAbsractAction; @@ -14,12 +14,12 @@ ActionEvent e = new ActionEvent( item,1,action.name()); dispatchAction.actionPerformed(e); } - add(refresh); + /*add(refresh); add(diff); add(update); add(commit); add(revert); - add(delete); + add(delete);*/ </script> <JMenuItem id='refresh' text='{_("lutinvcs.action.refresh")}' toolTipText='{_("lutinvcs.action.tooltip.refresh")}' icon='{createImageIcon("autoRefresh.png")}' onActionPerformed='doAction(VCSAction.REFRESH,refresh)'/> @@ -33,4 +33,4 @@ icon='{createImageIcon("rollback.png")}' onActionPerformed='doAction(VCSAction.REVERT,revert)'/> <JMenuItem id='delete' text='{_("lutinvcs.action.delete")}' toolTipText='{_("lutinvcs.action.tooltip.delete")}' icon='{createImageIcon("remove.png")}' onActionPerformed='doAction(VCSAction.DELETE,delete)'/> -</JPopupMenu> \ No newline at end of file +</org.codelutin.vcs.ui.AbstractVCSPopup> \ No newline at end of file
participants (1)
-
tchemit@users.labs.libre-entreprise.org