📄 legend.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 Legend</title></head><body><a name="_top_"></a><h1> Class Legend</h1><pre>java.lang.Object | +----Legend</pre><hr><dl> <dt> public class <b>Legend</b> <dt> extends Object <dt> implements <a href="DrawingObj.html#_top_">DrawingObj</a></dl>This is just another example implementation of the <code>DrawingObj</code> interface. It creates a small Legend describing the color code used in the drawing panel. This class has to be modified for different application. The <code>draw</code> method has to be re-implemented to reflex a particular application. This drawing object can be added to the drawing panel by: <code><pre> drawingPanel.addDrawingObj(new Legend(x, y)); </pre></code><p><dl> <dt> <b>See Also:</b> <dd> <a href="ComBox.html#_top_">ComBox</a>, <a href="IntMatrix.html#_top_">IntMatrix</a></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="#Legend(int, int)"><b>Legend</b></a>(int, int) <dd> Construct a legend object on the same drawing panel with the topleft corner specified by the parameters.</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="#draw(java.awt.Graphics)"><b>draw</b></a>(Graphics) <dd> This method draws the details of the legend object on the appropriate graphical context, normally the drawing panel. <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o "> <a href="#getX()"><b>getX</b></a>() <dd> Get the left most position of the legend object. <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o "> <a href="#getY()"><b>getY</b></a>() <dd> Get the top most position of the legend object. <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o "> <a href="#move(int, int)"><b>move</b></a>(int, int) <dd> Move the object to the position as specified by the parameter.</dl><a name="constructors"></a><h2> <img src="images/constructors.gif" width=231 height=38 alt="Constructors"></h2><a name="Legend"></a><a name="Legend(int, int)"><img src="images/yellow-ball.gif" width=12 height=12 alt=" o "></a><b>Legend</b><pre> public Legend(int x, int y)</pre><dl> <dd> Construct a legend object on the same drawing panel with the topleft corner specified by the parameters.<p> <dd><dl> <dt> <b>Parameters:</b> <dd> x - Left most position of the legend object. <dd> y - Right most position of the legend object. </dl></dd></dl><a name="methods"></a><h2> <img src="images/methods.gif" width=151 height=38 alt="Methods"></h2><a name="move(int, int)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="move"><b>move</b></a><pre> public void move(int x, int y)</pre><dl> <dd> Move the object to the position as specified by the parameter. This coordinate represents the topleft corner of the object.<p> <dd><dl> <dt> <b>Parameters:</b> <dd> x - The left most position of the legend object. <dd> y - The right most position of the legend object. </dl></dd></dl><a name="getX()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="getX"><b>getX</b></a><pre> public int getX()</pre><dl> <dd> Get the left most position of the legend object. This method is not actually used. Just there for completeness when implementing the <code>DrawingObj</code> interface.<p> <dd><dl> <dt> <b>Returns:</b> <dd> The left most position of the legend object. </dl></dd></dl><a name="getY()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="getY"><b>getY</b></a><pre> public int getY()</pre><dl> <dd> Get the top most position of the legend object. This method is not actually used. Just there for completeness when implementing the <code>DrawingObj</code> interface.<p> <dd><dl> <dt> <b>Returns:</b> <dd> The top most position of the legend object. </dl></dd></dl><a name="draw(java.awt.Graphics)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="draw"><b>draw</b></a><pre> public void draw(Graphics g)</pre><dl> <dd> This method draws the details of the legend object on the appropriate graphical context, normally the drawing panel. This method has to be modified for various application.<p></dl></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -