Home

Awesome

Nebula 2.5.0.0.0

<img src="https://raw.githubusercontent.com/AndyObtiva/glimmer-dsl-swt/master/images/glimmer-logo-hi-res.png" height=40 /> Glimmer Custom Widget

Gem Version

The Nebula Project is a collection of enterprise-grade high-quality SWT (Standard Widget Toolkit) custom widgets, made available for use with Glimmer DSL for SWT.

Project version numbers are in sync with the Nebula Project version (currently 2.5.0). The first 3 numbers represent the Nebula Project version. The last 2 numbers represent the minor and patch numbers of this Ruby gem.

This gem imports all of the Nebula Project custom widgets by default. If you prefer to bring in a single custom widget or just a few piecemeal, you can change the configuration or alternatively use one of the standalone Nebula custom widget gems like glimmer-cw-cdatetime-nebula by running the glimmer list:gems:customwidget command.

Custom Widgets

Here is a list of custom widgets taken from the Nebula Project Official Website.

Custom Date Time

c_date_time

PShelf

p_shelf

Gantt Chart

gantt_chart

Used in Are We There Yet?

Are We There Yet

Gallery

Gallery

Grid

This is a richer alternative to the table widget.

Grid

Paper Clips

Paper Clips

Oscilloscope

Oscilloscope

PGroup

PGroup

Rich Text

This is a richer alternative to the styled_text widget with some caveats (uses the browser widget behind the scenes).

Rich Text

Geo Map

Geo Map

Table Combo

TableCombo

XViewer

This is a richer alternative to the tree widget.

XViewer

Transition

Transition

Breadcrumb

Breadcrumb

Checkbox Group

Checkbox Group

Column Browser

Column Browser

Dialog

This is a richer alternative to the built-in dialog widget.

Dialog

Dual List

Dual List

Header

Header

Heap Manager

This shows memory usage in an application's Java Virtual Machine.

Heap Manager

Login Dialog

Login Dialog

Multi Choice

Multi Choice

Notifier

Notifier

Preference Window

Preference Window

Prompt Support

Prompt Support

Range Slider

Range Slider

Rounded Toolbar

Rounded Toolbar

Star Rating

Star Rating

Text Assist

Text Assist

Tip of The Day

Tip of the Day

Titled Separator

Titled Separator

Calculator

Calculator

Horizontal Spinner

Horizontal Spinner

Launcher

Launcher

Panels

Panels

Switch Button

Switch Button

Progress Circle

Progress Circle

Nebula Slider

This is a richer alternative to the built-in slider widget.

Nebula Slider

Split Button

This is an alternative to the combo widget.

Split Button

Rounded Checkbox

This is an alternative to the checkbox widget (aka check or button(:check) widget).

Rounded Checkbox

Floating Text

Floating Text

Password Revealer

Password Revealer

Custom Tree Combo

Custom Tree Combo

Badged Label

Badged Label

LED Display

LED Display

Step Bar

Step Bar

Chips

Chips

Carousel

Carousel

Font Awesome

Font Awesome

Rounded Switch

Rounded Switch

Nat Table

A higher-performant alternative to the built-in table widget.

Nat Table

Setup

This gem includes the Nebula Project JAR files, so you just need to install the gem to get started.

Bundler

gem 'glimmer-cw-nebula', '~> 2.5.0.0.0'

Direct

gem install glimmer-cw-nebula

Usage

Add the following require statement on top of your code (glimmer-dsl-swt gets required automatically as part of it):

require 'glimmer-cw-nebula'

This imports all of the Nebula Project custom widgets. You can optionally bring in only the custom widgets you need through configuration.

Otherwise, just like with SWT widgets, you may use lowercase underscored keywords for Nebula custom widgets in Glimmer DSL for SWT.

Examples:

For more details on what custom widgets are included in the Nebula Project, check out the official documentation below.

Nebula Project Official Website

Nebula Project Official Javadoc

Configuration

By default, this gem brings in all of the Nebula custom widgets. They are basically all the libraries that live under the gem's vendor/nebula directory minus the version number / file extension:

Packages:

