at.spardat.xma.mdl.paging.IPagingWMClient Maven / Gradle / Ivy
/*******************************************************************************
* Copyright (c) 2003, 2010 s IT Solutions AT Spardat GmbH .
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* s IT Solutions AT Spardat GmbH - initial API and implementation
*******************************************************************************/
// @(#) $Id: $
package at.spardat.xma.mdl.paging;
import at.spardat.xma.mdl.IWModelClient;
/**
* Interface defining the part of the paging model which is available on client side only.
*
* @author gub
* @since 2.3.0
*/
public interface IPagingWMClient extends IPagingWM, IWModelClient {
/**
* Sets the listener which will be responsible to reload the data for the table
* whenever its method {@link PagingListener#reload(int, int)} is called.
*/
public void setPagingListener(PagingListener listener);
/**
* Sets the customer which can customize the table whenever its method
* {@link Customizer#customize()} is called. The customizer will only be
* used if the flag {@link PagingControlClient#SHOW_CUSTOMIZE} is set.
*/
public void setCustomizer(Customizer customizer);
/**
* Sets the exporter which can export the table whenever its method
* {@link Customizer#export()} is called. The exporter will only be
* used if the flag {@link PagingControlClient#SHOW_EXPORT} is set.
*/
public void setExporter(Exporter exporter);
/**
* Gets the customer which can customize the table whenever its method
* {@link Customizer#customize()} is called. The customizer will only be
* used if the flag {@link PagingControlClient#SHOW_CUSTOMIZE} is set.
*/
public Customizer getCustomizer();
/**
* Reload the first page of data.
* This method will be called every time the user clicks on the start button.
*/
public void start();
/**
* Go back {@link #getJumpSize()} pages.
* This method will be called every time the user clicks on the fastBack button.
*/
public void fastBack();
/**
* Go back one page.
* This method will be called every time the user clicks on the back button.
*/
public void back();
/**
* Reloads the current page.
* This method will be called every time the user clicks on the reload button.
*/
public void reload();
/**
* Go to page jumpPage
.
* This method will be called every time the user selects an item in jump combo.
* @param jumpPage the index of the page to go to. The corresponding offset will
* be calculated automatically.
*/
public void jump(int jumpPage);
/**
* Tells if there will be more data after the current page. This method always returns
* true if {@link #getResultSize()} is unknown.
*/
public boolean hasNext();
/**
* Go to the next page.
* This method will be called every time the user clicks on the next button.
*/
public void next();
/**
* Go forward {@link #getJumpSize()} pages.
* This method will be called every time the user clicks on the fastNext button.
*/
public void fastNext();
/**
* Go to the last page.
* This method will be called every time the user clicks on the end button.
* @throws IllegalStateException if {@link #getResultSize()} is unknown.
*/
public void end();
/**
* Call the {@link Customizer}.
* This method will be called every time the user clicks on the customize button.
*/
public void customize();
/**
* Tells if neither jump nor pagesize combo has validation errors.
* @returns true if there are no validation errors
* false if any input field of this control has validation errors
*/
public boolean isValid();
}