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

📄 component.html.svn-base

📁 j2me设计的界面包
💻 SVN-BASE
📖 第 1 页 / 共 5 页
字号:
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#com.sun.lwuit.Component.RIGHT">Constant Field Values</A></DL>
</DL>

<!-- ========= CONSTRUCTOR DETAIL ======== -->

<A NAME="constructor_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TH>
</TR>
</TABLE>

<A NAME="Component()"><!-- --></A><H3>
Component</H3>
<PRE>
protected <B>Component</B>()</PRE>
<DL>
<DD>Creates a new instance of Component
<P>
</DL>

<!-- ============ METHOD DETAIL ========== -->

<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Method Detail</B></FONT></TH>
</TR>
</TABLE>

<A NAME="getX()"><!-- --></A><H3>
getX</H3>
<PRE>
public int <B>getX</B>()</PRE>
<DL>
<DD>Returns the current component x location relatively to its parent container
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>

<DT><B>Returns:</B><DD>the current x coordinate of the components origin</DL>
</DD>
</DL>
<HR>

<A NAME="getY()"><!-- --></A><H3>
getY</H3>
<PRE>
public int <B>getY</B>()</PRE>
<DL>
<DD>Returns the component y location relatively to its parent container
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>

<DT><B>Returns:</B><DD>the current y coordinate of the components origin</DL>
</DD>
</DL>
<HR>

<A NAME="isVisible()"><!-- --></A><H3>
isVisible</H3>
<PRE>
public boolean <B>isVisible</B>()</PRE>
<DL>
<DD>Returns whether the component is visible or not
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>

<DT><B>Returns:</B><DD>true if component is visible; otherwise false</DL>
</DD>
</DL>
<HR>

<A NAME="getWidth()"><!-- --></A><H3>
getWidth</H3>
<PRE>
public int <B>getWidth</B>()</PRE>
<DL>
<DD>Returns the component width
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>

<DT><B>Returns:</B><DD>the component width</DL>
</DD>
</DL>
<HR>

<A NAME="getHeight()"><!-- --></A><H3>
getHeight</H3>
<PRE>
public int <B>getHeight</B>()</PRE>
<DL>
<DD>Returns the component height
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>

<DT><B>Returns:</B><DD>the component height</DL>
</DD>
</DL>
<HR>

<A NAME="setX(int)"><!-- --></A><H3>
setX</H3>
<PRE>
public void <B>setX</B>(int&nbsp;x)</PRE>
<DL>
<DD>Sets the Component x location relative to the parent container, this method is exposed for the purpose of external layout managers and should not be invoked directly.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>x</CODE> - the current x coordinate of the components origin</DL>
</DD>
</DL>
<HR>

<A NAME="setY(int)"><!-- --></A><H3>
setY</H3>
<PRE>
public void <B>setY</B>(int&nbsp;y)</PRE>
<DL>
<DD>Sets the Component y location relative to the parent container, this method is exposed for the purpose of external layout managers and should not be invoked directly.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>y</CODE> - the current y coordinate of the components origin</DL>
</DD>
</DL>
<HR>

<A NAME="getBaseline(int, int)"><!-- --></A><H3>
getBaseline</H3>
<PRE>
public int <B>getBaseline</B>(int&nbsp;width,
                       int&nbsp;height)</PRE>
<DL>
<DD>The baseline for the component text according to which it should be aligned with other components for best visual look.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>width</CODE> - the component width<DD><CODE>height</CODE> - the component height
<DT><B>Returns:</B><DD>baseline value from the top of the component</DL>
</DD>
</DL>
<HR>

<A NAME="getBaselineResizeBehavior()"><!-- --></A><H3>
getBaselineResizeBehavior</H3>
<PRE>
public int <B>getBaselineResizeBehavior</B>()</PRE>
<DL>
<DD>Returns a constant indicating how the baseline varies with the size of the component.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>

<DT><B>Returns:</B><DD>one of BRB_CONSTANT_ASCENT, BRB_CONSTANT_DESCENT,         BRB_CENTER_OFFSET or BRB_OTHER</DL>
</DD>
</DL>
<HR>

<A NAME="setPreferredSize(com.sun.lwuit.geom.Dimension)"><!-- --></A><H3>
setPreferredSize</H3>
<PRE>
public void <B>setPreferredSize</B>(<A HREF="../../../com/sun/lwuit/geom/Dimension.html" title="class in com.sun.lwuit.geom">Dimension</A>&nbsp;d)</PRE>
<DL>
<DD>Sets the Component Preferred Size, there is no garuntee the Component will  be sized at its Preferred Size. The final size of the component may be smaller than its preferred size or even larger than the size.<br> The Layout manager can take this value into consideration, but there is no guarantee or requirement.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>d</CODE> - the component dimension</DL>
</DD>
</DL>
<HR>

<A NAME="getPreferredSize()"><!-- --></A><H3>
getPreferredSize</H3>
<PRE>
public <A HREF="../../../com/sun/lwuit/geom/Dimension.html" title="class in com.sun.lwuit.geom">Dimension</A> <B>getPreferredSize</B>()</PRE>
<DL>
<DD>Returns the Component Preferred Size, there is no garuntee the Component will  be sized at its Preferred Size. The final size of the component may be smaller than its preferred size or even larger than the size.<br> The Layout manager can take this value into consideration, but there is no guarantee or requirement.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>

<DT><B>Returns:</B><DD>the component preferred size</DL>
</DD>
</DL>
<HR>

<A NAME="setPreferredW(int)"><!-- --></A><H3>
setPreferredW</H3>
<PRE>
public void <B>setPreferredW</B>(int&nbsp;preferredW)</PRE>
<DL>
<DD>Helper method to set the preferred width of the component.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>preferredW</CODE> - the preferred width of the component<DT><B>See Also:</B><DD><A HREF="../../../com/sun/lwuit/Component.html#setPreferredSize(com.sun.lwuit.geom.Dimension)"><CODE>setPreferredSize(com.sun.lwuit.geom.Dimension)</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="setPreferredH(int)"><!-- --></A><H3>
setPreferredH</H3>
<PRE>
public void <B>setPreferredH</B>(int&nbsp;preferredH)</PRE>
<DL>
<DD>Helper method to set the preferred height of the component.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>preferredH</CODE> - the preferred height of the component<DT><B>See Also:</B><DD><A HREF="../../../com/sun/lwuit/Component.html#setPreferredSize(com.sun.lwuit.geom.Dimension)"><CODE>setPreferredSize(com.sun.lwuit.geom.Dimension)</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="getPreferredW()"><!-- --></A><H3>
getPreferredW</H3>
<PRE>
public int <B>getPreferredW</B>()</PRE>
<DL>
<DD>Helper method to retrieve the preferred width of the component.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>

<DT><B>Returns:</B><DD>preferred width of the component<DT><B>See Also:</B><DD><A HREF="../../../com/sun/lwuit/Component.html#getPreferredSize()"><CODE>getPreferredSize()</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="getPreferredH()"><!-- --></A><H3>
getPreferredH</H3>
<PRE>
public int <B>getPreferredH</B>()</PRE>
<DL>
<DD>Helper method to retrieve the preferred height of the compo

⌨️ 快捷键说明

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