|
@@ -90,13 +90,11 @@ class MyCanvas extends JPanel implements MouseListener, MouseMotionListener {
|
|
public void paintComponent(Graphics g) {
|
|
public void paintComponent(Graphics g) {
|
|
super.paintComponent(g);
|
|
super.paintComponent(g);
|
|
g2 = (Graphics2D) g;
|
|
g2 = (Graphics2D) g;
|
|
- g2.setStroke(new BasicStroke(GlobalVariables.SCALE/15));
|
|
|
|
RenderingHints rh = new RenderingHints(
|
|
RenderingHints rh = new RenderingHints(
|
|
RenderingHints.KEY_ANTIALIASING,
|
|
RenderingHints.KEY_ANTIALIASING,
|
|
RenderingHints.VALUE_ANTIALIAS_ON);
|
|
RenderingHints.VALUE_ANTIALIAS_ON);
|
|
g2.setRenderingHints(rh);
|
|
g2.setRenderingHints(rh);
|
|
|
|
|
|
-
|
|
|
|
//Selection
|
|
//Selection
|
|
if(selectRect != null){
|
|
if(selectRect != null){
|
|
g2.setColor(Color.GREEN);
|
|
g2.setColor(Color.GREEN);
|
|
@@ -114,6 +112,7 @@ class MyCanvas extends JPanel implements MouseListener, MouseMotionListener {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ //Highlighted Edge
|
|
g2.setColor(Color.GREEN);
|
|
g2.setColor(Color.GREEN);
|
|
for (CpsObject cps : model.getObjectsOnCanvas()) {
|
|
for (CpsObject cps : model.getObjectsOnCanvas()) {
|
|
for (CpsObject con : cps.getConnectedTo()) {
|
|
for (CpsObject con : cps.getConnectedTo()) {
|
|
@@ -184,12 +183,7 @@ class MyCanvas extends JPanel implements MouseListener, MouseMotionListener {
|
|
tempCps.setPos(e.getX() - GlobalVariables.SCALE_DIVIDED2, e.getY() - GlobalVariables.SCALE_DIVIDED2);
|
|
tempCps.setPos(e.getX() - GlobalVariables.SCALE_DIVIDED2, e.getY() - GlobalVariables.SCALE_DIVIDED2);
|
|
tempCps = null;
|
|
tempCps = null;
|
|
}
|
|
}
|
|
- if(y+GlobalVariables.SCALE>this.getHeight()){
|
|
|
|
- this.setPreferredSize(new Dimension(this.getWidth(), y+GlobalVariables.SCALE));
|
|
|
|
- }
|
|
|
|
- if(x+GlobalVariables.SCALE>this.getHeight()){
|
|
|
|
- this.setPreferredSize(new Dimension(x+GlobalVariables.SCALE,this.getHeight() ));
|
|
|
|
- }
|
|
|
|
|
|
+
|
|
// Rechtsklick Liste
|
|
// Rechtsklick Liste
|
|
if (e.getButton() == e.BUTTON3) {
|
|
if (e.getButton() == e.BUTTON3) {
|
|
if (e.getButton() == e.BUTTON3 && tempCps != null) {
|
|
if (e.getButton() == e.BUTTON3 && tempCps != null) {
|