Class AbstractAddMostCommonActorAction

    • Field Detail

      • m_Blacklisted

        protected static Set<String> m_Blacklisted
        for blacklisting actor classnames that couldn't be instantiated.
    • Constructor Detail

      • AbstractAddMostCommonActorAction

        public AbstractAddMostCommonActorAction()
    • Method Detail

      • blacklistActor

        protected void blacklistActor​(String classname)
        Flags the actor as blacklisted for the current session.
        Parameters:
        classname - the classname to blacklist
      • isBlacklistedActor

        protected boolean isBlacklistedActor​(String classname)
        Checks whether the actor has been blacklisted.
        Parameters:
        classname - the classname to check
        Returns:
        true if blacklisted
      • newActor

        protected Actor newActor​(String classname)
        Instantiates the specified actor if not blacklisted. Blacklists it automatically if it can't be instantiated.
        Parameters:
        classname - the classname of the actor to instantiate
        Returns:
        the actor, null if failed to instantiate
      • getMostCommonActors

        protected List<String> getMostCommonActors​(TreePath path,
                                                   TreeOperations.InsertPosition position)
        Returns the classnames of the most commonly used actors.
        Parameters:
        path - the path to insert the actor at
        position - where to insert the actor
        Returns:
        the actors
      • newMenuItem

        protected JMenuItem newMenuItem​(List<JMenuItem> menuitems,
                                        Actor actor)
        Creates a new menuitem.
        Parameters:
        menuitems - the list to add to
        actor - the actor to create the menuitem for
        Returns:
        the new item
      • finalizeMenu

        protected BaseMenu finalizeMenu​(List<JMenuItem> menuitems)
        Finalizes the menu.
        Parameters:
        menuitems - the menuitems for the menu
        Returns:
        the generated menu