public class GridCreationDialog
extends java.lang.Object
GridCreationDialog
is a dialog that allows the user
to construct a new grid, choosing its type (bounded or unbounded)
and, if appropriate, its dimensions.Modifier | Constructor and Description |
---|---|
protected |
GridCreationDialog(javax.swing.JFrame parent,
boolean promptForGridChoice)
Creates a dialog that allows the user to choose the type of
grid to create and/or its dimensions.
|
Modifier and Type | Method and Description |
---|---|
static GridCreationDialog |
makeDimensionsDialog(javax.swing.JFrame parent)
Creates a dialog that creates a bounded grid object
(using
BoundedGrid or whatever has been defined as
the default bounded grid in the GridPkgFactory )
after prompting the user for its dimensions. |
static GridCreationDialog |
makeGridChoiceDialog(javax.swing.JFrame parent)
Creates a dialog that allows the user to choose the type of
grid to create and, if appropriate, its dimensions.
|
Grid |
showDialog()
Shows the modal dialog that allows the user to create a new
grid.
|
protected GridCreationDialog(javax.swing.JFrame parent, boolean promptForGridChoice)
parent
- parent frame for the dialogpromptForGridChoice
- true
if dialog should
prompt for choice of grid representation;
false
if it should always create
a grid of the type returned by
GridPkgFactory.getDefaultBoundedGridClass
public static GridCreationDialog makeDimensionsDialog(javax.swing.JFrame parent)
BoundedGrid
or whatever has been defined as
the default bounded grid in the GridPkgFactory
)
after prompting the user for its dimensions.parent
- parent frame for the dialogpublic static GridCreationDialog makeGridChoiceDialog(javax.swing.JFrame parent)
GridPkgFactory
. If any bounded grid classes
have been registered with the GridPkgFactory
, then
the dialog will include them in the set of options. Otherwise,
it will include the default bounded grid specified in the
GridPkg
class as its only bounded
grid. Similarly, if any unbounded grid classes have been
registered with the GridPkgFactory
, then the dialog
will include them in the set of options. Otherwise, it will
include the default unbounded grid specified in the
GridPkg
class as its only unbounded
grid. The default bounded and unbounded grids must
explicitly be registered with the GridPkgFactory
to
appear along with other options from the factory.parent
- parent frame for the dialogpublic Grid showDialog()
null
is returned.null