001/* The node controller for Ptolemy objects.
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.vergil.basic;
029
030import diva.graph.GraphController;
031import diva.graph.JGraph;
032import ptolemy.actor.gui.Configuration;
033
034///////////////////////////////////////////////////////////////////
035//// NamedObjController
036
037/**
038 This class extends LocatableNodeController with an association
039 with a configuration. The configuration is central to a Ptolemy GUI,
040 and is used by derived classes to perform various functions such as
041 opening models or their documentation. The class also contains an
042 inner class the specifically supports accessing the documentation for
043 a Ptolemy II object.
044
045 @author Edward A. Lee
046 @version $Id$
047 @since Ptolemy II 2.0
048 @Pt.ProposedRating Red (eal)
049 @Pt.AcceptedRating Red (johnr)
050 */
051public class NamedObjController extends LocatableNodeController {
052    /** Create a node controller associated with the specified graph
053     *  controller.
054     *  @param controller The associated graph controller.
055     */
056    public NamedObjController(GraphController controller) {
057        super(controller);
058    }
059
060    ///////////////////////////////////////////////////////////////////
061    ////                         public methods                    ////
062
063    /** Add hot keys to the actions in the given JGraph.
064     *   It would be better that this method was added higher in the hierarchy. Now
065     *   most controllers
066     *  @param jgraph The JGraph to which hot keys are to be added.
067     */
068    public void addHotKeys(JGraph jgraph) {
069    }
070
071    /** Set the configuration.  This is used in derived classes to
072     *  to open files (such as documentation).  The configuration is
073     *  is important because it keeps track of which files are already
074     *  open and ensures that there is only one editor operating on the
075     *  file at any one time.
076     *  @param configuration The configuration.
077     */
078    public void setConfiguration(Configuration configuration) {
079        _configuration = configuration;
080    }
081
082    ///////////////////////////////////////////////////////////////////
083    ////                         protected variables               ////
084
085    /** The configuration. */
086    protected Configuration _configuration;
087}