|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
ObjectComponent
Container
JComponent
MosaicChooser
public class MosaicChooser
A chooser for a set of tiles to be used for creating a mosaic. This chooser
allows users to select tiles from a file or a directory. The tiles are images in any format
supported by Java Image I/O library (TIFF, PNG, etc.), accompanied by their
World Files (text files having the same name than the image files except for the
extension, which is .tfw, .jpw, etc. depending on the image format).
The silhouette of selected tiles is displayed in the right pane.
As an alternative to the selection of multiple image files, the user can also select a single
text file having the .txt, .lst or .csv extension. This text file is
expected to contain a list of image files to use for the mosaic.
Example:
MosaicChooser chooser = new MosaicChooser();
if (chooser.showDialog(null, "Select source tiles")) {
TileManager[] tiles = chooser.getSelectedTiles();
// Process here.
}
| display/geotk-widgets-swing (download) | View source code for this class |
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class JComponent |
|---|
JComponent.AccessibleJComponent |
| Nested classes/interfaces inherited from class Container |
|---|
Container.AccessibleAWTContainer |
| Nested classes/interfaces inherited from class Component |
|---|
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy |
| Field Summary |
|---|
| Fields inherited from class JComponent |
|---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
| Fields inherited from class Component |
|---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface ImageObserver |
|---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
|---|---|
MosaicChooser()
Creates a new tiles chooser. |
|
| Method Summary | |
|---|---|
void |
addChangeListener(ChangeListener listener)
Adds a listener to be notified when the selected tiles changed. |
void |
commitEdit()
Forces the current value to be taken from the editable fields and set them as the current values. |
TileManager[] |
getSelectedTiles()
Returns the selected tiles as TileManager objects, or an empty array if none. |
void |
removeChangeListener(ChangeListener listener)
Removes a listener previously added. |
boolean |
showDialog(Component owner,
String title)
Shows a dialog box requesting input from the user. |
| Methods inherited from class Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public MosaicChooser()
| Method Detail |
|---|
public TileManager[] getSelectedTiles()
TileManager objects, or an empty array if none.
Only one tile manager is usually returned. However more managers may be returned if,
for example, TileManagerFactory failed to create
only one instance from a set of tiles.
TileManager objects, or an empty array if none.public void addChangeListener(ChangeListener listener)
getSelectedTiles() in order to get the new
selection.
listener - The listener to add.public void removeChangeListener(ChangeListener listener)
listener - The listener to remove.
public void commitEdit()
throws ParseException
This method is typically invoked after Dialog.showDialog(Component, String)
returned true and before to read the values from the dialog widget.
commitEdit in interface DialogParseException - If at least one values couldn't be commited.JFormattedTextField.commitEdit(),
JSpinner.commitEdit()
public boolean showDialog(Component owner,
String title)
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.
showDialog in interface Dialogowner - The parent component for the dialog box, or null if there is no parent.title - The dialog box title.
true if user pressed the "Ok" button, or false otherwise
(e.g. pressing "Cancel" or closing the dialog box from the title bar).
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||