listmodelext.java
来自「ZK 基础介绍 功能操作 模块 结合数据库操作」· Java 代码 · 共 53 行
JAVA
53 行
/* ListModelExt.java{{IS_NOTE Purpose: Description: History: Fri Mar 30 16:40:50 2007, Created by tomyeh}}IS_NOTECopyright (C) 2007 Potix Corporation. All Rights Reserved.{{IS_RIGHT This program is distributed under GPL Version 2.0 in the hope that it will be useful, but WITHOUT ANY WARRANTY.}}IS_RIGHT*/package org.zkoss.zul;import java.util.Comparator;/** * An extra interface that can be implemented with {@link ListModel} * to control the sorting of the listbox. * * @author tomyeh */public interface ListModelExt { /** It called when {@link Listbox} or {@link Grid} has to sort * the content. * * <p>After sorting, this model shall notify the instances of * {@link org.zkoss.zul.event.ListDataListener} (registered thru {@link ListModel#addListDataListener}) * to update the content. * Typically you have to notify with * <pre><code>new ListDataEvent(this, ListDataEvent.CONTENTS_CHANGED, -1, -1)</code></pre> * to denote all data are changed (and reloading is required). * * <p>The comparator assigned to, say, {@link Listheader#setSortAscending} * is passed to method as the cmpr argument. * Thus, developers could use it as a tag to know which column * or what kind of order to sort. * * @param cmpr the comparator assigned to {@link Listheader#setSortAscending} * and other relative methods. If developers didn't assign any one, * the default comparator is used. * @param ascending whether to sort in the ascending order (or in * the descending order) */ public void sort(Comparator cmpr, boolean ascending);}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?