IDEMPIERE-85 : Add confirmation on TreeMaintenance when moving all nodes
This commit is contained in:
parent
28ac2b4f83
commit
0aae5a3997
|
@ -34,6 +34,7 @@ import javax.swing.ListSelectionModel;
|
|||
import javax.swing.event.ListSelectionEvent;
|
||||
import javax.swing.event.ListSelectionListener;
|
||||
|
||||
import org.compiere.apps.ADialog;
|
||||
import org.compiere.grid.tree.VTreePanel;
|
||||
import org.compiere.model.MTree;
|
||||
import org.compiere.model.MTreeNode;
|
||||
|
@ -297,14 +298,16 @@ public class VTreeMaintenance extends TreeMaintenance
|
|||
*/
|
||||
private void action_treeAddAll()
|
||||
{
|
||||
log.info("");
|
||||
ListModel model = centerList.getModel();
|
||||
int size = model.getSize();
|
||||
int index = -1;
|
||||
for (index = 0; index < size; index++)
|
||||
{
|
||||
ListItem item = (ListItem)model.getElementAt(index);
|
||||
action_treeAdd(item);
|
||||
if (ADialog.ask(m_WindowNo, null, "Add all item(s) on tree?")) { // idempiere-85
|
||||
log.info("");
|
||||
ListModel model = centerList.getModel();
|
||||
int size = model.getSize();
|
||||
int index = -1;
|
||||
for (index = 0; index < size; index++)
|
||||
{
|
||||
ListItem item = (ListItem)model.getElementAt(index);
|
||||
action_treeAdd(item);
|
||||
}
|
||||
}
|
||||
} // action_treeAddAll
|
||||
|
||||
|
@ -313,14 +316,16 @@ public class VTreeMaintenance extends TreeMaintenance
|
|||
*/
|
||||
private void action_treeDeleteAll()
|
||||
{
|
||||
log.info("");
|
||||
ListModel model = centerList.getModel();
|
||||
int size = model.getSize();
|
||||
int index = -1;
|
||||
for (index = 0; index < size; index++)
|
||||
{
|
||||
ListItem item = (ListItem)model.getElementAt(index);
|
||||
action_treeDelete(item);
|
||||
if (ADialog.ask(m_WindowNo, null, "Remove all item(s) from tree?")) { // idempiere-85
|
||||
log.info("");
|
||||
ListModel model = centerList.getModel();
|
||||
int size = model.getSize();
|
||||
int index = -1;
|
||||
for (index = 0; index < size; index++)
|
||||
{
|
||||
ListItem item = (ListItem)model.getElementAt(index);
|
||||
action_treeDelete(item);
|
||||
}
|
||||
}
|
||||
} // action_treeDeleteAll
|
||||
|
||||
|
|
|
@ -388,14 +388,16 @@ public class WTreeMaintenance extends TreeMaintenance implements IFormController
|
|||
*/
|
||||
private void action_treeAddAll()
|
||||
{
|
||||
log.info("");
|
||||
ListModel model = centerList.getModel();
|
||||
int size = model.getSize();
|
||||
int index = -1;
|
||||
for (index = 0; index < size; index++)
|
||||
{
|
||||
ListItem item = (ListItem)model.getElementAt(index);
|
||||
action_treeAdd(item);
|
||||
if (FDialog.ask(m_WindowNo, null, "Add all item(s) on tree?")) {
|
||||
log.info("");
|
||||
ListModel model = centerList.getModel();
|
||||
int size = model.getSize();
|
||||
int index = -1;
|
||||
for (index = 0; index < size; index++)
|
||||
{
|
||||
ListItem item = (ListItem)model.getElementAt(index);
|
||||
action_treeAdd(item);
|
||||
}
|
||||
}
|
||||
} // action_treeAddAll
|
||||
|
||||
|
|
Loading…
Reference in New Issue