Methods Summary |
---|
public void | addCountChangeListener(TableCountChangeListener listener)
listenersCountChange.add(listener);
|
public void | addLifeCycleListener(TableLifeCycleListener l)
listenersLifeCycle.add(l);
if (!isDisposed()) {
l.tableViewInitialized();
}
|
public void | addRefreshListener(TableRefreshListener l, boolean trigger)
listenersRefresh.add(l);
if (trigger) {
l.tableRefresh();
}
|
public void | addSelectionListener(TableSelectionListener listener, boolean bFireSelection)
listenersSelection.add(listener);
if (bFireSelection) {
TableRowCore[] rows = getSelectedRows();
listener.selected(rows);
listener.focusChanged(getFocusedRow());
}
|
public void | addTableDataSourceChangedListener(TableDataSourceChangedListener l, boolean trigger)
listenersDataSourceChanged.add(l);
if (trigger) {
l.tableDataSourceChanged(parentDataSource);
}
|
public void | removeTableDataSourceChangedListener(TableDataSourceChangedListener l)
listenersDataSourceChanged.remove(l);
|
public void | runForAllRows(TableGroupRowRunner runner)
// put to array instead of synchronised iterator, so that runner can remove
TableRowCore[] rows = getRows();
if (runner.run(rows)) {
return;
}
for (int i = 0; i < rows.length; i++) {
runner.run(rows[i]);
}
|
public void | setParentDataSource(java.lang.Object newDataSource)
parentDataSource = newDataSource;
Object[] listeners = listenersDataSourceChanged.toArray();
for (int i = 0; i < listeners.length; i++) {
TableDataSourceChangedListener l = (TableDataSourceChangedListener) listeners[i];
l.tableDataSourceChanged(newDataSource);
}
|
protected void | triggerDefaultSelectedListeners(TableRowCore[] selectedRows)
for (Iterator iter = listenersSelection.iterator(); iter.hasNext();) {
TableSelectionListener l = (TableSelectionListener) iter.next();
l.defaultSelected(selectedRows);
}
|
protected void | triggerDeselectionListeners(TableRowCore[] rows)
if (rows == null || rows.length == 0) {
return;
}
Object[] listeners = listenersSelection.toArray();
for (int i = 0; i < listeners.length; i++) {
TableSelectionListener l = (TableSelectionListener) listeners[i];
l.deselected(rows);
}
|
protected void | triggerFocusChangedListeners(TableRowCore row)
Object[] listeners = listenersSelection.toArray();
for (int i = 0; i < listeners.length; i++) {
TableSelectionListener l = (TableSelectionListener) listeners[i];
l.focusChanged(row);
}
|
protected void | triggerLifeCycleListener(int eventType)
Object[] listeners = listenersLifeCycle.toArray();
if (eventType == TableLifeCycleListener.EVENT_INITIALIZED) {
for (int i = 0; i < listeners.length; i++) {
TableLifeCycleListener l = (TableLifeCycleListener) listeners[i];
try {
l.tableViewInitialized();
} catch (Exception e) {
Debug.out(e);
}
}
} else {
for (int i = 0; i < listeners.length; i++) {
TableLifeCycleListener l = (TableLifeCycleListener) listeners[i];
try {
l.tableViewDestroyed();
} catch (Exception e) {
Debug.out(e);
}
}
}
|
protected void | triggerListenerRowAdded(TableRowCore row)
for (Iterator iter = listenersCountChange.iterator(); iter.hasNext();) {
TableCountChangeListener l = (TableCountChangeListener) iter.next();
l.rowAdded(row);
}
|
protected void | triggerListenerRowRemoved(TableRowCore row)
for (Iterator iter = listenersCountChange.iterator(); iter.hasNext();) {
TableCountChangeListener l = (TableCountChangeListener) iter.next();
l.rowRemoved(row);
}
|
protected void | triggerSelectionListeners(TableRowCore[] rows)
if (rows == null || rows.length == 0) {
return;
}
Object[] listeners = listenersSelection.toArray();
for (int i = 0; i < listeners.length; i++) {
TableSelectionListener l = (TableSelectionListener) listeners[i];
l.selected(rows);
}
|
protected void | triggerTableRefreshListeners()
Object[] listeners = listenersRefresh.toArray();
for (int i = 0; i < listeners.length; i++) {
TableRefreshListener l = (TableRefreshListener) listeners[i];
l.tableRefresh();
}
|