Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 griffon-app
Octocat-spinner-32 src
Octocat-spinner-32 .gitignore
Octocat-spinner-32 DialogsGriffonAddon.groovy
Octocat-spinner-32 DialogsGriffonPlugin.groovy
Octocat-spinner-32 LICENSE.txt
Octocat-spinner-32 README.md
Octocat-spinner-32 application.properties
README.md

Common dialogs

Plugin page: http://artifacts.griffon-framework.org/plugin/dialogs

The goal of this plugin is to provide a set of reusable 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

    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:

  • Create an implementation of the griffon.plugins.dialogs.Searcher interface.
  • Register the implementation with griffon.plugins.dialogs.Finder. This task can be achieved in two ways:

    • Programmatically. By calling Finder.getInstance().registerSearcher(FooComponent.class, FooComponentSearcher.class).
    • 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
      
Something went wrong with that request. Please try again.