📄 outputpanel.html
字号:
paintComponent</H3><PRE>public void <B>paintComponent</B>(java.awt.Graphics g)</PRE><DL><DD>Paints the current data points and if needed the decision regions<P><DD><DL><DT><B>Overrides:</B><DD><CODE>paintComponent</CODE> in class <CODE>javax.swing.JComponent</CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>g</CODE> - graphics object to use</DL></DD></DL><HR><A NAME="addOutput(java.util.Vector, int, java.awt.Color)"><!-- --></A><H3>addOutput</H3><PRE>public boolean <B>addOutput</B>(java.util.Vector<MyPoint> points_a, int type_a, java.awt.Color color_a)</PRE><DL><DD>Adds points to the output panel<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>points_a</CODE> - points to be added to panel<DD><CODE>type_a</CODE> - integer value of type<DD><CODE>color_a</CODE> - color of point<DT><B>Returns:</B><DD>true</DL></DD></DL><HR><A NAME="removeOutput()"><!-- --></A><H3>removeOutput</H3><PRE>public boolean <B>removeOutput</B>()</PRE><DL><DD>Removes last vector of points from output<P><DD><DL></DL></DD><DD><DL></DL></DD></DL><HR><A NAME="getDisplayWidth()"><!-- --></A><H3>getDisplayWidth</H3><PRE>public int <B>getDisplayWidth</B>()</PRE><DL><DD>Gets the width on the output canvas method: getDisplayWidth<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>width of the output plot</DL></DD></DL><HR><A NAME="getDisplayHeight()"><!-- --></A><H3>getDisplayHeight</H3><PRE>public int <B>getDisplayHeight</B>()</PRE><DL><DD>Gets the height on the output canvas<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>height of the output plot</DL></DD></DL><HR><A NAME="getXRatio()"><!-- --></A><H3>getXRatio</H3><PRE>public double <B>getXRatio</B>()</PRE><DL><DD>Gets the X direction Ratio<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>X ratio of the output plot</DL></DD></DL><HR><A NAME="getYRatio()"><!-- --></A><H3>getYRatio</H3><PRE>public double <B>getYRatio</B>()</PRE><DL><DD>Gets the Y direction Ratio<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>Y Ratio of the output plot</DL></DD></DL><HR><A NAME="clear()"><!-- --></A><H3>clear</H3><PRE>public void <B>clear</B>()</PRE><DL><DD>Clears the input panel screen<P><DD><DL></DL></DD><DD><DL></DL></DD></DL><HR><A NAME="refresh()"><!-- --></A><H3>refresh</H3><PRE>public void <B>refresh</B>()</PRE><DL><DD>Redraws the input panel screen<P><DD><DL></DL></DD><DD><DL></DL></DD></DL><HR><A NAME="copy()"><!-- --></A><H3>copy</H3><PRE>public <A HREF="OutputPanel.html" title="class in <Unnamed>">OutputPanel</A> <B>copy</B>()</PRE><DL><DD>Duplicates the OutputPanel Object<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>clone of OutputPanel</DL></DD></DL><HR><A NAME="constrain(java.awt.Container, java.awt.Component, int, int, int, int, int, int, double, double, int, int, int, int)"><!-- --></A><H3>constrain</H3><PRE>public boolean <B>constrain</B>(java.awt.Container container, java.awt.Component component, int grid_x, int grid_y, int grid_width, int grid_height, int fill, int anchor, double weight_x, double weight_y, int top, int left, int bottom, int right)</PRE><DL><DD>This method creates the constraints of a component in a container and then adds the component to the container. it is based on code from "Java in a Nutshell" by David Flanagan. published by O'Reilly and Associates incorporated. method: constrain<P><DD><DL><DT><B>Parameters:</B><DD><CODE>container</CODE> - (input) container to place the component<DD><CODE>component</CODE> - (input) the component to be constrained<DD><CODE>grid_x</CODE> - (input) horizontal position of component<DD><CODE>grid_y</CODE> - (input) vertical position of component<DD><CODE>grid_width</CODE> - (input) number of horizontal grid spots to take<DD><CODE>grid_height</CODE> - (input) number of vertical grid spots to take<DD><CODE>fill</CODE> - (input) directions to fill when component space is resized<DD><CODE>anchor</CODE> - (input) anchor position when component space is resized<DD><CODE>weight_x</CODE> - (input)relative amount of horizontal space component should take when its space is resized<DD><CODE>weight_y</CODE> - (input) relative amount of vertical space component should take when its space is resized<DD><CODE>top</CODE> - (input) amount of inset space on top<DD><CODE>left</CODE> - (input) amount of inset space on left<DD><CODE>bottom</CODE> - (input) amount of inset space on bottom<DD><CODE>right</CODE> - (input) amount of inset space on right<DT><B>Returns:</B><DD>true</DL></DD></DL><!-- ========= END OF CLASS DATA ========= --><HR><!-- ======= START OF BOTTOM NAVBAR ====== --><A NAME="navbar_bottom"><!-- --></A><A HREF="#skip-navbar_bottom" title="Skip navigation links"></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_bottom_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="Matrix.html" title="class in <Unnamed>"><B>PREV CLASS</B></A> <A HREF="SelectionArea.html" title="class in <Unnamed>"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="index.html?OutputPanel.html" target="_top"><B>FRAMES</B></A> <A HREF="OutputPanel.html" target="_top"><B>NO FRAMES</B></A> <SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="allclasses-noframe.html"><B>All Classes</B></A>'); } //--></SCRIPT><NOSCRIPT> <A HREF="allclasses-noframe.html"><B>All Classes</B></A></NOSCRIPT></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: <A HREF="#nested_classes_inherited_from_class_javax.swing.JPanel">NESTED</A> | <A HREF="#field_summary">FIELD</A> | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: <A HREF="#field_detail">FIELD</A> | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><A NAME="skip-navbar_bottom"></A><!-- ======== END OF BOTTOM NAVBAR ======= --><HR></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -