Exemple #1
0
#!/usr/bin/env python
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
#                                   Jiao Lin
#                      California Institute of Technology
#                      (C) 2006-2011  All Rights Reserved
#
# {LicenseText}
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#

from luban import py_major_ver, setup_context
if py_major_ver == 2: setup_context(locals())

from luban.ui.elements.Riveted import RivetedContainer, Meta, RivetedSubElement
from luban.ui.elements.ElementContainer import buildSubElementFactory


class Portlet(RivetedContainer):

    # decorations
    simple_description = 'provides users access to dynamic content'
    full_description = (
        'A portlet usually is a small window. It contains items that, '
        'when clicked, lead to loading of dynamic content of UI. '
        'A portlet has a title which can be empty, and its children '
        'are of type PortletItem.')

    # properties
Exemple #2
0
#!/usr/bin/env python
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
#                                   Jiao Lin
#                      California Institute of Technology
#                      (C) 2006-2011 All Rights Reserved
#
# {LicenseText}
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#

from luban import setup_context

setup_context(locals())

from luban.ui.AttributeContainer import AttributeContainer

import unittest


class TestCase(unittest.TestCase):
    def test1(self):
        "'action' descriptor"

        class T(AttributeContainer):

            a = descriptors.action()

            pass