tabbedpane.html.svn-base

来自「j2me设计的界面包」· SVN-BASE 代码 · 共 861 行 · 第 1/4 页

SVN-BASE
861
字号
</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="addTabsListener(com.sun.lwuit.events.SelectionListener)"><!-- --></A><H3>
addTabsListener</H3>
<PRE>
public void <B>addTabsListener</B>(<A HREF="../../../com/sun/lwuit/events/SelectionListener.html" title="interface in com.sun.lwuit.events">SelectionListener</A>&nbsp;listener)</PRE>
<DL>
<DD>This method adds a listener to the tabs.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>listener</CODE> - a selection listener to gets the selection events</DL>
</DD>
</DL>
<HR>

<A NAME="calcPreferredSize()"><!-- --></A><H3>
calcPreferredSize</H3>
<PRE>
protected <A HREF="../../../com/sun/lwuit/geom/Dimension.html" title="class in com.sun.lwuit.geom">Dimension</A> <B>calcPreferredSize</B>()</PRE>
<DL>
<DD><B>Description copied from class: <CODE><A HREF="../../../com/sun/lwuit/Component.html#calcPreferredSize()">Component</A></CODE></B></DD>
<DD>Calculates the preferred size based on component content. This method is invoked lazily by getPreferred size.
<P>
<DD><DL>
<DT><B>Overrides:</B><DD><CODE><A HREF="../../../com/sun/lwuit/Container.html#calcPreferredSize()">calcPreferredSize</A></CODE> in class <CODE><A HREF="../../../com/sun/lwuit/Container.html" title="class in com.sun.lwuit">Container</A></CODE></DL>
</DD>
<DD><DL>

<DT><B>Returns:</B><DD>the calculated preferred size based on component content</DL>
</DD>
</DL>
<HR>

<A NAME="setTabPlacement(int)"><!-- --></A><H3>
setTabPlacement</H3>
<PRE>
public void <B>setTabPlacement</B>(int&nbsp;tabPlacement)</PRE>
<DL>
<DD>Sets the tab placement for this tabbedpane. Possible values are:<ul> <li><code>Component.TOP</code> <li><code>Component.BOTTOM</code> <li><code>Component.LEFT</code> <li><code>Component.RIGHT</code> </ul> The default value, if not set, is <code>Component.TOP</code>.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>tabPlacement</CODE> - the placement for the tabs relative to the content</DL>
</DD>
</DL>
<HR>

<A NAME="addTab(java.lang.String, com.sun.lwuit.Image, com.sun.lwuit.Component)"><!-- --></A><H3>
addTab</H3>
<PRE>
public void <B>addTab</B>(java.lang.String&nbsp;title,
                   <A HREF="../../../com/sun/lwuit/Image.html" title="class in com.sun.lwuit">Image</A>&nbsp;icon,
                   <A HREF="../../../com/sun/lwuit/Component.html" title="class in com.sun.lwuit">Component</A>&nbsp;component)</PRE>
<DL>
<DD>Adds a <code>component</code>  represented by a <code>title</code> and/or <code>icon</code>, either of which can be <code>null</code>. Cover method for <code>insertTab</code>.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>title</CODE> - the title to be displayed in this tab<DD><CODE>icon</CODE> - the icon to be displayed in this tab<DD><CODE>component</CODE> - the component to be displayed when this tab is clicked<DT><B>See Also:</B><DD><A HREF="../../../com/sun/lwuit/TabbedPane.html#insertTab(java.lang.String, com.sun.lwuit.Image, com.sun.lwuit.Component, int)"><CODE>insertTab(java.lang.String, com.sun.lwuit.Image, com.sun.lwuit.Component, int)</CODE></A>, 
<A HREF="../../../com/sun/lwuit/TabbedPane.html#removeTabAt(int)"><CODE>removeTabAt(int)</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="addTab(java.lang.String, com.sun.lwuit.Component)"><!-- --></A><H3>
addTab</H3>
<PRE>
public void <B>addTab</B>(java.lang.String&nbsp;title,
                   <A HREF="../../../com/sun/lwuit/Component.html" title="class in com.sun.lwuit">Component</A>&nbsp;component)</PRE>
<DL>
<DD>Adds a <code>component</code>  represented by a <code>title</code> and no <code>icon</code>. Cover method for <code>insertTab</code>.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>title</CODE> - the title to be displayed in this tab<DD><CODE>component</CODE> - the component to be displayed when this tab is clicked<DT><B>See Also:</B><DD><A HREF="../../../com/sun/lwuit/TabbedPane.html#insertTab(java.lang.String, com.sun.lwuit.Image, com.sun.lwuit.Component, int)"><CODE>insertTab(java.lang.String, com.sun.lwuit.Image, com.sun.lwuit.Component, int)</CODE></A>, 
<A HREF="../../../com/sun/lwuit/TabbedPane.html#removeTabAt(int)"><CODE>removeTabAt(int)</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="insertTab(java.lang.String, com.sun.lwuit.Image, com.sun.lwuit.Component, int)"><!-- --></A><H3>
insertTab</H3>
<PRE>
public void <B>insertTab</B>(java.lang.String&nbsp;title,
                      <A HREF="../../../com/sun/lwuit/Image.html" title="class in com.sun.lwuit">Image</A>&nbsp;icon,
                      <A HREF="../../../com/sun/lwuit/Component.html" title="class in com.sun.lwuit">Component</A>&nbsp;component,
                      int&nbsp;index)</PRE>
