glimmer-dsl-swt 4.24.0.0 → 4.24.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 +7 -0
- data/README.md +6 -6
- data/VERSION +1 -1
- data/glimmer-dsl-swt.gemspec +0 -0
- data/lib/glimmer/swt/custom/shape.rb +5 -2
- data/samples/elaborate/game_of_life.rb +2 -2
- data/samples/elaborate/meta_sample/tutorials.yml +3 -0
- data/samples/hello/hello_canvas_drag_and_drop.rb +31 -2
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c637efeb5ad59518aa1929c81cd53967df42d6a2085ae777cfb366ddf7022418
|
4
|
+
data.tar.gz: c6f2aa15e48d2f0cfae428894ef85fb8a251f8574a0df55b9a0ade3a4a8d3b43
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dca42a5d1f7f78bdb866995c66aacc164b9b44881a16c5cca5949b88b2b4948700860fa27fdf168c21ef4ab6dd90b2d053282070bddb1693256656683e1d970e
|
7
|
+
data.tar.gz: b159b74c670e2363335043d538c188af59c3fd8da288340c6f47feecbad9cfb27cb01a54bd0e318e5cd83290290c9f8832c6171e0bd8b24ea14fffbc9dabdfdf
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,12 @@
|
|
1
1
|
# Change Log
|
2
2
|
|
3
|
+
## 4.24.0.1
|
4
|
+
|
5
|
+
- Support declaratively setting shape data via `data` property
|
6
|
+
- Update Hello, Canvas Drag and Drop! sample to set data in draggable shapes for a more sophisticated drag and drop example
|
7
|
+
- Refactor Game of Life sample
|
8
|
+
- Hello, Drag and Drop!, Hello, Canvas Drag and Drop!, and Game of Life Video Tutorials added to Glimmer Meta-Sample
|
9
|
+
|
3
10
|
## 4.24.0.0
|
4
11
|
|
5
12
|
- Upgrade to SWT 4.24
|
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.24.0.
|
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.24.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)
|
@@ -19,7 +19,7 @@ Featured in JRuby Cookbook](http://shop.oreilly.com/product/9780596519650.do) an
|
|
19
19
|
|
20
20
|
![Eclipse SWT RCP NASA Mars Rover](/images/glimmer-eclipse-swt-rcp-nasa-mars-rover.png)
|
21
21
|
|
22
|
-
[Glimmer DSL for SWT](https://rubygems.org/gems/glimmer-dsl-swt) 4.24.0.
|
22
|
+
[Glimmer DSL for SWT](https://rubygems.org/gems/glimmer-dsl-swt) 4.24.0.1 includes [SWT 4.24](https://download.eclipse.org/eclipse/downloads/drops4/R-4.24-202206070700/), which was released on June 7, 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.
|
23
23
|
|
24
24
|
**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).
|
25
25
|
|
@@ -301,7 +301,7 @@ https://www.eclipse.org/swt/faq.php
|
|
301
301
|
|
302
302
|
## Pre-requisites
|
303
303
|
|
304
|
-
- JDK 18 is recommended / JDK 16
|
304
|
+
- JDK 18 is recommended / Minimum is JDK 16 on x64 platforms and Linux AARCH64, and JDK 17 on Mac ARM64 (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)
|
305
305
|
- [RVM](http://rvm.io) on Mac & Linux (not needed on Windows)
|
306
306
|
- JRuby 9.3.4.0 (supporting Ruby 2.6.x syntax) (get via [RVM](http://rvm.io) on Mac and Linux by running `rvm install jruby-9.3.4.0`; On Windows, find at [https://www.jruby.org/download](https://www.jruby.org/download))
|
307
307
|
- SWT 4.24 (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
|
@@ -333,7 +333,7 @@ jgem install glimmer-dsl-swt
|
|
333
333
|
|
334
334
|
Or this command if you want a specific version:
|
335
335
|
```
|
336
|
-
jgem install glimmer-dsl-swt -v 4.24.0.
|
336
|
+
jgem install glimmer-dsl-swt -v 4.24.0.1
|
337
337
|
```
|
338
338
|
|
339
339
|
`jgem` is JRuby's version of `gem` command.
|
@@ -361,7 +361,7 @@ Note: if you're using activerecord or activesupport, keep in mind that Glimmer u
|
|
361
361
|
|
362
362
|
Add the following to `Gemfile`:
|
363
363
|
```
|
364
|
-
gem 'glimmer-dsl-swt', '~> 4.24.0.
|
364
|
+
gem 'glimmer-dsl-swt', '~> 4.24.0.1'
|
365
365
|
```
|
366
366
|
|
367
367
|
And, then run:
|
@@ -384,7 +384,7 @@ glimmer
|
|
384
384
|
```
|
385
385
|
|
386
386
|
```
|
387
|
-
Glimmer (JRuby Desktop Development GUI Framework) - JRuby Gem: glimmer-dsl-swt v4.24.0.
|
387
|
+
Glimmer (JRuby Desktop Development GUI Framework) - JRuby Gem: glimmer-dsl-swt v4.24.0.1
|
388
388
|
|
389
389
|
Usage: glimmer [--bundler] [--pd] [--quiet] [--debug] [--log-level=VALUE] [[ENV_VAR=VALUE]...] [[-jruby-option]...] (application.rb or task[task_args]) [[application2.rb]...]
|
390
390
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
4.24.0.
|
1
|
+
4.24.0.1
|
data/glimmer-dsl-swt.gemspec
CHANGED
Binary file
|
@@ -562,7 +562,8 @@ module Glimmer
|
|
562
562
|
end
|
563
563
|
|
564
564
|
def has_attribute?(attribute_name, *args)
|
565
|
-
|
565
|
+
attribute_name == 'data' or
|
566
|
+
self.class.gc_instance_methods.include?(attribute_setter(attribute_name)) or
|
566
567
|
parameter_name?(attribute_name) or
|
567
568
|
(respond_to?(attribute_name, super: true) and respond_to?(ruby_attribute_setter(attribute_name), super: true))
|
568
569
|
end
|
@@ -577,7 +578,9 @@ module Glimmer
|
|
577
578
|
property_change = nil
|
578
579
|
ruby_attribute_getter_name = ruby_attribute_getter(attribute_name)
|
579
580
|
ruby_attribute_setter_name = ruby_attribute_setter(attribute_name)
|
580
|
-
if
|
581
|
+
if attribute_name == 'data'
|
582
|
+
set_data(*args)
|
583
|
+
elsif parameter_name?(attribute_name)
|
581
584
|
return if ruby_attribute_getter_name == (args.size == 1 ? args.first : args)
|
582
585
|
set_parameter_attribute(ruby_attribute_getter_name, *args)
|
583
586
|
elsif (respond_to?(attribute_name, super: true) and respond_to?(ruby_attribute_setter_name, super: true))
|
@@ -48,7 +48,7 @@ class GameOfLife
|
|
48
48
|
(0...HEIGHT).each do |row_index|
|
49
49
|
(0...WIDTH).each do |column_index|
|
50
50
|
rectangle(column_index*CELL_WIDTH, row_index*CELL_HEIGHT, CELL_WIDTH, CELL_HEIGHT) {
|
51
|
-
background <= [@grid.cell_rows[row_index][column_index],
|
51
|
+
background <= [@grid.cell_rows[row_index][column_index], :alive, on_read: ->(a) {a ? :black : :white}]
|
52
52
|
|
53
53
|
on_mouse_down do
|
54
54
|
@grid.cell_rows[row_index][column_index].toggle_aliveness!
|
@@ -59,7 +59,7 @@ class GameOfLife
|
|
59
59
|
end
|
60
60
|
|
61
61
|
on_mouse_move do
|
62
|
-
@grid.cell_rows[row_index][column_index].
|
62
|
+
@grid.cell_rows[row_index][column_index].live! if @drag_detected
|
63
63
|
end
|
64
64
|
|
65
65
|
on_mouse_up do
|
@@ -1,3 +1,24 @@
|
|
1
|
+
# Copyright (c) 2007-2022 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
|
+
|
1
22
|
require 'glimmer-dsl-swt'
|
2
23
|
|
3
24
|
class HelloCanvasDragAndDrop
|
@@ -27,7 +48,9 @@ class HelloCanvasDragAndDrop
|
|
27
48
|
background :white
|
28
49
|
|
29
50
|
10.times do |n|
|
30
|
-
|
51
|
+
value = rand(10)
|
52
|
+
oval((rand*300).to_i, (rand*200).to_i, 50, 50) {
|
53
|
+
data 'value', value
|
31
54
|
background rgb(255, 165, 0)
|
32
55
|
|
33
56
|
# declare shape as a drag source, which unlike `drag_and_move true`, it means the shape now
|
@@ -38,6 +61,12 @@ class HelloCanvasDragAndDrop
|
|
38
61
|
oval(0, 0) {
|
39
62
|
foreground :black
|
40
63
|
}
|
64
|
+
|
65
|
+
text {
|
66
|
+
x :default
|
67
|
+
y :default
|
68
|
+
string value.to_s
|
69
|
+
}
|
41
70
|
}
|
42
71
|
end
|
43
72
|
|
@@ -70,7 +99,7 @@ class HelloCanvasDragAndDrop
|
|
70
99
|
@number_shape = text {
|
71
100
|
x :default
|
72
101
|
y :default
|
73
|
-
string (ball_count +
|
102
|
+
string (ball_count + drop_event.dragged_shape.get_data('value')).to_s
|
74
103
|
}
|
75
104
|
}
|
76
105
|
drop_event.dragged_shape.dispose
|
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.24.0.
|
4
|
+
version: 4.24.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-07-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|
@@ -328,6 +328,20 @@ dependencies:
|
|
328
328
|
- - "~>"
|
329
329
|
- !ruby/object:Gem::Version
|
330
330
|
version: 0.7.0
|
331
|
+
- !ruby/object:Gem::Dependency
|
332
|
+
requirement: !ruby/object:Gem::Requirement
|
333
|
+
requirements:
|
334
|
+
- - ">="
|
335
|
+
- !ruby/object:Gem::Version
|
336
|
+
version: 0.14.1.cr2
|
337
|
+
name: jruby-openssl
|
338
|
+
prerelease: false
|
339
|
+
type: :development
|
340
|
+
version_requirements: !ruby/object:Gem::Requirement
|
341
|
+
requirements:
|
342
|
+
- - ">="
|
343
|
+
- !ruby/object:Gem::Version
|
344
|
+
version: 0.14.1.cr2
|
331
345
|
description: Glimmer DSL for SWT (JRuby Desktop Development GUI Framework) is a native-GUI
|
332
346
|
cross-platform desktop development library written in JRuby, an OS-threaded faster
|
333
347
|
JVM version of Ruby. It includes SWT 4.22 (released November 24, 2021). Glimmer's
|