Package ptolemy.kernel.util

Examples of ptolemy.kernel.util.NamedObj.requestChange()


                            attribute.refreshParametersAndPorts();
                            _editDocAttribute(getFrame(), attribute, target);
                        }
                    };
                    target.requestChange(request);
                }
            }
        }
    }
View Full Code Here


            // Finally create and request the change
            NamedObj container = graphModel.getPtolemyModel();
            MoMLChangeRequest change = new MoMLChangeRequest(this, container,
                    moml.toString());
            change.setUndoable(true);
            container.requestChange(change);
        } catch (Exception ex) {
            MessageHandler
                    .error("Delete failed, changeRequest was:" + moml, ex);
        }
View Full Code Here

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

            MoMLChangeRequest change = new OffsetMoMLChangeRequest(this,
                    container, moml.toString());
            change.setUndoable(true);
            container.requestChange(change);
        } catch (Exception ex) {
            MessageHandler.error("Paste failed", ex);
        }
    }
View Full Code Here

        GraphModel model = _getGraphModel();

        try {
            NamedObj toplevel = (NamedObj) model.getRoot();
            RedoChangeRequest change = new RedoChangeRequest(this, toplevel);
            toplevel.requestChange(change);
        } catch (Exception ex) {
            MessageHandler.error("Redo failed", ex);
        }
    }
View Full Code Here

        GraphModel model = _getGraphModel();

        try {
            NamedObj toplevel = (NamedObj) model.getRoot();
            UndoChangeRequest change = new UndoChangeRequest(this, toplevel);
            toplevel.requestChange(change);
        } catch (Exception ex) {
            MessageHandler.error("Undo failed", ex);
        }
    }
View Full Code Here

            NamedObj actor = getTarget();
            StringBuffer moml = new StringBuffer("<group>");
            HashSet<NamedObj> visited = new HashSet<NamedObj>();
            _addHighlights(actor, moml, visited, _forward, _clear);
            moml.append("</group>");
            actor.requestChange(new MoMLChangeRequest(this, actor
                    .getContainer(), moml.toString()));
        }

        private boolean _forward, _clear;
    }
View Full Code Here

                        // any) is updated and listeners are notified.
                        String moml = "<property name=\"" + name
                                + "\" value=\"" + value + "\"/>";
                        MoMLChangeRequest request = new MoMLChangeRequest(this,
                                model, moml);
                        model.requestChange(request);

                        /* Formerly (before the change request):
                         ((Settable)attribute).setExpression(value);
                         if (attribute instanceof Variable) {
                         // Force evaluation so that listeners are notified.
View Full Code Here

                targets.add(target);
                move(targets, _type, target);
            }
        };

        target.requestChange(request);
    }

    /** Move the objects in the specified list up or down in the list
     *  of similar objects in their container, as specified by the move type.
     *  If the type is TO_FIRST or UP, then
View Full Code Here

                    + flipOn + "\"/>";
        }

        MoMLChangeRequest request = new MoMLChangeRequest(this, object, moml);
        request.setUndoable(true);
        object.requestChange(request);
    }

    ///////////////////////////////////////////////////////////////////
    ////                         private members                   ////
View Full Code Here

        // modified.
        NamedObj context = _attributeToEdit.getContainer();
        String request = "<property name=\"" + _attributeToEdit.getName()
                + "\" value=\""
                + StringUtilities.escapeForXML(_factory.getText()) + "\"/>";
        context.requestChange(new MoMLChangeRequest(this, context, request));
        setModified(false);
        return true;
    }

    ///////////////////////////////////////////////////////////////////
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.