<DL>
<DD>Inserts a <code>component</code>, at <code>index</code>, represented by a <code>title</code> and/or <code>icon</code>, either of which may be <code>null</code>. Uses java.util.Vector internally, see <code>insertElementAt</code> for details of insertion conventions.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>title</CODE> - the title to be displayed in this tab<DD><CODE>icon</CODE> - the icon to be displayed in this tab<DD><CODE>component</CODE> - The component to be displayed when this tab is clicked.<DD><CODE>index</CODE> - the position to insert this new tab<DT><B>See Also:</B><DD><A HREF="../../../com/sun/lwuit/TabbedPane.html#addTab(java.lang.String, com.sun.lwuit.Image, com.sun.lwuit.Component)"><CODE>addTab(java.lang.String, com.sun.lwuit.Image, com.sun.lwuit.Component)</CODE></A>, 
<A HREF="../../../com/sun/lwuit/TabbedPane.html#removeTabAt(int)"><CODE>removeTabAt(int)</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="removeTabAt(int)"><!-- --></A><H3>
removeTabAt</H3>
<PRE>
public void <B>removeTabAt</B>(int&nbsp;index)</PRE>
<DL>
<DD>Removes the tab at <code>index</code>. After the component associated with <code>index</code> is removed, its visibility is reset to true to ensure it will be visible if added to other containers.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>index</CODE> - the index of the tab to be removed
<DT><B>Throws:</B>
<DD><CODE>java.lang.IndexOutOfBoundsException</CODE> - if index is out of range             (index < 0 || index >= tab count)<DT><B>See Also:</B><DD><A HREF="../../../com/sun/lwuit/TabbedPane.html#addTab(java.lang.String, com.sun.lwuit.Image, com.sun.lwuit.Component)"><CODE>addTab(java.lang.String, com.sun.lwuit.Image, com.sun.lwuit.Component)</CODE></A>, 
<A HREF="../../../com/sun/lwuit/TabbedPane.html#insertTab(java.lang.String, com.sun.lwuit.Image, com.sun.lwuit.Component, int)"><CODE>insertTab(java.lang.String, com.sun.lwuit.Image, com.sun.lwuit.Component, int)</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="indexOfComponent(com.sun.lwuit.Component)"><!-- --></A><H3>
indexOfComponent</H3>
<PRE>
public int <B>indexOfComponent</B>(<A HREF="../../../com/sun/lwuit/Component.html" title="class in com.sun.lwuit">Component</A>&nbsp;component)</PRE>
<DL>
<DD>Returns the index of the tab for the specified component. Returns -1 if there is no tab for this component.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>component</CODE> - the component for the tab
<DT><B>Returns:</B><DD>the first tab which matches this component, or -1                if there is no tab for this component</DL>
</DD>
</DL>
<HR>

<A NAME="getTabCount()"><!-- --></A><H3>
getTabCount</H3>
<PRE>
public int <B>getTabCount</B>()</PRE>
<DL>
<DD>Returns the number of tabs in this <code>tabbedpane</code>.
<P>
<DD><DL>

<DT><B>Returns:</B><DD>an integer specifying the number of tabbed pages</DL>
</DD>
</DL>
<HR>

<A NAME="getSelectedIndex()"><!-- --></A><H3>
getSelectedIndex</H3>
<PRE>
public int <B>getSelectedIndex</B>()</PRE>
<DL>
<DD>Returns the currently selected index for this tabbedpane. Returns -1 if there is no currently selected tab.
<P>
<DD><DL>

<DT><B>Returns:</B><DD>the index of the selected tab</DL>
</DD>
</DL>
<HR>

<A NAME="getUIID()"><!-- --></A><H3>
getUIID</H3>
<PRE>
protected java.lang.String <B>getUIID</B>()</PRE>
<DL>
<DD><B>Description copied from class: <CODE><A HREF="../../../com/sun/lwuit/Component.html#getUIID()">Component</A></CODE></B></DD>
<DD>Unique identifier for a component, must be overriden for a component so a style can be applied to the component
<P>
<DD><DL>
<DT><B>Overrides:</B><DD><CODE><A HREF="../../../com/sun/lwuit/Component.html#getUIID()">getUIID</A></CODE> in class <CODE><A HREF="../../../com/sun/lwuit/Component.html" title="class in com.sun.lwuit">Component</A></CODE></DL>
</DD>
<DD><DL>

<DT><B>Returns:</B><DD>unique string identifying this component for the style sheet</DL>
</DD>
</DL>
<HR>

<A NAME="setTabTitlePrototype(java.lang.String)"><!-- --></A><H3>
setTabTitlePrototype</H3>
<PRE>
public void <B>setTabTitlePrototype</B>(java.lang.String&nbsp;title)</PRE>
<DL>
<DD>The prototype is optionally used in calculating the size of an individual tab and is recommended for performance reasons. You should invoke it with a String representing the width/height which will be used to calculate the size required for each element in the list.\ <p>This operation is not essential and if it isn't invoked the size of the first

⌨️ 快捷键说明

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