|
Oracle Data-aware Controls Reference | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectoracle.dacf.util.MultiSelectDelete
An utility class which can be used to implement multi-select delete
in a GridControl.
By default, the NavigationBar delete button delete's the current
row of the rowset to which it is bound to. When a GridControl configured
to work in MultiSelection mode is used in association with a NavigationBar,
this behaviour may not be desirable. The end user would expect all selected
rows to be deleted. The default behaviour of the NavigationBar delete button
can be overridden by using this class.
When an instance of this class is registered as a NavigationBarButtonClick
Listener it responds to the 'delete' button click by deleting all rows that
are selected in the GridControl. After the delete operation the first
row prior to deletion will be the selected row. This behaviour can be
changed by overriding this class and implementing the
getNewCurrencyAfterDelete() method.
Usage :
// support for deleting all selected rows in grid MultiSelectDelete msd = new MultiSelectDelete(); NavigationBar n = new NavigationBar(); GridControl g = new GridControl(); // put grid in multiselect mode g.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION); // add the grid to the MultiSelectDelete msd.addGridControl(g); // hook the MultiSelectDelete into the NavBar n.addVetoableNavigationBarButtonClickListener(msd);
Constructor Summary | |
MultiSelectDelete()
|
|
MultiSelectDelete(GridControl g)
|
Method Summary | |
void |
addGridControl(GridControl g)
|
protected void |
deleteSelectedRows(javax.infobus.ScrollableRowsetAccess s,
int[] rows)
|
protected int |
getNewCurrencyAfterDelete(int[] rows)
An arbitary selection algo which assumes that the first row before selection will be the new current row. |
protected javax.infobus.ScrollableRowsetAccess |
getRowset(GridControl g)
get rowset which we can use to delete things |
void |
navigationBarButtonClicked(NavigationBarButtonClickEvent event)
|
void |
removeGridControl(GridControl g)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public MultiSelectDelete()
public MultiSelectDelete(GridControl g)
Method Detail |
public void addGridControl(GridControl g)
public void removeGridControl(GridControl g)
public void navigationBarButtonClicked(NavigationBarButtonClickEvent event) throws NavigationBarButtonClickVetoException
navigationBarButtonClicked
in interface NavigationBarButtonClickListener
NavigationBarButtonClickVetoException
protected void deleteSelectedRows(javax.infobus.ScrollableRowsetAccess s, int[] rows)
protected javax.infobus.ScrollableRowsetAccess getRowset(GridControl g)
protected int getNewCurrencyAfterDelete(int[] rows)
|
Oracle Data-aware Controls Reference | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 1997, 2003, Oracle. All rights reserved.