Inherits from
- HasPrivateTraits: enthought.traits.has_traits.HasPrivateTraits
Attributes
- adapter_column_indices
For each adapter, specifies the column indices the adapter handles:
adapter_column_indices = Property(depends_on = 'adapters,columns')
- adapter_column_map
For each adapter, specifies the mapping from column index to column id:
adapter_column_map = Property(depends_on = 'adapters,columns')
- adapters
List of optional delegated adapters:
adapters = List(ITabularAdapter, update = True)
- alignment
Alignment to use for a specified column:
alignment = Enum('left', 'center', 'right')
- bg_color
The background color for a row item:
bg_color = Property
- cache
Cache of attribute handlers:
cache = Any({ })
- cache_flushed
Event fired when the cache is flushed:
cache_flushed = Event(update = True)
- can_drop
Can any arbitrary value be dropped onto the tabular view:
can_drop = Bool(False)
- can_edit
Can the text value of each item be edited:
can_edit = Bool(True)
- column
The column index of the current item being adapted:
column = Int
- column_id
The current column id being adapted (if any):
column_id = Any
- column_map
The mapping from column indices to column identifiers (defined by the columns trait):
column_map = Property(depends_on = 'columns')
- columns
A list of columns that should appear in the table. Each entry can have one of two forms: string or ( string, any ), where string is the UI name of the column, and any is a value that identifies that column to the adapter. Normally this value is either a trait name or an index, but it can be any value that the adapter wants. If only string is specified, then any is the index of the string within columns.
columns = List()
- content
The content of a row/column item (may be any Python value):
content = Property
- default_bg_color
default_bg_color = Color(None, update = True)
- default_text_color
default_text_color = Color(None, update = True)
- default_value
Specifies the default value for a new row:
default_value = Any('')
- drag
The value to be dragged for a specified row item:
drag = Property
- dropped
Specifies where a dropped item should be placed in the table relative to the item it is dropped on:
dropped = Enum('after', 'before')
- even_bg_color
even_bg_color = Color(None, update = True)
- even_text_color
even_text_color = Color(None, update = True)
- font
The font for a row item:
font = Font(None)
- format
The Python format string to use for a specified column:
format = Str('%s')
- image
The name of the default image to use for column items:
image = Str(None, update = True)
- item
Current item being adapted:
item = Any
- label_map
The mapping from column indices to column labels (defined by the columns trait):
label_map = Property(depends_on = 'columns')
- name
The name of the trait being edited:
name = Str
- object
The object whose trait is being edited:
object = Instance(HasTraits)
- odd_bg_color
The default background color for table rows (even, odd, any rows):
odd_bg_color = Color(None, update = True)
- odd_text_color
The default text color for table rows (even, odd, any rows):
odd_text_color = Color(None, update = True)
- row
The row index of the current item being adapted:
row = Int
- text
The text of a row/column item:
text = Property
- text_color
The text color for a row item:
text_color = Property
- tooltip
The tooltip information for a row/column item:
tooltip = Str
- value
The current value (if any):
value = Any
- width
Width of a specified column:
width = Float(-Const(1))
Inherited from base classes
Method summary
- delete(self, object, trait, row)
- get_alignment(self, object, trait, column)
- get_bg_color(self, object, trait, row)
- get_can_drop(self, object, trait, row, value)
- get_can_edit(self, object, trait, row)
- get_column(self, object, trait, index)
- get_content(self, object, trait, row, column)
- get_default_value(self, object, trait)
- get_drag(self, object, trait, row)
- get_dropped(self, object, trait, row, value)
- get_font(self, object, trait, row)
- get_format(self, object, trait, row, column)
- get_image(self, object, trait, row, column)
- get_item(self, object, trait, row)
- get_text(self, object, trait, row, column)
- get_text_color(self, object, trait, row)
- get_tooltip(self, object, trait, row, column)
- get_width(self, object, trait, column)
- insert(self, object, trait, row, value)
- len(self, object, trait)
- set_text(self, object, trait, row, column, text)
Inherited from base classes
- __deepcopy__(self, memo)
- __getstate__(self)
- __prefix_trait__(self, name, is_set)
- __reduce_ex__(self, protocol)
- __setstate__(self, state, trait_change_notify = True)
- add_class_trait(cls, name, *trait)
- add_trait(self, name, *trait)
- add_trait_category(cls, category)
- add_trait_listener(self, object, prefix = '')
- all_trait_names(self)
- base_trait(self, name)
- class_default_traits_view(cls)
- class_editable_traits(cls)
- class_trait_names(cls, **metadata)
- class_trait_view(cls, name = None, view_element = None)
- class_trait_view_elements(cls)
- class_traits(cls, **metadata)
- clone_traits(self, traits = None, memo = None, copy = None, **metadata)
- configure_traits(self, filename = None, view = None, kind = None, edit = True, context = None, handler = None, id = '', scrollable = None, **args)
- copy_traits(self, other, traits = None, memo = None, copy = None, **metadata)
- copyable_trait_names(self, **metadata)
- default_traits_view(self)
- edit_traits(self, view = None, parent = None, kind = None, context = None, handler = None, id = '', scrollable = None, **args)
- editable_traits(self)
- has_traits_interface(self, *interfaces)
- on_trait_change(self, handler, name = None, remove = False, dispatch = 'same', priority = False, deferred = False)
- print_traits(self, show_help = False, **metadata)
- remove_trait(self, name)
- remove_trait_listener(self, object, prefix = '')
- reset_traits(self, traits = None, **metadata)
- set_trait_dispatch_handler(cls, name, klass, override = False)
- sync_trait(self, trait_name, object, alias = None, mutual = True, remove = False)
- trait(self, name, force = False, copy = False)
- trait_context(self)
- trait_get(self, *names, **metadata)
- trait_monitor(cls, handler, remove = False)
- trait_names(self, **metadata)
- trait_set(self, trait_change_notify = True, **traits)
- trait_setq(self, **traits)
- trait_subclasses(cls, all = False)
- trait_view(self, name = None, view_element = None)
- trait_view_elements(self)
- trait_views(self, klass = None)
- traits(self, **metadata)
- validate_trait(self, name, value)
Methods
- delete(self, object, trait, row)
Deletes the specified object.trait[row] item.
- get_alignment(self, object, trait, column)
Returns the alignment style to use for a specified column.
- get_bg_color(self, object, trait, row)
Returns the background color for a specified object.trait[row] item. A result of None means use the default background color.
- get_can_drop(self, object, trait, row, value)
Returns whether the specified value can be dropped on the specified object.trait[row] item. A value of True means the value can be dropped; and a value of False indicates that it cannot be dropped.
- get_can_edit(self, object, trait, row)
Returns whether the user can edit a specified object.trait[row] item. A True result indicates the value can be edited, while a False result indicates that it cannot be edited.
- get_column(self, object, trait, index)
Returns the column id corresponding to a specified column index.
- get_content(self, object, trait, row, column)
Returns the content to display for a specified object.trait[row].column item.
- get_default_value(self, object, trait)
Returns a new default value for the specified object.trait list.
- get_drag(self, object, trait, row)
Returns the 'drag' value for a specified object.trait[row] item. A result of None means that the item cannot be dragged.
- get_dropped(self, object, trait, row, value)
Returns how to handle a specified value being dropped on a specified object.trait[row] item. The possible return values are:
- 'before'
- Insert the specified value before the dropped on item.
- 'after'
- Insert the specified value after the dropped on item.
- get_font(self, object, trait, row)
Returns the font for a specified object.trait[row] item. A result of None means use the default font.
- get_format(self, object, trait, row, column)
Returns the Python format string to use for a specified column.
- get_image(self, object, trait, row, column)
Returns the name of the image to use for a specified object.trait[row].column item. A result of None means no image should be used. Otherwise, the result should either be the name of the image, or an ImageResource item specifying the image to use.
- get_item(self, object, trait, row)
Returns the value of the object.trait[row] item.
- get_text(self, object, trait, row, column)
Returns the text to display for a specified object.trait[row].column item.
- get_text_color(self, object, trait, row)
Returns the text color for a specified object.trait[row] item. A result of None means use the default text color.
- get_tooltip(self, object, trait, row, column)
Returns the tooltip for a specified row.
- get_width(self, object, trait, column)
Returns the width to use for a specified column.
- insert(self, object, trait, row, value)
Inserts a new value at the specified object.trait[row] index.
- len(self, object, trait)
Returns the number of items in the specified object.trait list.
- set_text(self, object, trait, row, column, text)
Sets the text for a specified object.trait[row].column item to text.