Search in sources :

Example 31 with GridTab

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();
}
Also used : GridTab(org.compiere.model.GridTab)

Example 32 with GridTab

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();
}
Also used : GridTab(org.compiere.model.GridTab)

Example 33 with GridTab

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());
    }
}
Also used : GridTab(org.compiere.model.GridTab) WArchive(org.adempiere.webui.WArchive)

Example 34 with GridTab

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();
}
Also used : GridTab(org.compiere.model.GridTab) WDeleteSelection(org.adempiere.webui.window.WDeleteSelection)

Example 35 with GridTab

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();
}
Also used : GridTab(org.compiere.model.GridTab)

Aggregations

GridTab (org.compiere.model.GridTab)38 GridField (org.compiere.model.GridField)10 MQuery (org.compiere.model.MQuery)8 AdempiereException (org.adempiere.exceptions.AdempiereException)4 Point (java.awt.Point)3 MRole (org.compiere.model.MRole)3 PO (org.compiere.model.PO)3 Dimension (java.awt.Dimension)2 HashMap (java.util.HashMap)2 Map (java.util.Map)2 TreeMap (java.util.TreeMap)2 MBrowse (org.adempiere.model.MBrowse)2 ProcessModalDialog (org.adempiere.webui.apps.ProcessModalDialog)2 org.apache.ecs.xhtml.a (org.apache.ecs.xhtml.a)2 org.apache.ecs.xhtml.div (org.apache.ecs.xhtml.div)2 org.apache.ecs.xhtml.form (org.apache.ecs.xhtml.form)2 GridController (org.compiere.grid.GridController)2 ICreateFrom (org.compiere.grid.ICreateFrom)2 GridTable (org.compiere.model.GridTable)2 MOrderLine (org.compiere.model.MOrderLine)2