001/* An attribute that produces a custom node controller for ChicInvoker.
002
003 Copyright (c) 1998-2016 The Regents of the University of California.
004 All rights reserved.
005 Permission is hereby granted, without written agreement and without
006 license or royalty fees, to use, copy, modify, and distribute this
007 software and its documentation for any purpose, provided that the above
008 copyright notice and the following two paragraphs appear in all copies
009 of this software.
010
011 IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY
012 FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
013 ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
014 THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
015 SUCH DAMAGE.
016
017 THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,
018 INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
019 MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
020 PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
021 CALIFORNIA HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES,
022 ENHANCEMENTS, OR MODIFICATIONS.
023
024 PT_COPYRIGHT_VERSION_2
025 COPYRIGHTENDKEY
026
027 */
028package ptolemy.chic;
029
030import diva.graph.GraphController;
031// Diva imports
032import ptolemy.kernel.util.IllegalActionException;
033import ptolemy.kernel.util.NameDuplicationException;
034import ptolemy.kernel.util.NamedObj;
035import ptolemy.vergil.basic.NamedObjController;
036import ptolemy.vergil.basic.NodeControllerFactory;
037
038// Java imports
039///////////////////////////////////////////////////////////////////
040//// ChicControllerFactory
041
042/**
043 This is an attribute that produces a custom node controller for
044 Chic visible attributes.  This class creates an instance of
045 ChicController, for controlling Chic visible attributes in a ptolemy
046 model.
047
048 @author Eleftherios Matsikoudis
049 @version $Id$
050 @since Ptolemy II 3.0
051 @Pt.ProposedRating Red (cxh)
052 @Pt.AcceptedRating Red (cxh)
053 */
054public class ChicControllerFactory extends NodeControllerFactory {
055    /** Construct a new attribute with the given container and name.
056     *  @param container The container.
057     *  @param name The name.
058     *  @exception IllegalActionException If the attribute cannot be contained
059     *   by the proposed container.
060     *  @exception NameDuplicationException If the container already has an
061     *   attribute with this name.
062     */
063    public ChicControllerFactory(NamedObj container, String name)
064            throws NameDuplicationException, IllegalActionException {
065        super(container, name);
066    }
067
068    ///////////////////////////////////////////////////////////////////
069    ////                         public methods                    ////
070
071    /** Return a new node controller.  This method returns an
072     *  instance of ChicController.
073     *  @param controller The associated graph controller.
074     *  @return A new node controller.
075     */
076    @Override
077    public NamedObjController create(GraphController controller) {
078        return new ChicController(controller);
079    }
080}