Class: ActiveWindow::ActiveDateColumn

Inherits:
ActiveColumn show all
Defined in:
lib/active_window/active_column.rb

Overview

TODO: configure the date format

Constant Summary

Constants inherited from ActiveColumn

ActiveWindow::ActiveColumn::ClassesToSymbols

Instance Attribute Summary

Attributes inherited from ActiveColumn

#id, #name

Instance Method Summary collapse

Methods inherited from ActiveColumn

create, #data_value, #hide!, #initialize, #virtual?, #visible?

Constructor Details

This class inherits a constructor from ActiveWindow::ActiveColumn

Instance Method Details

#attributeObject



172
173
174
# File 'lib/active_window/active_column.rb', line 172

def attribute
  :text
end

#data_classObject



166
167
168
# File 'lib/active_window/active_column.rb', line 166

def data_class
  Time
end

#rendererObject



169
170
171
# File 'lib/active_window/active_column.rb', line 169

def renderer
  Gtk::CellRendererText.new
end

#viewObject



175
176
177
178
179
# File 'lib/active_window/active_column.rb', line 175

def view
  super.set_cell_data_func(renderer) do |col, renderer, model, iter|
    renderer.text = sprintf("%x %X", iter[self.id])
  end
end