|
From: <de...@us...> - 2012-10-31 17:22:20
|
Revision: 7837
http://fudaa.svn.sourceforge.net/fudaa/?rev=7837&view=rev
Author: deniger
Date: 2012-10-31 17:22:13 +0000 (Wed, 31 Oct 2012)
Log Message:
-----------
am?\195?\169lioration molette
Modified Paths:
--------------
trunk/framework/ebli-common/src/main/java/org/fudaa/ebli/controle/BMolette.java
trunk/framework/ebli-common/src/main/java/org/fudaa/ebli/palette/BPalettePlageDefault.java
trunk/framework/ebli-common/src/main/java/org/fudaa/ebli/trace/TraceIcon.java
Added Paths:
-----------
trunk/framework/ebli-common/src/main/java/org/fudaa/ebli/trace/TraceIconFleche.java
Modified: trunk/framework/ebli-common/src/main/java/org/fudaa/ebli/controle/BMolette.java
===================================================================
--- trunk/framework/ebli-common/src/main/java/org/fudaa/ebli/controle/BMolette.java 2012-10-30 16:28:42 UTC (rev 7836)
+++ trunk/framework/ebli-common/src/main/java/org/fudaa/ebli/controle/BMolette.java 2012-10-31 17:22:13 UTC (rev 7837)
@@ -20,6 +20,8 @@
import javax.swing.event.ChangeListener;
import com.memoire.bu.BuLightBorder;
+import java.awt.event.MouseWheelEvent;
+import java.awt.event.MouseWheelListener;
/**
* Une molette.
@@ -27,7 +29,8 @@
* @version $Revision: 1.11 $ $Date: 2006-09-19 14:55:52 $ by $Author: deniger $
* @author Axel von Arnim
*/
-public class BMolette extends JComponent implements MouseMotionListener, MouseListener {
+public class BMolette extends JComponent implements MouseMotionListener, MouseListener, MouseWheelListener {
+
public final static int VERTICAL = 1;
public final static int HORIZONTAL = 2;
public final static int PLUS = 3;
@@ -46,12 +49,14 @@
luminosite_ = 0.4;
tickSpacing_ = 5;
setOrientation(VERTICAL);
+ setFocusable(true);
event_ = new ChangeEvent(this);
direction_ = PLUS;
changeListeners_ = new ArrayList();
setBorder(new BuLightBorder(BuLightBorder.LOWERED, 1));
addMouseMotionListener(this);
addMouseListener(this);
+ addMouseWheelListener(this);
}
/*
@@ -119,41 +124,46 @@
// **********************************************
// EVENEMENTS
// **********************************************
- public void mouseMoved(final MouseEvent _e) {}
+ public void mouseMoved(final MouseEvent _e) {
+ }
+ public void mouseWheelMoved(MouseWheelEvent e) {
+ if (!isEnabled()) {
+ return;
+ }
+ if (e.getWheelRotation() < 0) {
+ if (orientation_ == HORIZONTAL) {
+ moveForwardHorizontal();
+ } else {
+ moveForwardVertical();
+ }
+ } else if (e.getWheelRotation() > 0) {
+ if (orientation_ == HORIZONTAL) {
+ moveBackwardHorizontal();
+ } else {
+ moveBackwardVertical();
+ }
+ }
+ repaint();
+ fireStateChanged();
+ }
+
public void mouseDragged(final MouseEvent _e) {
+ if (!isEnabled()) {
+ return;
+ }
if (orientation_ == HORIZONTAL) {
if ((_e.getPoint().x - prevMousePos_) > 0) {
- direction_ = PLUS;
- if (offset_ < tickSpacing_) {
- offset_++;
- } else {
- offset_ = 0;
- }
+ moveForwardHorizontal();
} else {
- direction_ = MOINS;
- if (offset_ > -tickSpacing_) {
- offset_--;
- } else {
- offset_ = 0;
- }
+ moveBackwardHorizontal();
}
prevMousePos_ = _e.getPoint().x;
} else {
if ((_e.getPoint().y - prevMousePos_) > 0) {
- direction_ = MOINS; // inversion de direction en y
- if (offset_ < tickSpacing_) {
- offset_++;
- } else {
- offset_ = 0;
- }
+ moveBackwardVertical();
} else {
- direction_ = PLUS;
- if (offset_ > -tickSpacing_) {
- offset_--;
- } else {
- offset_ = 0;
- }
+ moveForwardVertical();
}
prevMousePos_ = _e.getPoint().y;
}
@@ -161,13 +171,19 @@
fireStateChanged();
}
- public void mouseClicked(final MouseEvent _e) {}
+ public void mouseClicked(final MouseEvent _e) {
+ }
- public void mouseEntered(final MouseEvent _e) {}
+ public void mouseEntered(final MouseEvent _e) {
+ }
- public void mouseExited(final MouseEvent _e) {}
+ public void mouseExited(final MouseEvent _e) {
+ }
public void mousePressed(final MouseEvent _e) {
+ if (!isEnabled()) {
+ return;
+ }
if (orientation_ == HORIZONTAL) {
prevMousePos_ = _e.getPoint().x;
} else {
@@ -177,6 +193,9 @@
}
public void mouseReleased(final MouseEvent _e) {
+ if (!isEnabled()) {
+ return;
+ }
adjusting_ = false;
fireStateChanged();
}
@@ -265,7 +284,7 @@
// Methodes privees
private Color darkenBg(final int _xI) {
- int x=_xI;
+ int x = _xI;
final Color bg = getBackground();
int width;
if (orientation_ == HORIZONTAL) {
@@ -280,8 +299,44 @@
x = 0;
}
double dev = Math.abs(Math.cos((width / 2 - x) * Math.PI / width));
- dev = dev / (2. - contraste_) + luminosite_;
+ dev = dev / (2. - (isEnabled() ? contraste_ : 1.8d)) + (isEnabled() ? luminosite_ : 0.7);
return new Color((int) (Math.min(bg.getRed() * dev, 255)), (int) (Math.min(bg.getGreen() * dev, 255)), (int) (Math
- .min(bg.getBlue() * dev, 255)));
+ .min(bg.getBlue() * dev, 255)));
}
+
+ private void moveForwardHorizontal() {
+ direction_ = PLUS;
+ if (offset_ < tickSpacing_) {
+ offset_++;
+ } else {
+ offset_ = 0;
+ }
+ }
+
+ private void moveBackwardHorizontal() {
+ direction_ = MOINS;
+ if (offset_ > -tickSpacing_) {
+ offset_--;
+ } else {
+ offset_ = 0;
+ }
+ }
+
+ private void moveBackwardVertical() {
+ direction_ = MOINS; // inversion de direction en y
+ if (offset_ < tickSpacing_) {
+ offset_++;
+ } else {
+ offset_ = 0;
+ }
+ }
+
+ private void moveForwardVertical() {
+ direction_ = PLUS;
+ if (offset_ > -tickSpacing_) {
+ offset_--;
+ } else {
+ offset_ = 0;
+ }
+ }
}
Modified: trunk/framework/ebli-common/src/main/java/org/fudaa/ebli/palette/BPalettePlageDefault.java
===================================================================
--- trunk/framework/ebli-common/src/main/java/org/fudaa/ebli/palette/BPalettePlageDefault.java 2012-10-30 16:28:42 UTC (rev 7836)
+++ trunk/framework/ebli-common/src/main/java/org/fudaa/ebli/palette/BPalettePlageDefault.java 2012-10-31 17:22:13 UTC (rev 7837)
@@ -51,14 +51,11 @@
public void setSubTitleVisible(boolean subTitleTitleVisible) {
this.subTitleVisible = subTitleTitleVisible;
}
-
public String titre_;
private boolean logScale;
public BPalettePlageDefault() {
-
}
-
boolean reduit;
public JComponent createReduit() {
@@ -83,7 +80,7 @@
}
public boolean setReduit(final boolean _b) {
- reduit=_b;
+ reduit = _b;
return true;
}
@@ -163,9 +160,9 @@
}
/**
- * Si _z est compris entre 0 et 9, une couleur standard (variable statique de Color) est renvoyee. Sinon, une couleur
- * est choisie au hasard entre le rouge et le magenta.
- *
+ * Si _z est compris entre 0 et 9, une couleur standard (variable statique de Color) est renvoyee. Sinon, une couleur est choisie au hasard entre le
+ * rouge et le magenta.
+ *
* @param _z un entier
* @return une couleur correspondante.
*/
@@ -174,31 +171,34 @@
return Color.black;
}
if (_z == 1) {
- return Color.cyan;
+ return Color.orange;
}
if (_z == 2) {
return Color.green;
}
if (_z == 3) {
- return Color.gray;
+ return Color.red;
}
if (_z == 4) {
- return Color.orange;
+ return Color.pink;
}
if (_z == 5) {
return Color.yellow;
}
if (_z == 6) {
- return Color.red;
+ return Color.blue;
+
}
if (_z == 7) {
- return Color.blue;
+ return Color.darkGray;
}
if (_z == 8) {
- return Color.pink;
+ return Color.gray;
+
}
if (_z == 9) {
- return Color.darkGray;
+ return Color.cyan;
+
}
return BPalettePlageAbstract.getCouleur(Color.red, Color.magenta, Math.random());
}
Modified: trunk/framework/ebli-common/src/main/java/org/fudaa/ebli/trace/TraceIcon.java
===================================================================
--- trunk/framework/ebli-common/src/main/java/org/fudaa/ebli/trace/TraceIcon.java 2012-10-30 16:28:42 UTC (rev 7836)
+++ trunk/framework/ebli-common/src/main/java/org/fudaa/ebli/trace/TraceIcon.java 2012-10-31 17:22:13 UTC (rev 7837)
@@ -119,118 +119,7 @@
if (taille == 1) {
_g.drawLine(x, y, x, y);
} else if (taille != 0) {
- switch (model_.type_) {
- case RIEN:
- break;
- /*
- * case POINT: _g.drawLine(x, y, x, y); break;
- */
- case PLUS:
- _g.drawLine(x, y + mid, x + taille - 1, y + mid);
- _g.drawLine(x + mid, y, x + mid, y + taille - 1);
- break;
- case PLUS_DOUBLE:
- final Color oldC2 = _g.getColor();
- _g.setColor(Color.WHITE);
- _g.drawLine(x, y + mid - 1, x + taille - 1, y + mid - 1);
- _g.drawLine(x, y + mid + 1, x + taille - 1, y + mid + 1);
- _g.drawLine(x + mid - 1, y, x + mid - 1, y + taille - 1);
- _g.drawLine(x + mid + 1, y, x + mid + 1, y + taille - 1);
- _g.setColor(oldC2);
- _g.drawLine(x, y + mid, x + taille - 1, y + mid);
- _g.drawLine(x + mid, y, x + mid, y + taille - 1);
- _g.drawLine(x + mid - 1, y + mid - 1, x + mid + 1, y + mid + 1);
- _g.drawLine(x + mid + 1, y + mid - 1, x + mid - 1, y + mid + 1);
- break;
- case CROIX_DOUBLE:
- final Color oldC1 = _g.getColor();
- _g.setColor(Color.WHITE);
- _g.drawLine(x, y + 1, x + taille - 2, y + taille - 1);
- _g.drawLine(x + 1, y, x + taille - 1, y + taille - 2);
- _g.drawLine(x, y + taille - 2, x + taille - 2, y);
- _g.drawLine(x + 1, y + taille - 1, x + taille - 1, y + 1);
- _g.setColor(oldC1);
- _g.drawLine(x, y, x + taille - 1, y + taille - 1);
- _g.drawLine(x, y + taille - 1, x + taille - 1, y);
- break;
- case CROIX:
- _g.drawLine(x, y, x + taille - 1, y + taille - 1);
- _g.drawLine(x, y + taille - 1, x + taille - 1, y);
- break;
- case LIGNE_OBLIQUE:
- _g.drawLine(x, y, x + taille - 1, y + taille - 1);
- break;
- case LIGNE_HORIZONTAL:
- _g.drawLine(x, y + mid, x + taille - 1, y + mid);
- break;
- case CARRE:
- if (model_.backgroundColor != null && model_.isBackgroundColorPainted()) {
- Color current = _g.getColor();
- _g.setColor(model_.backgroundColor);
- _g.fillRect(x, y, taille - 1, taille - 1);
- _g.setColor(current);
- }
- _g.drawRect(x, y, taille - 1, taille - 1);
- break;
- case CARRE_ARRONDI:
- int arc = Math.max(1, (int) (taille * 0.3));
- if (model_.backgroundColor != null && model_.isBackgroundColorPainted()) {
- Color current = _g.getColor();
- _g.setColor(model_.backgroundColor);
- _g.fillRoundRect(x, y, taille - 1, taille - 1, arc, arc);
- _g.setColor(current);
- }
- _g.drawRoundRect(x, y, taille - 1, taille - 1, arc, arc);
- break;
- case CARRE_SELECTION:
- _g.drawRect(x, y, taille - 1, taille - 1);
- final Color oldC = _g.getColor();
- _g.setColor(Color.WHITE);
- _g.drawRect(x + 1, y + 1, taille - 3, taille - 3);
- _g.setColor(oldC);
- break;
- case CARRE_SELECTION_ELEMENT:
- _g.fillRect(x, y, taille, taille);
- break;
- case CARRE_PLEIN:
- _g.fillRect(x, y, taille, taille);
- break;
- case LOSANGE:
- if (model_.backgroundColor != null && model_.isBackgroundColorPainted()) {
- Color current = _g.getColor();
- _g.setColor(model_.backgroundColor);
- _g.fillPolygon(new int[]{x, x + mid, x + taille - 1, x + mid}, new int[]{y + mid, y, y + mid,
- y + taille - 1}, 4);
- _g.setColor(current);
- }
- _g.drawLine(x, y + mid, x + mid, y);
- _g.drawLine(x + mid, y, x + taille - 1, y + mid);
- _g.drawLine(x + taille - 1, y + mid, x + mid, y + taille - 1);
- _g.drawLine(x + mid, y + taille - 1, x, y + mid);
- break;
- case LOSANGE_PLEIN:
- _g.drawLine(x, y + mid, x + mid, y);
- _g.drawLine(x + mid, y, x + taille - 1, y + mid);
- _g.drawLine(x + taille - 1, y + mid, x + mid, y + taille - 1);
- _g.drawLine(x + mid, y + taille - 1, x, y + mid);
- _g.fillPolygon(new int[]{x, x + mid, x + taille - 1, x + mid}, new int[]{y + mid, y, y + mid,
- y + taille - 1}, 4);
- break;
- case CERCLE:
- if (model_.backgroundColor != null && model_.isBackgroundColorPainted()) {
- Color current = _g.getColor();
- _g.setColor(model_.backgroundColor);
- _g.fillArc(x, y, taille - 1, taille - 1, 0, 360);
- _g.setColor(current);
- }
- _g.drawArc(x, y, taille - 1, taille - 1, 0, 360);
- break;
- case DISQUE:
- _g.fillArc(x, y, taille - 1, taille - 1, 0, 360);
- break;
- default:
- break;
- }
+ traceData(_g, x, y, mid, taille);
}
if (old != null) {
_g.setColor(old);
@@ -261,4 +150,119 @@
public void paintIconCentre(final Component _c, final Graphics _g, final int _x, final int _y) {
paintIcon(_c, _g, _x - model_.taille_ + 1, _y - model_.taille_ + 1);
}
+
+ protected void traceData(final Graphics _g, final int x, final int y, final int mid, final int taille) {
+ switch (model_.type_) {
+ case RIEN:
+ break;
+ /*
+ * case POINT: _g.drawLine(x, y, x, y); break;
+ */
+ case PLUS:
+ _g.drawLine(x, y + mid, x + taille - 1, y + mid);
+ _g.drawLine(x + mid, y, x + mid, y + taille - 1);
+ break;
+ case PLUS_DOUBLE:
+ final Color oldC2 = _g.getColor();
+ _g.setColor(Color.WHITE);
+ _g.drawLine(x, y + mid - 1, x + taille - 1, y + mid - 1);
+ _g.drawLine(x, y + mid + 1, x + taille - 1, y + mid + 1);
+ _g.drawLine(x + mid - 1, y, x + mid - 1, y + taille - 1);
+ _g.drawLine(x + mid + 1, y, x + mid + 1, y + taille - 1);
+ _g.setColor(oldC2);
+ _g.drawLine(x, y + mid, x + taille - 1, y + mid);
+ _g.drawLine(x + mid, y, x + mid, y + taille - 1);
+ _g.drawLine(x + mid - 1, y + mid - 1, x + mid + 1, y + mid + 1);
+ _g.drawLine(x + mid + 1, y + mid - 1, x + mid - 1, y + mid + 1);
+ break;
+ case CROIX_DOUBLE:
+ final Color oldC1 = _g.getColor();
+ _g.setColor(Color.WHITE);
+ _g.drawLine(x, y + 1, x + taille - 2, y + taille - 1);
+ _g.drawLine(x + 1, y, x + taille - 1, y + taille - 2);
+ _g.drawLine(x, y + taille - 2, x + taille - 2, y);
+ _g.drawLine(x + 1, y + taille - 1, x + taille - 1, y + 1);
+ _g.setColor(oldC1);
+ _g.drawLine(x, y, x + taille - 1, y + taille - 1);
+ _g.drawLine(x, y + taille - 1, x + taille - 1, y);
+ break;
+ case CROIX:
+ _g.drawLine(x, y, x + taille - 1, y + taille - 1);
+ _g.drawLine(x, y + taille - 1, x + taille - 1, y);
+ break;
+ case LIGNE_OBLIQUE:
+ _g.drawLine(x, y, x + taille - 1, y + taille - 1);
+ break;
+ case LIGNE_HORIZONTAL:
+ _g.drawLine(x, y + mid, x + taille - 1, y + mid);
+ break;
+ case CARRE:
+ if (model_.backgroundColor != null && model_.isBackgroundColorPainted()) {
+ Color current = _g.getColor();
+ _g.setColor(model_.backgroundColor);
+ _g.fillRect(x, y, taille - 1, taille - 1);
+ _g.setColor(current);
+ }
+ _g.drawRect(x, y, taille - 1, taille - 1);
+ break;
+ case CARRE_ARRONDI:
+ int arc = Math.max(1, (int) (taille * 0.3));
+ if (model_.backgroundColor != null && model_.isBackgroundColorPainted()) {
+ Color current = _g.getColor();
+ _g.setColor(model_.backgroundColor);
+ _g.fillRoundRect(x, y, taille - 1, taille - 1, arc, arc);
+ _g.setColor(current);
+ }
+ _g.drawRoundRect(x, y, taille - 1, taille - 1, arc, arc);
+ break;
+ case CARRE_SELECTION:
+ _g.drawRect(x, y, taille - 1, taille - 1);
+ final Color oldC = _g.getColor();
+ _g.setColor(Color.WHITE);
+ _g.drawRect(x + 1, y + 1, taille - 3, taille - 3);
+ _g.setColor(oldC);
+ break;
+ case CARRE_SELECTION_ELEMENT:
+ _g.fillRect(x, y, taille, taille);
+ break;
+ case CARRE_PLEIN:
+ _g.fillRect(x, y, taille, taille);
+ break;
+ case LOSANGE:
+ if (model_.backgroundColor != null && model_.isBackgroundColorPainted()) {
+ Color current = _g.getColor();
+ _g.setColor(model_.backgroundColor);
+ _g.fillPolygon(new int[]{x, x + mid, x + taille - 1, x + mid}, new int[]{y + mid, y, y + mid,
+ y + taille - 1}, 4);
+ _g.setColor(current);
+ }
+ _g.drawLine(x, y + mid, x + mid, y);
+ _g.drawLine(x + mid, y, x + taille - 1, y + mid);
+ _g.drawLine(x + taille - 1, y + mid, x + mid, y + taille - 1);
+ _g.drawLine(x + mid, y + taille - 1, x, y + mid);
+ break;
+ case LOSANGE_PLEIN:
+ _g.drawLine(x, y + mid, x + mid, y);
+ _g.drawLine(x + mid, y, x + taille - 1, y + mid);
+ _g.drawLine(x + taille - 1, y + mid, x + mid, y + taille - 1);
+ _g.drawLine(x + mid, y + taille - 1, x, y + mid);
+ _g.fillPolygon(new int[]{x, x + mid, x + taille - 1, x + mid}, new int[]{y + mid, y, y + mid,
+ y + taille - 1}, 4);
+ break;
+ case CERCLE:
+ if (model_.backgroundColor != null && model_.isBackgroundColorPainted()) {
+ Color current = _g.getColor();
+ _g.setColor(model_.backgroundColor);
+ _g.fillArc(x, y, taille - 1, taille - 1, 0, 360);
+ _g.setColor(current);
+ }
+ _g.drawArc(x, y, taille - 1, taille - 1, 0, 360);
+ break;
+ case DISQUE:
+ _g.fillArc(x, y, taille - 1, taille - 1, 0, 360);
+ break;
+ default:
+ break;
+ }
+ }
}
Added: trunk/framework/ebli-common/src/main/java/org/fudaa/ebli/trace/TraceIconFleche.java
===================================================================
--- trunk/framework/ebli-common/src/main/java/org/fudaa/ebli/trace/TraceIconFleche.java (rev 0)
+++ trunk/framework/ebli-common/src/main/java/org/fudaa/ebli/trace/TraceIconFleche.java 2012-10-31 17:22:13 UTC (rev 7837)
@@ -0,0 +1,56 @@
+/*
+ GPL 2
+ */
+package org.fudaa.ebli.trace;
+
+import java.awt.Graphics;
+
+/**
+ *
+ * @author Frederic Deniger
+ */
+public class TraceIconFleche extends TraceIcon {
+
+ int dx1;
+ int dy1;
+ int dy2;
+ int dx2;
+
+ public int getDx1() {
+ return dx1;
+ }
+
+ public void setDx1(int dx1) {
+ this.dx1 = dx1;
+ }
+
+ public int getDy1() {
+ return dy1;
+ }
+
+ public void setDy1(int dy1) {
+ this.dy1 = dy1;
+ }
+
+ public int getDy2() {
+ return dy2;
+ }
+
+ public void setDy2(int dy2) {
+ this.dy2 = dy2;
+ }
+
+ public int getDx2() {
+ return dx2;
+ }
+
+ public void setDx2(int dx2) {
+ this.dx2 = dx2;
+ }
+
+ @Override
+ protected void traceData(Graphics _g, int x, int y, int mid, int taille) {
+ _g.drawLine(x + mid, y + mid, x + mid + dx1, y + mid + dy1);
+ _g.drawLine(x + mid, y + mid, x + mid + dx2, y + mid + dy2);
+ }
+}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <bma...@us...> - 2015-03-16 16:20:46
|
Revision: 9071
http://sourceforge.net/p/fudaa/svn/9071
Author: bmarchan
Date: 2015-03-16 16:20:44 +0000 (Mon, 16 Mar 2015)
Log Message:
-----------
Impl?\195?\169mentation m?\195?\169thode clone.
Modified Paths:
--------------
trunk/framework/ebli-common/src/main/java/org/fudaa/ebli/commun/VecteurGenerique.java
trunk/framework/ebli-common/src/main/java/org/fudaa/ebli/geometrie/GrPolyligne.java
Modified: trunk/framework/ebli-common/src/main/java/org/fudaa/ebli/commun/VecteurGenerique.java
===================================================================
--- trunk/framework/ebli-common/src/main/java/org/fudaa/ebli/commun/VecteurGenerique.java 2015-03-16 10:17:57 UTC (rev 9070)
+++ trunk/framework/ebli-common/src/main/java/org/fudaa/ebli/commun/VecteurGenerique.java 2015-03-16 16:20:44 UTC (rev 9071)
@@ -128,7 +128,8 @@
@Override
public final Object clone() throws CloneNotSupportedException {
final VecteurGenerique r = (VecteurGenerique) super.clone();
- r.vide();
+ // Obligatoire sinon le clone pointe sur la m\xEAme liste.
+ r.v_=new ArrayList();
for (int i = 0; i < nombre(); i++) {
r.ajoute(internRenvoie(i));
}
Modified: trunk/framework/ebli-common/src/main/java/org/fudaa/ebli/geometrie/GrPolyligne.java
===================================================================
--- trunk/framework/ebli-common/src/main/java/org/fudaa/ebli/geometrie/GrPolyligne.java 2015-03-16 10:17:57 UTC (rev 9070)
+++ trunk/framework/ebli-common/src/main/java/org/fudaa/ebli/geometrie/GrPolyligne.java 2015-03-16 16:20:44 UTC (rev 9071)
@@ -25,7 +25,7 @@
* @version $Id: GrPolyligne.java,v 1.12 2006-11-20 08:40:16 deniger Exp $
* @author Guillaume Desnoix
*/
-public class GrPolyligne extends GrObjet implements GrContour {
+public class GrPolyligne extends GrObjet implements GrContour, Cloneable {
// public ListeGrPoint sommets;
public VecteurGrPoint sommets_;
@@ -33,7 +33,22 @@
public GrPolyligne() {
sommets_ = new VecteurGrPoint();
}
+
+ @Override
+ public GrPolyligne clone() {
+ try {
+ GrPolyligne o=(GrPolyligne)super.clone();
+ o.sommets_=(VecteurGrPoint)sommets_.clone();
+ return o;
+ }
+ // Ne doit pas se produire.
+ catch (CloneNotSupportedException e) {
+ throw new InternalError();
+ }
+ }
+
+
/**
* Cr\xE9ation d'une polyligne \xE0 partir d'une sequence.
* @param _seq La sequence.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|