⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 controlpanel.html

📁 一种Java算法
💻 HTML
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"><!--NewPage--><html><head><!-- Generated by javadoc on Tue Nov 03 15:31:36 EST 1998 --><title>  Class ControlPanel</title></head><body><a name="_top_"></a><h1>  Class ControlPanel</h1><pre>java.lang.Object   |   +----java.awt.Component           |           +----java.awt.Container                   |                   +----java.awt.Panel                           |                           +----ControlPanel</pre><hr><dl>  <dt> public class <b>ControlPanel</b>  <dt> extends Panel</dl>This class extends the <code>java.awt.Panel</code> class to form a panel which holds the buttons that control the animation of the algorithm. <p> In this particular application, it only consists of four image buttons, namely, <code>run, stop, step,</code> and <code>skip</code>.<p><dl>    <dt> <b>See Also:</b>    <dd> Panel</dl><hr><a name="index"></a><h2>  <img src="images/constructor-index.gif" width=275 height=38 alt="Constructor Index"></h2><dl>  <dt> <img src="images/yellow-ball-small.gif" width=6 height=6 alt=" o ">	<a href="#ControlPanel(AlgAnimFrame, java.lang.String)"><b>ControlPanel</b></a>(AlgAnimFrame, String)  <dd>  Creates a panel to hold the control buttons of the animation tool.</dl><h2>  <img src="images/method-index.gif" width=207 height=38 alt="Method Index"></h2><dl>  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">	<a href="#action(java.awt.Event, java.lang.Object)"><b>action</b></a>(Event, Object)  <dd>  Action handler for the buttons and choice buttons in the control panel.  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">	<a href="#getRunButton()"><b>getRunButton</b></a>()  <dd>  Returns an instance of the run <code>ImageButton</code>, which is casted to <code>java.awt.Button</code>   <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">	<a href="#getSkipButton()"><b>getSkipButton</b></a>()  <dd>  Returns an instance of the skip <code>ImageButton</code>, which is casted to <code>java.awt.Button</code>   <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">	<a href="#getStepButton()"><b>getStepButton</b></a>()  <dd>  Returns an instance of the step <code>ImageButton</code>, which is casted to <code>java.awt.Button</code>   <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">	<a href="#getStopButton()"><b>getStopButton</b></a>()  <dd>  Returns an instance of the stop <code>ImageButton</code>, which is casted to <code>java.awt.Button</code>   <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">	<a href="#refreshButtons()"><b>refreshButtons</b></a>()  <dd>  Perform a <code>repaint()</code> on each of the image buttons.</dl><a name="constructors"></a><h2>  <img src="images/constructors.gif" width=231 height=38 alt="Constructors"></h2><a name="ControlPanel"></a><a name="ControlPanel(AlgAnimFrame, java.lang.String)"><img src="images/yellow-ball.gif" width=12 height=12 alt=" o "></a><b>ControlPanel</b><pre> public ControlPanel(<a href="AlgAnimFrame.html#_top_">AlgAnimFrame</a> frame,                     String algname)</pre><dl>  <dd> Creates a panel to hold the control buttons of the animation tool.<p>  <dd><dl>    <dt> <b>Parameters:</b>    <dd> frame - The parent window frame that contains this panel    <dd> algname - The algorithm name parsed from the applet parameter  </dl></dd></dl><a name="methods"></a><h2>  <img src="images/methods.gif" width=151 height=38 alt="Methods"></h2><a name="refreshButtons()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="refreshButtons"><b>refreshButtons</b></a><pre> public void refreshButtons()</pre><dl>  <dd> Perform a <code>repaint()</code> on each of the image buttons.<p></dl><a name="action(java.awt.Event, java.lang.Object)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="action"><b>action</b></a><pre> public boolean action(Event e,                       Object arg)</pre><dl>  <dd> Action handler for the buttons and choice buttons in the control panel.<p>  <dd><dl>    <dt> <b>Parameters:</b>    <dd> e - Event invoked    <dd> arg - Object that invokes the event    <dt> <b>Overrides:</b>    <dd> <a href="java.awt.Component.html#action(java.awt.Event, java.lang.Object)">action</a> in class Component  </dl></dd></dl><a name="getRunButton()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="getRunButton"><b>getRunButton</b></a><pre> public Button getRunButton()</pre><dl>  <dd> Returns an instance of the run <code>ImageButton</code>, which is casted to <code>java.awt.Button</code><p>  <dd><dl>    <dt> <b>Returns:</b>    <dd> Run button to initiate the animation of the algorithm.  </dl></dd></dl><a name="getStopButton()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="getStopButton"><b>getStopButton</b></a><pre> public Button getStopButton()</pre><dl>  <dd> Returns an instance of the stop <code>ImageButton</code>, which is casted to <code>java.awt.Button</code><p>  <dd><dl>    <dt> <b>Returns:</b>    <dd> Stop button to terminate the execution of algorithm.  </dl></dd></dl><a name="getStepButton()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="getStepButton"><b>getStepButton</b></a><pre> public Button getStepButton()</pre><dl>  <dd> Returns an instance of the step <code>ImageButton</code>, which is casted to <code>java.awt.Button</code><p>  <dd><dl>    <dt> <b>Returns:</b>    <dd> Step button to trace through the execution of the algorithm. If the <code>Run</code> button has already been pressed, the execution mode will be switched from <code>RUN</code> to <code>STEP</code>.  </dl></dd></dl><a name="getSkipButton()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="getSkipButton"><b>getSkipButton</b></a><pre> public Button getSkipButton()</pre><dl>  <dd> Returns an instance of the skip <code>ImageButton</code>, which is casted to <code>java.awt.Button</code><p>  <dd><dl>    <dt> <b>Returns:</b>    <dd> Skip button to bypass the animation of the algorithm.  </dl></dd></dl></body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -