glimmer-dsl-swt 4.17.10.3 → 4.17.10.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/README.md +5 -14
- data/VERSION +1 -1
- data/glimmer-dsl-swt.gemspec +5 -5
- data/lib/glimmer/data_binding/table_items_binding.rb +8 -9
- data/lib/glimmer/data_binding/tree_items_binding.rb +7 -7
- data/lib/glimmer/swt/table_proxy.rb +14 -14
- data/samples/hello/hello_table.rb +0 -4
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1fb2ca2da3bc7253db8416bc1395423988fee5296324c89fa06d380cb568f28e
|
4
|
+
data.tar.gz: 3924772c16691aafe3a8cdcdc05ef0e9aa566a6843642a987e7ac0e7348c63ec
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 38e692d156d993f29e9b362e8beb34c03eeb933b0d89a1d29c957e033da6f2356408032c03a2e3cfb69d66c0feb1f5c1b863705c40e2ddf55f2282efdf2d18d0
|
7
|
+
data.tar.gz: f9c23c58000fc174b8e6c83b430f117b4ed08ab305510a1f3ee7e1262af6ddb5105e60208be95a92d2bf5adb38501822fe9a8d1bde8fb25f3ee4b70047643858
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,11 @@
|
|
1
1
|
# Change Log
|
2
2
|
|
3
|
+
### 4.17.10.4
|
4
|
+
|
5
|
+
- Do not select first row in a table by default (keep unselected)
|
6
|
+
- Prevented extra call to model data in table items data-binding
|
7
|
+
- Upgraded to glimmer v1.0.5
|
8
|
+
|
3
9
|
### 4.17.10.3
|
4
10
|
|
5
11
|
- Fixed issue in StyledText data-binding relating to capturing selection changes on mouse click
|
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.17.10.
|
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.17.10.4
|
2
2
|
|
3
3
|
## JRuby Desktop Development GUI Framework
|
4
4
|
[![Gem Version](https://badge.fury.io/rb/glimmer-dsl-swt.svg)](http://badge.fury.io/rb/glimmer-dsl-swt)
|
@@ -353,7 +353,6 @@ Glimmer App:
|
|
353
353
|
- [Hello, Expand Bar!](#hello-expand-bar)
|
354
354
|
- [Hello, Radio!](#hello-radio)
|
355
355
|
- [Hello, Radio Group!](#hello-radio-group)
|
356
|
-
- [Hello, Checkbox!](#hello-checkbox)
|
357
356
|
- [Hello, Group!](#hello-group)
|
358
357
|
- [Hello, Checkbox!](#hello-checkbox)
|
359
358
|
- [Hello, Checkbox Group!](#hello-checkbox-group)
|
@@ -455,7 +454,7 @@ jgem install glimmer-dsl-swt
|
|
455
454
|
|
456
455
|
Or this command if you want a specific version:
|
457
456
|
```
|
458
|
-
jgem install glimmer-dsl-swt -v 4.17.10.
|
457
|
+
jgem install glimmer-dsl-swt -v 4.17.10.4
|
459
458
|
|
460
459
|
```
|
461
460
|
|
@@ -532,7 +531,7 @@ bin/glimmer samples
|
|
532
531
|
Below are the full usage instructions that come up when running `glimmer` without args.
|
533
532
|
|
534
533
|
```
|
535
|
-
Glimmer (JRuby Desktop Development GUI Framework) - JRuby Gem: glimmer-dsl-swt v4.17.10.
|
534
|
+
Glimmer (JRuby Desktop Development GUI Framework) - JRuby Gem: glimmer-dsl-swt v4.17.10.4
|
536
535
|
|
537
536
|
|
538
537
|
Usage: glimmer [--bundler] [--pd] [--quiet] [--debug] [--log-level=VALUE] [[ENV_VAR=VALUE]...] [[-jruby-option]...] (application.rb or task[task_args]) [[application2.rb]...]
|
@@ -710,7 +709,7 @@ glimmer bin/greeter
|
|
710
709
|
|
711
710
|
#### Desktopify
|
712
711
|
|
713
|
-
This scaffolding mode enables you to desktopify a web app. Glimmer Scaffolding basically
|
712
|
+
This scaffolding mode enables you to desktopify a web app. Glimmer Scaffolding basically turns a website into a desktop application by wrapping the website with a [Browser Widget](#browser-widget).
|
714
713
|
|
715
714
|
The desktopify app is similar to the standard scaffolded app. It can be extended and the [browser may even be instrumented](https://help.eclipse.org/2020-09/topic/org.eclipse.platform.doc.isv/reference/api/org/eclipse/swt/browser/Browser.html).
|
716
715
|
|
@@ -1010,7 +1009,7 @@ Output:
|
|
1010
1009
|
|
1011
1010
|
Css glimmer-dsl-css 1.1.0 AndyMaleh Glimmer DSL for CSS
|
1012
1011
|
Opal glimmer-dsl-opal 0.4.0 AndyMaleh Glimmer DSL for Opal
|
1013
|
-
Swt glimmer-dsl-swt 4.17.10.
|
1012
|
+
Swt glimmer-dsl-swt 4.17.10.4
|
1014
1013
|
AndyMaleh Glimmer DSL for SWT
|
1015
1014
|
Tk glimmer-dsl-tk 0.0.6 AndyMaleh Glimmer DSL for Tk
|
1016
1015
|
Xml glimmer-dsl-xml 1.1.0 AndyMaleh Glimmer DSL for XML
|
@@ -3874,14 +3873,6 @@ Hello, Radio Group!
|
|
3874
3873
|
|
3875
3874
|
![Hello Radio Group](images/glimmer-hello-radio-group.png)
|
3876
3875
|
|
3877
|
-
#### Hello, Checkbox!
|
3878
|
-
|
3879
|
-
This sample demonstrates the use of a `checkbox` (aka `check` or `button(:check)`) in Glimmer.
|
3880
|
-
|
3881
|
-
Code:
|
3882
|
-
|
3883
|
-
[samples/hello/hello_checkbox.rb](https://github.com/AndyObtiva/glimmer-dsl-swt/blob/master/samples/hello/hello_checkbox.rb)
|
3884
|
-
|
3885
3876
|
#### Hello, Group!
|
3886
3877
|
|
3887
3878
|
This sample demonstrates the use of a `group` in Glimmer (not to be confused with the logical radio group custom widget, this is just an alternative to `composite` that provides a border around content).
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
4.17.10.
|
1
|
+
4.17.10.4
|
data/glimmer-dsl-swt.gemspec
CHANGED
@@ -2,16 +2,16 @@
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
3
|
# Instead, edit Juwelier::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
|
-
# stub: glimmer-dsl-swt 4.17.10.
|
5
|
+
# stub: glimmer-dsl-swt 4.17.10.4 ruby lib
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = "glimmer-dsl-swt".freeze
|
9
|
-
s.version = "4.17.10.
|
9
|
+
s.version = "4.17.10.4"
|
10
10
|
|
11
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
|
12
12
|
s.require_paths = ["lib".freeze]
|
13
13
|
s.authors = ["AndyMaleh".freeze]
|
14
|
-
s.date = "2020-
|
14
|
+
s.date = "2020-12-02"
|
15
15
|
s.description = "Glimmer DSL for SWT (JRuby Desktop Development GUI Library)".freeze
|
16
16
|
s.email = "andy.am@gmail.com".freeze
|
17
17
|
s.executables = ["glimmer".freeze, "girb".freeze]
|
@@ -172,7 +172,7 @@ Gem::Specification.new do |s|
|
|
172
172
|
end
|
173
173
|
|
174
174
|
if s.respond_to? :add_runtime_dependency then
|
175
|
-
s.add_runtime_dependency(%q<glimmer>.freeze, ["~> 1.0.
|
175
|
+
s.add_runtime_dependency(%q<glimmer>.freeze, ["~> 1.0.5"])
|
176
176
|
s.add_runtime_dependency(%q<super_module>.freeze, ["~> 1.4.1"])
|
177
177
|
s.add_runtime_dependency(%q<nested_inherited_jruby_include_package>.freeze, ["~> 0.3.0"])
|
178
178
|
s.add_runtime_dependency(%q<puts_debuggerer>.freeze, ["~> 0.10.2"])
|
@@ -191,7 +191,7 @@ Gem::Specification.new do |s|
|
|
191
191
|
s.add_development_dependency(%q<simplecov>.freeze, ["~> 0.16.1"])
|
192
192
|
s.add_development_dependency(%q<simplecov-lcov>.freeze, ["~> 0.7.0"])
|
193
193
|
else
|
194
|
-
s.add_dependency(%q<glimmer>.freeze, ["~> 1.0.
|
194
|
+
s.add_dependency(%q<glimmer>.freeze, ["~> 1.0.5"])
|
195
195
|
s.add_dependency(%q<super_module>.freeze, ["~> 1.4.1"])
|
196
196
|
s.add_dependency(%q<nested_inherited_jruby_include_package>.freeze, ["~> 0.3.0"])
|
197
197
|
s.add_dependency(%q<puts_debuggerer>.freeze, ["~> 0.10.2"])
|
@@ -38,16 +38,16 @@ module Glimmer
|
|
38
38
|
@model_binding = model_binding
|
39
39
|
@table.swt_widget.data = @model_binding
|
40
40
|
@column_properties = column_properties
|
41
|
+
@table.on_widget_disposed do |dispose_event|
|
42
|
+
unregister_all_observables
|
43
|
+
end
|
41
44
|
if @table.respond_to?(:column_properties=)
|
42
45
|
@table.column_properties = @column_properties
|
43
46
|
else # assume custom widget
|
44
47
|
@table.body_root.column_properties = @column_properties
|
45
48
|
end
|
46
|
-
call(@model_binding.evaluate_property)
|
47
49
|
@table_observer_registration = observe(model_binding)
|
48
|
-
|
49
|
-
unregister_all_observables
|
50
|
-
end
|
50
|
+
call
|
51
51
|
end
|
52
52
|
|
53
53
|
def call(new_model_collection=nil)
|
@@ -65,7 +65,7 @@ module Glimmer
|
|
65
65
|
end
|
66
66
|
|
67
67
|
def populate_table(model_collection, parent, column_properties)
|
68
|
-
selected_table_item_models = parent.swt_widget.getSelection.map(&:
|
68
|
+
selected_table_item_models = parent.swt_widget.getSelection.map(&:get_data)
|
69
69
|
parent.finish_edit!
|
70
70
|
parent.swt_widget.items.each(&:dispose)
|
71
71
|
parent.swt_widget.removeAll
|
@@ -74,11 +74,10 @@ module Glimmer
|
|
74
74
|
for index in 0..(column_properties.size-1)
|
75
75
|
table_item.setText(index, model.send(column_properties[index]).to_s)
|
76
76
|
end
|
77
|
-
table_item.
|
77
|
+
table_item.set_data(model)
|
78
78
|
end
|
79
|
-
selected_table_items = parent.search {|item| selected_table_item_models.include?(item.
|
80
|
-
|
81
|
-
parent.swt_widget.setSelection(selected_table_items) unless selected_table_items.empty?
|
79
|
+
selected_table_items = parent.search {|item| selected_table_item_models.include?(item.get_data) }
|
80
|
+
parent.swt_widget.setSelection(selected_table_items)
|
82
81
|
parent.sort!
|
83
82
|
parent.swt_widget.redraw if parent&.swt_widget&.respond_to?(:redraw)
|
84
83
|
end
|
@@ -1,5 +1,5 @@
|
|
1
1
|
# Copyright (c) 2007-2020 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
|
@@ -69,7 +69,7 @@ module Glimmer
|
|
69
69
|
old_tree_item_expansion_by_data = old_tree_items.reduce({}) {|hash, ti| hash.merge(ti.getData => ti.getExpanded)}
|
70
70
|
old_tree_items.each do |tree_item|
|
71
71
|
tree_item.getData('observer_registrations').each(&:unregister)
|
72
|
-
end
|
72
|
+
end
|
73
73
|
parent.swt_widget.items.each(&:dispose)
|
74
74
|
parent.swt_widget.removeAll
|
75
75
|
populate_tree_node(model_tree_root_node, parent.swt_widget, tree_properties)
|
@@ -85,9 +85,9 @@ module Glimmer
|
|
85
85
|
array + [observe(model_tree_node, key_value_pair.last)]
|
86
86
|
end
|
87
87
|
|
88
|
-
tree_item.
|
89
|
-
tree_item.
|
90
|
-
tree_item.
|
88
|
+
tree_item.set_data('observer_registrations', observer_registrations)
|
89
|
+
tree_item.set_data(model_tree_node)
|
90
|
+
tree_item.text = (model_tree_node && model_tree_node.send(tree_properties[:text])).to_s
|
91
91
|
[model_tree_node && model_tree_node.send(tree_properties[:children])].flatten.to_a.compact.each do |child|
|
92
92
|
populate_tree_node(child, tree_item, tree_properties)
|
93
93
|
end
|
@@ -245,7 +245,7 @@ module Glimmer
|
|
245
245
|
end
|
246
246
|
end
|
247
247
|
|
248
|
-
attr_reader :table_editor, :table_editor_widget_proxy, :sort_property, :sort_direction, :sort_block, :sort_type, :sort_by_block, :additional_sort_properties, :editor, :editable
|
248
|
+
attr_reader :table_editor, :table_editor_widget_proxy, :sort_property, :sort_direction, :sort_block, :sort_type, :sort_by_block, :additional_sort_properties, :editor, :editable
|
249
249
|
attr_accessor :column_properties
|
250
250
|
alias editable? editable
|
251
251
|
|
@@ -353,19 +353,6 @@ module Glimmer
|
|
353
353
|
@additional_sort_properties = args unless args.empty?
|
354
354
|
end
|
355
355
|
|
356
|
-
def editor=(args)
|
357
|
-
@editor = args
|
358
|
-
end
|
359
|
-
|
360
|
-
def cells_for(model)
|
361
|
-
column_properties.map {|property| model.send(property)}
|
362
|
-
end
|
363
|
-
|
364
|
-
def cells
|
365
|
-
column_count = @table.column_properties.size
|
366
|
-
swt_widget.items.map {|item| column_count.times.map {|i| item.get_text(i)} }
|
367
|
-
end
|
368
|
-
|
369
356
|
def sort!
|
370
357
|
return unless sort_property && (sort_type || sort_block || sort_by_block)
|
371
358
|
array = model_binding.evaluate_property
|
@@ -395,6 +382,19 @@ module Glimmer
|
|
395
382
|
model_binding.call(sorted_array)
|
396
383
|
end
|
397
384
|
|
385
|
+
def editor=(args)
|
386
|
+
@editor = args
|
387
|
+
end
|
388
|
+
|
389
|
+
def cells_for(model)
|
390
|
+
column_properties.map {|property| model.send(property)}
|
391
|
+
end
|
392
|
+
|
393
|
+
def cells
|
394
|
+
column_count = @table.column_properties.size
|
395
|
+
swt_widget.items.map {|item| column_count.times.map {|i| item.get_text(i)} }
|
396
|
+
end
|
397
|
+
|
398
398
|
# Performs a search for table items matching block condition
|
399
399
|
# If no condition block is passed, returns all table items
|
400
400
|
# Returns a Java TableItem array to easily set as selection on org.eclipse.swt.Table if needed
|
metadata
CHANGED
@@ -1,21 +1,21 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: glimmer-dsl-swt
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.17.10.
|
4
|
+
version: 4.17.10.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- AndyMaleh
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-12-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|
15
15
|
requirements:
|
16
16
|
- - "~>"
|
17
17
|
- !ruby/object:Gem::Version
|
18
|
-
version: 1.0.
|
18
|
+
version: 1.0.5
|
19
19
|
name: glimmer
|
20
20
|
prerelease: false
|
21
21
|
type: :runtime
|
@@ -23,7 +23,7 @@ dependencies:
|
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 1.0.
|
26
|
+
version: 1.0.5
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
requirement: !ruby/object:Gem::Requirement
|
29
29
|
requirements:
|