Package ptolemy.actor.gui

Examples of ptolemy.actor.gui.EditorFactory


            Frame frame = getFrame();
            if (target instanceof GTEntity) {
                List<?> attributeList = target
                        .attributeList(EditorFactory.class);
                if (attributeList.size() > 0) {
                    EditorFactory factory = (EditorFactory) attributeList
                            .get(0);
                    factory.createEditor(target, frame);
                } else {
                    new EditParametersDialog(frame, target);
                }
            } else {
                List<?> ingredientsAttributes = target
                        .attributeList(GTIngredientsAttribute.class);
                try {
                    if (ingredientsAttributes.isEmpty()) {
                        Attribute attribute = new GTIngredientsAttribute(
                                target, target.uniqueName("operations"));
                        attribute.setPersistent(false);
                    }

                    EditorFactory factory = new GTIngredientsEditor.Factory(
                            target, target
                                    .uniqueName("ingredientsEditorFactory"));
                    factory.setPersistent(false);
                    factory.createEditor(target, frame);
                    factory.setContainer(null);
                } catch (KernelException e) {
                    throw new InternalErrorException(e);
                }
            }
        }
View Full Code Here


        //Use the EditorFactory if the alt key is not pressed and the
        // action command is not "Configure".
        if (attributeList.size() > 0 && !altKeyPressed
                && !event.getActionCommand().equals("Configure")) {

            EditorFactory factory = (EditorFactory) attributeList.get(0);
            factory.createEditor(target, parent);
        } else {
            new EditParametersDialog(parent, target);
        }
    }
View Full Code Here

TOP

Related Classes of ptolemy.actor.gui.EditorFactory

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.