
org.gwt.advanced.client.datamodel.Editable Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of advanced-gwt Show documentation
Show all versions of advanced-gwt Show documentation
The set of useful GWT components
/*
* Copyright 2008-2012 Sergey Skladchikov
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.gwt.advanced.client.datamodel;
import java.util.Comparator;
/**
* This is interface describing an editable table.
*
* @author Sergey Skladchikov
* @since 1.0.0
*/
public interface Editable extends GridDataModel {
/**
* This method adds a row into the model.
*
* @param beforeRow is a row number.
* @param row is row data.
* @throws IllegalArgumentException if the row number is invalid.
*/
void addRow(int beforeRow, Object[] row) throws IllegalArgumentException;
/**
* This method updates a row with the specified data set.
*
* @param rowNumber is a row number.
* @param row is row data.
* @throws IllegalArgumentException if the row number is invalid.
*/
void updateRow(int rowNumber, Object[] row) throws IllegalArgumentException;
/**
* This method removes a row from the model.
*
* @param rowNumber is a row number.
* @throws IllegalArgumentException if the row number is invalid.
*/
void removeRow(int rowNumber) throws IllegalArgumentException;
/**
* This method adds a column into the model.
*
* @param beforeColumn a column number.
* @param column a column data set.
*
* @throws IllegalArgumentException if the column number is invalid.
*/
void addColumn(int beforeColumn, Object[] column) throws IllegalArgumentException;
/**
* This method adds a column into the model.
*
* @param beforeColumn a column number.
* @param name a column name.
* @param column a column data set.
*
* @throws IllegalArgumentException if the column number is invalid.
*/
void addColumn(int beforeColumn, String name, Object[] column) throws IllegalArgumentException;
/**
* This method updates a column with the specified data set.
*
* @param columnNumber a column number.
* @param column a column data set.
*
* @throws IllegalArgumentException if the column number is invalid.
*/
void updateColumn(int columnNumber, Object[] column) throws IllegalArgumentException;
/**
* This method updates a column with the specified data set.
*
* @param name a column name.
* @param column a column data set.
*/
void updateColumn(String name, Object[] column);
/**
* This method removes a column from the model.
*
* @param columnNumber a column number.
*
* @throws IllegalArgumentException if the column number is invalid.
*/
void removeColumn(int columnNumber) throws IllegalArgumentException;
/**
* This method removes a column from the model.
*
* @param name a column name.
*/
void removeColumn(String name);
/**
* This method removes all rows from the model.
*/
void removeAll();
/**
* This method updates the specified cell with the value.
*
* @param row is a row number.
* @param column is a column number.
* @param data is a data to be applied.
*
* @throws IllegalArgumentException if row and / or column number is invalid.
*/
void update(int row, int column, Object data) throws IllegalArgumentException;
/**
* This method sets a sort column and uses the specified comparator.
*
* @param sortColumn is a sort column.
* @param comparator is a column comparator.
*/
void setSortColumn (int sortColumn, Comparator
© 2015 - 2025 Weber Informatics LLC | Privacy Policy