[Buix-commits] r289 - in trunk/lutinvcs/lutinvcs-ui/src/main/java/org/codelutin/vcs/ui: . action
Author: tchemit Date: 2008-04-02 09:13:04 +0000 (Wed, 02 Apr 2008) New Revision: 289 Added: trunk/lutinvcs/lutinvcs-ui/src/main/java/org/codelutin/vcs/ui/action/ trunk/lutinvcs/lutinvcs-ui/src/main/java/org/codelutin/vcs/ui/action/VCSPopupAction.java Log: action de la popup Added: trunk/lutinvcs/lutinvcs-ui/src/main/java/org/codelutin/vcs/ui/action/VCSPopupAction.java =================================================================== --- trunk/lutinvcs/lutinvcs-ui/src/main/java/org/codelutin/vcs/ui/action/VCSPopupAction.java (rev 0) +++ trunk/lutinvcs/lutinvcs-ui/src/main/java/org/codelutin/vcs/ui/action/VCSPopupAction.java 2008-04-02 09:13:04 UTC (rev 289) @@ -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.action; + +import org.codelutin.vcs.VCSFileState; +import org.codelutin.vcs.ui.JSynchUI; +import org.codelutin.vcs.ui.JVCSPopup; +import org.codelutin.vcs.ui.model.AbstractVCSFileStatesModel; + +import javax.swing.ListSelectionModel; +import java.awt.event.ActionEvent; + +/** @author chemit */ +public class VCSPopupAction extends VCSAbsractAction { + private static final long serialVersionUID = -1983061535956510913L; + + protected JVCSPopup popup; + protected AbstractVCSFileStatesModel model; + protected transient ListSelectionModel selectionModel; + + public VCSPopupAction(JSynchUI ui, String modelName) { + super(ui.getModel().getHandler()); + this.model = ui.getModel().getModel(modelName); + this.popup = ui.getPopup(modelName); + this.selectionModel = ui.getTable(modelName).getSelectionModel(); + } + + public void actionPerformed(ActionEvent e) { + model.select(action, selectionModel); + VCSFileState[] states = model.getData(selectionModel); + log.info("files to treate :" + states.length); + } +}
participants (1)
-
tchemit@users.labs.libre-entreprise.org