|
From: <bma...@us...> - 2011-09-26 14:28:23
|
Revision: 6448
http://fudaa.svn.sourceforge.net/fudaa/?rev=6448&view=rev
Author: bmarchan
Date: 2011-09-26 14:28:17 +0000 (Mon, 26 Sep 2011)
Log Message:
-----------
Mod : Suppression de calques inutiles.
Modified Paths:
--------------
trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/PivVisuPanel.java
Removed Paths:
-------------
trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/layer/PivLigneBriseeLayer.java
trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/layer/PivMultiPointLayer.java
Modified: trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/PivVisuPanel.java
===================================================================
--- trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/PivVisuPanel.java 2011-09-26 14:27:24 UTC (rev 6447)
+++ trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/PivVisuPanel.java 2011-09-26 14:28:17 UTC (rev 6448)
@@ -24,6 +24,8 @@
import org.fudaa.ebli.calque.ZEbliCalquesPanel;
import org.fudaa.ebli.calque.dessin.DeForme;
import org.fudaa.ebli.calque.edition.ZCalqueEditionInteraction;
+import org.fudaa.ebli.calque.edition.ZCalqueLigneBriseeEditable;
+import org.fudaa.ebli.calque.edition.ZCalqueMultiPointEditable;
import org.fudaa.ebli.calque.edition.ZCalquePointEditable;
import org.fudaa.ebli.calque.edition.ZEditorDefault;
import org.fudaa.ebli.calque.edition.ZModelePointEditable;
@@ -46,8 +48,6 @@
import org.fudaa.fudaa.piv.layer.PivControlPointsModel;
import org.fudaa.fudaa.piv.layer.PivIASALayer;
import org.fudaa.fudaa.piv.layer.PivIASAModel;
-import org.fudaa.fudaa.piv.layer.PivLigneBriseeLayer;
-import org.fudaa.fudaa.piv.layer.PivMultiPointLayer;
import org.fudaa.fudaa.piv.layer.PivOriginalImageModel;
import org.fudaa.fudaa.piv.layer.PivOrthoPointsModel;
import org.fudaa.fudaa.piv.layer.PivRealImageModel;
@@ -101,11 +101,11 @@
ZCalqueImageRaster cqTransfImage_;
ZCalquePointEditable cqGrille_;
- PivLigneBriseeLayer cqCntGrille_;
- PivMultiPointLayer cqOrthoPoints_;
+ ZCalqueLigneBriseeEditable cqCntGrille_;
+ ZCalqueMultiPointEditable cqOrthoPoints_;
ZCalqueImageRaster cqOriginalImg_;
- PivMultiPointLayer cqRealOrthoPoints_;
- PivMultiPointLayer cqRealControlPoints_;
+ ZCalqueMultiPointEditable cqRealOrthoPoints_;
+ ZCalqueMultiPointEditable cqRealControlPoints_;
ZCalqueImageRaster cqRealImg_;
PivIASALayer cqIASA_;
/** Le calque d'\xE9dition du contour de grille. */
@@ -407,7 +407,7 @@
*/
protected void buildOriginalLayers() {
// Layer des ortho points
- cqOrthoPoints_=new PivMultiPointLayer();
+ cqOrthoPoints_=new ZCalqueMultiPointEditable(null, null);
cqOrthoPoints_.setTitle(PivResource.getS("Points r\xE9f\xE9rence"));
cqOrthoPoints_.setIconModel(0, new TraceIconModel(TraceIcon.PLUS_DOUBLE, 3, Color.RED));
cqOrthoPoints_.setName("cqOrthoPoints");
@@ -437,7 +437,7 @@
*/
protected void buildRealLayers() {
// Layer des ortho points
- cqRealOrthoPoints_=new PivMultiPointLayer();
+ cqRealOrthoPoints_=new ZCalqueMultiPointEditable(null,null);
cqRealOrthoPoints_.setTitle(PivResource.getS("Points r\xE9f\xE9rence"));
cqRealOrthoPoints_.setIconModel(0, new TraceIconModel(TraceIcon.PLUS_DOUBLE, 3, Color.RED));
cqRealOrthoPoints_.setName("cqRealOrthoPoints");
@@ -447,7 +447,7 @@
// Layer des ortho points recalcul\xE9s
// Layer des ortho points
- cqRealControlPoints_=new PivMultiPointLayer();
+ cqRealControlPoints_=new ZCalqueMultiPointEditable(null,null);
cqRealControlPoints_.setTitle(PivResource.getS("Points de controle"));
cqRealControlPoints_.setIconModel(0, new TraceIconModel(TraceIcon.PLUS_DOUBLE, 3, Color.BLUE));
cqRealControlPoints_.setName("cqRealControlPoints");
@@ -501,7 +501,7 @@
cqIASA_.setDestructible(false);
// Layer des bords de grille
- cqCntGrille_=new PivLigneBriseeLayer();
+ cqCntGrille_=new ZCalqueLigneBriseeEditable();
cqCntGrille_.setFormeEnable(new int[]{DeForme.POLYGONE});
cqCntGrille_.setTitle(PivResource.getS("Contour grille"));
cqCntGrille_.setLineModel(0, new TraceLigneModel(TraceLigne.POINTILLE, 1, Color.RED));
Deleted: trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/layer/PivLigneBriseeLayer.java
===================================================================
--- trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/layer/PivLigneBriseeLayer.java 2011-09-26 14:27:24 UTC (rev 6447)
+++ trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/layer/PivLigneBriseeLayer.java 2011-09-26 14:28:17 UTC (rev 6448)
@@ -1,133 +0,0 @@
-package org.fudaa.fudaa.piv.layer;
-
-import java.awt.Color;
-import java.awt.FontMetrics;
-import java.awt.Graphics2D;
-import java.awt.geom.Rectangle2D;
-import org.fudaa.ctulu.gis.GISAttributeInterface;
-import org.fudaa.ctulu.gis.GISAttributeModel;
-import org.fudaa.ctulu.gis.GISZoneCollection;
-import org.fudaa.ebli.calque.edition.ZCalqueLigneBriseeEditable;
-import org.fudaa.ebli.geometrie.GrBoite;
-import org.fudaa.ebli.geometrie.GrMorphisme;
-import org.fudaa.ebli.geometrie.GrPoint;
-
-/**
- * Un calque contenant des lignes bris\xE9es impl\xE9mentant l'affichage de labels
- * sur les atomics. Repris de Fudaa-Modeleur#ZCalqueGeometry en attendant que
- * celui ci soit r\xE9int\xE9gr\xE9 dans la branche principale.
- *
- * @author Bertrand Marchand (mar...@de...)
- * @version $Id$
- */
-public class PivLigneBriseeLayer extends ZCalqueLigneBriseeEditable {
- /** L'attribut utilis\xE9 pour afficher les labels */
- protected GISAttributeInterface attrLabels_=null;
-
- /**
- * Le seul constructeur, avec le modele \xE9ditable.
- */
- public PivLigneBriseeLayer() {
- super();
- }
-
- /**
- * D\xE9finit l'attribut atomique pris pour afficher les labels.
- * @param _att L'attribut. Si Null : Pas d'affichage de labels.
- */
- public void setAttributForLabels(GISAttributeInterface _att) {
- if (_att==null || !_att.isAtomicValue())
- attrLabels_=null;
- else
- attrLabels_=_att;
- repaint();
- }
-
- /**
- * Trace les donn\xE9es du calque, avec les labels.
- * @param _g Le contexte graphique.
- * @param _versEcran Le morphisme pour passer des coordonn\xE9es r\xE9elles vers ecran.
- * @param _versReel Le morphisme pour passer des coordonn\xE9es ecran vers r\xE9elles.
- * @param _clipReel La fenetre de clipping en coordonn\xE9es r\xE9elles.
- */
- @Override
- public void paintDonnees(final Graphics2D _g, final GrMorphisme _versEcran, final GrMorphisme _versReel,
- final GrBoite _clipReel) {
- super.paintDonnees(_g, _versEcran, _versReel,_clipReel);
- // Les labels sur les atomiques.
- paintLabelsOnAtomics(_g, _versEcran, _versReel, _clipReel);
- }
-
- /**
- * Trace les labels sur les atomiques.
- * @param _g Le contexte graphique.
- * @param _versEcran Le morphisme pour passer des coordonn\xE9es r\xE9elles vers ecran.
- * @param _versReel Le morphisme pour passer des coordonn\xE9es ecran vers r\xE9elles.
- * @param _clipReel La fenetre de clipping en coordonn\xE9es r\xE9elles.
- */
- protected void paintLabelsOnAtomics(final Graphics2D _g, final GrMorphisme _versEcran, final GrMorphisme _versReel,
- final GrBoite _clipReel) {
-
- final GrBoite clip = _clipReel;
- final GrMorphisme versEcran = _versEcran;
- final int nombre = modele_.getNombre();
- final GrBoite bPoly = new GrBoite();
-
- if (attrLabels_!=null && !isRapide()) {
- GISZoneCollection geomData = modeleDonnees().getGeomData();
- int idxLabels=geomData.getIndiceOf(attrLabels_);
-
- if (idxLabels!=-1) {
- final FontMetrics fm = _g.getFontMetrics();
- final Color fgColor = _g.getColor();
- final Color bgColor = getBackground();
-
- for (int i=nombre-1; i>=0; i--) {
- // il n'y a pas de points pour cette ligne
- if (modele_.getNbPointForGeometry(i)<=0) {
- continue;
- }
-
- modele_.getDomaineForGeometry(i, bPoly);
- // Si la boite du polygone n'est pas dans la boite d'affichage on
- // passe
- if (bPoly.intersectionXY(clip)==null) {
- continue;
- }
- final int nbPoints=modele_.getNbPointForGeometry(i);
- if (nbPoints<=0) {
- continue;
- }
-
- GISAttributeModel mdl=(GISAttributeModel)geomData.getModel(idxLabels).getObjectValueAt(i);
-
- final GrPoint ptDest=new GrPoint();
- for (int j=nbPoints-1; j>=0; j--) {
- modele_.point(ptDest, i, j);
- if (!_clipReel.contientXY(ptDest)) {
- continue;
- }
-
- Object o=mdl.getObjectValueAt(j);
- if (o==null)
- continue;
- String s=o.toString().trim();
- if (s.equals(""))
- continue;
-
- ptDest.autoApplique(versEcran);
- final Rectangle2D rec=fm.getStringBounds(s, _g);
- double x=ptDest.x_-rec.getWidth()/2;
- double y=ptDest.y_-5;
- rec.setFrame(x, y-fm.getAscent(), rec.getWidth(), fm.getAscent()+2);
- _g.setColor(bgColor);
- _g.fill(rec);
- _g.setColor(fgColor);
- _g.drawString(s, (int)x, (int)y);
- }
- }
- }
- }
- }
-
-}
Deleted: trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/layer/PivMultiPointLayer.java
===================================================================
--- trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/layer/PivMultiPointLayer.java 2011-09-26 14:27:24 UTC (rev 6447)
+++ trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/layer/PivMultiPointLayer.java 2011-09-26 14:28:17 UTC (rev 6448)
@@ -1,133 +0,0 @@
-package org.fudaa.fudaa.piv.layer;
-
-import java.awt.Color;
-import java.awt.FontMetrics;
-import java.awt.Graphics2D;
-import java.awt.geom.Rectangle2D;
-import org.fudaa.ctulu.gis.GISAttributeInterface;
-import org.fudaa.ctulu.gis.GISAttributeModel;
-import org.fudaa.ctulu.gis.GISZoneCollection;
-import org.fudaa.ebli.calque.edition.ZCalqueMultiPointEditable;
-import org.fudaa.ebli.geometrie.GrBoite;
-import org.fudaa.ebli.geometrie.GrMorphisme;
-import org.fudaa.ebli.geometrie.GrPoint;
-
-/**
- * Un calque contenant des multipoints impl\xE9mentant l'affichage de labels sur
- * les atomics. Repris de Fudaa-Modeleur#ZCalqueGeometry en attendant que celui
- * ci soit r\xE9int\xE9gr\xE9 dans la branche principale.
- *
- * @author Bertrand Marchand (mar...@de...)
- * @version $Id$
- */
-public class PivMultiPointLayer extends ZCalqueMultiPointEditable {
- /** L'attribut utilis\xE9 pour afficher les labels */
- protected GISAttributeInterface attrLabels_=null;
-
- /**
- * Le seul constructeur.
- */
- public PivMultiPointLayer() {
- super(null, null);
- }
-
- /**
- * D\xE9finit l'attribut atomique pris pour afficher les labels.
- * @param _att L'attribut. Si Null : Pas d'affichage de labels.
- */
- public void setAttributForLabels(GISAttributeInterface _att) {
- if (_att==null || !_att.isAtomicValue())
- attrLabels_=null;
- else
- attrLabels_=_att;
- repaint();
- }
-
- /**
- * Trace les donn\xE9es du calque, avec les labels.
- * @param _g Le contexte graphique.
- * @param _versEcran Le morphisme pour passer des coordonn\xE9es r\xE9elles vers ecran.
- * @param _versReel Le morphisme pour passer des coordonn\xE9es ecran vers r\xE9elles.
- * @param _clipReel La fenetre de clipping en coordonn\xE9es r\xE9elles.
- */
- @Override
- public void paintDonnees(final Graphics2D _g, final GrMorphisme _versEcran, final GrMorphisme _versReel,
- final GrBoite _clipReel) {
- super.paintDonnees(_g, _versEcran, _versReel,_clipReel);
- // Les labels sur les atomiques.
- paintLabelsOnAtomics(_g, _versEcran, _versReel, _clipReel);
- }
-
- /**
- * Trace les labels sur les atomiques.
- * @param _g Le contexte graphique.
- * @param _versEcran Le morphisme pour passer des coordonn\xE9es r\xE9elles vers ecran.
- * @param _versReel Le morphisme pour passer des coordonn\xE9es ecran vers r\xE9elles.
- * @param _clipReel La fenetre de clipping en coordonn\xE9es r\xE9elles.
- */
- protected void paintLabelsOnAtomics(final Graphics2D _g, final GrMorphisme _versEcran, final GrMorphisme _versReel,
- final GrBoite _clipReel) {
-
- final GrBoite clip = _clipReel;
- final GrMorphisme versEcran = _versEcran;
- final int nombre = modele_.getNombre();
- final GrBoite bPoly = new GrBoite();
-
- if (attrLabels_!=null && !isRapide()) {
- GISZoneCollection geomData = modeleDonnees().getGeomData();
- int idxLabels=geomData.getIndiceOf(attrLabels_);
-
- if (idxLabels!=-1) {
- final FontMetrics fm = _g.getFontMetrics();
- final Color fgColor = _g.getColor();
- final Color bgColor = getBackground();
-
- for (int i=nombre-1; i>=0; i--) {
- // il n'y a pas de points pour cette ligne
- if (modele_.getNbPointForGeometry(i)<=0) {
- continue;
- }
-
- modele_.getDomaineForGeometry(i, bPoly);
- // Si la boite du polygone n'est pas dans la boite d'affichage on
- // passe
- if (bPoly.intersectionXY(clip)==null) {
- continue;
- }
- final int nbPoints=modele_.getNbPointForGeometry(i);
- if (nbPoints<=0) {
- continue;
- }
-
- GISAttributeModel mdl=(GISAttributeModel)geomData.getModel(idxLabels).getObjectValueAt(i);
-
- final GrPoint ptDest=new GrPoint();
- for (int j=nbPoints-1; j>=0; j--) {
- modele_.point(ptDest, i, j);
- if (!_clipReel.contientXY(ptDest)) {
- continue;
- }
-
- Object o=mdl.getObjectValueAt(j);
- if (o==null)
- continue;
- String s=o.toString().trim();
- if (s.equals(""))
- continue;
-
- ptDest.autoApplique(versEcran);
- final Rectangle2D rec=fm.getStringBounds(s, _g);
- double x=ptDest.x_-rec.getWidth()/2;
- double y=ptDest.y_-5;
- rec.setFrame(x, y-fm.getAscent(), rec.getWidth(), fm.getAscent()+2);
- _g.setColor(bgColor);
- _g.fill(rec);
- _g.setColor(fgColor);
- _g.drawString(s, (int)x, (int)y);
- }
- }
- }
- }
- }
-
-}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|