Hi,
I have the following question about the code. T^T
private void onEditUndo(ActionEvent e)
{
_flowChart.getUndoManager().undo();
}
private void onEditRedo(ActionEvent e)
{
_flowChart.getUndoManager().redo();
}
I have the above coding for undo and redo functions, but they don't work, how can I solve this problem?
Besides, I have written some code for Cut, Copy, and Paste function, but I am not sure whether they are correct and cannot paste the object I copied for more than one time by using the paste function.
Here is the code:
private void onEditCut(ActionEvent e)
{
sel = _flowChart.copySelection(_flowChart, false, true);
_flowChart.getActiveItem().setVisible(false);
}
private void onEditCopy(ActionEvent e)
{
sel = _flowChart.copySelection(_flowChart, false, true);
}
private void onEditPaste(ActionEvent e)
{
CompositeCmd cmd = new CompositeCmd(_flowChart, "copied");
_flowChart.pasteSelection(_flowChart, sel, cmd, 10, 10);
}
Thanks. ^^