/swing

Straightforward wrappers for javax.swing primitives

Primary LanguageRubyMIT LicenseMIT

swing

by: Arvicco url: github.com/arvicco/swing

DESCRIPTION:

Straightforward wrappers for javax.swing Components that simplify Swing code in JRuby-based GUI applications.

PROBLEMS:

This code is NOT production-ready! For production-ready code, try something like Rubeus: [github.com/akm/rubeus]. Personally, I’ve tried to use Rubeus and its auto-magic worked great for some use-cases, but I had problems extending its code when I needed to change default Rubeus behavior. For the life of me, I cannot figure out where all this Rubeus magic happens and how to change ANYTHING without the whole stage with smoke and mirrors falling down on me.

Maybe it’s just me - but I’m uncomfortable with complicated code and prefer much more straightforward solutions. So, I intend this lib to be straightforward - even at the expense of performance.

FEATURES:

Library adds extended functionality to original javax.swing classes, such as:

  • Ability to set attributes via constructor options: Swing::JButton.new ‘Title’, :enabled => false

  • Ability to define settable attributes/properties via attr_setter class macro, as well as (optional) defaults for them that may be different from Swing’s original defaults

  • Auto adding component to parent if ops is given to initializer

SYNOPSIS:

FIXME (code sample of usage)

REQUIREMENTS:

  • FIXME (list of requirements)

INSTALL:

$ sudo gem install swing

LICENSE:

Copyright © 2011 Arvicco. See LICENSE for details.