-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathConnector.java
More file actions
37 lines (36 loc) · 837 Bytes
/
Connector.java
File metadata and controls
37 lines (36 loc) · 837 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)
/**
* This class represents the visual connector from a node to it's parent.
*
* @author Roșca Paul-Teodor
* @version 1.0 (22/12/2020)
*/
public class Connector extends Actor
{
/**
* Default consturctor for creating a connector
*/
public Connector()
{
}
/**
* Constructor for creating a connector of a specific size
* @param x length
* @param y width
*/
public Connector(int x,int y)
{
GreenfootImage img=getImage();
img.scale(x,y);
setImage(img);
}
/**
* Method for chaning the size of the connector
*/
public void setScale(int x,int y)
{
GreenfootImage img=getImage();
img.scale(x,y);
setImage(img);
}
}