forked from dthoma6403/ch5BoxBall
-
Notifications
You must be signed in to change notification settings - Fork 67
/
Copy pathCanvas.ctxt
83 lines (83 loc) · 7.53 KB
/
Canvas.ctxt
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
#BlueJ class context
comment0.params=title
comment0.target=Canvas(java.lang.String)
comment0.text=\r\n\ Create\ a\ Canvas\ with\ default\ height,\ width\ and\ background\ color\ \r\n\ (300,\ 300,\ white).\r\n\ @param\ title\ \ title\ to\ appear\ in\ Canvas\ Frame\ \ \ \ \ \r\n
comment1.params=title\ width\ height
comment1.target=Canvas(java.lang.String,\ int,\ int)
comment1.text=\r\n\ Create\ a\ Canvas\ with\ default\ background\ color\ (white).\r\n\ @param\ title\ \ title\ to\ appear\ in\ Canvas\ Frame\r\n\ @param\ width\ \ the\ desired\ width\ for\ the\ canvas\r\n\ @param\ height\ \ the\ desired\ height\ for\ the\ canvas\r\n
comment10.params=xPos\ yPos\ diameter
comment10.target=void\ eraseCircle(int,\ int,\ int)
comment10.text=\r\n\ Erase\ the\ internal\ dimensions\ of\ the\ given\ circle.\ This\ is\ a\ \r\n\ convenience\ method.\ A\ similar\ effect\ can\ be\ achieved\ with\r\n\ the\ "erase"\ method.\r\n
comment11.params=xPos\ yPos\ width\ height
comment11.target=void\ eraseRectangle(int,\ int,\ int,\ int)
comment11.text=\r\n\ Erase\ the\ internal\ dimensions\ of\ the\ given\ rectangle.\ This\ is\ a\ \r\n\ convenience\ method.\ A\ similar\ effect\ can\ be\ achieved\ with\r\n\ the\ "erase"\ method.\r\n
comment12.params=shape
comment12.target=void\ erase(java.awt.Shape)
comment12.text=\r\n\ Erase\ a\ given\ shape's\ interior\ on\ the\ screen.\r\n\ @param\ \ shape\ \ the\ shape\ object\ to\ be\ erased\ \r\n
comment13.params=shape
comment13.target=void\ eraseOutline(java.awt.Shape)
comment13.text=\r\n\ Erases\ a\ given\ shape's\ outline\ on\ the\ screen.\r\n\ @param\ \ shape\ \ the\ shape\ object\ to\ be\ erased\ \r\n
comment14.params=image\ x\ y
comment14.target=boolean\ drawImage(java.awt.Image,\ int,\ int)
comment14.text=\r\n\ Draws\ an\ image\ onto\ the\ canvas.\r\n\ @param\ \ image\ \ \ the\ Image\ object\ to\ be\ displayed\ \r\n\ @param\ \ x\ \ \ \ \ \ \ x\ co-ordinate\ for\ Image\ placement\ \r\n\ @param\ \ y\ \ \ \ \ \ \ y\ co-ordinate\ for\ Image\ placement\ \r\n\ @return\ \ returns\ boolean\ value\ representing\ whether\ the\ image\ was\ \r\n\ \ \ \ \ \ \ \ \ \ completely\ loaded\ \r\n
comment15.params=text\ x\ y
comment15.target=void\ drawString(java.lang.String,\ int,\ int)
comment15.text=\r\n\ Draws\ a\ String\ on\ the\ Canvas.\r\n\ @param\ \ text\ \ \ the\ String\ to\ be\ displayed\ \r\n\ @param\ \ x\ \ \ \ \ \ x\ co-ordinate\ for\ text\ placement\ \r\n\ @param\ \ y\ \ \ \ \ \ y\ co-ordinate\ for\ text\ placement\r\n
comment16.params=text\ x\ y
comment16.target=void\ eraseString(java.lang.String,\ int,\ int)
comment16.text=\r\n\ Erases\ a\ String\ on\ the\ Canvas.\r\n\ @param\ \ text\ \ \ \ \ the\ String\ to\ be\ displayed\ \r\n\ @param\ \ x\ \ \ \ \ \ \ \ x\ co-ordinate\ for\ text\ placement\ \r\n\ @param\ \ y\ \ \ \ \ \ \ \ y\ co-ordinate\ for\ text\ placement\r\n
comment17.params=x1\ y1\ x2\ y2
comment17.target=void\ drawLine(int,\ int,\ int,\ int)
comment17.text=\r\n\ Draws\ a\ line\ on\ the\ Canvas.\r\n\ @param\ \ x1\ \ \ x\ co-ordinate\ of\ start\ of\ line\ \r\n\ @param\ \ y1\ \ \ y\ co-ordinate\ of\ start\ of\ line\ \r\n\ @param\ \ x2\ \ \ x\ co-ordinate\ of\ end\ of\ line\ \r\n\ @param\ \ y2\ \ \ y\ co-ordinate\ of\ end\ of\ line\ \r\n
comment18.params=newColor
comment18.target=void\ setForegroundColor(java.awt.Color)
comment18.text=\r\n\ Sets\ the\ foreground\ color\ of\ the\ Canvas.\r\n\ @param\ \ newColor\ \ \ the\ new\ color\ for\ the\ foreground\ of\ the\ Canvas\ \r\n
comment19.params=
comment19.target=java.awt.Color\ getForegroundColor()
comment19.text=\r\n\ Returns\ the\ current\ color\ of\ the\ foreground.\r\n\ @return\ \ \ the\ color\ of\ the\ foreground\ of\ the\ Canvas\ \r\n
comment2.params=title\ width\ height\ bgColor
comment2.target=Canvas(java.lang.String,\ int,\ int,\ java.awt.Color)
comment2.text=\r\n\ Create\ a\ Canvas.\r\n\ @param\ title\ \ title\ to\ appear\ in\ Canvas\ Frame\r\n\ @param\ width\ \ the\ desired\ width\ for\ the\ canvas\r\n\ @param\ height\ \ the\ desired\ height\ for\ the\ canvas\r\n\ @param\ bgClour\ \ the\ desired\ background\ color\ of\ the\ canvas\r\n
comment20.params=newColor
comment20.target=void\ setBackgroundColor(java.awt.Color)
comment20.text=\r\n\ Sets\ the\ background\ color\ of\ the\ Canvas.\r\n\ @param\ \ newColor\ \ \ the\ new\ color\ for\ the\ background\ of\ the\ Canvas\ \r\n
comment21.params=
comment21.target=java.awt.Color\ getBackgroundColor()
comment21.text=\r\n\ Returns\ the\ current\ color\ of\ the\ background\r\n\ @return\ \ \ the\ color\ of\ the\ background\ of\ the\ Canvas\ \r\n
comment22.params=newFont
comment22.target=void\ setFont(java.awt.Font)
comment22.text=\r\n\ changes\ the\ current\ Font\ used\ on\ the\ Canvas\r\n\ @param\ \ newFont\ \ \ new\ font\ to\ be\ used\ for\ String\ output\r\n
comment23.params=
comment23.target=java.awt.Font\ getFont()
comment23.text=\r\n\ Returns\ the\ current\ font\ of\ the\ canvas.\r\n\ @return\ \ \ \ \ the\ font\ currently\ in\ use\r\n
comment24.params=width\ height
comment24.target=void\ setSize(int,\ int)
comment24.text=\r\n\ Sets\ the\ size\ of\ the\ canvas.\r\n\ @param\ \ width\ \ \ \ new\ width\ \r\n\ @param\ \ height\ \ \ new\ height\ \r\n
comment25.params=
comment25.target=java.awt.Dimension\ getSize()
comment25.text=\r\n\ Returns\ the\ size\ of\ the\ canvas.\r\n\ @return\ \ \ \ \ The\ current\ dimension\ of\ the\ canvas\r\n
comment26.params=milliseconds
comment26.target=void\ wait(int)
comment26.text=\r\n\ Waits\ for\ a\ specified\ number\ of\ milliseconds\ before\ finishing.\r\n\ This\ provides\ an\ easy\ way\ to\ specify\ a\ small\ delay\ which\ can\ be\r\n\ used\ when\ producing\ animations.\r\n\ @param\ \ milliseconds\ \ the\ number\ \r\n
comment3.params=visible
comment3.target=void\ setVisible(boolean)
comment3.text=\r\n\ Set\ the\ canvas\ visibility\ and\ brings\ canvas\ to\ the\ front\ of\ screen\r\n\ when\ made\ visible.\ This\ method\ can\ also\ be\ used\ to\ bring\ an\ already\r\n\ visible\ canvas\ to\ the\ front\ of\ other\ windows.\r\n\ @param\ visible\ \ boolean\ value\ representing\ the\ desired\ visibility\ of\r\n\ the\ canvas\ (true\ or\ false)\ \r\n
comment4.params=
comment4.target=boolean\ isVisible()
comment4.text=\r\n\ Provide\ information\ on\ visibility\ of\ the\ Canvas.\r\n\ @return\ \ true\ if\ canvas\ is\ visible,\ false\ otherwise\r\n
comment5.params=shape
comment5.target=void\ draw(java.awt.Shape)
comment5.text=\r\n\ Draw\ the\ outline\ of\ a\ given\ shape\ onto\ the\ canvas.\r\n\ @param\ \ shape\ \ the\ shape\ object\ to\ be\ drawn\ on\ the\ canvas\r\n
comment6.params=shape
comment6.target=void\ fill(java.awt.Shape)
comment6.text=\r\n\ Fill\ the\ internal\ dimensions\ of\ a\ given\ shape\ with\ the\ current\ \r\n\ foreground\ color\ of\ the\ canvas.\r\n\ @param\ \ shape\ \ the\ shape\ object\ to\ be\ filled\ \r\n
comment7.params=xPos\ yPos\ diameter
comment7.target=void\ fillCircle(int,\ int,\ int)
comment7.text=\r\n\ Fill\ the\ internal\ dimensions\ of\ the\ given\ circle\ with\ the\ current\ \r\n\ foreground\ color\ of\ the\ canvas.\r\n\ @param\ \ xPos\ \ The\ x-coordinate\ of\ the\ circle\ center\ point\r\n\ @param\ \ yPos\ \ The\ y-coordinate\ of\ the\ circle\ center\ point\r\n\ @param\ \ diameter\ \ The\ diameter\ of\ the\ circle\ to\ be\ drawn\r\n
comment8.params=xPos\ yPos\ width\ height
comment8.target=void\ fillRectangle(int,\ int,\ int,\ int)
comment8.text=\r\n\ Fill\ the\ internal\ dimensions\ of\ the\ given\ rectangle\ with\ the\ current\ \r\n\ foreground\ color\ of\ the\ canvas.\ This\ is\ a\ convenience\ method.\ A\ similar\ \r\n\ effect\ can\ be\ achieved\ with\ the\ "fill"\ method.\r\n
comment9.params=
comment9.target=void\ erase()
comment9.text=\r\n\ Erase\ the\ whole\ canvas.\r\n
numComments=27