Ejemplo n.º 1
0
    def remove(self, items, group =None):
        """Rmoves class(es) from the existing list of classes, ignoring duplicates.

        @@@param names:string,list
            The names argument can be a single class name, a whitespace-delimited list of class
            names or a list of class names.
        """

        if items is None or not items:
            return

        if isinstance(items, basestring):
            items = Classes._WS_DELIMITER.split(items)

        ListDataOrganizer.remove(self, items, group)
Ejemplo n.º 2
0
    def add(self, *args, **kwargs):
        """Adds class(es) to the existing list of classes, ignoring duplicates.

        @@@param names:string,list
            The names argument can be a single class name, a whitespace-delimited list of class
            names or a list of class names.
        """

        names = ArgsUtils.get('items', None, kwargs, args, 0)
        if names is None or not names:
            return

        if isinstance(names, basestring):
            names = Classes._WS_DELIMITER.split(names)

        group = ArgsUtils.get('group', None, kwargs, args, 1)

        ListDataOrganizer.add(self, names, group)
Ejemplo n.º 3
0
 def __init__(self, root, **kwargs):
     """Creates a new instance of Classes."""
     ListDataOrganizer.__init__(self, root, **kwargs)