Sha256: 6d5e81edd7044f2451742152d75fa1cc70448dc987506681645e985e1258cba3

Contents?: true

Size: 1.73 KB

Versions: 2

Compression:

Stored size: 1.73 KB

Contents

#   The contents of this file are subject to the Mozilla Public License
#   Version 1.1 (the "License"); you may not use this file except in
#   compliance with the License. You may obtain a copy of the License at
#   http://www.mozilla.org/MPL/
#
#   Software distributed under the License is distributed on an "AS IS"
#   basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
#   License for the specific language governing rights and limitations
#   under the License.
#
#   The Initial Developer of the Original Code is Johannes Rudolph.
#   Portions created by the Initial Developer are Copyright (C) 2006
#   the Initial Developer. All Rights Reserved.
#
#   Contributor(s):
#      Johannes Rudolph <johannes_rudolph@gmail.com>

require 'swt'
require 'test/unit'

module SWT
  class SWTTest < Test::Unit::TestCase
    include_class 'java.lang.Thread' do
      "JavaThread"
    end
    def test_swt_container
      shell=SWT::Builder.go do
        shell "Testprogramm",2 do
          tree(:verticalFill=>true,:horizontalFill=>true) do
            child do
              object{JavaThread.currentThread}
              label{|x| x}
              children(lambda{|x|x.getStackTrace}) do
                label{|x| x}
                leaf {|x|"Datei: #{x.getFileName}"}
                leaf {|x|"Zeilennummer: #{x.getLineNumber}"}
              end
            end
          end
          container 2 do
            group "Wurst",2 do
              labeledText "Katastrophe:"
              labeledText "Butterbrot:"
            end
            group "Buttons",1 do
              button "Hallo"
              button "Gustav das Brot"
            end
          end
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
sweetgui-0.0.4 tests/ts_swt.rb
sweetgui-0.0.3 tests/ts_swt.rb