Files
G4G0-1/Semester 1/Programming 1/Java/examples/projects/chapter06/scribble/Canvas.ctxt
2024-01-15 20:14:10 +00:00

84 lines
7.3 KiB
Plaintext
Executable File

#BlueJ class context
comment0.params=title
comment0.target=Canvas(java.lang.String)
comment0.text=\n\ Create\ a\ Canvas\ with\ default\ height,\ width\ and\ background\ color\ \n\ (300,\ 300,\ white).\n\ @param\ title\ \ title\ to\ appear\ in\ Canvas\ Frame\ \ \ \ \ \n
comment1.params=title\ width\ height
comment1.target=Canvas(java.lang.String,\ int,\ int)
comment1.text=\n\ Create\ a\ Canvas\ with\ default\ background\ color\ (white).\n\ @param\ title\ \ title\ to\ appear\ in\ Canvas\ Frame\n\ @param\ width\ \ the\ desired\ width\ for\ the\ canvas\n\ @param\ height\ \ the\ desired\ height\ for\ the\ canvas\n
comment10.params=xPos\ yPos\ diameter
comment10.target=void\ eraseCircle(int,\ int,\ int)
comment10.text=\n\ Erase\ the\ internal\ dimensions\ of\ the\ given\ circle.\ This\ is\ a\ \n\ convenience\ method.\ A\ similar\ effect\ can\ be\ achieved\ with\n\ the\ "erase"\ method.\n
comment11.params=xPos\ yPos\ width\ height
comment11.target=void\ eraseRectangle(int,\ int,\ int,\ int)
comment11.text=\n\ Erase\ the\ internal\ dimensions\ of\ the\ given\ rectangle.\ This\ is\ a\ \n\ convenience\ method.\ A\ similar\ effect\ can\ be\ achieved\ with\n\ the\ "erase"\ method.\n
comment12.params=shape
comment12.target=void\ erase(java.awt.Shape)
comment12.text=\n\ Erase\ a\ given\ shape's\ interior\ on\ the\ screen.\n\ @param\ \ shape\ \ the\ shape\ object\ to\ be\ erased\ \n
comment13.params=shape
comment13.target=void\ eraseOutline(java.awt.Shape)
comment13.text=\n\ Erases\ a\ given\ shape's\ outline\ on\ the\ screen.\n\ @param\ \ shape\ \ the\ shape\ object\ to\ be\ erased\ \n
comment14.params=image\ x\ y
comment14.target=boolean\ drawImage(java.awt.Image,\ int,\ int)
comment14.text=\n\ Draws\ an\ image\ onto\ the\ canvas.\n\ @param\ \ image\ \ \ the\ Image\ object\ to\ be\ displayed\ \n\ @param\ \ x\ \ \ \ \ \ \ x\ co-ordinate\ for\ Image\ placement\ \n\ @param\ \ y\ \ \ \ \ \ \ y\ co-ordinate\ for\ Image\ placement\ \n\ @return\ \ returns\ boolean\ value\ representing\ whether\ the\ image\ was\ \n\ \ \ \ \ \ \ \ \ \ completely\ loaded\ \n
comment15.params=text\ x\ y
comment15.target=void\ drawString(java.lang.String,\ int,\ int)
comment15.text=\n\ Draws\ a\ String\ on\ the\ Canvas.\n\ @param\ \ text\ \ \ the\ String\ to\ be\ displayed\ \n\ @param\ \ x\ \ \ \ \ \ x\ co-ordinate\ for\ text\ placement\ \n\ @param\ \ y\ \ \ \ \ \ y\ co-ordinate\ for\ text\ placement\n
comment16.params=text\ x\ y
comment16.target=void\ eraseString(java.lang.String,\ int,\ int)
comment16.text=\n\ Erases\ a\ String\ on\ the\ Canvas.\n\ @param\ \ text\ \ \ \ \ the\ String\ to\ be\ displayed\ \n\ @param\ \ x\ \ \ \ \ \ \ \ x\ co-ordinate\ for\ text\ placement\ \n\ @param\ \ y\ \ \ \ \ \ \ \ y\ co-ordinate\ for\ text\ placement\n
comment17.params=x1\ y1\ x2\ y2
comment17.target=void\ drawLine(int,\ int,\ int,\ int)
comment17.text=\n\ Draws\ a\ line\ on\ the\ Canvas.\n\ @param\ \ x1\ \ \ x\ co-ordinate\ of\ start\ of\ line\ \n\ @param\ \ y1\ \ \ y\ co-ordinate\ of\ start\ of\ line\ \n\ @param\ \ x2\ \ \ x\ co-ordinate\ of\ end\ of\ line\ \n\ @param\ \ y2\ \ \ y\ co-ordinate\ of\ end\ of\ line\ \n
comment18.params=newColor
comment18.target=void\ setForegroundColor(java.awt.Color)
comment18.text=\n\ Sets\ the\ foreground\ color\ of\ the\ Canvas.\n\ @param\ \ newColor\ \ \ the\ new\ color\ for\ the\ foreground\ of\ the\ Canvas\ \n
comment19.params=
comment19.target=java.awt.Color\ getForegroundColor()
comment19.text=\n\ Returns\ the\ current\ color\ of\ the\ foreground.\n\ @return\ \ \ the\ color\ of\ the\ foreground\ of\ the\ Canvas\ \n
comment2.params=title\ width\ height\ bgColor
comment2.target=Canvas(java.lang.String,\ int,\ int,\ java.awt.Color)
comment2.text=\n\ Create\ a\ Canvas.\n\ @param\ title\ \ title\ to\ appear\ in\ Canvas\ Frame\n\ @param\ width\ \ the\ desired\ width\ for\ the\ canvas\n\ @param\ height\ \ the\ desired\ height\ for\ the\ canvas\n\ @param\ bgClour\ \ the\ desired\ background\ color\ of\ the\ canvas\n
comment20.params=newColor
comment20.target=void\ setBackgroundColor(java.awt.Color)
comment20.text=\n\ Sets\ the\ background\ color\ of\ the\ Canvas.\n\ @param\ \ newColor\ \ \ the\ new\ color\ for\ the\ background\ of\ the\ Canvas\ \n
comment21.params=
comment21.target=java.awt.Color\ getBackgroundColor()
comment21.text=\n\ Returns\ the\ current\ color\ of\ the\ background\n\ @return\ \ \ the\ color\ of\ the\ background\ of\ the\ Canvas\ \n
comment22.params=newFont
comment22.target=void\ setFont(java.awt.Font)
comment22.text=\n\ changes\ the\ current\ Font\ used\ on\ the\ Canvas\n\ @param\ \ newFont\ \ \ new\ font\ to\ be\ used\ for\ String\ output\n
comment23.params=
comment23.target=java.awt.Font\ getFont()
comment23.text=\n\ Returns\ the\ current\ font\ of\ the\ canvas.\n\ @return\ \ \ \ \ the\ font\ currently\ in\ use\n
comment24.params=width\ height
comment24.target=void\ setSize(int,\ int)
comment24.text=\n\ Sets\ the\ size\ of\ the\ canvas.\n\ @param\ \ width\ \ \ \ new\ width\ \n\ @param\ \ height\ \ \ new\ height\ \n
comment25.params=
comment25.target=java.awt.Dimension\ getSize()
comment25.text=\n\ Returns\ the\ size\ of\ the\ canvas.\n\ @return\ \ \ \ \ The\ current\ dimension\ of\ the\ canvas\n
comment26.params=milliseconds
comment26.target=void\ wait(int)
comment26.text=\n\ Waits\ for\ a\ specified\ number\ of\ milliseconds\ before\ finishing.\n\ This\ provides\ an\ easy\ way\ to\ specify\ a\ small\ delay\ which\ can\ be\n\ used\ when\ producing\ animations.\n\ @param\ \ milliseconds\ \ the\ number\ \n
comment3.params=visible
comment3.target=void\ setVisible(boolean)
comment3.text=\n\ Set\ the\ canvas\ visibility\ and\ brings\ canvas\ to\ the\ front\ of\ screen\n\ when\ made\ visible.\ This\ method\ can\ also\ be\ used\ to\ bring\ an\ already\n\ visible\ canvas\ to\ the\ front\ of\ other\ windows.\n\ @param\ visible\ \ boolean\ value\ representing\ the\ desired\ visibility\ of\n\ the\ canvas\ (true\ or\ false)\ \n
comment4.params=
comment4.target=boolean\ isVisible()
comment4.text=\n\ Provide\ information\ on\ visibility\ of\ the\ Canvas.\n\ @return\ \ true\ if\ canvas\ is\ visible,\ false\ otherwise\n
comment5.params=shape
comment5.target=void\ draw(java.awt.Shape)
comment5.text=\n\ Draw\ the\ outline\ of\ a\ given\ shape\ onto\ the\ canvas.\n\ @param\ \ shape\ \ the\ shape\ object\ to\ be\ drawn\ on\ the\ canvas\n
comment6.params=shape
comment6.target=void\ fill(java.awt.Shape)
comment6.text=\n\ Fill\ the\ internal\ dimensions\ of\ a\ given\ shape\ with\ the\ current\ \n\ foreground\ color\ of\ the\ canvas.\n\ @param\ \ shape\ \ the\ shape\ object\ to\ be\ filled\ \n
comment7.params=xPos\ yPos\ diameter
comment7.target=void\ fillCircle(int,\ int,\ int)
comment7.text=\n\ Fill\ the\ internal\ dimensions\ of\ the\ given\ circle\ with\ the\ current\ \n\ foreground\ color\ of\ the\ canvas.\n\ @param\ \ xPos\ \ The\ x-coordinate\ of\ the\ circle\ center\ point\n\ @param\ \ yPos\ \ The\ y-coordinate\ of\ the\ circle\ center\ point\n\ @param\ \ diameter\ \ The\ diameter\ of\ the\ circle\ to\ be\ drawn\n
comment8.params=xPos\ yPos\ width\ height
comment8.target=void\ fillRectangle(int,\ int,\ int,\ int)
comment8.text=\n\ Fill\ the\ internal\ dimensions\ of\ the\ given\ rectangle\ with\ the\ current\ \n\ foreground\ color\ of\ the\ canvas.\ This\ is\ a\ convenience\ method.\ A\ similar\ \n\ effect\ can\ be\ achieved\ with\ the\ "fill"\ method.\n
comment9.params=
comment9.target=void\ erase()
comment9.text=\n\ Erase\ the\ whole\ canvas.\n
numComments=27