Class SelectCharacters

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible, RootPaneContainer, WindowConstants

public class SelectCharacters extends JDialog
SelectCharacters provides a dialog that displays all the characters in a given font.

A series of characters may be selected and either sent to registered listener objects that implement the SelectCharactersListener interface and register themselves, or returned as a result when the a modal form of the dialog that returns the selected characters maye be used.

Since:
$Date$, 03-NOV-2000
Version:
$Id$
Author:
Peter W. Draper
See Also:
  • Field Details

  • Constructor Details

    • SelectCharacters

      public SelectCharacters(Font displayFont)
      Create an instance of this class. Accepts the font that is to be displayed. This version is not modal so you should probably use the SelectCharactersListener interface to receive the results.
    • SelectCharacters

      public SelectCharacters(Frame owner, String title, boolean modal, Font displayFont)
      Create an instance of this class. Accepts the font that is to be displayed, a parent frame and whether the dialog is modal or not.
  • Method Details

    • setDisplayFont

      public void setDisplayFont(Font displayFont)
      Set the font that that is displayed.
    • closeWindowEvent

      protected void closeWindowEvent(boolean accept)
      Close window, either sending the text to any registered listeners, or not.
    • initFont

      protected void initFont()
      Initialise the interface to use the display font.
    • cellSelected

      protected void cellSelected(ListSelectionEvent e)
      A cell has been selected.
    • addListener

      public void addListener(SelectCharactersListener l)
      Registers a listener who wants to be informed about the final character string (when the window exits).
      Parameters:
      l - the SelectCharactersListener
    • fireExiting

      protected void fireExiting()
      Send SelectCharactersEvent event to all listeners.