glimmer-dsl-swt 4.23.1.3 → 4.24.0.0

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: c56f6eab2f22aaac950b9e566a79c94bdd0f39085de6e4e8221a76883e8a8f05
4
- data.tar.gz: 8af3b454dd1c3e921530f70b7771e2bd4261d16eb733c312e8e79eee29a8d420
3
+ metadata.gz: 1a25afed6b0f4010952764759059e90443cce1bd9f88c44bbd2d547321716413
4
+ data.tar.gz: f60fc6cbfb12a5119480730ee0024dd445ef2821bdcb8a029eaf7fcc8f0aba2d
5
5
  SHA512:
6
- metadata.gz: 9e602c4e3b8cba6ea17509be4b015a44e6e9587f2f57d569e24592b4162d168f00df1466b057027c399733c8960117b8742020efb8e6603ba34569aa42c3554e
7
- data.tar.gz: 491bbfbaa41427da7a172c5990b5579b1570314b4e20152e1e79937985def33c03367f4d4f27ca7f8b514c9fc19d8511c4b22f7f6a2cbbe26175ce15a027fa26
6
+ metadata.gz: e13cf0dd856101fee5858774a859ef463ca03a9e032f5923e69d8f0333cc62624631a35bdfd19203f0b27347a983be18708474452ba3f195616610de7b77c8e8
7
+ data.tar.gz: 714d7c2457fb33a5da576c1f0c5d1e7b04f459a159d0c132ff2abf4af064bfba0db5791ec5cc2509933cbc375449b30572c9f61d5dfea3f86a80641ba4bc2512
data/CHANGELOG.md CHANGED
@@ -1,5 +1,20 @@
1
1
  # Change Log
2
2
 
3
+ ## 4.24.0.0
4
+
5
+ - Upgrade to SWT 4.24
6
+
7
+ ## 4.23.1.5
8
+
9
+ - Refactor/Improve the Hello, Cursor! sample
10
+ - Add Hello, Cursor! video tutorial to Glimmer Meta-Sample
11
+
12
+ ## 4.23.1.4
13
+
14
+ - Improve convenience by making `sash_form` accept `orientation` with SWT style symbols directly (`:horizontal` directly instead of `swt(:horizontal)`)
15
+ - Improve convenience by making `sash_form` accept `maximized_control` as Glimmer DSL for SWT widget proxy instead of low-level SWT widget (`@label` instead of `@label.swt_widget`)
16
+ - Update Hello, Sash Form! to add Sash Color and simplify with new `sash_form` improvements
17
+
3
18
  ## 4.23.1.3
4
19
 
