Package ptolemy.kernel.undo

Examples of ptolemy.kernel.undo.UndoStackAttribute


        List attrList = _model.attributeList(UndoStackAttribute.class);

        if (attrList.size() == 0) {
            // Create and attach a new instance
            try {
                new UndoStackAttribute(_model, "_undoInfo");
            } catch (KernelException e) {
                throw new InternalErrorException(e);
            }
        }
    }
View Full Code Here


                // the change request, there is a race condition
                // on the undo, and a deadlock could result if
                // the model is running.
                MoMLUndoEntry newEntry = new MoMLUndoEntry(toplevel,
                        finalUndoMoML);
                UndoStackAttribute undoInfo = UndoStackAttribute
                        .getUndoInfo(toplevel);
                undoInfo.push(newEntry);
            }
        };

        toplevel.requestChange(request);
View Full Code Here

            }
        }

        // Merge the undo entry created if needed
        if (_undoable && _mergeWithPreviousUndo) {
            UndoStackAttribute undoInfo = UndoStackAttribute
                    .getUndoInfo(_context);
            undoInfo.mergeTopTwo();
        }
        _postParse(_parser);
    }
View Full Code Here

            if (context == null) {
                context = _toplevel;
            }

            MoMLUndoEntry newEntry = new MoMLUndoEntry(context, undoMoML);
            UndoStackAttribute undoInfo = UndoStackAttribute
                    .getUndoInfo(context);

            // If we are in the middle of processing an undo, then this will
            // go onto the redo stack.
            undoInfo.push(newEntry);

            // Clear up the various MoML variables.
            _resetUndo();
        }
View Full Code Here

            moml.append("</group>\n");

            // Push the undo entry onto the stack
            MoMLUndoEntry undoEntry = new MoMLUndoEntry(composite, moml
                    .toString());
            UndoStackAttribute undoInfo = UndoStackAttribute
                    .getUndoInfo(composite);
            undoInfo.push(undoEntry);
        } catch (Throwable throwable) {
            // operation not undoable
        }

        // Perform the layout and repaint
View Full Code Here

                    public void execute() {
                        move(targets, type, context);
                    }
                };

                UndoStackAttribute undoInfo = UndoStackAttribute
                        .getUndoInfo(context);
                undoInfo.push(redoAction);
            }
        };

        UndoStackAttribute undoInfo = UndoStackAttribute.getUndoInfo(context);
        undoInfo.push(undoAction);
    }
View Full Code Here

TOP

Related Classes of ptolemy.kernel.undo.UndoStackAttribute

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.