org.eclipse.nebula.widgets.opal.heapmanager
org.eclipse.nebula.widgets.carousel
org.eclipse.nebula.widgets.badgedlabel
org.eclipse.nebula.widgets.passwordrevealer
org.eclipse.nebula.widgets.progresscircle
org.eclipse.nebula.widgets.opal.starrating
org.eclipse.nebula.widgets.opal.checkboxgroup
org.eclipse.nebula.widgets.opal.calculator
org.eclipse.nebula.widgets.xviewer
org.eclipse.nebula.widgets.floatingtext
org.eclipse.nebula.widgets.opal.dialog
org.eclipse.nebula.widgets.geomap
org.eclipse.nebula.widgets.richtext
org.eclipse.nebula.widgets.ganttchart
org.eclipse.nebula.widgets.chips
org.eclipse.nebula.widgets.segmentedbar
org.eclipse.nebula.paperclips.widgets
org.eclipse.nebula.widgets.opal.multichoice
org.eclipse.nebula.widgets.opal.preferencewindow
org.eclipse.nebula.widgets.splitbutton
org.eclipse.nebula.widgets.opal.switchbutton
org.eclipse.nebula.widgets.xviewer.core
org.eclipse.nebula.widgets.tablecombo
org.eclipse.nebula.paperclips.core
org.eclipse.nebula.widgets.pgroup
org.eclipse.nebula.widgets.cdatetime
org.eclipse.nebula.widgets.opal.launcher
org.eclipse.nebula.widgets.opal.propertytable
org.eclipse.nebula.widgets.opal.commons
org.eclipse.nebula.widgets.opal.textassist
org.eclipse.nebula.widgets.opal.duallist
org.eclipse.nebula.widgets.opal.rangeslider
org.eclipse.nebula.widgets.fontawesome
org.eclipse.nebula.widgets.roundedswitch
org.eclipse.nebula.widgets.opal.titledseparator
org.eclipse.nebula.widgets.stepbar
org.eclipse.nebula.cwt
org.eclipse.nebula.widgets.gallery
org.eclipse.nebula.widgets.pshelf
org.eclipse.nebula.effects.stw
org.eclipse.nebula.widgets.nebulaslider
org.eclipse.nebula.widgets.opal.header
org.eclipse.nebula.widgets.oscilloscope
org.eclipse.nebula.widgets.opal.notifier
org.eclipse.nebula.widgets.opal.promptsupport
org.eclipse.nebula.widgets.compositetable
org.eclipse.nebula.widgets.ctreecombo
org.eclipse.nebula.widgets.opal.panels
org.eclipse.nebula.widgets.opal.logindialog
org.eclipse.nebula.widgets.grid
org.eclipse.nebula.visualization.widgets
org.eclipse.nebula.widgets.opal.roundedtoolbar
org.eclipse.nebula.widgets.opal.columnbrowser
org.eclipse.nebula.widgets.opal.tipoftheday
org.eclipse.nebula.widgets.opal.horizontalspinner
org.eclipse.nebula.widgets.opal.breadcrumb
org.eclipse.nebula.widgets.led

To limit imported custom widgets, set one of the following variables before the gem require statment (require 'glimmer-cw-nebula'):

Example

Run:

girb

Enter this code (assuming you have gem installed):

# require './lib/glimmer-cw-nebula' # if run locally from cloned project
require 'glimmer-cw-nebula'

include Glimmer

shell {
  minimum_size 100, 100
  
  progress_circle {
    show_text true
    selection  53
  }
}.open

Nebula Example

Note about widgets without a standard SWT (parent, style) constructor:

Some Nebula widgets do not follow the SWT convention of always having a constructor that receives only the (parent, style) arguments, like text_assist as documented in the TextAssist Nebula widget page:

There is a big difference with other SWT widget : there is no constructor TextAssist(Composite parent, int style).

The only constructor available is public TextAssist(final Composite parent, final int style, final TextAssistContentProvider contentProvider)

In that case, you would have to pass all widget arguments manually in the Glimmer GUI DSL, so instead of simply adding a call to text_assist, you would have to pass all its arguments, including its parent as in text_assist(parent, style, content_provider). Learn more in the example below.

Example:

require 'glimmer-dsl-swt'
require 'glimmer-cw-nebula'

class EuropeanCountryContentProvider < org.eclipse.nebula.widgets.opal.textassist.TextAssistContentProvider
    EUROZONE = ["Austria", "Belgium", "Cyprus",
         "Estonia", "Finland", "France", "Germany", "Greece", "Ireland", "Italy",
         "Luxembourg", "Malta", "Netherlands", "Portugal", "Slovakia", "Slovenia", "Spain"]

    def getContent(entry)
      EUROZONE.select { |country| country.downcase.start_with?(entry.to_s.downcase) }
    end
end

include Glimmer

shell { |shell_proxy|
  text 'Text Assist Demo'
  
  text_assist(shell_proxy.swt_widget, :none, EuropeanCountryContentProvider.new)
}.open

Nebula Text Assist Example

TODO

TODO.md

Change Log

CHANGELOG.md

Contributing to glimmer-cw-nebula

License

MIT

Copyright (c) 2021 - Andy Maleh

--

<img src="https://raw.githubusercontent.com/AndyObtiva/glimmer/master/images/glimmer-logo-hi-res.png" height=40 /> Built for Glimmer DSL for SWT (JRuby Desktop Development GUI Framework).