|
From: <de...@us...> - 2012-12-17 07:37:48
|
Revision: 8146
http://fudaa.svn.sourceforge.net/fudaa/?rev=8146&view=rev
Author: deniger
Date: 2012-12-17 07:37:41 +0000 (Mon, 17 Dec 2012)
Log Message:
-----------
Modified Paths:
--------------
trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/TrLauncherDefault.java
trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/profile/MvProfileFillePanel.java
trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/profile/MvProfileTreeModel.java
Removed Paths:
-------------
trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/profile/MvProfileGridPalette.java
Modified: trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/TrLauncherDefault.java
===================================================================
--- trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/TrLauncherDefault.java 2012-12-17 07:05:42 UTC (rev 8145)
+++ trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/TrLauncherDefault.java 2012-12-17 07:37:41 UTC (rev 8146)
@@ -69,8 +69,8 @@
infoSoft = new BuInformationsSoftware();
infoSoft.name = "prepro";
- infoSoft.version = "1.2-RC16";
- infoSoft.date = "2012-11-28";
+ infoSoft.version = "1.2-RC17";
+ infoSoft.date = "2012-12-17";
infoSoft.rights = TrResource.getS("Tous droits r\xE9serv\xE9s") + ". CETMEF (c)2003-2009";
infoSoft.contact = "fre...@fu...";
infoSoft.license = "GPL2";
Modified: trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/profile/MvProfileFillePanel.java
===================================================================
--- trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/profile/MvProfileFillePanel.java 2012-12-17 07:05:42 UTC (rev 8145)
+++ trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/profile/MvProfileFillePanel.java 2012-12-17 07:37:41 UTC (rev 8146)
@@ -81,17 +81,17 @@
}
private void initActions(final MvProfileTreeModel _a, final CtuluUI _ui) {
- final EbliActionPaletteTreeModel act = new EbliActionPaletteTreeModel(MvResource.getS("Vue 2D"), MvResource.MV.getIcon("maillage"), "VUE2D") {
-
- @Override
- protected BPalettePanelInterface buildPaletteContent() {
- return new MvProfileGridPalette(MvProfileFillePanel.this, _ui);
- }
- };
- act.setResizable(true);
- getTreeModel().getSelectionModel().addTreeSelectionListener(act);
+// final EbliActionPaletteTreeModel act = new EbliActionPaletteTreeModel(MvResource.getS("Vue 2D"), MvResource.MV.getIcon("maillage"), "VUE2D") {
+//
+// @Override
+// protected BPalettePanelInterface buildPaletteContent() {
+// return new MvProfileGridPalette(MvProfileFillePanel.this, _ui);
+// }
+// };
+// act.setResizable(true);
+// getTreeModel().getSelectionModel().addTreeSelectionListener(act);
+// acts.add(act);
final List acts = new ArrayList(5);
- acts.add(act);
if (_a.containsTime()) {
acts.add(new EbliCalqueActionTimeChooser(getTreeModel().getSelectionModel(), true));
Deleted: trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/profile/MvProfileGridPalette.java
===================================================================
--- trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/profile/MvProfileGridPalette.java 2012-12-17 07:05:42 UTC (rev 8145)
+++ trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/profile/MvProfileGridPalette.java 2012-12-17 07:37:41 UTC (rev 8146)
@@ -1,330 +0,0 @@
-/*
- * @creation 1 d\xE9c. 06
- * @modification $Date: 2007-06-13 14:46:13 $
- * @license GNU General Public License 2
- * @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne
- * @mail de...@fu...
- */
-package org.fudaa.fudaa.tr.post.profile;
-
-import com.memoire.bu.BuBorderLayout;
-import com.memoire.bu.BuLib;
-import com.memoire.bu.BuPalette;
-import com.memoire.bu.BuPanel;
-import com.memoire.bu.BuResource;
-import com.memoire.bu.BuToolBar;
-import java.awt.Color;
-import java.awt.EventQueue;
-import java.awt.event.ActionEvent;
-import java.awt.event.KeyEvent;
-import javax.swing.Action;
-import javax.swing.JComponent;
-import javax.swing.JPanel;
-import javax.swing.KeyStroke;
-import javax.swing.SwingUtilities;
-import org.fudaa.ctulu.CtuluListSelection;
-import org.fudaa.ctulu.CtuluListSelectionEvent;
-import org.fudaa.ctulu.CtuluListSelectionListener;
-import org.fudaa.ctulu.CtuluUI;
-import org.fudaa.ctulu.gis.GISZoneCollectionLigneBrisee;
-import org.fudaa.dodico.ef.operation.EfLineIntersectionsResultsI;
-import org.fudaa.ebli.calque.ZCalqueAffichageDonneesAbstract;
-import org.fudaa.ebli.calque.ZCalqueGeometry.SelectionMode;
-import org.fudaa.ebli.calque.ZCalqueLigneBrisee;
-import org.fudaa.ebli.calque.ZEbliCalquePanelController;
-import org.fudaa.ebli.calque.ZEbliCalquesPanel;
-import org.fudaa.ebli.calque.ZSelectionEvent;
-import org.fudaa.ebli.calque.ZSelectionListener;
-import org.fudaa.ebli.calque.action.CalqueActionInteraction;
-import org.fudaa.ebli.calque.action.SceneZoomOnSelectedAction;
-import org.fudaa.ebli.calque.edition.ZModeleLigneBriseeDefault;
-import org.fudaa.ebli.commun.BPalettePanelInterface;
-import org.fudaa.ebli.commun.EbliActionInterface;
-import org.fudaa.ebli.commun.EbliActionSimple;
-import org.fudaa.ebli.commun.EbliComponentFactory;
-import org.fudaa.ebli.commun.EbliLib;
-import org.fudaa.ebli.commun.EbliListeSelectionMulti;
-import org.fudaa.ebli.commun.EbliSelectionState;
-import org.fudaa.ebli.geometrie.GrBoite;
-import org.fudaa.ebli.ressource.EbliResource;
-import org.fudaa.ebli.trace.TraceIcon;
-import org.fudaa.ebli.trace.TraceIconModel;
-import org.fudaa.ebli.trace.TraceLigne;
-import org.fudaa.ebli.trace.TraceLigneModel;
-import org.fudaa.fudaa.meshviewer.MvResource;
-import org.fudaa.fudaa.meshviewer.layer.MvElementLayer;
-import org.fudaa.fudaa.meshviewer.layer.MvFrontierPolygonLayer;
-import org.fudaa.fudaa.meshviewer.model.MvElementModelDefault;
-import org.fudaa.fudaa.meshviewer.model.MvFrontierModelDefault;
-import org.fudaa.fudaa.ressource.FudaaResource;
-import org.fudaa.fudaa.sig.FSigLineSingleModel;
-import org.fudaa.fudaa.sig.layer.FSigLayerLine;
-
-/**
- * @author fred deniger
- * @version $Id: MvProfileGridPalette.java,v 1.5 2007-06-13 14:46:13 deniger Exp $
- */
-public class MvProfileGridPalette implements BPalettePanelInterface, CtuluListSelectionListener, ZSelectionListener {
-
- protected class CustomController extends ZEbliCalquePanelController {
-
- public CustomController(final CtuluUI _ui) {
- super(false, _ui);
- }
-
- @Override
- protected void buildButtonGroupNavigation() {
- if (navigationActionGroup_ != null) {
- return;
- }
- navigationActionGroup_ = new EbliActionInterface[5];
- // RESTORE ACTION
- final EbliActionSimple restore = new EbliActionSimple(EbliResource.EBLI.getString("Restaurer"), EbliResource.EBLI.getIcon("restore"), "RESTORE") {
-
- @Override
- public void actionPerformed(final ActionEvent _arg) {
- getPn().restaurer();
- }
- };
- restore.putValue(Action.SHORT_DESCRIPTION, EbliResource.EBLI.getString("Restaurer la vue globale"));
- restore.putValue(Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke('r'));
- restore.putValue(EbliActionInterface.SECOND_KEYSTROKE, KeyStroke.getKeyStroke(KeyEvent.VK_F5, 0));
- int i = 0;
- navigationActionGroup_[i++] = restore;
- // ZOOM ACTION
- CalqueActionInteraction action = new CalqueActionInteraction(EbliResource.EBLI.getString("Zoom"),
- EbliResource.EBLI.getIcon("loupe"), "ZOOM", cqZoomI_);
- action.setDefaultToolTip(EbliLib.getZoomDesc());
- action.putValue(Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke('z'));
-
- navigationActionGroup_[i++] = action;
- navigationActionGroup_[i++] = new SceneZoomOnSelectedAction(pn_);
- // VIEW NAVIGATION
-
- navigationActionGroup_[i] = new EbliActionSimple(EbliResource.EBLI.getString("Derni\xE8re vue"), EbliResource.EBLI.getIcon("zoom-previous"), "LAST_VIEW") {
-
- @Override
- public void actionPerformed(final ActionEvent _arg) {
- getPn().getVueCalque().undoRepere();
- }
- };
- navigationActionGroup_[i].putValue(Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke('y'));
- navigationActionGroup_[i++].setDefaultToolTip(EbliLib.getS("Retourner \xE0 la derni\xE8re vue"));
- // action.putValue(Action.MNEMONIC_KEY, new Int);
- action = new CalqueActionInteraction(EbliResource.EBLI.getString("D\xE9placer la vue"), EbliResource.EBLI.getIcon("main"), "MOVE_VIEW", cqDepVueI_);
- action.putValue(Action.SHORT_DESCRIPTION, EbliResource.EBLI.getString("D\xE9placer la vue"));
- action.putValue(Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke('m'));
- navigationActionGroup_[i++] = action;
- }
-
- protected void setSwapEnable(final boolean _b) {
- standardActionGroup_[1].setEnabled(_b);
- }
-
- @Override
- protected void buildButtonGroupStandard() {
- if (standardActionGroup_ == null) {
- standardActionGroup_ = new EbliActionInterface[2];
- standardActionGroup_[0] = new EbliActionSimple(MvResource.getS("Incruster dans la vue"), FudaaResource.FUDAA.getIcon("fermerpleinecran"), "INCRUST") {
-
- @Override
- public void actionPerformed(final ActionEvent _e) {
- final JPanel panel = MvProfileGridPalette.this.palettePanel_;
- if (targetPanel_.isVueIncrustee()) {
- targetPanel_.removeVueTop();
- panel.add(calques_);
- super.setIcon(FudaaResource.FUDAA.getIcon("fermerpleinecran"));
- setSwapEnable(false);
-
- } else {
- targetPanel_.updateVueTop(calques_);
- panel.remove(calques_);
- panel.doLayout();
- panel.revalidate();
- super.setIcon(BuResource.BU.getIcon("pleinecran"));
- setSwapEnable(true);
- }
- final BuPalette parent = (BuPalette) (SwingUtilities.getAncestorOfClass(BuPalette.class, panel));
- if (parent != null) {
- BuLib.invokeLater(new Runnable() {
-
- @Override
- public void run() {
- parent.pack();
- parent.revalidate();
- calques_.restaurer();
-
- }
- });
-
- }
- }
- };
- standardActionGroup_[1] = new EbliActionSimple(MvResource.getS("Disposition"), BuResource.BU.getToolIcon("crystal_ranger"), "LAYOUT") {
-
- @Override
- public void actionPerformed(final ActionEvent _e) {
- targetPanel_.swapVue();
- super.setIcon(BuResource.BU.getToolIcon(targetPanel_.isVueHorizontal() ? "crystal_rangerpalettes"
- : "crystal_ranger"));
- }
- };
- }
- }
- }
- ZEbliCalquesPanel calques_;
- ZCalqueLigneBrisee cqCurrent_;
- boolean first_ = true;
- boolean isUpdateFromLayer_;
- boolean isUpdatingFromTable_;
- final MvProfileFillePanel targetPanel_;
- protected JPanel palettePanel_;
- final CtuluListSelection selection_;
- final CtuluUI ui_;
-
- public MvProfileGridPalette(final MvProfileFillePanel _panel, final CtuluUI _ui) {
- super();
- _panel.addSelectionListener(this);
-
- selection_ = _panel.getSelection();
- targetPanel_ = _panel;
- ui_ = _ui;
-
- }
-
- public static GrBoite getDomaine(final EfLineIntersectionsResultsI _res) {
- final GrBoite b = new GrBoite();
- ajustBoite(_res, b);
- return b;
- }
-
- public static void ajustBoite(final EfLineIntersectionsResultsI _res, final GrBoite _b) {
- for (int i = _res.getNbIntersect() - 1; i >= 0; i--) {
- _b.ajuste(_res.getIntersect(i).getX(), _res.getIntersect(i).getY(), 0);
- }
- }
-
- private void createCalquesPanel() {
- calques_ = new ZEbliCalquesPanel(null, new CustomController(ui_), false);
- cqCurrent_ = new FSigLayerLine(new FSigLineSingleModel());
- cqCurrent_.setVisible(true);
- cqCurrent_.setSelectionMode(SelectionMode.ATOMIC);
- TraceIconModel traceIconModel = new TraceIconModel(TraceIcon.CROIX_DOUBLE, 5, Color.RED);
- cqCurrent_.setIconModel(0, traceIconModel);
- cqCurrent_.setIconModel(1, traceIconModel);
- TraceLigneModel traceLigneModel = new TraceLigneModel(TraceLigne.LISSE, 1, Color.RED);
- cqCurrent_.setLineModel(0, traceLigneModel);
- cqCurrent_.setLineModel(1, traceLigneModel);
- calques_.addCalque(cqCurrent_);
- calques_.addCalque(new MvFrontierPolygonLayer(new MvFrontierModelDefault(targetPanel_.getProfileTreeModel().target_.getData().getGrid())));
- calques_.addCalque(new MvElementLayer(new MvElementModelDefault(targetPanel_.getProfileTreeModel().target_.getData().getGrid())));
- palettePanel_ = new BuPanel(new BuBorderLayout(2, 0));
- calques_.getController().buildActions();
- final EbliActionInterface[] cqs = calques_.getController().getBaseActions();
- final BuToolBar tb = new BuToolBar();
- final int nb = cqs.length;
- for (int i = 0; i < nb; i++) {
- if (cqs[i] == null) {
- tb.addSeparator();
- } else {
- tb.add(cqs[i].buildToolButton(EbliComponentFactory.INSTANCE));
- }
- }
- calques_.getArbreCalqueModel().setSelectionCalque(cqCurrent_);
- cqCurrent_.addSelectionListener(this);
- palettePanel_.add(tb, BuBorderLayout.NORTH);
- palettePanel_.add(calques_, BuBorderLayout.CENTER);
- }
-
- @Override
- public void doAfterDisplay() {
- if (first_) {
- EventQueue.invokeLater(new Runnable() {
-
- @Override
- public void run() {
- calques_.restaurer();
- }
- });
- first_ = false;
- }
- }
-
- @Override
- public JComponent getComponent() {
- if (palettePanel_ == null) {
- createCalquesPanel();
- targetPanel_.getProfileTreeModel().setPaletteGrid(this);
- }
- return palettePanel_;
- }
-
- @Override
- public void listeSelectionChanged(final CtuluListSelectionEvent _e) {
-
- if (isUpdateFromLayer_) {
- return;
- }
- isUpdatingFromTable_ = true;
- if (!cqCurrent_.isVisible()) {
- return;
- }
- if (selection_.isEmpty()) {
- cqCurrent_.clearSelection();
- } else {
- final EbliListeSelectionMulti sele = new EbliListeSelectionMulti(1);
- sele.set(0, new CtuluListSelection(selection_));
- cqCurrent_.changeSelectionMulti(sele, EbliSelectionState.ACTION_REPLACE);
- }
- isUpdatingFromTable_ = false;
-
- }
-
- @Override
- public void paletteDeactivated() {
- }
-
- @Override
- public void selectionChanged(final ZSelectionEvent _evt) {
- if (isUpdatingFromTable_) {
- return;
- }
- if (!cqCurrent_.isVisible()) {
- return;
- }
- isUpdateFromLayer_ = true;
- if (cqCurrent_.isSelectionEmpty()) {
- selection_.clear();
- } else {
- selection_.setSelection(cqCurrent_.getLayerSelectionMulti().getSelection(0));
- }
- isUpdateFromLayer_ = false;
- }
-
- @Override
- public boolean setPalettePanelTarget(final Object _target) {
- cqCurrent_.clearSelection();
- boolean visible = true;
- if (_target instanceof MvProfileCourbeInterface) {
- final GISZoneCollectionLigneBrisee ligneBrisee = new GISZoneCollectionLigneBrisee();
- ligneBrisee.addCoordinateSequence(((MvProfileCourbeInterface) _target).getProfileModel().getLineString().getCoordinateSequence(), null, null);
- final ZModeleLigneBriseeDefault modeleDefault = new ZModeleLigneBriseeDefault(ligneBrisee);
- cqCurrent_.modele(modeleDefault);
- EventQueue.invokeLater(new Runnable() {
-
- @Override
- public void run() {
- final GrBoite domaine = cqCurrent_.getDomaine();
- ZCalqueAffichageDonneesAbstract.ajusteZoomOnSelected(domaine, calques_.getDonneesCalque().getDomaine());
- calques_.zoom(domaine);
- }
- });
-
- } else {
- visible = false;
-
- }
- cqCurrent_.setVisible(visible);
- return visible;
- }
-}
Modified: trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/profile/MvProfileTreeModel.java
===================================================================
--- trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/profile/MvProfileTreeModel.java 2012-12-17 07:05:42 UTC (rev 8145)
+++ trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/profile/MvProfileTreeModel.java 2012-12-17 07:37:41 UTC (rev 8146)
@@ -70,16 +70,7 @@
public class MvProfileTreeModel extends EGGrapheTreeModel implements Target {
FudaaCourbeTimeListModel timeModel_;
-// EfLineIntersectionsResultsMng resNode_;
-// EfLineIntersectionsResultsBuilder builderNode_;
-// EfLineIntersectionsResultsBuilder builderMesh_;
-// EfLineIntersectionsResultsMng resMesh_;
EfLineIntersectionsCorrectionTester tester_;
- /**
- * Ligne initialement utilis\xE9e pour la creation de la courbe
- */
-// LineString initLineNode;
-// LineString initLineMesh;
public MvProfileTarget target_;
public MvProfileTreeModel(final MvProfileTarget _target, final EfLineIntersectionsCorrectionTester _tester) {
@@ -96,6 +87,13 @@
target_ = _model.target_;
}
+ @Override
+ public boolean isContentModifiable() {
+ return false;
+ }
+
+
+
/**
* ACHTUNG! Constructuer uniquement utilis\xE9 pour la serialization des graphes!! Il faut imp\xE9rativement initialiser la variable target_ avec un
* ProfilDapter apres coup avec le trpostsource qui convient
@@ -294,7 +292,7 @@
}
}
- MvProfileGridPalette paletteGrid_;
+// MvProfileGridPalette paletteGrid_;
// public EfLineIntersectionsResultsI[] getDefaultRes() {
// return new EfLineIntersectionsResultsI[] { resNode_ == null ? null : resNode_.getDefaultRes(),
@@ -768,14 +766,14 @@
}
- protected MvProfileGridPalette getPaletteGrid() {
- return paletteGrid_;
- }
+// protected MvProfileGridPalette getPaletteGrid() {
+// return paletteGrid_;
+// }
+//
+// protected void setPaletteGrid(final MvProfileGridPalette _paletteGrid) {
+// paletteGrid_ = _paletteGrid;
+// }
- protected void setPaletteGrid(final MvProfileGridPalette _paletteGrid) {
- paletteGrid_ = _paletteGrid;
- }
-
@Override
public void importCourbes(final EvolutionReguliereInterface[] _crb, final CtuluCommandManager _mng,
final ProgressionInterface _prog) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|