pagechangeevent.java

来自「esri的ArcGIS Server超级学习模板程序(for java)」· Java 代码 · 共 56 行

JAVA
56
字号
package com.esri.solutions.jitk.web.data.results;

import java.util.EventObject;

/**
 * This class represents an event of interest to registered listeners that 
 * occurred on the specified table model.
 * 
 * @author Carsten Piepel
 *
 * @see TableModel
 * @see PageChangeListener
 */
public class PageChangeEvent extends EventObject {

    private static final long serialVersionUID = 7666668993779766861L;
    
    private TableModel tableModel;
    private int pageIndex;
    
    /**
     * Construct an event object that is associated with the specified page.
     * 
     * @param tableModel the table model on which this event occurred
     * @param pageIndex the 0-based page index indicating the new page, 
     * or <code>-1</code> for no specific page association
     */
    public PageChangeEvent(TableModel tableModel, int pageIndex) {
        
        super(tableModel);
        
        this.tableModel = tableModel;
        this.pageIndex = pageIndex;
    }
    
    /**
     * Return the table model that fired this event.
     * 
     * @return the table mdoel that fired this event.
     */
    public TableModel getTableModel() {
        return tableModel;
    }
    
    /**
     * Return the 0-based page index indicating the new page, 
     * or <code>-1</code> for no specific page association.
     * 
     * @return the 0-based page index indicating the new page, 
     * or <code>-1</code> for no specific page association.
     */
    public int getPageIndex() {
        return pageIndex;
    }
}

⌨️ 快捷键说明

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