📄 drawingpanel.html
字号:
font initialization overhead.<p> <dd><dl> <dt> <b>Returns:</b> <dd> Size 12 PLAIN Dialog font. </dl></dd></dl><a name="getSmallFont()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="getSmallFont"><b>getSmallFont</b></a><pre> public Font getSmallFont()</pre><dl> <dd> Return font objects initialized during the class initialization, which can be readily used during the animation.<p> <dd><dl> <dt> <b>Returns:</b> <dd> Size 10 PLAIN Dialog font. <dt> <b>See Also:</b> <dd> <a href="#getBigFont">getBigFont</a> </dl></dd></dl><a name="getTinyFont()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="getTinyFont"><b>getTinyFont</b></a><pre> public Font getTinyFont()</pre><dl> <dd> Return font objects initialized during the class initialization, which can be readily used during the animation.<p> <dd><dl> <dt> <b>Returns:</b> <dd> Size 8 PLAIN Dialog font. <dt> <b>See Also:</b> <dd> <a href="#getBigFont">getBigFont</a> </dl></dd></dl><a name="getHugeFont()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="getHugeFont"><b>getHugeFont</b></a><pre> public Font getHugeFont()</pre><dl> <dd> Return font objects initialized during the class initialization, which can be readily used during the animation.<p> <dd><dl> <dt> <b>Returns:</b> <dd> Size 14 PLAIN Dialog font. <dt> <b>See Also:</b> <dd> <a href="#getBigFont">getBigFont</a> </dl></dd></dl><a name="getFixFont()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="getFixFont"><b>getFixFont</b></a><pre> public Font getFixFont()</pre><dl> <dd> Return font objects initialized during the class initialization, which can be readily used during the animation.<p> <dd><dl> <dt> <b>Returns:</b> <dd> Size 12 PLAIN Courier font. <dt> <b>See Also:</b> <dd> <a href="#getBigFont">getBigFont</a> </dl></dd></dl><a name="getPanelHeight()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="getPanelHeight"><b>getPanelHeight</b></a><pre> public int getPanelHeight()</pre><dl> <dd> Get the height of the drawing panel.<p> <dd><dl> <dt> <b>Returns:</b> <dd> Height of the drawing panel set during the initialization of the class or after each invoke of the <code>repaint()</code> method. </dl></dd></dl><a name="getPanelWidth()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="getPanelWidth"><b>getPanelWidth</b></a><pre> public int getPanelWidth()</pre><dl> <dd> Get the width of the drawing panel.<p> <dd><dl> <dt> <b>Returns:</b> <dd> Width of the drawing panel set during the initialization of the class or after each invoke of the <code>repaint()</code> method. </dl></dd></dl><a name="getOffset()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="getOffset"><b>getOffset</b></a><pre> public int getOffset()</pre><dl> <dd> Get the number of pixel towards the edge of the panel which are not going to be drawn.<p> <dd><dl> <dt> <b>Returns:</b> <dd> Inset of the drawing panel, i.e. the edge pads on the four sides of of the panel that are not to be drawn. </dl></dd></dl><a name="setSkip(boolean)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="setSkip"><b>setSkip</b></a><pre> public void setSkip(boolean skip)</pre><dl> <dd> Set if the animation is in the 'SKIP' . . 'UNTIL' mode.<p> <dd><dl> <dt> <b>Parameters:</b> <dd> skip - TRUE if the algorithm animation is to be fast forwarded to a specific point of execution. FALSE otherwise. </dl></dd></dl><a name="setNoAnim(boolean)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="setNoAnim"><b>setNoAnim</b></a><pre> public void setNoAnim(boolean noAnim)</pre><dl> <dd> Set if the animation is disable.<p> <dd><dl> <dt> <b>Parameters:</b> <dd> noAnim - TRUE is animation is disabled; FALSE otherwise. </dl></dd></dl><a name="getNoAnim()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="getNoAnim"><b>getNoAnim</b></a><pre> public boolean getNoAnim()</pre><dl> <dd> Check if the noAnim flag is set.<p> <dd><dl> <dt> <b>Returns:</b> <dd> If the noAnim flag is set. </dl></dd></dl><a name="getSkip()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="getSkip"><b>getSkip</b></a><pre> public boolean getSkip()</pre><dl> <dd> Check if the animationis in the skip mode.<p> <dd><dl> <dt> <b>Returns:</b> <dd> Returns if the animation is in the 'SKIP' . . 'UNTIL' mode. </dl></dd></dl><a name="addDrawingObj(DrawingObj)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="addDrawingObj"><b>addDrawingObj</b></a><pre> public void addDrawingObj(<a href="DrawingObj.html#_top_">DrawingObj</a> obj)</pre><dl> <dd> Adds a drawing object to the canvas.<p> <dd><dl> <dt> <b>Parameters:</b> <dd> obj - The object to be added. </dl></dd></dl><a name="isObjExist(DrawingObj)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="isObjExist"><b>isObjExist</b></a><pre> public boolean isObjExist(<a href="DrawingObj.html#_top_">DrawingObj</a> obj)</pre><dl> <dd> Checks if a certain object has already been added to the drawing panel.<p> <dd><dl> <dt> <b>Parameters:</b> <dd> obj - The drawing object to be checked. <dt> <b>Returns:</b> <dd> Returns TRUE if the drawing object has been added; FALSE otherwise. </dl></dd></dl><a name="removeObj(DrawingObj)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="removeObj"><b>removeObj</b></a><pre> public boolean removeObj(<a href="DrawingObj.html#_top_">DrawingObj</a> obj)</pre><dl> <dd> Remove a drawing object which matches the parameter.<p> <dd><dl> <dt> <b>Parameters:</b> <dd> obj - The drawing object to be removed. <dt> <b>Returns:</b> <dd> TRUE if the object has been successfully deleted; FALSE otherwise. </dl></dd></dl><a name="addCom(ComBox)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="addCom"><b>addCom</b></a><pre> public void addCom(<a href="ComBox.html#_top_">ComBox</a> com)</pre><dl> <dd> Adds a commentary box to the drawing panel.<p> <dd><dl> <dt> <b>Parameters:</b> <dd> com - The commentary box to be added. </dl></dd></dl><a name="isComExist(ComBox)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="isComExist"><b>isComExist</b></a><pre> public boolean isComExist(<a href="ComBox.html#_top_">ComBox</a> com)</pre><dl> <dd> Check if a commentary box has already been added to the drawing panel.<p> <dd><dl> <dt> <b>Parameters:</b> <dd> com - The commentary box to be checked. <dt> <b>Returns:</b> <dd> Returns TRUE if the commentary box has been added; FALSE otherwise. </dl></dd></dl><a name="removeCom(ComBox)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="removeCom"><b>removeCom</b></a><pre> public void removeCom(<a href="ComBox.html#_top_">ComBox</a> com)</pre><dl> <dd> Remove the commentary box.<p> <dd><dl> <dt> <b>Parameters:</b> <dd> com - The combox to be removed. </dl></dd></dl><a name="setAnimStep(int)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="setAnimStep"><b>setAnimStep</b></a><pre> public void setAnimStep(int step)</pre><dl> <dd> Set the animation step, i.e. the number of step for an object to move from one point to another.<p> <dd><dl> <dt> <b>Parameters:</b> <dd> step - The number of animation step. </dl></dd></dl><a name="animate(DrawingObj, java.util.Vector)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="animate"><b>animate</b></a><pre> public void animate(<a href="DrawingObj.html#_top_">DrawingObj</a> obj, Vector pts)</pre><dl> <dd> Animate a single drawing object through a sequence of points specified by the <code>Vector</code> construction. Each element of the vector is of type Point, where the first is the source and the last is the destination of the trajectory to be animated on the object.<p> <dd><dl> <dt> <b>Parameters:</b> <dd> obj - The drawing object to be move. <dd> pts - The trajectory the drawing object is to be moved. </dl></dd></dl><a name="animate(DrawingObj[], java.util.Vector[])"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="animate"><b>animate</b></a><pre> public void animate(<a href="DrawingObj.html#_top_">DrawingObj</a> objs[], Vector pts[])</pre><dl> <dd> Animate a list of drawing objects store in an array. The trajectories of these objects are passed in through the second parameter. The size of the arrays passed in through both parameters should be equal. Otherwise, nothing will be performed. The number of points in all the trajectories must be equal too.<p> <dd><dl> <dt> <b>Parameters:</b> <dd> objs - Array holding the drawing objects to be animated. <dd> pts - Array holding the trajectories of the drawing objects. </dl></dd></dl></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -