use of org.compiere.model.GridTab in project adempiere by adempiere.
the class AbstractADWindowPanel method onNext.
/**
* @see ToolbarListener#onNext()
*/
public void onNext() {
GridTab currentTab = toolbar.getCurrentPanel().getGridTab();
currentTab.navigateRelative(+1);
focusToActivePanel();
}
use of org.compiere.model.GridTab in project adempiere by adempiere.
the class AbstractADWindowPanel method onFirst.
/**
* @see ToolbarListener#onFirst()
*/
public void onFirst() {
GridTab currentTab = toolbar.getCurrentPanel().getGridTab();
currentTab.navigate(0);
focusToActivePanel();
}
use of org.compiere.model.GridTab in project adempiere by adempiere.
the class AbstractADWindowPanel method onArchive.
//
// Elaine 2008/07/28
/**
* @see ToolbarListener#onArchive()
*/
public void onArchive() {
if (toolbar.getEvent() != null) {
GridTab currentTab = toolbar.getCurrentPanel().getGridTab();
if (currentTab.getRecord_ID() <= 0)
return;
new WArchive(toolbar.getEvent().getTarget(), currentTab.getAD_Table_ID(), currentTab.getRecord_ID());
}
}
use of org.compiere.model.GridTab in project adempiere by adempiere.
the class AbstractADWindowPanel method onDeleteSelection.
// Elaine 2008/12/01
/**
* @see ToolbarListener#onDelete()
*/
public void onDeleteSelection() {
GridTab currentTab = toolbar.getCurrentPanel().getGridTab();
if (currentTab.isReadOnly())
return;
//
WDeleteSelection dSelection = new WDeleteSelection(currentTab);
dSelection.showDialog();
if (dSelection.isOkPressed()) {
logger.fine("ok");
int[] indices = dSelection.getSelection();
Arrays.sort(indices);
int offset = 0;
for (int i = 0; i < indices.length; i++) {
currentTab.navigate(indices[i] - offset);
if (currentTab.dataDelete()) {
offset++;
}
}
curTabPanel.dynamicDisplay(0);
} else {
logger.fine("cancel");
}
// Set Focus
focusToActivePanel();
}
use of org.compiere.model.GridTab in project adempiere by adempiere.
the class AbstractADWindowPanel method onDelete.
/**
* @see ToolbarListener#onDelete()
*/
public void onDelete() {
GridTab currentTab = toolbar.getCurrentPanel().getGridTab();
if (currentTab.isReadOnly()) {
return;
}
if (FDialog.ask(curWindowNo, null, "DeleteRecord?")) {
//error will be catch in the dataStatusChanged event
currentTab.dataDelete();
}
curTabPanel.dynamicDisplay(0);
focusToActivePanel();
}
Aggregations