glimmer-dsl-swt 4.24.4.8 → 4.25.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +13 -0
- data/README.md +8 -8
- data/RUBY_VERSION +1 -1
- data/VERSION +1 -1
- data/docs/reference/GLIMMER_GUI_DSL_SYNTAX.md +1 -1
- data/glimmer-dsl-swt.gemspec +0 -0
- data/lib/glimmer/swt/table_proxy.rb +1 -1
- data/lib/glimmer/swt/widget_proxy.rb +1 -0
- data/samples/elaborate/contact_manager/contact.rb +3 -3
- data/samples/elaborate/contact_manager/contact_manager_presenter.rb +38 -8
- data/samples/elaborate/contact_manager/contact_repository.rb +13 -3
- data/samples/elaborate/contact_manager.rb +34 -1
- data/samples/hello/hello_tool_bar.rb +2 -1
- data/vendor/swt/linux/swt.jar +0 -0
- data/vendor/swt/linux_aarch64/swt.jar +0 -0
- data/vendor/swt/mac/swt.jar +0 -0
- data/vendor/swt/mac_aarch64/swt.jar +0 -0
- data/vendor/swt/windows/swt.jar +0 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 25c1ee50ed943be0816df8fcb6a185002555f26f00c3901b3119b3fac7e205cf
|
4
|
+
data.tar.gz: 7b20693058c5942e78d2ffe1b43f7e2af8f09f731164338f50652bbe7d1d7819
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e2a05775a6377592290639bdc617067f40c5aff23dc261052fd0e767e7271b62b682271ab47ba5bbcbe1e175be125e0149322ba0d3dea2b88502f59906d8a55c
|
7
|
+
data.tar.gz: 8707f436fe24cff7f31809510db6b168fdd55a815504115be42e3e1f55f46a75a5c44c16edaa3ba2907fa9343b7a69493f8d8ac183b22024c75313a787586bdf
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,18 @@
|
|
1
1
|
# Change Log
|
2
2
|
|
3
|
+
## 4.25.0.1
|
4
|
+
|
5
|
+
- Contact Manager Create Button and Table Delete Menu Item
|
6
|
+
- Make default table sorting behavior for strings case-insensitive
|
7
|
+
|
8
|
+
## 4.25.0.0
|
9
|
+
|
10
|
+
- Upgrade to SWT 4.25
|
11
|
+
- Upgrade to JRuby 9.3.8.0
|
12
|
+
- Upgrade to JDK 19
|
13
|
+
- Make `:edge` the default SWT style for `browser` widget on Windows (Microsoft Edge Browser)
|
14
|
+
- Fix Hello, Tool Bar! look in Linux
|
15
|
+
|
3
16
|
## 4.24.4.8
|
4
17
|
|
5
18
|
- Optimize `refined_table` sorting to avoid re-running upon navigating pages
|
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.
|
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.25.0.1
|
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)
|
@@ -21,7 +21,7 @@ Featured in JRuby Cookbook](http://shop.oreilly.com/product/9780596519650.do) an
|
|
21
21
|
|
22
22
|
![Eclipse SWT RCP NASA Mars Rover](/images/glimmer-eclipse-swt-rcp-nasa-mars-rover.png)
|
23
23
|
|
24
|
-
[Glimmer DSL for SWT](https://rubygems.org/gems/glimmer-dsl-swt) 4.
|
24
|
+
[Glimmer DSL for SWT](https://rubygems.org/gems/glimmer-dsl-swt) 4.25.0.1 includes [SWT 4.25](https://download.eclipse.org/eclipse/downloads/drops4/R-4.25-202208311800/), which was released on 31 Aug 2022. 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.
|
25
25
|
|
26
26
|
**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. That was [originally conceived back in 2007](https://andymaleh.blogspot.com/2007/12/data-shining-in-glimmer.html).
|
27
27
|
|
@@ -306,10 +306,10 @@ https://www.eclipse.org/swt/faq.php
|
|
306
306
|
|
307
307
|
## Pre-requisites
|
308
308
|
|
309
|
-
- JDK
|
309
|
+
- JDK 19 is recommended / JDK 16 is the minimum except on Mac ARM64 where JDK 17 is the minimum (find at https://www.oracle.com/java/technologies/downloads / Ensure `PATH` env var includes Java bin directory for `jpackage` command to work when packaging Glimmer applications / Preferably setup `JAVA_HOME` env var too to point to JDK home directory before installing JRuby)
|
310
310
|
- [RVM](http://rvm.io) on Mac & Linux (not needed on Windows)
|
311
|
-
- JRuby 9.3.
|
312
|
-
- SWT 4.
|
311
|
+
- JRuby 9.3.8.0 is recommended / JRuby 9.3.6.0 is the minimum (supporting Ruby 2.6.x syntax) (get via [RVM](http://rvm.io) on Mac and Linux by running `rvm install jruby-9.3.8.0`; On Windows, find at [https://www.jruby.org/download](https://www.jruby.org/download))
|
312
|
+
- SWT 4.25 (already included in the [glimmer-dsl-swt](https://rubygems.org/gems/glimmer-dsl-swt) gem). Note that SWT supports ARM64/AARCH64 on Mac and Linux since version 4.20
|
313
313
|
- Git (comes with Mac and Linux. Install on Windows: https://git-scm.com/download/win )
|
314
314
|
|
315
315
|
Glimmer might still work on other versions of Java, JRuby and SWT, but there are no guarantees, so it is best to stick to the pre-requisites outlined above.
|
@@ -338,7 +338,7 @@ jgem install glimmer-dsl-swt
|
|
338
338
|
|
339
339
|
Or this command if you want a specific version:
|
340
340
|
```
|
341
|
-
jgem install glimmer-dsl-swt -v 4.
|
341
|
+
jgem install glimmer-dsl-swt -v 4.25.0.1
|
342
342
|
```
|
343
343
|
|
344
344
|
`jgem` is JRuby's version of `gem` command.
|
@@ -366,7 +366,7 @@ Note: if you're using activerecord or activesupport, keep in mind that Glimmer u
|
|
366
366
|
|
367
367
|
Add the following to `Gemfile`:
|
368
368
|
```
|
369
|
-
gem 'glimmer-dsl-swt', '~> 4.
|
369
|
+
gem 'glimmer-dsl-swt', '~> 4.25.0.1'
|
370
370
|
```
|
371
371
|
|
372
372
|
And, then run:
|
@@ -389,7 +389,7 @@ glimmer
|
|
389
389
|
```
|
390
390
|
|
391
391
|
```
|
392
|
-
Glimmer (JRuby Desktop Development GUI Framework) - JRuby Gem: glimmer-dsl-swt v4.
|
392
|
+
Glimmer (JRuby Desktop Development GUI Framework) - JRuby Gem: glimmer-dsl-swt v4.25.0.1
|
393
393
|
|
394
394
|
Usage: glimmer [--bundler] [--pd] [--quiet] [--debug] [--log-level=VALUE] [[ENV_VAR=VALUE]...] [[-jruby-option]...] (application.rb or task[task_args]) [[application2.rb]...]
|
395
395
|
|
data/RUBY_VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
jruby-9.3.
|
1
|
+
jruby-9.3.8.0
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
4.
|
1
|
+
4.25.0.1
|
@@ -1079,7 +1079,7 @@ You may check out a more full-fledged example in [Hello, Sash Form!](/docs/refer
|
|
1079
1079
|
|
1080
1080
|
![Hello Browser](/images/glimmer-hello-browser.png)
|
1081
1081
|
|
1082
|
-
Glimmer DSL for SWT includes a basic [SWT Browser widget](https://help.eclipse.org/2020-12/topic/org.eclipse.platform.doc.isv/reference/api/org/eclipse/swt/browser/Browser.html), which can load URLs or render HTML. It supports WebKit,
|
1082
|
+
Glimmer DSL for SWT includes a basic [SWT Browser widget](https://help.eclipse.org/2020-12/topic/org.eclipse.platform.doc.isv/reference/api/org/eclipse/swt/browser/Browser.html), which can load URLs or render HTML. It supports WebKit (default on Mac/Linux), Edge (default on Windows), and IE (pass SWT style `:none` to activate on Windows) browsers out of the box. Its JavaScript engine can even be instrumented with Ruby code if needed.
|
1083
1083
|
|
1084
1084
|
Example loading a URL (you may copy/paste in [`girb`](GLIMMER_GIRB.md)):
|
1085
1085
|
|
data/glimmer-dsl-swt.gemspec
CHANGED
Binary file
|
@@ -1,5 +1,5 @@
|
|
1
1
|
# Copyright (c) 2007-2022 Andy Maleh
|
2
|
-
#
|
2
|
+
#
|
3
3
|
# Permission is hereby granted, free of charge, to any person obtaining
|
4
4
|
# a copy of this software and associated documentation files (the
|
5
5
|
# "Software"), to deal in the Software without restriction, including
|
@@ -7,10 +7,10 @@
|
|
7
7
|
# distribute, sublicense, and/or sell copies of the Software, and to
|
8
8
|
# permit persons to whom the Software is furnished to do so, subject to
|
9
9
|
# the following conditions:
|
10
|
-
#
|
10
|
+
#
|
11
11
|
# The above copyright notice and this permission notice shall be
|
12
12
|
# included in all copies or substantial portions of the Software.
|
13
|
-
#
|
13
|
+
#
|
14
14
|
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
15
|
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
16
|
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
@@ -1,5 +1,5 @@
|
|
1
1
|
# Copyright (c) 2007-2022 Andy Maleh
|
2
|
-
#
|
2
|
+
#
|
3
3
|
# Permission is hereby granted, free of charge, to any person obtaining
|
4
4
|
# a copy of this software and associated documentation files (the
|
5
5
|
# "Software"), to deal in the Software without restriction, including
|
@@ -7,10 +7,10 @@
|
|
7
7
|
# distribute, sublicense, and/or sell copies of the Software, and to
|
8
8
|
# permit persons to whom the Software is furnished to do so, subject to
|
9
9
|
# the following conditions:
|
10
|
-
#
|
10
|
+
#
|
11
11
|
# The above copyright notice and this permission notice shall be
|
12
12
|
# included in all copies or substantial portions of the Software.
|
13
|
-
#
|
13
|
+
#
|
14
14
|
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
15
|
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
16
|
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
@@ -23,7 +23,7 @@ require_relative "contact_repository"
|
|
23
23
|
|
24
24
|
class ContactManager
|
25
25
|
class ContactManagerPresenter
|
26
|
-
attr_accessor :results
|
26
|
+
attr_accessor :results, :selected_contact
|
27
27
|
@@contact_attributes = [:first_name, :last_name, :email]
|
28
28
|
@@contact_attributes.each {|attribute_name| attr_accessor attribute_name}
|
29
29
|
|
@@ -33,15 +33,45 @@ class ContactManager
|
|
33
33
|
end
|
34
34
|
|
35
35
|
def list
|
36
|
-
|
36
|
+
@applied_filter = {}
|
37
|
+
filter
|
37
38
|
end
|
38
39
|
|
39
40
|
def find
|
40
|
-
|
41
|
+
@applied_filter = fields
|
42
|
+
filter
|
43
|
+
end
|
44
|
+
|
45
|
+
def filter
|
46
|
+
self.results = @contact_repository.find(@applied_filter)
|
47
|
+
end
|
48
|
+
|
49
|
+
def fields
|
50
|
+
filters = {}
|
41
51
|
@@contact_attributes.each do |attribute_name|
|
42
|
-
|
52
|
+
filters[attribute_name] = self.send(attribute_name) if self.send(attribute_name)
|
43
53
|
end
|
44
|
-
|
54
|
+
filters
|
55
|
+
end
|
56
|
+
|
57
|
+
def clear_fields
|
58
|
+
@@contact_attributes.each do |attribute_name|
|
59
|
+
self.send("#{attribute_name}=", '')
|
60
|
+
end
|
61
|
+
end
|
62
|
+
|
63
|
+
def create
|
64
|
+
created_contact = @contact_repository.create(fields)
|
65
|
+
filter
|
66
|
+
clear_fields
|
67
|
+
created_contact
|
68
|
+
end
|
69
|
+
|
70
|
+
def delete
|
71
|
+
deleted_contact = @contact_repository.delete(@selected_contact)
|
72
|
+
filter
|
73
|
+
self.selected_contact = nil
|
74
|
+
deleted_contact
|
45
75
|
end
|
46
76
|
end
|
47
77
|
end
|
@@ -1,5 +1,5 @@
|
|
1
1
|
# Copyright (c) 2007-2022 Andy Maleh
|
2
|
-
#
|
2
|
+
#
|
3
3
|
# Permission is hereby granted, free of charge, to any person obtaining
|
4
4
|
# a copy of this software and associated documentation files (the
|
5
5
|
# "Software"), to deal in the Software without restriction, including
|
@@ -7,10 +7,10 @@
|
|
7
7
|
# distribute, sublicense, and/or sell copies of the Software, and to
|
8
8
|
# permit persons to whom the Software is furnished to do so, subject to
|
9
9
|
# the following conditions:
|
10
|
-
#
|
10
|
+
#
|
11
11
|
# The above copyright notice and this permission notice shall be
|
12
12
|
# included in all copies or substantial portions of the Software.
|
13
|
-
#
|
13
|
+
#
|
14
14
|
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
15
|
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
16
|
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
@@ -165,5 +165,15 @@ class ContactManager
|
|
165
165
|
match
|
166
166
|
end
|
167
167
|
end
|
168
|
+
|
169
|
+
def create(attributes)
|
170
|
+
created_contact = Contact.new(attributes)
|
171
|
+
@contacts << created_contact
|
172
|
+
created_contact
|
173
|
+
end
|
174
|
+
|
175
|
+
def delete(contact)
|
176
|
+
@contacts.delete(contact)
|
177
|
+
end
|
168
178
|
end
|
169
179
|
end
|
@@ -96,6 +96,18 @@ class ContactManager
|
|
96
96
|
horizontal_span 2
|
97
97
|
}
|
98
98
|
|
99
|
+
button {
|
100
|
+
text "&Create"
|
101
|
+
|
102
|
+
on_widget_selected do
|
103
|
+
create_contact
|
104
|
+
end
|
105
|
+
|
106
|
+
on_key_pressed do |key_event|
|
107
|
+
create_contact if key_event.keyCode == swt(:cr)
|
108
|
+
end
|
109
|
+
}
|
110
|
+
|
99
111
|
button {
|
100
112
|
text "&Find"
|
101
113
|
|
@@ -122,7 +134,7 @@ class ContactManager
|
|
122
134
|
}
|
123
135
|
}
|
124
136
|
|
125
|
-
table(:editable, :border) { |table_proxy|
|
137
|
+
@table = table(:editable, :border) { |table_proxy|
|
126
138
|
layout_data {
|
127
139
|
horizontal_alignment :fill
|
128
140
|
vertical_alignment :fill
|
@@ -144,7 +156,18 @@ class ContactManager
|
|
144
156
|
width 200
|
145
157
|
}
|
146
158
|
|
159
|
+
menu {
|
160
|
+
menu_item {
|
161
|
+
text '&Delete'
|
162
|
+
|
163
|
+
on_widget_selected do
|
164
|
+
@contact_manager_presenter.delete
|
165
|
+
end
|
166
|
+
}
|
167
|
+
}
|
168
|
+
|
147
169
|
items <=> [@contact_manager_presenter, :results]
|
170
|
+
selection <=> [@contact_manager_presenter, :selected_contact]
|
148
171
|
|
149
172
|
on_mouse_up do |event|
|
150
173
|
table_proxy.edit_table_item(event.table_item, event.column_index)
|
@@ -153,6 +176,16 @@ class ContactManager
|
|
153
176
|
}
|
154
177
|
}
|
155
178
|
}
|
179
|
+
|
180
|
+
def create_contact
|
181
|
+
created_contact = @contact_manager_presenter.create
|
182
|
+
new_item = @table.search do |table_item|
|
183
|
+
model = table_item.data # get model embodied by table item
|
184
|
+
created_contact == model
|
185
|
+
end.first
|
186
|
+
@table.setSelection(new_item) # set selection with Table SWT API
|
187
|
+
@table.showSelection # show selection with Table SWT API
|
188
|
+
end
|
156
189
|
end
|
157
190
|
|
158
191
|
ContactManager.launch
|
data/vendor/swt/linux/swt.jar
CHANGED
Binary file
|
Binary file
|
data/vendor/swt/mac/swt.jar
CHANGED
Binary file
|
Binary file
|
data/vendor/swt/windows/swt.jar
CHANGED
Binary file
|
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.
|
4
|
+
version: 4.25.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andy Maleh
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-10-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|
@@ -344,7 +344,7 @@ dependencies:
|
|
344
344
|
version: 0.14.1.cr2
|
345
345
|
description: Glimmer DSL for SWT (JRuby Desktop Development GUI Framework) is a native-GUI
|
346
346
|
cross-platform desktop development library written in JRuby, an OS-threaded faster
|
347
|
-
JVM version of Ruby. It includes SWT 4.
|
347
|
+
JVM version of Ruby. It includes SWT 4.25 (released 31 Aug 2022). Glimmer's main
|
348
348
|
innovation is a declarative Ruby DSL that enables productive and efficient authoring
|
349
349
|
of desktop application user-interfaces by relying on the robust Eclipse SWT library.
|
350
350
|
Glimmer additionally innovates by having built-in data-binding support, which greatly
|