Logo Search packages:      
Sourcecode: matplotlib version File versions

array_editor_test.py

#-------------------------------------------------------------------------------
#  
#  ArrayEditor test case  
#  
#  Written by: David C. Morrill
#  
#  Date: 01/10/2006
#  
#  (c) Copyright 2006 by Enthought, Inc.
#  
#-------------------------------------------------------------------------------

#-------------------------------------------------------------------------------
#  Imports:  
#-------------------------------------------------------------------------------

from enthought.traits.api import HasPrivateTraits, Array
    
from enthought.traits.ui.api import View, ArrayEditor
    
from enthought.traits.ui.menu import NoButtons
    
#-------------------------------------------------------------------------------
#  'Test' class:
#-------------------------------------------------------------------------------

class Test ( HasPrivateTraits ):
    
    #---------------------------------------------------------------------------
    #  Trait definitions:  
    #---------------------------------------------------------------------------
        
    three = Array( (3,3), int )
    four  = Array( (4,4), float, editor = ArrayEditor( width = -50 ) )
    
    #---------------------------------------------------------------------------
    #  Traits view definitions:  
    #---------------------------------------------------------------------------
        
    view = View( 'three', '_', 'three', '_', 'three~', '_', 
                 'four',  '_', 'four',  '_', 'four~',
                 title     = 'ArrayEditor Test Case',
                 buttons   = NoButtons,
                 resizable = True )
                 
#-------------------------------------------------------------------------------
#  Run the test case:  
#-------------------------------------------------------------------------------
                     
if __name__ == '__main__':
    Test().configure_traits()

Generated by  Doxygen 1.6.0   Back to index