org.esa.beam.framework.processor.ui
Class IOParameterPage

java.lang.Object
  extended by org.esa.beam.framework.processor.ui.ParameterPage
      extended by org.esa.beam.framework.processor.ui.IOParameterPage

public class IOParameterPage
extends ParameterPage

This class is intended to be used with MultiPageProcessorUI.

It provides an UI for selecting an input and output product, the output fomat and for enabling logging in to an extra loggoing file next to the output product.

Author:
Marco Peters, Ralf Quast, Norman Fomferra

Nested Class Summary
static class IOParameterPage.InputProductValidator
           
 
Field Summary
static String DEFAULT_PAGE_TITLE
          The default title of this page.
static String INPUT_PRODUCT_PARAM_NAME
          Parameter name for the request parameter describing the input_product.
static String LOG_PREFIX_PARAM_NAME
          Parameter name for the request parameter describing the log_prefix.
static String LOG_TO_OUTPUT_PARAM_NAME
          Parameter name for the request parameter describing the log_to_output.
static String OUTPUT_FORMAT_PARAM_NAME
          Parameter name for the request parameter describing the output_format.
static String OUTPUT_PRODUCT_PARAM_NAME
          Parameter name for the request parameter describing the output_product.
 
Constructor Summary
IOParameterPage()
          Creates an I/O parameter page for the MultiPageProcessorUI.
IOParameterPage(IOParameterPage.InputProductValidator validator)
          Creates an default I/O page for the MultiPageProcessorUI.
IOParameterPage(ParamGroup paramGroup)
          Creates an default I/O page for the MultiPageProcessorUI.
 
Method Summary
 JComponent createUI()
          It creates the UI by using the parameter group of this page.
 String getDefaultLogPrefix()
          Gets the default log prefix.
 String getDefaultOutputProductFileName()
          Gets the default output product file name.
 void initRequestFromUI(Request request)
          Fills the given request with parameters.
 void setDefaultLogPrefix(String logPrefix)
          Sets the default log prefix.
 void setDefaultLogToOutputParameter(Boolean logToOutput)
           
 void setDefaultOutputProductFileName(String name)
          Sets the default output product file name.
 void setUIFromRequest(Request request)
          Sets the parameter values by these given with the request.
 
Methods inherited from class org.esa.beam.framework.processor.ui.ParameterPage
getApp, getParamGroup, getTitle, setApp, setTitle, setUIDefaults
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INPUT_PRODUCT_PARAM_NAME

public static final String INPUT_PRODUCT_PARAM_NAME
Parameter name for the request parameter describing the input_product. This field just redirects to ProcessorConstants.INPUT_PRODUCT_PARAM_NAME

See Also:
Constant Field Values

OUTPUT_PRODUCT_PARAM_NAME

public static final String OUTPUT_PRODUCT_PARAM_NAME
Parameter name for the request parameter describing the output_product. This field just redirects to ProcessorConstants.OUTPUT_PRODUCT_PARAM_NAME

See Also:
Constant Field Values

OUTPUT_FORMAT_PARAM_NAME

public static final String OUTPUT_FORMAT_PARAM_NAME
Parameter name for the request parameter describing the output_format. This field just redirects to ProcessorConstants.OUTPUT_FORMAT_PARAM_NAME

See Also:
Constant Field Values

LOG_PREFIX_PARAM_NAME

public static final String LOG_PREFIX_PARAM_NAME
Parameter name for the request parameter describing the log_prefix. This field just redirects to ProcessorConstants.LOG_PREFIX_PARAM_NAME

See Also:
Constant Field Values

LOG_TO_OUTPUT_PARAM_NAME

public static final String LOG_TO_OUTPUT_PARAM_NAME
Parameter name for the request parameter describing the log_to_output. This field just redirects to ProcessorConstants.LOG_TO_OUTPUT_PARAM_NAME

See Also:
Constant Field Values

DEFAULT_PAGE_TITLE

public static final String DEFAULT_PAGE_TITLE
The default title of this page.

See Also:
Constant Field Values
Constructor Detail

IOParameterPage

public IOParameterPage()
Creates an I/O parameter page for the MultiPageProcessorUI. This class is created with a paramGroup which contains the following parameters:

See Also:
IOParameterPage(org.esa.beam.framework.param.ParamGroup)

IOParameterPage

public IOParameterPage(IOParameterPage.InputProductValidator validator)
Creates an default I/O page for the MultiPageProcessorUI. This class is created with a paramGroup which contains the following parameters:

Parameters:
validator - the input product validator, can be null if not required
See Also:
IOParameterPage(org.esa.beam.framework.param.ParamGroup)

IOParameterPage

public IOParameterPage(ParamGroup paramGroup)
Creates an default I/O page for the MultiPageProcessorUI. The given paramGroup must contain the following parameters:

Parameters:
paramGroup - the paramGroup to create the UI from
See Also:
ProcessorConstants, IOParameterPage()
Method Detail

getDefaultOutputProductFileName

public String getDefaultOutputProductFileName()
Gets the default output product file name.

Returns:
the default output product file name

setDefaultOutputProductFileName

public void setDefaultOutputProductFileName(String name)
Sets the default output product file name.

Parameters:
name - the output product file name

getDefaultLogPrefix

public String getDefaultLogPrefix()
Gets the default log prefix.

Returns:
the default log prefix

setDefaultLogPrefix

public void setDefaultLogPrefix(String logPrefix)
Sets the default log prefix.

Parameters:
logPrefix - the log prefix

setDefaultLogToOutputParameter

public void setDefaultLogToOutputParameter(Boolean logToOutput)

setUIFromRequest

public void setUIFromRequest(Request request)
                      throws ProcessorException
Sets the parameter values by these given with the request.

Specified by:
setUIFromRequest in class ParameterPage
Parameters:
request - the request to obtain the parameters
Throws:
ProcessorException - if an error occurred

initRequestFromUI

public void initRequestFromUI(Request request)
                       throws ProcessorException
Fills the given request with parameters.

Specified by:
initRequestFromUI in class ParameterPage
Parameters:
request - the request to fill
Throws:
ProcessorException - if an error occurred

createUI

public JComponent createUI()
It creates the UI by using the parameter group of this page.

It's only called once by the MultiPageProcessorUI during lifetime of an instance of this class.

Specified by:
createUI in class ParameterPage
Returns:
the UI component displayed as page of the MultiPageProcessorUI.


Copyright © 2002-2012 Brockmann Consult GmbH. All Rights Reserved.