📄 list.html.svn-base
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_01) on Thu Jun 05 13:35:02 IDT 2008 -->
<TITLE>
List
</TITLE>
<META NAME="date" CONTENT="2008-06-05">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">
<SCRIPT type="text/javascript">
function windowTitle()
{
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="List";
}
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>
</HEAD>
<BODY BGCOLOR="white" onload="windowTitle();">
<HR>
<!-- ========= START OF TOP NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A>
<A HREF="#skip-navbar_top" 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_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
<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="class-use/List.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </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-files/index-1.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="../../../com/sun/lwuit/Label.html" title="class in com.sun.lwuit"><B>PREV CLASS</B></A>
<A HREF="../../../com/sun/lwuit/M3G.html" title="class in com.sun.lwuit"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../index.html?com/sun/lwuit/List.html" target="_top"><B>FRAMES</B></A>
<A HREF="List.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: NESTED | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->
<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
com.sun.lwuit</FONT>
<BR>
Class List</H2>
<PRE>
java.lang.Object
<IMG SRC="../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../com/sun/lwuit/Component.html" title="class in com.sun.lwuit">com.sun.lwuit.Component</A>
<IMG SRC="../../../resources/inherit.gif" ALT="extended by "><B>com.sun.lwuit.List</B>
</PRE>
<DL>
<DT><B>All Implemented Interfaces:</B> <DD><A HREF="../../../com/sun/lwuit/animations/Animation.html" title="interface in com.sun.lwuit.animations">Animation</A>, <A HREF="../../../com/sun/lwuit/events/StyleListener.html" title="interface in com.sun.lwuit.events">StyleListener</A></DD>
</DL>
<DL>
<DT><B>Direct Known Subclasses:</B> <DD><A HREF="../../../com/sun/lwuit/ComboBox.html" title="class in com.sun.lwuit">ComboBox</A></DD>
</DL>
<HR>
<DL>
<DT><PRE>public class <B>List</B><DT>extends <A HREF="../../../com/sun/lwuit/Component.html" title="class in com.sun.lwuit">Component</A></DL>
</PRE>
<P>
A set of elements that is rendered using a <A HREF="../../../com/sun/lwuit/list/ListCellRenderer.html" title="interface in com.sun.lwuit.list"><CODE>ListCellRenderer</CODE></A> and are extracted via the <A HREF="../../../com/sun/lwuit/list/ListModel.html" title="interface in com.sun.lwuit.list"><CODE>ListModel</CODE></A>. <p>A list can represent many UI concepts ranging from a carousel to a "todo" checklist, this is made possible thanks to extensive use of Swing's style of MVC. Specifically a list component is relatively simple, it invokes the model in order to extract the displayed/selected information and shows it to the user by invoking the cell renderer. <p>The list class itself is completely decoupled from everything, thus it allows us to extract its content from any source (e.g. network, storage etc.) and display the information in any form (e.g. checkboxed elemenents, icons etc.).
<P>
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../com/sun/lwuit/list/package-summary.html"><CODE>com.sun.lwuit.list</CODE></A></DL>
<HR>
<P>
<!-- =========== FIELD SUMMARY =========== -->
<A NAME="field_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Field Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/sun/lwuit/List.html#FIXED_CENTER">FIXED_CENTER</A></B></CODE>
<BR>
Indicates the list selection is fixed into place at the center of the list</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/sun/lwuit/List.html#FIXED_LEAD">FIXED_LEAD</A></B></CODE>
<BR>
Indicates the list selection is fixed into place at the top of the list or at the left of the list</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/sun/lwuit/List.html#FIXED_NONE">FIXED_NONE</A></B></CODE>
<BR>
Indicates the list isn't fixed and that selection is movable</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/sun/lwuit/List.html#FIXED_NONE_CYCLIC">FIXED_NONE_CYCLIC</A></B></CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/sun/lwuit/List.html#FIXED_TRAIL">FIXED_TRAIL</A></B></CODE>
<BR>
Indicates the list selection is fixed into place at the bottom of the list or at the right of the list</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/sun/lwuit/List.html#HORIZONTAL">HORIZONTAL</A></B></CODE>
<BR>
Indicates the list orientation is HORIZONTAL</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/sun/lwuit/List.html#VERTICAL">VERTICAL</A></B></CODE>
<BR>
Indicates the list orientation is VERTICAL</TD>
</TR>
</TABLE>
<A NAME="fields_inherited_from_class_com.sun.lwuit.Component"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Fields inherited from class com.sun.lwuit.<A HREF="../../../com/sun/lwuit/Component.html" title="class in com.sun.lwuit">Component</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../com/sun/lwuit/Component.html#BOTTOM">BOTTOM</A>, <A HREF="../../../com/sun/lwuit/Component.html#BRB_CENTER_OFFSET">BRB_CENTER_OFFSET</A>, <A HREF="../../../com/sun/lwuit/Component.html#BRB_CONSTANT_ASCENT">BRB_CONSTANT_ASCENT</A>, <A HREF="../../../com/sun/lwuit/Component.html#BRB_CONSTANT_DESCENT">BRB_CONSTANT_DESCENT</A>, <A HREF="../../../com/sun/lwuit/Component.html#BRB_OTHER">BRB_OTHER</A>, <A HREF="../../../com/sun/lwuit/Component.html#CENTER">CENTER</A>, <A HREF="../../../com/sun/lwuit/Component.html#LEFT">LEFT</A>, <A HREF="../../../com/sun/lwuit/Component.html#RIGHT">RIGHT</A>, <A HREF="../../../com/sun/lwuit/Component.html#TOP">TOP</A></CODE></TD>
</TR>
</TABLE>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<A NAME="constructor_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Constructor Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../com/sun/lwuit/List.html#List()">List</A></B>()</CODE>
<BR>
Creates a new instance of List with an empty default model</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../com/sun/lwuit/List.html#List(com.sun.lwuit.list.ListModel)">List</A></B>(<A HREF="../../../com/sun/lwuit/list/ListModel.html" title="interface in com.sun.lwuit.list">ListModel</A> model)</CODE>
<BR>
Creates a new instance of List with the given model</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../com/sun/lwuit/List.html#List(java.lang.Object[])">List</A></B>(java.lang.Object[] items)</CODE>
<BR>
Creates a new instance of List</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../com/sun/lwuit/List.html#List(java.util.Vector)">List</A></B>(java.util.Vector items)</CODE>
<BR>
Creates a new instance of List</TD>
</TR>
</TABLE>
<!-- ========== METHOD SUMMARY =========== -->
<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Method Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/sun/lwuit/List.html#addActionListener(com.sun.lwuit.events.ActionListener)">addActionListener</A></B>(<A HREF="../../../com/sun/lwuit/events/ActionListener.html" title="interface in com.sun.lwuit.events">ActionListener</A> l)</CODE>
<BR>
Allows binding a listener to user selection actions</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/sun/lwuit/List.html#addItem(java.lang.Object)">addItem</A></B>(java.lang.Object item)</CODE>
<BR>
Allows adding an element to a list if the underlying model supports this, notice that it is an optional operation and if the model does not support it (default list model does) then this operation may failed.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/sun/lwuit/List.html#addSelectionListener(com.sun.lwuit.events.SelectionListener)">addSelectionListener</A></B>(<A HREF="../../../com/sun/lwuit/events/SelectionListener.html" title="interface in com.sun.lwuit.events">SelectionListener</A> l)</CODE>
<BR>
Invoked to indicate interest in future selection events</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/sun/lwuit/List.html#animate()">animate</A></B>()</CODE>
<BR>
Allows the animation to reduce "repaint" calls when it returns false.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -