glimmer-dsl-swt 4.20.4.1 → 4.20.4.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 477ae45e0e1bc13247941f92ae0b7548c2b6a73646f5f88ff7153491a2ec6c6a
4
- data.tar.gz: 69cb3de2f04851c2282f952df47db2b9eda03279e44502b04e8f93eb9373178d
3
+ metadata.gz: b0bba8c354a9db8c2792672663e9aa7831f38ad7b34fd5a3d928fdb12a64eba3
4
+ data.tar.gz: 671c5533d419dd32454f3dba595f7887f3b65d0643e89c7ef6db8dba44d3f4f7
5
5
  SHA512:
6
- metadata.gz: 2aa235c3ca3ec8155e60af29ffca40232d38e8d5e87317e14244afe49da93ca2cd0fe103b688a78f7d22587a16e89ebaafa1f1a60abd92fe16b82a1f1e3e42f1
7
- data.tar.gz: 2f2d84b284317afd09bfed98ce5ebcf95d4707fd87d5e53b8d36b4da485a5685ef95339ba48d16c0f5800e753635c28823a8f56735cee237a982e51a3ff5aea7
6
+ metadata.gz: 448277d9a14e6dc86bb6685c5f6890090246147bdbf9099d9035ec6b9fc294f042cd2d211b107249d648eb002e4d80bd5c5f3d4349647619708ea5cd88a39719
7
+ data.tar.gz: a98582730c8ec1143e387cadb89cc80432b72aa1d50db2c935f5b3212403f8a13d3b9daa4292b09d9efcb0afceef108d40ccd8eb28bc6e286f3cd14c6cc26ef6
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Change Log
2
2
 
3
+ ### 4.20.4.2
4
+
5
+ - Hello, Label!
6
+
3
7
  ### 4.20.4.1
4
8
 
5
9
  - Ensure a `table` with `:editable` style loses it if `items <= ...` one-way data-binding (having read_only: true option) was setup.
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # [<img src="https://raw.githubusercontent.com/AndyObtiva/glimmer/master/images/glimmer-logo-hi-res.png" height=85 />](https://github.com/AndyObtiva/glimmer) Glimmer DSL for SWT 4.20.4.1
1
+ # [<img src="https://raw.githubusercontent.com/AndyObtiva/glimmer/master/images/glimmer-logo-hi-res.png" height=85 />](https://github.com/AndyObtiva/glimmer) Glimmer DSL for SWT 4.20.4.2
2
2
  ## JRuby Desktop Development GUI Framework
3
3
  [![Gem Version](https://badge.fury.io/rb/glimmer-dsl-swt.svg)](http://badge.fury.io/rb/glimmer-dsl-swt)
4
4
  [![Travis CI](https://travis-ci.com/AndyObtiva/glimmer-dsl-swt.svg?branch=master)](https://travis-ci.com/github/AndyObtiva/glimmer-dsl-swt)
@@ -15,7 +15,7 @@
15
15
  [<img src="https://covers.oreillystatic.com/images/9780596519650/lrg.jpg" width=105 /><br />
16
16
  Featured in JRuby Cookbook](http://shop.oreilly.com/product/9780596519650.do) and [Chalmers/Gothenburg University Software Engineering Master's Lecture Material](http://www.cse.chalmers.se/~bergert/slides/guest_lecture_DSLs.pdf)
17
17
 
18
- [Glimmer DSL for SWT](https://rubygems.org/gems/glimmer-dsl-swt) 4.20.4.1 includes [SWT 4.20](https://download.eclipse.org/eclipse/downloads/drops4/R-4.20-202106111600/), which was released on June 11, 2021. Gem version numbers are in sync with the SWT library versions. The first two digits represent the SWT version number. The last two digits represent the minor and patch versions of Glimmer DSL for SWT. Note that SWT now supports AARCH64 on Mac and Linux, but it is not fully tested in Glimmer DSL for SWT yet, so deem its support experimental for the time being without guarantees for functionality until declared otherwise (report any issues you may encounter).
18
+ [Glimmer DSL for SWT](https://rubygems.org/gems/glimmer-dsl-swt) 4.20.4.2 includes [SWT 4.20](https://download.eclipse.org/eclipse/downloads/drops4/R-4.20-202106111600/), which was released on June 11, 2021. Gem version numbers are in sync with the SWT library versions. The first two digits represent the SWT version number. The last two digits represent the minor and patch versions of Glimmer DSL for SWT. Note that SWT now supports AARCH64 on Mac and Linux, but it is not fully tested in Glimmer DSL for SWT yet, so deem its support experimental for the time being without guarantees for functionality until declared otherwise (report any issues you may encounter).
19
19
 
20
20
  **Starting in version 4.20.0.0, [Glimmer DSL for SWT](https://rubygems.org/gems/glimmer-dsl-swt) comes with the new [***Shine***](/docs/reference/GLIMMER_GUI_DSL_SYNTAX.md#shine) syntax** for highly intuitive and visually expressive View/Model Attribute Mapping, relying on `<=>` for bidirectional (two-way) data-binding and `<=` for unidirectional (one-way) data-binding, providing an alternative to the `bind` keyword (keep in mind that it is still a beta, so default back to `bind` whenever needed).
21
21
 
@@ -347,7 +347,7 @@ jgem install glimmer-dsl-swt
347
347
 
348
348
  Or this command if you want a specific version:
349
349
  ```
350
- jgem install glimmer-dsl-swt -v 4.20.4.1
350
+ jgem install glimmer-dsl-swt -v 4.20.4.2
351
351
  ```
352
352
 
353
353
  `jgem` is JRuby's version of `gem` command.
@@ -375,7 +375,7 @@ Note: if you're using activerecord or activesupport, keep in mind that Glimmer u
375
375
 
376
376
  Add the following to `Gemfile`:
377
377
  ```
378
- gem 'glimmer-dsl-swt', '~> 4.20.4.1'
378
+ gem 'glimmer-dsl-swt', '~> 4.20.4.2'
379
379
  ```
380
380
 
381
381
  And, then run:
@@ -396,7 +396,7 @@ glimmer
396
396
  ```
397
397
 
398
398
  ```
399
- Glimmer (JRuby Desktop Development GUI Framework) - JRuby Gem: glimmer-dsl-swt v4.20.4.1
399
+ Glimmer (JRuby Desktop Development GUI Framework) - JRuby Gem: glimmer-dsl-swt v4.20.4.2
400
400
 
401
401
  Usage: glimmer [--bundler] [--pd] [--quiet] [--debug] [--log-level=VALUE] [[ENV_VAR=VALUE]...] [[-jruby-option]...] (application.rb or task[task_args]) [[application2.rb]...]
402
402
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 4.20.4.1
1
+ 4.20.4.2
@@ -2,6 +2,7 @@
2
2
  - [Hello Samples](#hello-samples)
3
3
  - [Hello, World!](#hello-world)
4
4
  - [Hello, Button!](#hello-button)
5
+ - [Hello, Label!](#hello-label)
5
6
  - [Hello, Text!](#hello-text)
6
7
  - [Hello, Composite!](#hello-composite)
7
8
  - [Hello, Layout!](#hello-layout)
@@ -117,6 +118,28 @@ Hello, Button! Incremented 7 times!
117
118
 
118
119
  ![Hello Button Incremented](/images/glimmer-hello-button-incremented.png)
119
120
 
121
+ #### Hello, Label!
122
+
123
+ This sample demonstrates the use of the `label` widget in Glimmer.
124
+
125
+ Code:
126
+
127
+ [samples/hello/hello_label.rb](/samples/hello/hello_label.rb)
128
+
129
+ ![Hello Label Left Aligned](/images/glimmer-hello-label-left-aligned.png)
130
+
131
+ ![Hello Label Center Aligned](/images/glimmer-hello-label-center-aligned.png)
132
+
133
+ ![Hello Label Right Aligned](/images/glimmer-hello-label-right-aligned.png)
134
+
135
+ ![Hello Label Images](/images/glimmer-hello-label-images.png)
136
+
137
+ ![Hello Label Background Images](/images/glimmer-hello-label-background_images.png)
138
+
139
+ ![Hello Label Horizontal Separator](/images/glimmer-hello-label-horizontal-separator.png)
140
+
141
+ ![Hello Label Vertical Separator](/images/glimmer-hello-label-vertical-separator.png)
142
+
120
143
  #### Hello, Text!
121
144
 
122
145
  This sample demonstrates the use of the `text` widget in Glimmer, including data-binding (e.g. via the `<=>` operator) and event handling.
Binary file
@@ -6,7 +6,7 @@ class Timer
6
6
 
7
7
  import 'javax.sound.sampled'
8
8
 
9
- FILE_SOUND_ALARM = File.expand_path(File.join('timer', 'alarm1.wav'), __dir__)
9
+ FILE_SOUND_ALARM = File.expand_path(File.join('timer', 'sounds', 'alarm1.wav'), __dir__)
10
10
  COMMAND_KEY = OS.mac? ? :command : :ctrl
11
11
 
12
12
  ## Add options like the following to configure CustomShell by outside consumers
@@ -44,7 +44,7 @@ class HelloCTab
44
44
  foreground :blue
45
45
  selection_foreground :dark_blue
46
46
  font name: 'Times New Roman', height: 30, style: [:bold, :italic]
47
- image File.expand_path('hello_c_tab/usa.png', __dir__)
47
+ image File.expand_path('images/usa.png', __dir__)
48
48
 
49
49
  label {
50
50
  text 'Hello, World!'
@@ -58,7 +58,7 @@ class HelloCTab
58
58
  foreground :blue
59
59
  selection_foreground :dark_blue
60
60
  font name: 'Times New Roman', height: 30, style: [:bold, :italic]
61
- image File.expand_path('hello_c_tab/france.png', __dir__)
61
+ image File.expand_path('images/france.png', __dir__)
62
62
 
63
63
  label {
64
64
  text 'Bonjour, Univers!'
@@ -72,7 +72,7 @@ class HelloCTab
72
72
  foreground :blue
73
73
  selection_foreground :dark_blue
74
74
  font name: 'Times New Roman', height: 30, style: [:bold, :italic]
75
- image File.expand_path('hello_c_tab/mexico.png', __dir__)
75
+ image File.expand_path('images/mexico.png', __dir__)
76
76
 
77
77
  label {
78
78
  text 'Hola, Mundo!'
@@ -86,7 +86,7 @@ class HelloCTab
86
86
  foreground :blue
87
87
  selection_foreground :dark_blue
88
88
  font name: 'Times New Roman', height: 30, style: [:bold, :italic]
89
- image File.expand_path('hello_c_tab/germany.png', __dir__)
89
+ image File.expand_path('images/germany.png', __dir__)
90
90
 
91
91
  label {
92
92
  text 'Hallo, Welt!'
@@ -100,7 +100,7 @@ class HelloCTab
100
100
  foreground :blue
101
101
  selection_foreground :dark_blue
102
102
  font name: 'Times New Roman', height: 30, style: [:bold, :italic]
103
- image File.expand_path('hello_c_tab/italy.png', __dir__)
103
+ image File.expand_path('images/italy.png', __dir__)
104
104
 
105
105
  label {
106
106
  text 'Ciao, Mondo!'
@@ -114,7 +114,7 @@ class HelloCTab
114
114
  foreground :blue
115
115
  selection_foreground :dark_blue
116
116
  font name: 'Times New Roman', height: 30, style: [:bold, :italic]
117
- image File.expand_path('hello_c_tab/netherlands.png', __dir__)
117
+ image File.expand_path('images/netherlands.png', __dir__)
118
118
 
119
119
  label {
120
120
  text 'Hallo, Wereld!'
@@ -128,7 +128,7 @@ class HelloCTab
128
128
  foreground :blue
129
129
  selection_foreground :dark_blue
130
130
  font name: 'Times New Roman', height: 30, style: [:bold, :italic]
131
- image File.expand_path('hello_c_tab/denmark.png', __dir__)
131
+ image File.expand_path('images/denmark.png', __dir__)
132
132
 
133
133
  label {
134
134
  text 'Hej, Verden!'
@@ -142,7 +142,7 @@ class HelloCTab
142
142
  foreground :blue
143
143
  selection_foreground :dark_blue
144
144
  font name: 'Times New Roman', height: 30, style: [:bold, :italic]
145
- image File.expand_path('hello_c_tab/finland.png', __dir__)
145
+ image File.expand_path('images/finland.png', __dir__)
146
146
 
147
147
  label {
148
148
  text 'Hei, Maailma!'
@@ -156,7 +156,7 @@ class HelloCTab
156
156
  foreground :blue
157
157
  selection_foreground :dark_blue
158
158
  font name: 'Times New Roman', height: 30, style: [:bold, :italic]
159
- image File.expand_path('hello_c_tab/norway.png', __dir__)
159
+ image File.expand_path('images/norway.png', __dir__)
160
160
 
161
161
  label {
162
162
  text 'Hei, Verden!'
@@ -0,0 +1,194 @@
1
+ # Copyright (c) 2007-2021 Andy Maleh
2
+ #
3
+ # Permission is hereby granted, free of charge, to any person obtaining
4
+ # a copy of this software and associated documentation files (the
5
+ # "Software"), to deal in the Software without restriction, including
6
+ # without limitation the rights to use, copy, modify, merge, publish,
7
+ # distribute, sublicense, and/or sell copies of the Software, and to
8
+ # permit persons to whom the Software is furnished to do so, subject to
9
+ # the following conditions:
10
+ #
11
+ # The above copyright notice and this permission notice shall be
12
+ # included in all copies or substantial portions of the Software.
13
+ #
14
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ # LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21
+
22
+ require 'glimmer-dsl-swt'
23
+
24
+ class HelloGroup
25
+ include Glimmer::UI::CustomShell
26
+
27
+ body {
28
+ shell {
29
+ text 'Hello, Label!'
30
+
31
+ tab_folder {
32
+ tab_item {
33
+ text 'left-aligned'
34
+
35
+ grid_layout 2, true
36
+
37
+ 1.upto(3) do |n|
38
+ label(:left) { # :left is default in English, so it is unnecessary
39
+ layout_data :fill, :center, true, false
40
+ text "Field #{n}"
41
+ }
42
+ text {
43
+ layout_data :fill, :center, true, false
44
+ text "Enter Field #{n}"
45
+ }
46
+ end
47
+ }
48
+
49
+ tab_item {
50
+ text 'center-aligned'
51
+
52
+ grid_layout 2, true
53
+
54
+ 1.upto(3) do |n|
55
+ label(:center) {
56
+ layout_data :fill, :center, true, false
57
+ text "Field #{n}"
58
+ }
59
+ text {
60
+ layout_data :fill, :center, true, false
61
+ text "Enter Field #{n}"
62
+ }
63
+ end
64
+ }
65
+
66
+ tab_item {
67
+ text 'right-aligned'
68
+
69
+ grid_layout 2, true
70
+
71
+ 1.upto(3) do |n|
72
+ label(:right) {
73
+ layout_data :fill, :center, true, false
74
+ text "Field #{n}"
75
+ }
76
+ text {
77
+ layout_data :fill, :center, true, false
78
+ text "Enter Field #{n}"
79
+ }
80
+ end
81
+ }
82
+
83
+ tab_item {
84
+ text 'images'
85
+
86
+ grid_layout 2, true
87
+
88
+ ['denmark', 'finland', 'norway'].each do |image_name|
89
+ label {
90
+ layout_data :fill, :center, true, false
91
+ image File.expand_path("images/#{image_name}.png", __dir__)
92
+ }
93
+ text {
94
+ layout_data :fill, :center, true, false
95
+ text "Enter Field #{image_name.capitalize}"
96
+ }
97
+ end
98
+ }
99
+
100
+ tab_item {
101
+ text 'background images'
102
+
103
+ grid_layout 2, true
104
+
105
+ ['italy', 'france', 'mexico'].each do |image_name|
106
+ label {
107
+ layout_data :center, :center, true, false
108
+ background_image File.expand_path("images/#{image_name}.png", __dir__)
109
+ text image_name.capitalize
110
+ font height: 26, style: :bold
111
+ }
112
+ text {
113
+ layout_data :fill, :center, true, false
114
+ text "Enter Field #{image_name.capitalize}"
115
+ }
116
+ end
117
+ }
118
+
119
+ tab_item {
120
+ text 'horizontal separator'
121
+
122
+ grid_layout 2, true
123
+
124
+ label {
125
+ layout_data :fill, :center, true, false
126
+ text "Field 1"
127
+ }
128
+ text {
129
+ layout_data :fill, :center, true, false
130
+ text "Enter Field 1"
131
+ }
132
+
133
+ label(:separator, :horizontal) {
134
+ layout_data(:fill, :center, true, false) {
135
+ horizontal_span 2
136
+ }
137
+ }
138
+
139
+ label {
140
+ layout_data :fill, :center, true, false
141
+ text "Field 2"
142
+ }
143
+ text {
144
+ layout_data :fill, :center, true, false
145
+ text "Enter Field 2"
146
+ }
147
+ }
148
+
149
+ tab_item {
150
+ text 'vertical separator'
151
+
152
+ grid_layout 3, true
153
+
154
+ label {
155
+ layout_data :fill, :center, true, false
156
+ text "Field 1"
157
+ }
158
+ label(:separator, :vertical) {
159
+ layout_data(:center, :center, false, false) {
160
+ vertical_span 3
161
+ }
162
+ }
163
+ text {
164
+ layout_data :fill, :center, true, false
165
+ text "Enter Field 1"
166
+ }
167
+
168
+ label {
169
+ layout_data :fill, :center, true, false
170
+ text "Field 2"
171
+ }
172
+ text {
173
+ layout_data :fill, :center, true, false
174
+ text "Enter Field 2"
175
+ }
176
+
177
+ label {
178
+ layout_data :fill, :center, true, false
179
+ text "Field 3"
180
+ }
181
+ text {
182
+ layout_data :fill, :center, true, false
183
+ text "Enter Field 3"
184
+ }
185
+ }
186
+
187
+ }
188
+
189
+ }
190
+
191
+ }
192
+ end
193
+
194
+ HelloGroup.launch
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: glimmer-dsl-swt
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.20.4.1
4
+ version: 4.20.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andy Maleh
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-07-12 00:00:00.000000000 Z
11
+ date: 2021-07-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement
@@ -561,7 +561,6 @@ files:
561
561
  - samples/elaborate/tic_tac_toe/board.rb
562
562
  - samples/elaborate/tic_tac_toe/cell.rb
563
563
  - samples/elaborate/timer.rb
564
- - samples/elaborate/timer/alarm1.wav
565
564
  - samples/elaborate/timer/sounds/alarm1.wav
566
565
  - samples/elaborate/user_profile.rb
567
566
  - samples/elaborate/weather.rb
@@ -569,15 +568,6 @@ files:
569
568
  - samples/hello/hello_button.rb
570
569
  - samples/hello/hello_c_combo.rb
571
570
  - samples/hello/hello_c_tab.rb
572
- - samples/hello/hello_c_tab/denmark.png
573
- - samples/hello/hello_c_tab/finland.png
574
- - samples/hello/hello_c_tab/france.png
575
- - samples/hello/hello_c_tab/germany.png
576
- - samples/hello/hello_c_tab/italy.png
577
- - samples/hello/hello_c_tab/mexico.png
578
- - samples/hello/hello_c_tab/netherlands.png
579
- - samples/hello/hello_c_tab/norway.png
580
- - samples/hello/hello_c_tab/usa.png
581
571
  - samples/hello/hello_canvas.rb
582
572
  - samples/hello/hello_canvas_animation.rb
583
573
  - samples/hello/hello_canvas_animation_data_binding.rb
@@ -604,6 +594,7 @@ files:
604
594
  - samples/hello/hello_file_dialog.rb
605
595
  - samples/hello/hello_font_dialog.rb
606
596
  - samples/hello/hello_group.rb
597
+ - samples/hello/hello_label.rb
607
598
  - samples/hello/hello_layout.rb
608
599
  - samples/hello/hello_link.rb
609
600
  - samples/hello/hello_list_multi_selection.rb
@@ -626,6 +617,15 @@ files:
626
617
  - samples/hello/hello_tool_bar.rb
627
618
  - samples/hello/hello_tree.rb
628
619
  - samples/hello/hello_world.rb
620
+ - samples/hello/images/denmark.png
621
+ - samples/hello/images/finland.png
622
+ - samples/hello/images/france.png
623
+ - samples/hello/images/germany.png
624
+ - samples/hello/images/italy.png
625
+ - samples/hello/images/mexico.png
626
+ - samples/hello/images/netherlands.png
627
+ - samples/hello/images/norway.png
628
+ - samples/hello/images/usa.png
629
629
  - sounds/metronome-down.wav
630
630
  - sounds/metronome-up.wav
631
631
  - vendor/swt/linux/swt.jar
Binary file