org.geotoolkit.gui.swing
Interface Dialog

All Known Implementing Classes:
About, CoordinateChooser, CoverageFileProperties, DisjointLists, FormatChooser, GradientKernelEditor, ImageFileProperties, ImageProperties, KernelEditor, MosaicBuilderEditor, MosaicChooser, MosaicPerformanceGraph, MultiColorChooser, OperationTreeBrowser

public interface Dialog

Interface for widgets that can be used as a dialog box.

Since:
3.00
Version:
3.12
Author:
Martin Desruisseaux (Geomatys)
Module:
display/geotk-widgets-swing (download)    View source code for this class

Method Summary
 void commitEdit()
          Forces the current value to be taken from the editable fields and set them as the current values.
 boolean showDialog(Component owner, String title)
          Shows a dialog box requesting input from the user.
 

Method Detail

showDialog

boolean showDialog(Component owner,
                   String title)
Shows a dialog box requesting input from the user. The dialog box will be parented to owner. If owner is contained into a JDesktopPane, the dialog box will appears as an internal frame.

Multi-threading
Geotk implementations allow this method to be invoked from any thread. If the caller thread is not the Swing thread, then the execution of this method will be registered in the AWT Event Queue and the caller thread will block until completion.

Parameters:
owner - The parent component for the dialog box, or null if there is no parent.
title - The dialog box title.
Returns:
true if user pressed the "Ok" button, or false otherwise (e.g. pressing "Cancel" or closing the dialog box from the title bar).

commitEdit

void commitEdit()
                throws ParseException
Forces the current value to be taken from the editable fields and set them as the current values. If this operation fails for at least one field, this method will set the focus on the offending field before to throw the exception.

This method is typically invoked after showDialog(Component, String) returned true and before to read the values from the dialog widget.

Throws:
ParseException - If at least one values couldn't be commited.
Since:
3.12
See Also:
JFormattedTextField.commitEdit(), JSpinner.commitEdit()


Copyright © 2009-2012 Geotoolkit.org. All Rights Reserved.