org.geotools.swt.control
Class JTextReporter

Object
  extended by Window
      extended by Dialog
          extended by JTextReporter
All Implemented Interfaces:
IShellProvider

public class JTextReporter
extends Dialog

A dialog to display text reports to the user and, if requested, save them to file.

Since:
2.6
Author:
Michael Bedward

Nested Class Summary
 
Nested classes/interfaces inherited from class Window
Window.IExceptionHandler
 
Field Summary
 
Fields inherited from class Dialog
blockedHandler, buttonBar, DIALOG_DEFAULT_BOUNDS, DIALOG_PERSISTLOCATION, DIALOG_PERSISTSIZE, dialogArea, DLG_IMG_ERROR, DLG_IMG_HELP, DLG_IMG_INFO, DLG_IMG_MESSAGE_ERROR, DLG_IMG_MESSAGE_INFO, DLG_IMG_MESSAGE_WARNING, DLG_IMG_QUESTION, DLG_IMG_WARNING, ELLIPSIS
 
Fields inherited from class Window
CANCEL, OK
 
Constructor Summary
JTextReporter(Shell parent, String title)
          Creates a new JTextReporter with the following default options: Remains on top of other application windows Is not modal Will be disposed of when closed
 
Method Summary
 void append(String text)
          Append text to the report being displayed.
protected  void configureShell(Shell newShell)
           
protected  Button createButton(Composite parent, int id, String label, boolean defaultButton)
           
protected  Control createDialogArea(Composite parent)
           
 
Methods inherited from class Dialog
applyDialogFont, buttonPressed, cancelPressed, close, convertHeightInCharsToPixels, convertHeightInCharsToPixels, convertHorizontalDLUsToPixels, convertHorizontalDLUsToPixels, convertVerticalDLUsToPixels, convertVerticalDLUsToPixels, convertWidthInCharsToPixels, convertWidthInCharsToPixels, create, createButtonBar, createButtonsForButtonBar, createContents, dialogFontIsDefault, getBlockedHandler, getButton, getButtonBar, getCancelButton, getDialogArea, getDialogBoundsSettings, getDialogBoundsStrategy, getImage, getInitialLocation, getInitialSize, getOKButton, initializeBounds, initializeDialogUnits, isResizable, okPressed, setBlockedHandler, setButtonLayoutData, setButtonLayoutFormData, shortenText
 
Methods inherited from class Window
canHandleShellCloseEvent, constrainShellSize, createShell, getConstrainedShellBounds, getContents, getDefaultImage, getDefaultImages, getDefaultOrientation, getLayout, getParentShell, getReturnCode, getShell, getShellListener, getShellStyle, getWindowManager, handleFontChange, handleShellCloseEvent, open, setBlockOnOpen, setDefaultImage, setDefaultImages, setDefaultModalParent, setDefaultOrientation, setExceptionHandler, setParentShell, setReturnCode, setShellStyle, setWindowManager
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JTextReporter

public JTextReporter(Shell parent,
                     String title)
Creates a new JTextReporter with the following default options:

Parameters:
dialogTrim -
parent -
title - title for the dialog (may be null)
rows - number of text rows displayed without scrolling (if zero or negative, the default is used)
cols - number of text columns displayed without scrolling (if zero or negative the default is used)
Method Detail

configureShell

protected void configureShell(Shell newShell)
Overrides:
configureShell in class Window

append

public void append(String text)
Append text to the report being displayed. No additional line feeds are added after the text.

If called from other than the AWT event dispatch thread this method puts the append task onto the dispatch thread and waits for its completion.

Parameters:
text - the text to be appended to the report

createDialogArea

protected Control createDialogArea(Composite parent)
Overrides:
createDialogArea in class Dialog

createButton

protected Button createButton(Composite parent,
                              int id,
                              String label,
                              boolean defaultButton)
Overrides:
createButton in class Dialog


Copyright © 1996-2014 Geotools. All Rights Reserved.