?? drawinggizmo.ctxt
字號:
#BlueJ class contextcomment0.target=class\ DrawingGizmocomment0.text=DrawingGizmo\ is\ like\ a\ drawing\ pen\ that\ncan\ be\ moved\ around\ a\ drawing\ canvas\nThis\ is\ similar\ to\ a\ turtle\ from\ the\nLOGO\ programming\ language.\n\nClass\ Invariant\nwindow\ is\ instantiated\ with\ a\ canvas\ of\ 260\ by\ 160\ colored\nand\ \ the\ window\ is\ colored\ as\ established\ by\ setBackground\nand\ \ (locX,\ locY)\ maintains\ the\ position\ of\ the\ drawing\ tool\nwithin\ the\ window\ canvas\nand\ \ direction\ indicates\ the\ direction\ of\ travel\ (in\ degrees)\n(increasing\ the\ direction\ value\ rotates\ clockwise)\ \n\ncomment1.params=comment1.target=void\ dontDraw()comment1.text=post\:\ \ \ \!isDrawing\ \ncomment10.target=locXcomment11.target=windowcomment12.params=comment12.target=void\ draw()comment12.text=post\:\ \ isDrawing\ \ncomment13.params=gcomment13.target=void\ paint(Graphics)comment13.text=post\:\ thisis\ drawn\ as\ an\ arrow\ at\ position\ (locX,locY),\ \nangled\ according\ to\ direction\nand\ isDrawing\ implies\ the\ arrow\ is\ colored\ green\notherwise\ the\ arrow\ is\ colored\ red\ \n\ncomment14.target=isMajorDiagonalcomment15.params=gcomment15.target=void\ paint(Graphics)comment16.params=x1\ y1\ x2\ y2comment16.target=Line(int,int,int,int)comment17.params=comment17.target=DrawingGizmo()comment17.text=post\:\ \ \ window@pre\!\=null\ implies\ window\ \=\=\ window@pre\nand\ \ window.getContentPane().getWidth()\=\=200\ \ and\ \ window.getContentPane().getHeight()\=\=160\nand\ \ getX()\ \=\=\ 127\ \ and\ \ getY()\ \=\=\ 77\ \ and\ \ getWidth()\ \=\=\ getHeight()\ \=\=\ 9\nand\ \ isDrawing\nand\ \ direction\ \=\=\ -90\ (the\ triangle\ points\ up)\nand\ \ getForeground()\ \=\=\ Color.green\ \n\ncomment18.params=comment18.target=void\ turnCounterclockwise()comment18.text=post\:\ \ direction\ \=\=\ direction@pre\ -\ 30\ \ (direction\ rotates\ counterclockwise\ by\ 10\ degrees)\ \ncomment19.params=comment19.target=void\ turnClockwise()comment19.text=post\:\ \ direction\ \=\=\ direction@pre\ +\ 30\ \ (direction\ rotates\ clockwise\ by\ 10\ degrees)\ \ncomment2.params=comment2.target=void\ moveForward()comment2.text=post\:\ \ (locX,\ locY)\ is\ a\ point\ at\ angle\ direction\ and\ 20\ units\ from\ (locX@pre,\ locY@pre)\nand\ \ isDrawing\ implies\ a\ line\ segment\ is\ drawn\ connecting\ (locX@pre,\ locY@pre)\nwith\ (locX,\ locY)\ \n\ncomment20.target=directioncomment21.target=isDrawingcomment3.params=dcomment3.target=void\ turnBy(int)comment3.text=post\:\ \ direction\ \=\=\ direction@pre\ +\ d\ \ (direction\ rotates\ clockwise\ by\ d\ degrees)\ \ncomment4.params=ccomment4.target=void\ setBackground(Color)comment4.text=post\:\ \ the\ window\ is\ recolored\ to\ match\ c\ \ncomment5.params=dcomment5.target=void\ moveBy(int)comment5.text=post\:\ \ (locX,\ locY)\ is\ a\ point\ at\ angle\ direction\ and\ d\ units\ from\ (locX@pre,\ locY@pre)\nand\ \ isDrawing\ implies\ a\ line\ segment\ is\ drawn\ connecting\ (locX@pre,\ locY@pre)\nwith\ (locX,\ locY)\ \n\ncomment6.params=comment6.target=void\ delay2Sec()comment7.target=delayTimercomment8.target=locYcomment9.params=tcomment9.target=void\ delayBy(int)numComments=22
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -