Sha256: c71f3b6a88eea5d326592a314c84878772429a56b9e4fecfe516dc243b678244
Contents?: true
Size: 1.63 KB
Versions: 1
Compression:
Stored size: 1.63 KB
Contents
# Copyright (C) 2007-2008 Annas Al Maleh # Licensed under the LGPL. See /COPYING.LGPL for more details. require File.dirname(__FILE__) + "/contact_manager_presenter" require File.dirname(__FILE__) + "/../../src/swt" class RWidget include_package 'org.eclipse.jface.viewers' end class ContactManager extend Glimmer include_package 'org.eclipse.swt' include_package 'org.eclipse.swt.widgets' include_package 'org.eclipse.swt.layout' include_package 'org.eclipse.jface.viewers' contact_manager_presenter = ContactManagerPresenter.new shell { text "Contact Manager" composite { composite { layout GridLayout.new(2, false) label {text "First &Name: "} text { text bind(contact_manager_presenter, :first_name) } label {text "&Last Name: "} text { text bind(contact_manager_presenter, :last_name) } label {text "&Email: "} text { text bind(contact_manager_presenter, :email) } } table { layout_data GridData.new(fill, fill, true, true) table_column { text "First Name" width 80 } table_column { text "Last Name" width 80 } table_column { text "Email" width 120 } items bind(contact_manager_presenter, :results), column_properties(:first_name, :last_name, :email) } button { text "&Find" on_widget_selected { contact_manager_presenter.find } } } }.open end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
glimmer-0.1.0.0 | samples/contactmanager/contact_manager.rb |