|
@@ -1,7 +1,11 @@
|
|
|
package ui.view;
|
|
|
|
|
|
import classes.*;
|
|
|
+import classes.comparator.UnitGraphPointComperator;
|
|
|
+import interfaces.GraphEditable;
|
|
|
+import interfaces.GraphEditable.Graphtype;
|
|
|
import interfaces.IGraphedElement;
|
|
|
+import sun.reflect.generics.reflectiveObjects.NotImplementedException;
|
|
|
import ui.controller.Control;
|
|
|
import ui.controller.SingletonControl;
|
|
|
import ui.model.Model;
|
|
@@ -13,10 +17,12 @@ import java.awt.geom.CubicCurve2D;
|
|
|
import java.awt.geom.GeneralPath;
|
|
|
import java.awt.geom.Line2D;
|
|
|
import java.awt.geom.Path2D;
|
|
|
+import java.awt.geom.Point2D;
|
|
|
import java.util.ArrayDeque;
|
|
|
import java.util.ArrayList;
|
|
|
import java.util.Iterator;
|
|
|
import java.util.LinkedList;
|
|
|
+import java.util.ListIterator;
|
|
|
|
|
|
/**
|
|
|
* This Class represents a Graph where the User can model the behavior of
|
|
@@ -55,16 +61,37 @@ public class UnitGraph extends JPanel implements MouseListener, MouseMotionListe
|
|
|
private Point tempP = null;
|
|
|
private double x = 0, y = 0;
|
|
|
private int x1, x2, y1, y2, ctrlx1, ctrly1, ctrlx2, ctrly2;
|
|
|
- private int border = 4;
|
|
|
+
|
|
|
private int textWidth = 0;
|
|
|
|
|
|
private IGraphedElement current;
|
|
|
|
|
|
//NEW ERA
|
|
|
+ // Normal Settings
|
|
|
+ private int border = 4;
|
|
|
+ private int clickThreshholdSquared = 25;
|
|
|
+ // Display Settings
|
|
|
+ /**
|
|
|
+ * The size of a dot in the graph.
|
|
|
+ * It should be at least 1.
|
|
|
+ * */
|
|
|
int dotSize = 8;
|
|
|
+ /** The Color of a dot in the graph. */
|
|
|
+ Color dotColor = Color.blue;
|
|
|
|
|
|
-
|
|
|
-
|
|
|
+ //Intern Variables
|
|
|
+ //TODO: JavaDoc
|
|
|
+ private LinkedList<UnitGraphPoint> actualGraphPoints = new LinkedList<UnitGraphPoint>();
|
|
|
+ /**
|
|
|
+ * This is list is sortet in the y achsis
|
|
|
+ */
|
|
|
+ private LinkedList<Position> representativePositions = new LinkedList<Position>();
|
|
|
+ private Graphtype actualGraphType;
|
|
|
+ private GraphEditable actualElement;
|
|
|
+ ListIterator<Position> iter;
|
|
|
+ ListIterator<UnitGraphPoint> iter2;
|
|
|
+ Position currentPosition;
|
|
|
+ private int widthWithBorder, heightWithBorder;
|
|
|
/**
|
|
|
* Constructor.
|
|
|
*
|
|
@@ -92,15 +119,22 @@ public class UnitGraph extends JPanel implements MouseListener, MouseMotionListe
|
|
|
public void paintComponent(Graphics g) {
|
|
|
super.paintComponent(g);
|
|
|
|
|
|
- System.out.println("paint");
|
|
|
+ //System.out.println("paint");
|
|
|
Graphics2D g2D = (Graphics2D) g;
|
|
|
g2D.setColor(Color.BLACK);
|
|
|
int höhe = this.getHeight();
|
|
|
int breite = this.getWidth();
|
|
|
- int punktGröße = 8;
|
|
|
+
|
|
|
g2D.setRenderingHints(new RenderingHints(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON));
|
|
|
g2D.setStroke(new BasicStroke(2));
|
|
|
// g2D.drawLine(0, 0,breite, höhe);
|
|
|
+ //printDebug();
|
|
|
+ printDebugRepresentive();
|
|
|
+ g2D.setColor(dotColor);
|
|
|
+ drawUnitGraphPoints(g2D);
|
|
|
+ g2D.setColor(Color.BLACK);
|
|
|
+ drawUnitGraph(g2D);
|
|
|
+
|
|
|
//generate Path --> maybe als Methode auslagern
|
|
|
|
|
|
//Good Source for basic understanding for Bezier Curves
|
|
@@ -309,19 +343,162 @@ public class UnitGraph extends JPanel implements MouseListener, MouseMotionListe
|
|
|
// controller.calculateStateForTimeStep(model.getCurIteration());
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+ //TODO -> New Section
|
|
|
+
|
|
|
+
|
|
|
private void drawDot(Graphics2D g, Position p)
|
|
|
{
|
|
|
g.fillOval(p.x -dotSize/2, p.y-dotSize/2, dotSize, dotSize);
|
|
|
}
|
|
|
+ private Position convertToPosition(UnitGraphPoint p) {
|
|
|
+ //Relativ to Border
|
|
|
+ //1-p.y because its on the Top
|
|
|
+ return new Position((int) (p.x * widthWithBorder) + border, (int) ((1-p.y) * heightWithBorder) + border);
|
|
|
+ }
|
|
|
+ private void drawUnitGraph(Graphics2D g) {
|
|
|
+ switch(actualGraphType) {
|
|
|
+ case boolGraph:
|
|
|
+ drawBoolGraph(g);
|
|
|
+ break;
|
|
|
+ case doubleGraph:
|
|
|
+ drawDoubleGraph(g);
|
|
|
+ break;
|
|
|
+ default:
|
|
|
+ throw new UnsupportedOperationException();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ private void drawUnitGraphPoints(Graphics2D g) {
|
|
|
+ for(UnitGraphPoint p : actualGraphPoints){
|
|
|
+ if (p.changed) {
|
|
|
+ g.setColor(Color.red);
|
|
|
+ } else {
|
|
|
+ g.setColor(Color.blue);
|
|
|
+ }
|
|
|
+ drawDot(g, p.displayedPosition);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ private void drawBoolGraph(Graphics2D g) {
|
|
|
+ throw new NotImplementedException();
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ private void updateRepresentativePositions()
|
|
|
+ {
|
|
|
+ for(UnitGraphPoint p : actualGraphPoints) {
|
|
|
+ p.calcDisplayedPosition(border, widthWithBorder, heightWithBorder);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ private void drawDoubleGraph(Graphics2D g) {
|
|
|
+
|
|
|
+ }
|
|
|
+ private void overrideUnitGraph(LinkedList<Point2D.Double> stateCurve) {
|
|
|
+ actualGraphPoints.clear();
|
|
|
+ for(Point2D.Double p: stateCurve){
|
|
|
+ actualGraphPoints.add(new UnitGraphPoint(p));
|
|
|
+ }
|
|
|
+ updateRepresentativePositions();
|
|
|
+ }
|
|
|
+ private void calculateWidthHeight()
|
|
|
+ {
|
|
|
+ widthWithBorder = this.getWidth() - 2 * border;
|
|
|
+ heightWithBorder = this.getHeight() - 2 * border;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void initNewElement(GraphEditable element)
|
|
|
+ {
|
|
|
+ overrideUnitGraph(element.getStateGraph());
|
|
|
+ actualGraphType = element.getGraphType();
|
|
|
+ actualElement = element;
|
|
|
+ repaint();
|
|
|
+ }
|
|
|
+ private void printDebug(){
|
|
|
+ if(actualGraphPoints.isEmpty()) return;
|
|
|
+ System.out.print("{");
|
|
|
+ for(UnitGraphPoint p: actualGraphPoints){
|
|
|
+ System.out.print(p);
|
|
|
+ }
|
|
|
+ System.out.println("}");
|
|
|
+ }
|
|
|
+ private void printDebugRepresentive(){
|
|
|
+ if(this.actualGraphPoints.isEmpty()) return;
|
|
|
+ System.out.print("{");
|
|
|
+ for(UnitGraphPoint p: actualGraphPoints){
|
|
|
+ System.out.print(p.displayedPosition);
|
|
|
+ }
|
|
|
+ System.out.println("}");
|
|
|
+ }
|
|
|
+
|
|
|
+ private boolean detectPointUnderCurser(MouseEvent mEvent) {
|
|
|
+ //get mouse Position
|
|
|
+ Position mPosition = new Position(mEvent.getPoint());
|
|
|
+ //iter = representativePositions.listIterator();
|
|
|
+ iter2 = actualGraphPoints.listIterator();
|
|
|
+ while (iter2.hasNext())
|
|
|
+ {
|
|
|
+ Position tempPosition = iter2.next().displayedPosition;
|
|
|
+ if(mPosition.squareDistance(tempPosition) < clickThreshholdSquared)
|
|
|
+ {
|
|
|
+ currentPosition = tempPosition;
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ private void updateGraphPoint(Position newPosition) {
|
|
|
+ //make it in the bounds of the UnitGraph no Point out of the Border
|
|
|
+ currentPosition = setInBounds(newPosition);
|
|
|
+ iter2.set(generateUnitGraphPoint(currentPosition));
|
|
|
+ repaint();
|
|
|
+ }
|
|
|
+
|
|
|
+ private Position setInBounds(Position p) {
|
|
|
+ p.clampX(border, border + widthWithBorder);
|
|
|
+ p.clampY(border, border + heightWithBorder);
|
|
|
+ return p;
|
|
|
+ }
|
|
|
+
|
|
|
+ private void insertNewGraphPoint(Position pos)
|
|
|
+ {
|
|
|
+ System.out.println("insertNewGraphPoint");
|
|
|
+ setInBounds(pos);
|
|
|
+ iter2 = actualGraphPoints.listIterator();
|
|
|
+ while (iter2.hasNext())
|
|
|
+ {
|
|
|
+ Position tempPosition = iter2.next().displayedPosition;
|
|
|
+ if(pos.x <= tempPosition.x)
|
|
|
+ {
|
|
|
+ //First previous to go back a position to make the new point before the the Position with greater X
|
|
|
+ iter2.previous();
|
|
|
+ iter2.add(generateUnitGraphPoint(pos));
|
|
|
+ //Second Previous to select the new added Position
|
|
|
+ iter2.previous();
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ private UnitGraphPoint generateUnitGraphPoint(Position pos) {
|
|
|
+ UnitGraphPoint temp = new UnitGraphPoint((double)(pos.x - border)/(double)widthWithBorder,(double)(pos.y - border)/(double)heightWithBorder,true);
|
|
|
+ temp.displayedPosition = pos;
|
|
|
+ return temp;
|
|
|
+ }
|
|
|
|
|
|
- @Override
|
|
|
+ @Override
|
|
|
public void mouseDragged(MouseEvent e) {
|
|
|
System.out.println("MouseDragged");
|
|
|
- if (isElement) {
|
|
|
- elementDragged(e);
|
|
|
- } else if (isSwitch) {
|
|
|
- switchDragged(e);
|
|
|
- }
|
|
|
+ //System.out.println("PositionFromITERATOR= "+ currentPosition +" Index= " + iter.previousIndex() );
|
|
|
+ updateGraphPoint(new Position(e.getPoint()));
|
|
|
+ //printDebugRepresentive();
|
|
|
+// if (isElement) {
|
|
|
+// elementDragged(e);
|
|
|
+// } else if (isSwitch) {
|
|
|
+// switchDragged(e);
|
|
|
+// }
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -331,27 +508,27 @@ public class UnitGraph extends JPanel implements MouseListener, MouseMotionListe
|
|
|
*/
|
|
|
public void elementDragged(MouseEvent e) {
|
|
|
System.out.println("elementDragged");
|
|
|
- if (pointDrag && tempP != null) {
|
|
|
- // Out of Bounds verhindern
|
|
|
- int i = pointList.indexOf(tempP);
|
|
|
- x = (e.getX() - border) / scaleX;
|
|
|
- y = (e.getY() - border) / scaleY;
|
|
|
- // y
|
|
|
- if (e.getY() <= border) {
|
|
|
- y = 0;
|
|
|
- } else if (this.getHeight() - border <= e.getY()) {
|
|
|
- y = (this.getHeight() - border * 2) / scaleY;
|
|
|
- }
|
|
|
- // x
|
|
|
- if (tempP == pointList.getFirst() || tempP == pointList.getLast() || pointList.get(i + 1).getX() < x + 2
|
|
|
- || pointList.get(i - 1).getX() > x - 2 || pointList.getFirst().getX() > x - 2
|
|
|
- || pointList.getLast().getX() < x + 2) {
|
|
|
- x = tempP.getX();
|
|
|
- }
|
|
|
- tempP.setLocation(x, y);
|
|
|
-
|
|
|
- repaint();
|
|
|
- }
|
|
|
+// if (pointDrag && tempP != null) {
|
|
|
+// // Out of Bounds verhindern
|
|
|
+// int i = pointList.indexOf(tempP);
|
|
|
+// x = (e.getX() - border) / scaleX;
|
|
|
+// y = (e.getY() - border) / scaleY;
|
|
|
+// // y
|
|
|
+// if (e.getY() <= border) {
|
|
|
+// y = 0;
|
|
|
+// } else if (this.getHeight() - border <= e.getY()) {
|
|
|
+// y = (this.getHeight() - border * 2) / scaleY;
|
|
|
+// }
|
|
|
+// // x
|
|
|
+// if (tempP == pointList.getFirst() || tempP == pointList.getLast() || pointList.get(i + 1).getX() < x + 2
|
|
|
+// || pointList.get(i - 1).getX() > x - 2 || pointList.getFirst().getX() > x - 2
|
|
|
+// || pointList.getLast().getX() < x + 2) {
|
|
|
+// x = tempP.getX();
|
|
|
+// }
|
|
|
+// tempP.setLocation(x, y);
|
|
|
+//
|
|
|
+// repaint();
|
|
|
+// }
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -361,26 +538,26 @@ public class UnitGraph extends JPanel implements MouseListener, MouseMotionListe
|
|
|
*/
|
|
|
public void switchDragged(MouseEvent e) {
|
|
|
System.out.println("switchDragged");
|
|
|
- if (pointDrag && tempP != null && tempP != pointList.getFirst() && tempP != pointList.getLast()) {
|
|
|
- int i = pointList.indexOf(tempP);
|
|
|
- x = (e.getX() - border) / scaleX;
|
|
|
-
|
|
|
- if (pointList.get(i + 1).getY() == tempP.getY()) {
|
|
|
- // x
|
|
|
- if (pointList.get(i + 1).getX() <= x + 1 || pointList.get(i - 2).getX() >= x - 1) {
|
|
|
- x = tempP.getX();
|
|
|
- }
|
|
|
- pointList.get(i - 1).setLocation(x, pointList.get(i - 1).getY());
|
|
|
- } else {
|
|
|
- // x
|
|
|
- if (pointList.get(i + 2).getX() <= x + 1 || pointList.get(i - 1).getX() >= x - 1) {
|
|
|
- x = tempP.getX();
|
|
|
- }
|
|
|
- pointList.get(i + 1).setLocation(x, pointList.get(i + 1).getY());
|
|
|
- }
|
|
|
- tempP.setLocation(x, tempP.getY());
|
|
|
- repaint();
|
|
|
- }
|
|
|
+// if (pointDrag && tempP != null && tempP != pointList.getFirst() && tempP != pointList.getLast()) {
|
|
|
+// int i = pointList.indexOf(tempP);
|
|
|
+// x = (e.getX() - border) / scaleX;
|
|
|
+//
|
|
|
+// if (pointList.get(i + 1).getY() == tempP.getY()) {
|
|
|
+// // x
|
|
|
+// if (pointList.get(i + 1).getX() <= x + 1 || pointList.get(i - 2).getX() >= x - 1) {
|
|
|
+// x = tempP.getX();
|
|
|
+// }
|
|
|
+// pointList.get(i - 1).setLocation(x, pointList.get(i - 1).getY());
|
|
|
+// } else {
|
|
|
+// // x
|
|
|
+// if (pointList.get(i + 2).getX() <= x + 1 || pointList.get(i - 1).getX() >= x - 1) {
|
|
|
+// x = tempP.getX();
|
|
|
+// }
|
|
|
+// pointList.get(i + 1).setLocation(x, pointList.get(i + 1).getY());
|
|
|
+// }
|
|
|
+// tempP.setLocation(x, tempP.getY());
|
|
|
+// repaint();
|
|
|
+// }
|
|
|
}
|
|
|
|
|
|
@Override
|
|
@@ -389,6 +566,7 @@ public class UnitGraph extends JPanel implements MouseListener, MouseMotionListe
|
|
|
|
|
|
@Override
|
|
|
public void mouseClicked(MouseEvent e) {
|
|
|
+ System.out.println("mouseClicked");
|
|
|
}
|
|
|
|
|
|
@Override
|
|
@@ -402,12 +580,13 @@ public class UnitGraph extends JPanel implements MouseListener, MouseMotionListe
|
|
|
@Override
|
|
|
public void mousePressed(MouseEvent e) {
|
|
|
System.out.println("mousePressed");
|
|
|
- if (isElement) {
|
|
|
- elementPressed(e);
|
|
|
- } else if (isSwitch) {
|
|
|
- switchPressed(e);
|
|
|
- }
|
|
|
-
|
|
|
+ if (detectPointUnderCurser(e)) {
|
|
|
+ //DoNothing
|
|
|
+ } else {
|
|
|
+ //create new Position
|
|
|
+ this.insertNewGraphPoint(new Position(e.getPoint()));
|
|
|
+ repaint();
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -417,56 +596,57 @@ public class UnitGraph extends JPanel implements MouseListener, MouseMotionListe
|
|
|
*/
|
|
|
public void elementPressed(MouseEvent e) {
|
|
|
System.out.println("elementPressed");
|
|
|
- boolean added = false;
|
|
|
- boolean deletePoint = false;
|
|
|
-
|
|
|
- int x = (int) ((e.getX() - border) / scaleX);
|
|
|
- double y = (e.getY() - border) / scaleY;
|
|
|
-
|
|
|
- // Click on Point
|
|
|
- tempP = null;
|
|
|
- if (pointList != null) {
|
|
|
- // look if a point was clicked
|
|
|
- for (Point p : pointList) {
|
|
|
- if (x >= p.getX() - recSize.getX() / 2 && y >= p.getY() - recSize.getY() / 2
|
|
|
- && x <= p.getX() + recSize.getX() / 2 && y <= p.getY() * scaleY + recSize.getY() / 2) {
|
|
|
- if (e.getButton() == MouseEvent.BUTTON3) {//TODO: test
|
|
|
- tempP = p;
|
|
|
- deletePoint = true;
|
|
|
- } else {
|
|
|
- pointDrag = true;
|
|
|
- tempP = p;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- // New Point
|
|
|
- if (!pointDrag && e.getButton() != MouseEvent.BUTTON3 && e.getX() != 0
|
|
|
- && e.getX() != this.getWidth() / scaleX) {
|
|
|
- for (int i = 0; i < pointList.size(); i++) {
|
|
|
- // When a point already exist on this x position
|
|
|
- if (x == pointList.get(i).getX() || x == width || x == 0) {
|
|
|
- break;
|
|
|
- }
|
|
|
- if (x < pointList.get(i).getX() && !added) {
|
|
|
- if (e.getY() <= border) {
|
|
|
- pointList.add(i, new Point((int) (x), 0));
|
|
|
- } else {
|
|
|
- pointList.add(i, new Point((int) (x), (int) y));
|
|
|
- }
|
|
|
- added = true;
|
|
|
- pointDrag = true;
|
|
|
- tempP = pointList.get(i);
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- // Delete a Point
|
|
|
- if (deletePoint && tempP.getX() != 0
|
|
|
- && /*(*//*tempP.getX() != this.getWidth() / scaleX || */tempP != pointList.getLast())/*)*/ {
|
|
|
- pointList.remove(tempP);
|
|
|
- }
|
|
|
-
|
|
|
- repaint();
|
|
|
- }
|
|
|
+//
|
|
|
+// boolean added = false;
|
|
|
+// boolean deletePoint = false;
|
|
|
+//
|
|
|
+// int x = (int) ((e.getX() - border) / scaleX);
|
|
|
+// double y = (e.getY() - border) / scaleY;
|
|
|
+//
|
|
|
+// // Click on Point
|
|
|
+// tempP = null;
|
|
|
+// if (pointList != null) {
|
|
|
+// // look if a point was clicked
|
|
|
+// for (Point p : pointList) {
|
|
|
+// if (x >= p.getX() - recSize.getX() / 2 && y >= p.getY() - recSize.getY() / 2
|
|
|
+// && x <= p.getX() + recSize.getX() / 2 && y <= p.getY() * scaleY + recSize.getY() / 2) {
|
|
|
+// if (e.getButton() == MouseEvent.BUTTON3) {//TODO: test
|
|
|
+// tempP = p;
|
|
|
+// deletePoint = true;
|
|
|
+// } else {
|
|
|
+// pointDrag = true;
|
|
|
+// tempP = p;
|
|
|
+// }
|
|
|
+// }
|
|
|
+// }
|
|
|
+// // New Point
|
|
|
+// if (!pointDrag && e.getButton() != MouseEvent.BUTTON3 && e.getX() != 0
|
|
|
+// && e.getX() != this.getWidth() / scaleX) {
|
|
|
+// for (int i = 0; i < pointList.size(); i++) {
|
|
|
+// // When a point already exist on this x position
|
|
|
+// if (x == pointList.get(i).getX() || x == width || x == 0) {
|
|
|
+// break;
|
|
|
+// }
|
|
|
+// if (x < pointList.get(i).getX() && !added) {
|
|
|
+// if (e.getY() <= border) {
|
|
|
+// pointList.add(i, new Point((int) (x), 0));
|
|
|
+// } else {
|
|
|
+// pointList.add(i, new Point((int) (x), (int) y));
|
|
|
+// }
|
|
|
+// added = true;
|
|
|
+// pointDrag = true;
|
|
|
+// tempP = pointList.get(i);
|
|
|
+// }
|
|
|
+// }
|
|
|
+// }
|
|
|
+// // Delete a Point
|
|
|
+// if (deletePoint && tempP.getX() != 0
|
|
|
+// && /*(*//*tempP.getX() != this.getWidth() / scaleX || */tempP != pointList.getLast())/*)*/ {
|
|
|
+// pointList.remove(tempP);
|
|
|
+// }
|
|
|
+//
|
|
|
+// repaint();
|
|
|
+// }
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -550,15 +730,16 @@ public class UnitGraph extends JPanel implements MouseListener, MouseMotionListe
|
|
|
@Override
|
|
|
public void mouseReleased(MouseEvent e) {
|
|
|
System.out.println("mouseReleased");
|
|
|
- if (pointDrag) {
|
|
|
- pointDrag = false;
|
|
|
- tempP = null;
|
|
|
- }
|
|
|
- /**
|
|
|
- * reset the dragInformation.
|
|
|
- */
|
|
|
- dragInformation = "";
|
|
|
- repaint();
|
|
|
+ this.actualGraphPoints.sort(new UnitGraphPointComperator());
|
|
|
+// if (pointDrag) {
|
|
|
+// pointDrag = false;
|
|
|
+// tempP = null;
|
|
|
+// }
|
|
|
+// /**
|
|
|
+// * reset the dragInformation.
|
|
|
+// */
|
|
|
+// dragInformation = "";
|
|
|
+// repaint();
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -568,6 +749,8 @@ public class UnitGraph extends JPanel implements MouseListener, MouseMotionListe
|
|
|
*/
|
|
|
public void componentResized(ComponentEvent e) {
|
|
|
System.out.println("componentResized");
|
|
|
+ calculateWidthHeight();
|
|
|
+ updateRepresentativePositions();
|
|
|
// Wenn ein anderes Element genommen wird
|
|
|
/*
|
|
|
if (init) {
|