Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

Description

The goal of this plugin is to provide a set of reusable dialogs.

Installation

The current version of griffon-dialogs-plugin is 0.1
To install just issue the following command

Code Block
griffon install-plugin dialogs

Usage

Finder

This dialog is inspired in the find/replace utility available in TextMate

The following snippet shows how this dialog can be activated

Code Block
package sample

import griffon.plugins.dialogs.Finder

class SampleController {
    def view

    def find = {
        Finder.instance.findIt(view.componentToSearch)
    }
}

The previous code assumes there's a View component identified by 'componentToSearch' that can be searched. By default only JTextComponent subclasses are supported. You'll have to follow these steps should you wish to support additional components:

  1. Create an implementation of the griffon.plugins.dialogs.Searcher interface.
  2. Register the implementation with griffon.plugins.dialogs.Finder. This task can be achieved in two ways:
    1. Programmatically. By calling Finder.getInstance().registerSearcher(FooComponent.class, FooComponentSearcher.class).
    2. Declaratively. By creating a file named META-INF/services/griffon.plugins.dialogs.Searcher with a line per searcher implementation following this format:
      com.acme.FooComponent = com.acme.FooComponentSearcher

History

Version

Date

Notes

0.1

10-21-11

Initial release