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