示例#1
0
    def add(self, *args, **kwargs):
        """Adds a style or multiple styles to the Stylesheet.

        @@@param key:string
            If adding one style, the first argument is the name of the style to add. If adding
            multiple styles this argument is omitted.

        @@@param value:mixed,dict
            When adding a single style, this value can be any basic type that can be converted
            to a string. When adding multiple values this is the first argument and should be a
            dictionary of style name/value pairs.

        @@@param group:string
            Defaults to None, in which case the style(s) are added to the root group. Otherwise,
            specified the style group in which to add the style.
        """

        KeyDataOrganizer.add(self, *args, **kwargs)
示例#2
0
 def __init__(self, root, **kwargs):
     """Creates a new instance of Stylesheet."""
     KeyDataOrganizer.__init__(self, root, **kwargs)
 def __init__(self, *args, **kwargs):
     """Creates a new instance of AttributeDataOrganizer."""
     root         = ArgsUtils.extract('root', None, kwargs, args, 0)
     self._prefix = ArgsUtils.extract('prefix', '', kwargs, args, 1)
     KeyDataOrganizer.__init__(self, root, **kwargs)