org.apache.pivot.wtk.TableView Maven / Gradle / Ivy
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to you 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.apache.pivot.wtk;
import java.io.IOException;
import java.net.URL;
import java.util.Comparator;
import java.util.Iterator;
import java.util.Locale;
import org.apache.pivot.beans.DefaultProperty;
import org.apache.pivot.collections.ArrayList;
import org.apache.pivot.collections.Dictionary;
import org.apache.pivot.collections.HashMap;
import org.apache.pivot.collections.List;
import org.apache.pivot.collections.ListListener;
import org.apache.pivot.collections.Map;
import org.apache.pivot.collections.Sequence;
import org.apache.pivot.collections.immutable.ImmutableList;
import org.apache.pivot.json.JSON;
import org.apache.pivot.json.JSONSerializer;
import org.apache.pivot.serialization.SerializationException;
import org.apache.pivot.util.Filter;
import org.apache.pivot.util.ImmutableIterator;
import org.apache.pivot.util.ListenerList;
import org.apache.pivot.wtk.content.TableViewCellRenderer;
import org.apache.pivot.wtk.content.TableViewHeaderDataRenderer;
/**
* Component that displays a sequence of rows partitioned into columns,
* optionally allowing a user to select one or more rows.
*/
@DefaultProperty("tableData")
public class TableView extends Component {
/**
* Contains information about a table column.
*/
@DefaultProperty("cellRenderer")
public static class Column {
private TableView tableView = null;
private String name = null;
private Object headerData = null;
private HeaderDataRenderer headerDataRenderer = DEFAULT_HEADER_DATA_RENDERER;
private int width = 0;
private int minimumWidth = 0;
private int maximumWidth = Integer.MAX_VALUE;
private boolean relative = false;
private Object filter = null;
private CellRenderer cellRenderer = DEFAULT_CELL_RENDERER;
private static final CellRenderer DEFAULT_CELL_RENDERER = new TableViewCellRenderer();
private static final HeaderDataRenderer DEFAULT_HEADER_DATA_RENDERER = new TableViewHeaderDataRenderer();
/**
* Default column width.
*/
public static final int DEFAULT_WIDTH = 100;
/**
* Creates an empty column.
*/
public Column() {
this(null, null, DEFAULT_WIDTH, false);
}
/**
* Creates a new column with no header data and a fixed default width.
*
* @param name
* The column name.
*/
public Column(String name) {
this(name, null, DEFAULT_WIDTH, false);
}
/**
* Creates a new column with a fixed default width.
*
* @param name
* The column name.
*
* @param headerData
* The column header data.
*/
public Column(String name, Object headerData) {
this(name, headerData, DEFAULT_WIDTH, false);
}
/**
* Creates a new column with a fixed width.
*
* @param name
* The column name.
*
* @param headerData
* The column header data.
*
* @param width
* The width of the column.
*/
public Column(String name, Object headerData, int width) {
this(name, headerData, width, false);
}
/**
* Creates a new column.
*
* @param name
* The column name.
*
* @param headerData
* The column header data.
*
* @param width
* The width of the column.
*
* @param relative
* If true, specifies a relative column width; otherwise,
* specifies a fixed column width.
*/
public Column(String name, Object headerData, int width, boolean relative) {
setName(name);
setHeaderData(headerData);
setWidth(width, relative);
}
/**
* Returns the table view with which this column is associated.
*
* @return
* The column's table view, or null if the column does not
* currently belong to a table.
*/
public TableView getTableView() {
return tableView;
}
/**
* Returns the column name.
*
* @return
* The column name.
*/
public String getName() {
return name;
}
/**
* Sets the column name.
*
* @param name
* The column name.
*/
public void setName(String name) {
String previousName = this.name;
if (previousName != name) {
this.name = name;
if (tableView != null) {
tableView.tableViewColumnListeners.columnNameChanged(this,
previousName);
}
}
}
/**
* Returns the column header data.
*
* @return
* The column header data, or null if the column has no
* header data.
*/
public Object getHeaderData() {
return headerData;
}
/**
* Sets the column header data.
*
* @param headerData
* The column header data, or null for no header data.
*/
public void setHeaderData(Object headerData) {
Object previousHeaderData = this.headerData;
if (previousHeaderData != headerData) {
this.headerData = headerData;
if (tableView != null) {
tableView.tableViewColumnListeners.columnHeaderDataChanged(this,
previousHeaderData);
}
}
}
/**
* Returns the column header data renderer.
*/
public HeaderDataRenderer getHeaderDataRenderer() {
return headerDataRenderer;
}
/**
* Sets the column header data renderer.
*
* @param headerDataRenderer
*/
public void setHeaderDataRenderer(HeaderDataRenderer headerDataRenderer) {
if (headerDataRenderer == null) {
throw new IllegalArgumentException("headerDataRenderer is null.");
}
HeaderDataRenderer previousHeaderDataRenderer = this.headerDataRenderer;
if (previousHeaderDataRenderer != headerDataRenderer) {
this.headerDataRenderer = headerDataRenderer;
if (tableView != null) {
tableView.tableViewColumnListeners.columnHeaderDataRendererChanged(this,
previousHeaderDataRenderer);
}
}
}
/**
* Returns the column width.
*
* @return
* The width of the column.
*/
public int getWidth() {
return width;
}
/**
* Returns the relative flag.
*
* @return
* true if the column width is relative, false if it
* is fixed.
*/
public boolean isRelative() {
return relative;
}
/**
* Set the column width.
*
* @param width
* The absolute width of the column.
*/
public void setWidth(int width) {
setWidth(width, false);
}
/**
* Set the column width.
*
* @param width
* The encoded width of the row. If the string ends with the '*'
* character, it is treated as a relative value. Otherwise, it is
* considered an absolute value.
*/
public void setWidth(String width) {
boolean relativeLocal = false;
if (width.endsWith("*")) {
relativeLocal = true;
setWidth(Integer.parseInt(width.substring(0, width.length() - 1)), relativeLocal);
} else {
setWidth(Integer.parseInt(width), relativeLocal);
}
}
/**
* Sets the column width.
*
* @param width
* The width of the column.
*
* @param relative
* true if the column width is relative, false if it
* is fixed.
*/
public void setWidth(int width, boolean relative) {
if (width < (relative ? 0 : -1)) {
throw new IllegalArgumentException("illegal width " + width);
}
int previousWidth = this.width;
boolean previousRelative = this.relative;
if (previousWidth != width
|| previousRelative != relative) {
this.width = width;
this.relative = relative;
if (tableView != null) {
tableView.tableViewColumnListeners.columnWidthChanged(this,
previousWidth, previousRelative);
}
}
}
/**
* Gets the minimum and maximum widths to which the column can size.
*/
public Limits getWidthLimits() {
return new Limits(minimumWidth, maximumWidth);
}
/**
* Sets the minimum and maximum widths the column can size to.
*
* @param minimumWidth
* Column width cannot be smaller than this size.
*
* @param maximumWidth
* Column width cannot be greater than this size.
*/
public void setWidthLimits(int minimumWidth, int maximumWidth) {
if (minimumWidth < 0) {
throw new IllegalArgumentException("Minimum width is negative, " + minimumWidth);
}
if (maximumWidth < minimumWidth) {
throw new IllegalArgumentException("Maximum width is smaller than minimum width, "
+ maximumWidth + "<" + minimumWidth);
}
int previousMinimumWidth = this.minimumWidth;
int previousMaximumWidth = this.maximumWidth;
if (minimumWidth != previousMinimumWidth
|| maximumWidth != previousMaximumWidth) {
this.minimumWidth = minimumWidth;
this.maximumWidth = maximumWidth;
if (tableView != null) {
tableView.tableViewColumnListeners.columnWidthLimitsChanged(this,
previousMinimumWidth, previousMaximumWidth);
}
}
}
/**
* Sets the minimum and maximum widths to which the column can size.
*
* @param widthLimits
* The new width limits.
*/
public void setWidthLimits(Limits widthLimits) {
setWidthLimits(widthLimits.minimum, widthLimits.maximum);
}
/**
* Gets the minimum width the column is allowed to be.
*
* @return
* Minimum column width.
*/
public int getMinimumWidth() {
return minimumWidth;
}
/**
* Sets the minimum width the column is allowed to be.
*
* @param minimumWidth
* Minimum column width.
*/
public void setMinimumWidth(int minimumWidth) {
setWidthLimits(minimumWidth, maximumWidth);
}
/**
* Get the maximum width the column is allowed to be.
*
* @return
* Maximum column width.
*/
public int getMaximumWidth() {
return maximumWidth;
}
/**
* Set the maximum width the column is allowed to be.
*
* @param maximumWidth
* Maximum column width.
*/
public void setMaximumWidth(int maximumWidth) {
setWidthLimits(minimumWidth, maximumWidth);
}
/**
* Returns the column's filter.
*
* @return
* The column's filter, or null if the column does not have
* a filter.
*/
public Object getFilter() {
return filter;
}
/**
* Sets the column's filter.
*
* @param filter
* The column's filter, or null for no filter.
*/
public void setFilter(Object filter) {
Object previousFilter = this.filter;
if (previousFilter != filter) {
this.filter = filter;
if (tableView != null) {
tableView.tableViewColumnListeners.columnFilterChanged(this,
previousFilter);
}
}
}
/**
* Returns the column's cell renderer.
*
* @return
* The cell renderer that is used to draw the contents of this column.
*/
public CellRenderer getCellRenderer() {
return cellRenderer;
}
/**
* Sets the column's cell renderer.
*
* @param cellRenderer
* The cell renderer that is used to draw the contents of this column.
*/
public void setCellRenderer(CellRenderer cellRenderer) {
if (cellRenderer == null) {
throw new IllegalArgumentException("cellRenderer is null.");
}
CellRenderer previousCellRenderer = this.cellRenderer;
if (previousCellRenderer != cellRenderer) {
this.cellRenderer = cellRenderer;
if (tableView != null) {
tableView.tableViewColumnListeners.columnCellRendererChanged(this,
previousCellRenderer);
}
}
}
}
/**
* Enumeration defining supported selection modes.
*/
public enum SelectMode {
/**
* Selection is disabled.
*/
NONE,
/**
* A single index may be selected at a time.
*/
SINGLE,
/**
* Multiple indexes may be concurrently selected.
*/
MULTI
}
/**
* {@link Renderer} interface to customize the appearance of a cell in a TableView.
*/
public interface CellRenderer extends Renderer {
/**
* Prepares the renderer for layout or paint.
*
* @param row
* The row to render, or null if called to calculate preferred height for
* skins that assume a fixed renderer height.
*
* @param rowIndex
* The index of the row being rendered, or -1 if value
* is null.
*
* @param columnIndex
* The index of the column being rendered.
*
* @param tableView
* The host component.
*
* @param columnName
* The name of the column being rendered.
*
* @param selected
* If true, the row is selected.
*
* @param highlighted
* If true, the row is highlighted.
*
* @param disabled
* If true, the row is disabled.
*/
public void render(Object row, int rowIndex, int columnIndex, TableView tableView,
String columnName, boolean selected, boolean highlighted, boolean disabled);
/**
* Converts table view cell data to a string representation.
*
* @param row
* @param columnName
*
* @return
* The cell data's string representation, or null if the data does not
* have a string representation.
*
* Note that this method may be called often during keyboard navigation, so
* implementations should avoid unnecessary string allocations.
*/
public String toString(Object row, String columnName);
}
/**
* {@link Renderer} interface to customize the appearance of the header of a TableView
*/
public interface HeaderDataRenderer extends Renderer {
/**
* Prepares the renderer for layout or paint.
*
* @param data
* The data to render, or null if called to calculate preferred
* height for skins that assume a fixed renderer height.
*
* @param columnIndex
* The index of the column being rendered.
*
* @param tableViewHeader
* The host component.
*
* @param columnName
* The name of the column being rendered.
*
* @param highlighted
* If true, the item is highlighted.
*/
public void render(Object data, int columnIndex, TableViewHeader tableViewHeader,
String columnName, boolean highlighted);
/**
* Converts table view header data to a string representation.
*
* @param item
*
* @return
* The data's string representation, or null if the data does not
* have a string representation.
*
* Note that this method may be called often during keyboard navigation, so
* implementations should avoid unnecessary string allocations.
*/
public String toString(Object item);
}
/**
* Table view row editor interface.
*/
public interface RowEditor {
/**
* Called to begin editing a table row.
*
* @param tableView
* @param rowIndex
* @param columnIndex
*/
public void beginEdit(TableView tableView, int rowIndex, int columnIndex);
/**
* Terminates an edit operation.
*
* @param result
* true to perform the edit; false to cancel it.
*/
public void endEdit(boolean result);
/**
* Tests whether an edit is currently in progress.
*/
public boolean isEditing();
}
/**
* Table view skin interface. Table view skins must implement this.
*/
public interface Skin {
public int getRowAt(int y);
public int getColumnAt(int x);
public Bounds getRowBounds(int rowIndex);
public Bounds getColumnBounds(int columnIndex);
public Bounds getCellBounds(int rowIndex, int columnIndex);
}
/**
* Translates between table and bind context data during data binding.
*/
public interface TableDataBindMapping {
/**
* Converts a context value to table data.
*
* @param value
*/
public List> toTableData(Object value);
/**
* Converts table data to a context value.
*
* @param tableData
*/
public Object valueOf(List> tableData);
}
/**
* Translates between selection and bind context data during data binding.
*/
public interface SelectedRowBindMapping {
/**
* Returns the index of the row in the source list.
*
* @param tableData
* The source table data.
*
* @param value
* The value to locate.
*
* @return
* The index of first occurrence of the value if it exists in the list;
* -1, otherwise.
*/
public int indexOf(List> tableData, Object value);
/**
* Retrieves the value at the given index.
*
* @param tableData
* The source table data.
*
* @param index
* The index of the value to retrieve.
*/
public Object get(List> tableData, int index);
}
/**
* Column sequence implementation.
*/
public final class ColumnSequence implements Sequence, Iterable {
@Override
public int add(Column column) {
int index = getLength();
insert(column, index);
return index;
}
@Override
public void insert(Column column, int index) {
if (column == null) {
throw new IllegalArgumentException("column is null.");
}
if (column.tableView != null) {
throw new IllegalArgumentException("column is already in use by another table view.");
}
columns.insert(column, index);
column.tableView = TableView.this;
tableViewColumnListeners.columnInserted(TableView.this, index);
}
@Override
public Column update(int index, Column column) {
throw new UnsupportedOperationException();
}
@Override
public int remove(Column column) {
int index = indexOf(column);
if (index != -1) {
remove(index, 1);
}
return index;
}
@Override
public Sequence remove(int index, int count) {
Sequence removed = columns.remove(index, count);
if (count > 0) {
for (int i = 0, n = removed.getLength(); i < n; i++) {
removed.get(i).tableView = null;
}
tableViewColumnListeners.columnsRemoved(TableView.this, index, removed);
}
return removed;
}
@Override
public Column get(int index) {
return columns.get(index);
}
@Override
public int indexOf(Column column) {
return columns.indexOf(column);
}
@Override
public int getLength() {
return columns.getLength();
}
@Override
public Iterator iterator() {
return new ImmutableIterator(columns.iterator());
}
}
/**
* Sort dictionary implementation.
*/
public final class SortDictionary implements Dictionary, Iterable {
@Override
public SortDirection get(String columnName) {
return sortMap.get(columnName);
}
@Override
public SortDirection put(String columnName, SortDirection sortDirection) {
SortDirection previousSortDirection;
if (sortDirection == null) {
previousSortDirection = remove(columnName);
} else {
boolean update = containsKey(columnName);
previousSortDirection = sortMap.put(columnName, sortDirection);
if (update) {
tableViewSortListeners.sortUpdated(TableView.this, columnName, previousSortDirection);
} else {
sortList.add(columnName);
tableViewSortListeners.sortAdded(TableView.this, columnName);
}
}
return previousSortDirection;
}
@Override
public SortDirection remove(String columnName) {
SortDirection sortDirection = null;
if (containsKey(columnName)) {
sortDirection = sortMap.remove(columnName);
sortList.remove(columnName);
tableViewSortListeners.sortRemoved(TableView.this, columnName, sortDirection);
}
return sortDirection;
}
@Override
public boolean containsKey(String columnName) {
return sortMap.containsKey(columnName);
}
public boolean isEmpty() {
return sortMap.isEmpty();
}
public Dictionary.Pair get(int index) {
String columnName = sortList.get(index);
SortDirection sortDirection = sortMap.get(columnName);
return new Dictionary.Pair(columnName, sortDirection);
}
public int getLength() {
return sortList.getLength();
}
@Override
public Iterator iterator() {
return sortList.iterator();
}
}
private static class TableViewListenerList extends WTKListenerList
implements TableViewListener {
@Override
public void tableDataChanged(TableView tableView, List> previousTableData) {
for (TableViewListener listener : this) {
listener.tableDataChanged(tableView, previousTableData);
}
}
@Override
public void columnSourceChanged(TableView tableView, TableView previousColumnSource) {
for (TableViewListener listener : this) {
listener.columnSourceChanged(tableView, previousColumnSource);
}
}
@Override
public void rowEditorChanged(TableView tableView,
TableView.RowEditor previousRowEditor) {
for (TableViewListener listener : this) {
listener.rowEditorChanged(tableView, previousRowEditor);
}
}
@Override
public void selectModeChanged(TableView tableView, SelectMode previousSelectMode) {
for (TableViewListener listener : this) {
listener.selectModeChanged(tableView, previousSelectMode);
}
}
@Override
public void disabledRowFilterChanged(TableView tableView, Filter> previousDisabledRowFilter) {
for (TableViewListener listener : this) {
listener.disabledRowFilterChanged(tableView, previousDisabledRowFilter);
}
}
}
private static class TableViewColumnListenerList extends WTKListenerList
implements TableViewColumnListener {
@Override
public void columnInserted(TableView tableView, int index) {
for (TableViewColumnListener listener : this) {
listener.columnInserted(tableView, index);
}
}
@Override
public void columnsRemoved(TableView tableView, int index, Sequence columns) {
for (TableViewColumnListener listener : this) {
listener.columnsRemoved(tableView, index, columns);
}
}
@Override
public void columnNameChanged(Column column, String previousName) {
for (TableViewColumnListener listener : this) {
listener.columnNameChanged(column, previousName);
}
}
@Override
public void columnHeaderDataChanged(Column column, Object previousHeaderData) {
for (TableViewColumnListener listener : this) {
listener.columnHeaderDataChanged(column, previousHeaderData);
}
}
@Override
public void columnHeaderDataRendererChanged(TableView.Column column,
TableView.HeaderDataRenderer previousHeaderDataRenderer) {
for (TableViewColumnListener listener : this) {
listener.columnHeaderDataRendererChanged(column, previousHeaderDataRenderer);
}
}
@Override
public void columnWidthChanged(Column column, int previousWidth, boolean previousRelative) {
for (TableViewColumnListener listener : this) {
listener.columnWidthChanged(column, previousWidth, previousRelative);
}
}
@Override
public void columnWidthLimitsChanged(Column column, int previousMinimumWidth, int previousMaximumWidth) {
for (TableViewColumnListener listener : this) {
listener.columnWidthLimitsChanged(column, previousMinimumWidth, previousMaximumWidth);
}
}
@Override
public void columnFilterChanged(Column column, Object previousFilter) {
for (TableViewColumnListener listener : this) {
listener.columnFilterChanged(column, previousFilter);
}
}
@Override
public void columnCellRendererChanged(Column column, TableView.CellRenderer previousCellRenderer) {
for (TableViewColumnListener listener : this) {
listener.columnCellRendererChanged(column, previousCellRenderer);
}
}
}
private static class TableViewRowListenerList extends WTKListenerList
implements TableViewRowListener {
@Override
public void rowInserted(TableView tableView, int index) {
for (TableViewRowListener listener : this) {
listener.rowInserted(tableView, index);
}
}
@Override
public void rowsRemoved(TableView tableView, int index, int count) {
for (TableViewRowListener listener : this) {
listener.rowsRemoved(tableView, index, count);
}
}
@Override
public void rowUpdated(TableView tableView, int index) {
for (TableViewRowListener listener : this) {
listener.rowUpdated(tableView, index);
}
}
@Override
public void rowsCleared(TableView tableView) {
for (TableViewRowListener listener : this) {
listener.rowsCleared(tableView);
}
}
@Override
public void rowsSorted(TableView tableView) {
for (TableViewRowListener listener : this) {
listener.rowsSorted(tableView);
}
}
}
private static class TableViewSelectionListenerList extends WTKListenerList
implements TableViewSelectionListener {
@Override
public void selectedRangeAdded(TableView tableView, int rangeStart, int rangeEnd) {
for (TableViewSelectionListener listener : this) {
listener.selectedRangeAdded(tableView, rangeStart, rangeEnd);
}
}
@Override
public void selectedRangeRemoved(TableView tableView, int rangeStart, int rangeEnd) {
for (TableViewSelectionListener listener : this) {
listener.selectedRangeRemoved(tableView, rangeStart, rangeEnd);
}
}
@Override
public void selectedRangesChanged(TableView tableView, Sequence previousSelection) {
for (TableViewSelectionListener listener : this) {
listener.selectedRangesChanged(tableView, previousSelection);
}
}
@Override
public void selectedRowChanged(TableView tableView, Object previousSelectedRow) {
for (TableViewSelectionListener listener : this) {
listener.selectedRowChanged(tableView, previousSelectedRow);
}
}
}
private static class TableViewSortListenerList extends WTKListenerList
implements TableViewSortListener {
@Override
public void sortAdded(TableView tableView, String columnName) {
for (TableViewSortListener listener : this) {
listener.sortAdded(tableView, columnName);
}
}
@Override
public void sortUpdated(TableView tableView, String columnName,
SortDirection previousSortDirection) {
for (TableViewSortListener listener : this) {
listener.sortUpdated(tableView, columnName, previousSortDirection);
}
}
@Override
public void sortRemoved(TableView tableView, String columnName,
SortDirection sortDirection) {
for (TableViewSortListener listener : this) {
listener.sortRemoved(tableView, columnName, sortDirection);
}
}
@Override
public void sortChanged(TableView tableView) {
for (TableViewSortListener listener : this) {
listener.sortChanged(tableView);
}
}
}
private static class TableViewBindingListenerList extends WTKListenerList
implements TableViewBindingListener {
@Override
public void tableDataKeyChanged(TableView tableView, String previousTableDataKey) {
for (TableViewBindingListener listener : this) {
listener.tableDataKeyChanged(tableView, previousTableDataKey);
}
}
@Override
public void tableDataBindTypeChanged(TableView tableView, BindType previousTableDataBindType) {
for (TableViewBindingListener listener : this) {
listener.tableDataBindTypeChanged(tableView, previousTableDataBindType);
}
}
@Override
public void tableDataBindMappingChanged(TableView tableView,
TableView.TableDataBindMapping previousTableDataBindMapping) {
for (TableViewBindingListener listener : this) {
listener.tableDataBindMappingChanged(tableView, previousTableDataBindMapping);
}
}
@Override
public void selectedRowKeyChanged(TableView tableView, String previousSelectedRowKey) {
for (TableViewBindingListener listener : this) {
listener.selectedRowKeyChanged(tableView, previousSelectedRowKey);
}
}
@Override
public void selectedRowBindTypeChanged(TableView tableView, BindType previousSelectedRowBindType) {
for (TableViewBindingListener listener : this) {
listener.selectedRowBindTypeChanged(tableView, previousSelectedRowBindType);
}
}
@Override
public void selectedRowBindMappingChanged(TableView tableView,
TableView.SelectedRowBindMapping previousSelectedRowBindMapping) {
for (TableViewBindingListener listener : this) {
listener.selectedRowBindMappingChanged(tableView, previousSelectedRowBindMapping);
}
}
@Override
public void selectedRowsKeyChanged(TableView tableView, String previousSelectedRowsKey) {
for (TableViewBindingListener listener : this) {
listener.selectedRowsKeyChanged(tableView, previousSelectedRowsKey);
}
}
@Override
public void selectedRowsBindTypeChanged(TableView tableView, BindType previousSelectedRowsBindType) {
for (TableViewBindingListener listener : this) {
listener.selectedRowsBindTypeChanged(tableView, previousSelectedRowsBindType);
}
}
@Override
public void selectedRowsBindMappingChanged(TableView tableView,
TableView.SelectedRowBindMapping previousSelectedRowsBindMapping) {
for (TableViewBindingListener listener : this) {
listener.selectedRowsBindMappingChanged(tableView, previousSelectedRowsBindMapping);
}
}
}
private ArrayList columns = new ArrayList();
private ColumnSequence columnSequence = new ColumnSequence();
private List> tableData = null;
private TableView columnSource = null;
private RowEditor rowEditor = null;
private RangeSelection rangeSelection = new RangeSelection();
private SelectMode selectMode = SelectMode.SINGLE;
private HashMap sortMap = new HashMap();
private ArrayList sortList = new ArrayList();
private SortDictionary sortDictionary = new SortDictionary();
private Filter> disabledRowFilter = null;
private String tableDataKey = null;
private BindType tableDataBindType = BindType.BOTH;
private TableDataBindMapping tableDataBindMapping = null;
private String selectedRowKey = null;
private BindType selectedRowBindType = BindType.BOTH;
private SelectedRowBindMapping selectedRowBindMapping = null;
private String selectedRowsKey = null;
private BindType selectedRowsBindType = BindType.BOTH;
private SelectedRowBindMapping selectedRowsBindMapping = null;
private ListListener