-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathModel.java
More file actions
47 lines (35 loc) · 813 Bytes
/
Model.java
File metadata and controls
47 lines (35 loc) · 813 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
38
39
40
41
42
43
44
45
46
47
import java.awt.Color;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.event.ActionEvent;
import java.awt.event.MouseEvent;
import javax.swing.JButton;
import javax.swing.JColorChooser;
@SuppressWarnings("unused")
public class Model {
// private Model M_View;
private Color myColor;
//variblae to store size of brush
int brushSize;
public JButton modelEraser;
public JButton modelBrush;
public Color modelColor;
public myCanvas modelCanvas;
public Model()
{
myColor = Color.BLACK;
brushSize = 10;
}
public int getSize() {
return brushSize;
}
public void setSize(int Bs) {
brushSize = Bs;
}
public Color getColor() {
return myColor;
}
public void setColor(Color color) {
myColor = color;
}
}