5
20
  - Update initial tab folder width in Weather sample
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.23.1.3
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.0
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,9 +19,9 @@ 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.23.1.3 includes [SWT 4.23](https://download.eclipse.org/eclipse/downloads/drops4/R-4.23-202203080310/), which was released on March 8, 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.
22
+ [Glimmer DSL for SWT](https://rubygems.org/gems/glimmer-dsl-swt) 4.24.0.0 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
- **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.
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
 
26
26
  Please help make [Glimmer DSL for SWT](https://rubygems.org/gems/glimmer-dsl-swt) better by providing feedback and [contributing](#contributing) whenever possible. Any feature suggestions that are accepted could be implemented within weeks if not days.
27
27
 
@@ -278,7 +278,7 @@ Audio is supported via the Java Sound library in a cross-platform approach and v
278
278
 
279
279
  ### Remaining Challenges
280
280
 
281
- Startup time is long. Thankfully, [there are work-arounds](https://andymaleh.blogspot.com/2021/03/glimmer-dsl-for-swt-41900-halved.html) that could make apps start as fast as instantly.
281
+ JRuby startup time is longer than that of CRuby, but has gotten a lot faster with newer CPUs, especially the latest Mac ARM64 processors. Thankfully, [there are work-arounds](https://andymaleh.blogspot.com/2021/03/glimmer-dsl-for-swt-41900-halved.html) that could make apps start as fast as instantly when needed.
282
282
 
283
283
  Contributors who appreciate Glimmer's ultra-high productivity, maintainability, and extensibility might want to help report and resolve remaining challenges in its software architecture.
284
284
 
@@ -301,10 +301,10 @@ https://www.eclipse.org/swt/faq.php
301
301
 
302
302
  ## Pre-requisites
303
303
 
304
- - JDK 18 (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)
304
+ - JDK 18 is recommended / JDK 16 is the minimum needed (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
- - SWT 4.23 (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
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
308
308
  - Git (comes with Mac and Linux. Install on Windows: https://git-scm.com/download/win )
309
309
 
310
310
  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.
@@ -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.23.1.3
336
+ jgem install glimmer-dsl-swt -v 4.24.0.0
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.23.1.3'
364
+ gem 'glimmer-dsl-swt', '~> 4.24.0.0'
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.23.1.3
387
+ Glimmer (JRuby Desktop Development GUI Framework) - JRuby Gem: glimmer-dsl-swt v4.24.0.0
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.23.1.3
1
+ 4.24.0.0
@@ -940,7 +940,7 @@ The system tray allows showing icons for various apps that need to stay on for e
940
940
 
941
941
  In Glimmer DSL for SWT, generating tray items is automated via the `tray_item` keyword, which can be nested under `shell` and then have a child `menu` underneath that pops up when the user clicks on its icon in the system tray. It is recommended that the related shell is declared with the `:on_top` style (in addition to the default style `:shell_trim`) to ensure it opens above all apps when shown.
942
942
 
943
- Note that if you would like to display notifications, you can use the [Nebula Notifier custom widget](https://github.com/AndyObtiva/glimmer-cw-nebula#notifier). Alternatively, you can look into the [Two Slices](https://github.com/sshtools/two-slices) Java library.
943
+ Note that if you would like to display notifications, you can use the [JFace Notification API](https://help.eclipse.org/latest/topic/org.eclipse.platform.doc.isv/reference/api/org/eclipse/jface/notifications/NotificationPopup.html) and new [JFace Notification builder](https://www.eclipse.org/eclipse/news/4.23/platform_isv.php#notification-api), the [Nebula Notifier custom widget](https://github.com/AndyObtiva/glimmer-cw-nebula#notifier), or the [Two Slices](https://github.com/sshtools/two-slices) Java library.
944
944
 
945
945
  Example code:
946
946
 
@@ -84,6 +84,7 @@
84
84
  - [Glimmer Calculator](#glimmer-calculator)
85
85
  - [Gladiator](#gladiator)
86
86
  - [Timer](#timer)
87
+ - [Contact Manager App](#contact-manager-app)
87
88
  - [License](#license)
88
89
 
89
90
  ## Samples
@@ -1429,11 +1430,11 @@ Gladiator is a good demonstration of:
1429
1430
 
1430
1431
  [<img src="https://raw.githubusercontent.com/AndyObtiva/glimmer-cs-timer/master/glimmer-timer-screenshot.png" />](https://github.com/AndyObtiva/glimmer-cs-timer)
1431
1432
 
1432
- #### Contact Manager
1433
+ #### Contact Manager App
1433
1434
 
1434
- [<img src="https://raw.githubusercontent.com/AndyObtiva/contact_manager/master/icons/linux/Contact%20Manager.png" height=40 /> Contact Manager](https://github.com/AndyObtiva/contact_manager) is an enhanced version of the included Contact Manager elaborate sample, which demonstrates how to connect to a [SQLite database](https://www.sqlite.org/index.html) with [ActiveRecord](https://rubygems.org/gems/activerecord).
1435
+ [<img src="https://raw.githubusercontent.com/AndyObtiva/contact_manager/master/icons/linux/Contact%20Manager.png" height=40 /> Contact Manager](https://github.com/AndyObtiva/contact_manager) is an enhanced version of the included Contact Manager elaborate sample, which demonstrates how to connect to a [SQLite database](https://www.sqlite.org/index.html) with [ActiveRecord](https://rubygems.org/gems/activerecord) and how to implement a [Master-Detail Interface](https://en.wikipedia.org/wiki/Master%E2%80%93detail_interface) following the [Model-View-Presenter Pattern](https://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93presenter). This version can also be packaged as a native executable (DMG/MSI/DEB/RPM).
1435
1436
 
1436
- [<img src="https://raw.githubusercontent.com/AndyObtiva/contact_manager/master/screenshots/contact-manager.png" /> ](https://github.com/AndyObtiva/contact_manager)
1437
+ [<img src="https://raw.githubusercontent.com/AndyObtiva/contact_manager/master/screenshots/contact-manager.gif" /> ](https://github.com/AndyObtiva/contact_manager)
1437
1438
 
1438
1439
  ## License
1439
1440
 
Binary file
@@ -74,9 +74,6 @@ module Glimmer
74
74
  DisplayProxy.instance.auto_exec { parent.swt_widget.setMenuBar(swt_widget) }
75
75
  elsif styles.include?(:pop_up)
76
76
  if parent.swt_widget.is_a?(TrayItem)
77
- parent.on_widget_selected {
78
- self.visible = true
79
- }
80
77
  parent.on_menu_detected {
81
78
  self.visible = true
82
79
  }
@@ -1141,6 +1141,14 @@ module Glimmer
1141
1141
  items: lambda do |value|
1142
1142
  value.to_java :string
1143
1143
  end,
1144
+ maximized_control: lambda do |value|
1145
+ value = (value.respond_to?(:swt_widget) ? value.swt_widget : value) if swt_widget.is_a?(SashForm)
1146
+ value
1147
+ end,
1148
+ orientation: lambda do |value|
1149
+ value = SWTProxy[value] if swt_widget.is_a?(SashForm)
1150
+ value
1151
+ end,
1144
1152
  selection: lambda do |value|
1145
1153
  value = value.to_f if swt_widget.is_a?(Spinner)
1146
1154
  value
@@ -35,7 +35,7 @@ class GameOfLife
35
35
  def initialize(row_count=DEFAULT_ROW_COUNT, column_count=DEFAULT_COLUMN_COUNT)
36
36
  @row_count = row_count
37
37
  @column_count = column_count
38
- @speed = 1.0
38
+ @speed = 10.0
39
39
  build_cells
40
40
  end
41
41
 
@@ -53,6 +53,18 @@ class GameOfLife
53
53
  on_mouse_down do
54
54
  @grid.cell_rows[row_index][column_index].toggle_aliveness!
55
55
  end
56
+
57
+ on_drag_detected do
58
+ @drag_detected = true
59
+ end
60
+
61
+ on_mouse_move do
62
+ @grid.cell_rows[row_index][column_index].alive = true if @drag_detected
63
+ end
64
+
65
+ on_mouse_up do
66
+ @drag_detected = false
67
+ end
56
68
  }
57
69
  end
58
70
  end
@@ -17,3 +17,5 @@ Hello, Menu Bar!: 3RRVFIfA_UM
17
17
  Weather: rC6x6aj1MdA
18
18
  Hello, Date Time!: MpXbPEMUrns
19
19
  Hello, Sash Form!: F7j2TTpbX6s
20
+ Hello, Cursor!: 4AYlo8n3WFc
21
+ Hello, Tray Item!: VYXgIr5zxMM
@@ -48,7 +48,7 @@ class Sample
48
48
  end
49
49
 
50
50
  def tutorials
51
- if remote_tutorials && !remote_tutorials.empty? && remote_tutorials != local_tutorials
51
+ if remote_tutorials && !remote_tutorials.empty? && remote_tutorials.size >= local_tutorials.size
52
52
  remote_tutorials
53
53
  else
54
54
  local_tutorials
@@ -23,27 +23,25 @@ require 'glimmer-dsl-swt'
23
23
 
24
24
  class HelloCursor
25
25
  include Glimmer::UI::CustomShell
26
-
26
+
27
27
  attr_accessor :selected_cursor
28
-
28
+
29
29
  # This method matches the name of the :selected_cursor property by convention
30
30
  def selected_cursor_options
31
31
  Glimmer::SWT::SWTProxy.cursor_options
32
32
  end
33
-
34
- after_body do
35
- observe(self, :selected_cursor) {
36
- body_root.cursor = selected_cursor
37
- }
33
+
34
+ before_body do
35
+ self.selected_cursor = :arrow
38
36
  end
39
-
37
+
40
38
  body {
41
39
  shell {
42
40
  grid_layout
43
-
41
+
44
42
  text 'Hello, Cursor!'
45
- cursor :wait
46
-
43
+ cursor <= [self, :selected_cursor]
44
+
47
45
  label {
48
46
  text 'Please select a cursor style and see it change the mouse cursor (varies per platform):'
49
47
  font style: :bold
@@ -22,22 +22,15 @@
22
22
  require 'glimmer-dsl-swt'
23
23
 
24
24
  class SashFormPresenter
25
- include Glimmer
26
-
27
- attr_accessor :sash_width, :orientation, :orientation_style
25
+ attr_accessor :sash_width, :sash_color, :orientation
28
26
 
29
27
  def initialize
30
- @sash_width = 10
31
- self.orientation = 'horizontal'
28
+ self.sash_width = 10
29
+ self.orientation = :horizontal
32
30
  end
33
31
 
34
32
  def orientation_options
35
- ['horizontal', 'vertical']
36
- end
37
-
38
- def orientation=(value)
39
- @orientation = value
40
- self.orientation_style = swt(@orientation)
33
+ [:horizontal, :vertical]
41
34
  end
42
35
  end
43
36
 
@@ -55,7 +48,8 @@ shell {
55
48
  height_hint 200
56
49
  }
57
50
  sash_width <=> [@presenter, :sash_width]
58
- orientation <=> [@presenter, :orientation_style]
51
+ background <=> [@presenter, :sash_color]
52
+ orientation <=> [@presenter, :orientation]
59
53
  weights 1, 2
60
54
 
61
55
  @green_label = label {
@@ -90,6 +84,20 @@ shell {
90
84
  font height: 16
91
85
  }
92
86
 
87
+ label {
88
+ layout_data(:right, :center, true, false)
89
+ text 'Sash Color:'
90
+ font height: 16
91
+ }
92
+ button {
93
+ layout_data :fill, :center, true, false
94
+ text "Choose Color..."
95
+
96
+ on_widget_selected do
97
+ @presenter.sash_color = color_dialog.open
98
+ end
99
+ }
100
+
93
101
  label {
94
102
  layout_data(:right, :center, true, false)
95
103
  text 'Orientation:'
@@ -110,7 +118,7 @@ shell {
110
118
  font height: 16
111
119
 
112
120
  on_widget_selected do
113
- @sash_form.maximized_control = @green_label.swt_widget
121
+ @sash_form.maximized_control = @green_label
114
122
  end
115
123
  }
116
124
  button {
@@ -120,7 +128,7 @@ shell {
120
128
  font height: 16
121
129
 
122
130
  on_widget_selected do
123
- @sash_form.maximized_control = @red_label.swt_widget
131
+ @sash_form.maximized_control = @red_label
124
132
  end
125
133
  }
126
134
 
@@ -105,12 +105,6 @@ class HelloTrayItem
105
105
  }
106
106
 
107
107
  # supported tray item listeners (you can try to add actions to them when needed)
108
- # on_swt_Show do
109
- # end
110
- #
111
- # on_swt_Hide do
112
- # end
113
- #
114
108
  # on_widget_selected do
115
109
  # end
116
110
  #
Binary file
Binary file
Binary file
Binary file
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.23.1.3
4
+ version: 4.24.0.0
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-06-02 00:00:00.000000000 Z
11
+ date: 2022-06-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement