|
From: <de...@us...> - 2012-06-27 23:09:55
|
Revision: 7408
http://fudaa.svn.sourceforge.net/fudaa/?rev=7408&view=rev
Author: deniger
Date: 2012-06-27 23:09:48 +0000 (Wed, 27 Jun 2012)
Log Message:
-----------
Modified Paths:
--------------
trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/TrPostVisuPanel.java
trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/actions/TrPostActionController.java
Modified: trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/TrPostVisuPanel.java
===================================================================
--- trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/TrPostVisuPanel.java 2012-06-27 22:25:06 UTC (rev 7407)
+++ trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/TrPostVisuPanel.java 2012-06-27 23:09:48 UTC (rev 7408)
@@ -1,9 +1,6 @@
/**
- * @creation 25 mars 2004
- * @modification $Date: 2007-06-14 12:01:40 $
- * @license GNU General Public License 2
- * @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne
- * @mail de...@fu...
+ * @creation 25 mars 2004 @modification $Date: 2007-06-14 12:01:40 $ @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;
@@ -83,7 +80,7 @@
*/
@SuppressWarnings("serial")
public class TrPostVisuPanel extends TrVisuPanel implements TrPostDataListener, EbliAnimatedInterface, CtuluExportDataInterface, TimeStepFormatAware,
- ListDataListener {
+ ListDataListener {
private class ClearSonde extends EbliActionSimple {
@@ -110,7 +107,6 @@
setEnabled(true);
}
}
-
}
private class EvolutionAction extends EbliActionSimple {
@@ -136,7 +132,6 @@
setEnabled(true);
}
}
-
}
public static class ExportAction extends EbliActionSimple {
@@ -156,11 +151,13 @@
}
}
- public static TrPostVisuPanel buildVisuPanelForWidgets(final TrPostProjet projet, final TrPostCommonImplementation impl, final TrPostSource source) {
+ public static TrPostVisuPanel buildVisuPanelForWidgets(final TrPostProjet projet, final TrPostCommonImplementation impl,
+ final TrPostSource source) {
// -- creation de la legende --//
final CalqueLegendeWidgetAdapter legendeCalque = new CalqueLegendeWidgetAdapter(impl.getCurrentLayoutFille().getScene());
- final TrPostVisuPanel pnVisu = new TrPostVisuPanel(impl, projet, source.getFlecheListModel().getSize() == 0, legendeCalque, source);
+ final TrPostVisuPanel pnVisu = new TrPostVisuPanel(impl, projet, source.getFlecheListModel().getSize() == 0, legendeCalque,
+ source);
return pnVisu;
}
@@ -170,12 +167,14 @@
* @param _selection la selection
* @param pn peut etre null.//TODO WARN
*/
- public static void startExport(final CtuluUI _impl, final TrPostSource _src, final MvSelectionNodeOrEltData _selection, TrVisuPanel pn) {
+ public static void startExport(final CtuluUI _impl, final TrPostSource _src, final MvSelectionNodeOrEltData _selection,
+ TrVisuPanel pn) {
TrExportFactory fac = null;
if ((_src instanceof TrPostSourceTelemac3D)
&& CtuluLibDialog.showConfirmation(_impl.getParentComponent(), "TELEMAC 3D",
- TrResource.getS("Voulez-vous exporter votre projet dans son format 3D initial ?"), TrLib.getString("Exporter en 3D"),
- TrLib.getString(" Rester en 2D"))) {
+ TrResource.getS("Voulez-vous exporter votre projet dans son format 3D initial ?"),
+ TrLib.getString("Exporter en 3D"),
+ TrLib.getString(" Rester en 2D"))) {
fac = new TrExportFactory(_impl, TrTelemacImplHelper.getID(), ((TrPostSourceTelemac3D) _src).getInit3DSource(), pn);
fac.setInitIpobo(((TrPostSourceTelemac3D) _src).getIpobo());
fac.setIparams(((TrPostSourceTelemac3D) _src).getIparams());
@@ -186,37 +185,33 @@
}
if (_src.containsOnlyElementVar()) {
fac = new TrExportFactory(_impl, TrRubarImplHelper.getID(), _src.getNewVarListModel(), _src.getNewTimeListModel(),
- new TrPostSourceRubarNodeBathyAdapter((TrPostSourceRubar) _src), _src.getInterpolator().getVect(), pn);
+ new TrPostSourceRubarNodeBathyAdapter((TrPostSourceRubar) _src), _src.getInterpolator().getVect(),
+ pn);
}
if (fac == null) {
- fac = new TrExportFactory(_impl, (_src instanceof TrPostSourceReflux || _src instanceof TrPostSourceReaderReflux) ? TrRefluxImplHelper.getID()
- : null, _src, pn);
+ fac = new TrExportFactory(_impl,
+ (_src instanceof TrPostSourceReflux || _src instanceof TrPostSourceReaderReflux) ? TrRefluxImplHelper.getID()
+ : null, _src, pn);
}
if (_src instanceof TrPostSourceSerafin) {
fac.setIdate(((TrPostSourceSerafin) _src).getReaderSerafin().getReferenceDateInMillis());
}
MvExportFactory.startExport(fac, _impl, _selection);
}
-
CalqueActionSonde actionSonde = null;
-
ActionAnimationTreeSelection anim_;
-
TrPostInfoDelegate info_;
-
protected TrIsoLayer isoLayer_;
-
protected TrPostProjet projet_;
-
public boolean simplifiedInit;
-
/**
- * Tres important!!! c'est la source utilisee par le trpostvisupanel. Il est automatiquement plac\xE9 en param du
- * constructeur. Si rien n est mis apr defaut ce sera le source 0, donc le cas ou il y a une seule simul.
+ * Tres important!!! c'est la source utilisee par le trpostvisupanel. Il est automatiquement plac\xE9 en param du constructeur. Si
+ * rien n est mis apr defaut ce sera le source 0, donc le cas ou il y a une seule simul.
*/
private final TrPostSource source_;
- public TrPostVisuPanel(final TrPostCommonImplementation _impl, final TrPostProjet _projet, final BCalqueLegende _leg, final TrPostSource _src) {
+ public TrPostVisuPanel(final TrPostCommonImplementation _impl, final TrPostProjet _projet, final BCalqueLegende _leg,
+ final TrPostSource _src) {
this(_impl, _projet, false, _leg, _src);
}
@@ -227,7 +222,7 @@
* @param _src : l indice de la source courante utilis\xE9e
*/
public TrPostVisuPanel(final TrPostCommonImplementation _impl, final TrPostProjet _controller, final boolean _simplified,
- final BCalqueLegende _leg, final TrPostSource _src) {
+ final BCalqueLegende _leg, final TrPostSource _src) {
super(new TrPostActionController(_impl));
// -- mise a jour de l indice de la source courante --//
@@ -235,8 +230,9 @@
projet_ = _controller;
info_ = new TrPostInfoDelegate(source_, getEbliFormatter());
addCqInfos(source_.getGrid());
- if (_leg != null)
+ if (_leg != null) {
addCqLegende(_leg);
+ }
addCqMaillage(source_.getGrid(), info_);
final MvGridLayerGroup gr = getGridGroup();
gr.getPointLayer().setVisible(false);
@@ -245,8 +241,8 @@
polygonLayer.setVisible(false);
buildFrontiereLayer();
isoLayer_ = buildIsoLayer();
- final EbliActionInterface[] action = new EbliActionInterface[] { addActionEvolutionFor(getSource().containsOnlyElementVar()),
- new TrIsoLineAction(this), getClearSondeAction() };
+ final EbliActionInterface[] action = new EbliActionInterface[]{addActionEvolutionFor(),
+ new TrIsoLineAction(this), getClearSondeAction()};
simplifiedInit = _simplified;
if (!_simplified) {
final TrPostFlecheLayer fleche = new TrPostFlecheLayer(source_);
@@ -275,7 +271,7 @@
_controller.registerTimeListenerTo(_src, this);
}
- protected EbliActionInterface addActionEvolutionFor(final boolean _rubar) {
+ protected EbliActionInterface addActionEvolutionFor() {
return new EvolutionAction();
}
@@ -293,10 +289,12 @@
TrPostCourbeBuilder.chooseAndBuild(this, (ZCalqueAffichageDonnees) getCalqueActif(), idx, selectedVar);
} else if (isSelectionOkForEvolutionSonde()) {
- TrPostCourbeBuilder.chooseAndBuild(this, (ZCalqueAffichageDonnees) getCalqueActif(), getInterpolePointForEvol(), getSelectedVarInCalqueActif());
+ TrPostCourbeBuilder.chooseAndBuild(this, (ZCalqueAffichageDonnees) getCalqueActif(), getInterpolePointForEvol(),
+ getSelectedVarInCalqueActif());
} else {
- TrPostCourbeBuilder.chooseAndBuild(this, (ZCalqueAffichageDonnees) getCalqueActif(), null, null, getSelectedVarInCalqueActif());
+ TrPostCourbeBuilder.chooseAndBuild(this, (ZCalqueAffichageDonnees) getCalqueActif(), null, null,
+ getSelectedVarInCalqueActif());
}
@@ -306,7 +304,7 @@
final MvFrontierLayerAbstract l = new TrFrontierLayer(source_, info_);
l.setName("cqGridFr");
l.setTitle(TrResource.getS("fronti\xE8res"));
- l.setActions(new EbliActionInterface[] { l.create3DAction(getImpl(), getCmdMng()) });
+ l.setActions(new EbliActionInterface[]{l.create3DAction(getImpl(), getCmdMng())});
getDonneesCalque().enPremier(l);
}
@@ -340,8 +338,9 @@
}
@Override
- public void dataChanged(final H2dVariableType _old, final H2dVariableType _new, final boolean _contentChanged, final boolean _isFleche,
- final Set _varDependingOnOld) {
+ public void dataChanged(final H2dVariableType _old, final H2dVariableType _new, final boolean _contentChanged,
+ final boolean _isFleche,
+ final Set _varDependingOnOld) {
final BCalque[] cq = getDonneesCalque().getTousCalques();
if (cq != null) {
for (int i = cq.length - 1; i >= 0; i--) {
@@ -413,7 +412,6 @@
public TrBcBoundaryLayer getBcLayer() {
return null;
}
-
ClearSonde actionClearSonde;
public ClearSonde getClearSondeAction() {
@@ -432,6 +430,7 @@
}
private class BuildingData {
+
ZCalqueLigneBrisee[] buildings;
boolean useBoundary = false;
}
@@ -461,8 +460,9 @@
MvFrontierLayerAbstract boundaryLayer = getFrontierLayer3D();
boolean useFrontier = boundaryLayer != null && boundaryLayer.getModeleCl().getNbFrontier() > 0;
if (!useFrontier && buildingLayers.isEmpty()) {
- getImpl().warn(TrLib.getString("Affichage des batiments 3D"), TrLib.getString("Il n'y a pas de donn\xE9es permettant l'affichage de batiments"),
- true);
+ getImpl().warn(TrLib.getString("Affichage des batiments 3D"), TrLib.getString(
+ "Il n'y a pas de donn\xE9es permettant l'affichage de batiments"),
+ true);
return new BuildingData();
}
BuildingLayerSelector selector = new BuildingLayerSelector(buildingLayers, useFrontier);
@@ -495,7 +495,6 @@
/*
* protected void anim(){ if (anim_ == null) anim_ = new EbliAnimation(this); anim_.go(); }
*/
-
public TrPostInfoDelegate getInfo() {
return info_;
}
@@ -536,7 +535,7 @@
/**
* Retourne le pas de temps du calque actif. Retourne -1 sinon.
- *
+ *
* @return
*/
public int getSelectedTimeInCalqueActif() {
@@ -570,7 +569,7 @@
/**
* Action qui recupere la sonde comme action.
- *
+ *
* @return
*/
public CalqueActionSonde getSondeAction() {
@@ -659,7 +658,7 @@
return;
}
Tr3DFactory.afficheFrame(_f, source_, source_.getInterpolator().getVect(), getImpl(), getGroupFond(),
- buildingLayers3D.useBoundary ? getFrontierLayer3D() : null, buildingLayers3D.buildings);
+ buildingLayers3D.useBoundary ? getFrontierLayer3D() : null, buildingLayers3D.buildings);
}
@@ -687,5 +686,4 @@
@Override
public void intervalRemoved(ListDataEvent e) {
}
-
}
\ No newline at end of file
Modified: trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/actions/TrPostActionController.java
===================================================================
--- trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/actions/TrPostActionController.java 2012-06-27 22:25:06 UTC (rev 7407)
+++ trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/actions/TrPostActionController.java 2012-06-27 23:09:48 UTC (rev 7408)
@@ -22,9 +22,9 @@
import org.fudaa.fudaa.sig.layer.FSigVisuPanelController;
/**
- * Un ActionController sp\xE9cifique qui permet de preciser les palettes qui doivent rester en tant que JDialog et celle
- * qui seront dockes dans la frame Flexdock.
- *
+ * Un ActionController sp\xE9cifique qui permet de preciser les palettes qui doivent rester en tant que JDialog et celle qui seront
+ * dockes dans la frame Flexdock.
+ *
* @author deniger
*/
public class TrPostActionController extends FSigVisuPanelController {
@@ -34,11 +34,10 @@
*/
Map<String, EbliActionPaletteAbstract> mapTabPalettes_ = new HashMap<String, EbliActionPaletteAbstract>(2);
Collection<EbliActionPaletteAbstract> tabPalettes_ = null;
+ Collection<String> useAsPalette = Arrays.asList("CONFIGURE", "CHANGE_REFERENCE", "GLOBAL_MOVE", "GLOBAL_ROTATE",
+ "PALETTE_DISTANCE");
+ Collection<String> useAsTab = Arrays.asList("INFOS", "PALETTE_EDTION");
- Collection<String> useAsPalette = Arrays.asList("CONFIGURE", "CHANGE_REFERENCE", "GLOBAL_MOVE", "GLOBAL_ROTATE");
-
- Collection<String> useAsTab = Arrays.asList("INFOS", "PALETTE_EDTION"/**, "NAVIGATE"**/);
-
/**
* @param _ui l'ui
*/
@@ -48,7 +47,9 @@
@Override
protected void buildButtonGroupNavigation() {
- if (navigationActionGroup_ != null) { return; }
+ if (navigationActionGroup_ != null) {
+ return;
+ }
super.buildButtonGroupNavigation();
final EbliActionInterface[] actions = navigationActionGroup_;
navigationActionGroup_ = removePalettes(actions);
@@ -62,13 +63,17 @@
@Override
protected void buildButtonGroupStandard() {
- if (standardActionGroup_ != null) return;
+ if (standardActionGroup_ != null) {
+ return;
+ }
super.buildButtonGroupStandard();
standardActionGroup_ = removePalettes(standardActionGroup_);
}
protected void buildButtonGroupSpecifiques() {
- if (standardActionGroup_ != null) return;
+ if (standardActionGroup_ != null) {
+ return;
+ }
super.buildButtonGroupStandard();
standardActionGroup_ = removePalettes(standardActionGroup_);
@@ -80,17 +85,20 @@
@Override
public Collection<EbliActionPaletteAbstract> getTabPaletteAction() {
// si deja fait on retourne de suite
- if (tabPalettes_ != null) return tabPalettes_;
+ if (tabPalettes_ != null) {
+ return tabPalettes_;
+ }
initSpecificActions();
tabPalettes_ = new ArrayList<EbliActionPaletteAbstract>(3);
for (final String str : useAsTab) {
final EbliActionPaletteAbstract o = mapTabPalettes_.get(str);
- if (o != null) tabPalettes_.add(o);
+ if (o != null) {
+ tabPalettes_.add(o);
+ }
}
return tabPalettes_;
}
-
@Override
public FSigVisuPanel getVisuPanel() {
return super.getVisuPanel();
@@ -112,13 +120,12 @@
protected EbliActionInterface[] getApplicationActions() {
return removePalettes(pn_.getApplicationActions());
}
-
private List<EbliActionPaletteAbstract> toHide = new ArrayList<EbliActionPaletteAbstract>();
/**
* @param actions les actions a trier
- * @return la listes des actions a ajouter dans les menus et autres. Les autres ( les palettes) seront visible tout le
- * temps dans des dock.
+ * @return la listes des actions a ajouter dans les menus et autres. Les autres ( les palettes) seront visible tout le temps
+ * dans des dock.
*/
private EbliActionInterface[] removePalettes(final EbliActionInterface[] actions) {
@@ -126,7 +133,9 @@
for (int i = 0; i < actions.length; i++) {
final EbliActionInterface action = actions[i];
- if (action == null) continue;
+ if (action == null) {
+ continue;
+ }
final String value = (String) action.getValue(Action.ACTION_COMMAND_KEY);
final boolean isPalette = action instanceof EbliActionPaletteAbstract;
if ("GLOBAL_MOVE".equals(value) || "GLOBAL_ROTATE".equals(value)) {
@@ -136,6 +145,7 @@
}
if (!isPalette || useAsPalette.contains(value)) {
acts.add(action);
+ ((EbliActionPaletteAbstract) action).setDialogIsModal(false);
}
if (isPalette && useAsTab.contains(value)) {
mapTabPalettes_.put(value, (EbliActionPaletteAbstract) action);
@@ -152,5 +162,4 @@
}
}
-
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|