Rational Developer for Power Systems Software
V7.6

com.ibm.etools.iseries.editor
Class ISeriesEditorPrompter

java.lang.Object
  extended by com.ibm.etools.iseries.editor.ISeriesEditorPrompter
All Implemented Interfaces:
IISeriesEditorPromptAdapter
Direct Known Subclasses:
ISeriesEditorCOBOLPrompter, ISeriesEditorDDSPrompter, ISeriesEditorRPGILEPrompter, ISeriesEditorRPGOPMPrompter

public abstract class ISeriesEditorPrompter
extends Object
implements IISeriesEditorPromptAdapter

This abstract base class is the interface between a prompt view and the editor. Subclasses must provide a getPromptPageId method that translates between an index and a prompt page identifier string. This adapter can add listeners which are notified whenever the cursor in the editor changes. The listener is given the line number, the line text, and the prompt page identifier string in an ISeriesEditorPromptChangeEvent.


Field Summary
protected  Action _actionInsertMode
           
protected  IISeriesEditorPromptChangeListener _listener
           
protected  LpexView _lpexView
           
protected  IISeriesEditorParser _parser
           
protected  ISeriesEditorPromptGroup _promptGroup
           
protected  String _strPromptXmlFilename
           
static String copyright
           
 
Constructor Summary
ISeriesEditorPrompter(LpexView view, IISeriesEditorParser parser)
          Constructor
 
Method Summary
 void addPromptChangeListener(IISeriesEditorPromptChangeListener listener)
          Method declared on IISeriesEditorPromptAdapter.
 void displayHelp(String strHelpResourceID)
          Requests that the help for the given help resource identifier be displayed.
 void displayMessageHelp(String strMessageID)
          Requests that the help for the given message identifier be displayed.
 void elementChanged(LpexView view)
          Method declared on LpexCursorListener.
 IISeriesEditorPromptChangeListener getPromptChangeListener()
          Return the prompt change listener
 String getPromptEncoding()
          Returns the codepage that the editor is in.
 Font getPromptFont()
          Returns the font that the editor is using.
abstract  String getPromptFormatLine(String strPromptPageId)
          Subclasses must translate between from a prompt page identifier to a format line string.
 ISeriesEditorPromptGroup getPromptGroup()
          Method declared in IISeriesEditorPromptAdapter.
 int getPromptMaxLineLength()
          Returns the maximum line length of all editor text lines excluding the sequence/prefix area, or -1 if unknown.
abstract  String getPromptPageId(int iElement)
          Subclasses must translate from a Element number to a prompt page identifier string.
abstract  int getPromptPageIndex(int iElement)
          Subclasses must translate from a Element number to a prompt page index.
protected  URL getPromptUserInterfaceDefinitionURL()
          Method declared on IISeriesEditorPromptAdapter Returns the URL of the XML file that contains the user interface definitions for each of the prompt pages.
 boolean getRetainLowerCase()
          Method declared on IISeriesEditorPromptAdapter.
 void promptElementChanged(int iElementNumber, String strText)
          The editor is being notified by the prompter that the Element of text has been changed by the user within the prompt view.
 void promptLineChanged(int iLineNumber, String strText)
          Deprecated.  
 void removePromptChangeListener(IISeriesEditorPromptChangeListener listener)
          The editor is to remove a prompt change listener from its list of listeners.
 void setInsertModeAction(Action actionInsertMode)
          Gives the adapter the action that tells it whether a new line should be created when the prompt view's apply button is pressed, or whether an existing line should be replaced.
 void setUserInterfaceDefinitionFilename(String strFilename)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.ibm.etools.iseries.edit.views.IISeriesEditorPromptAdapter
getSyntaxChecker
 

Field Detail

copyright

public static final String copyright
See Also:
Constant Field Values

_actionInsertMode

protected Action _actionInsertMode

_lpexView

protected LpexView _lpexView

_strPromptXmlFilename

protected String _strPromptXmlFilename

_promptGroup

protected ISeriesEditorPromptGroup _promptGroup

_listener

protected IISeriesEditorPromptChangeListener _listener

_parser

protected IISeriesEditorParser _parser
Constructor Detail

ISeriesEditorPrompter

public ISeriesEditorPrompter(LpexView view,
                             IISeriesEditorParser parser)
Constructor

Method Detail

addPromptChangeListener

public void addPromptChangeListener(IISeriesEditorPromptChangeListener listener)
Method declared on IISeriesEditorPromptAdapter. Adds a listener (a prompt view page) that wants to know when the prompt view should change.

Specified by:
addPromptChangeListener in interface IISeriesEditorPromptAdapter

elementChanged

public void elementChanged(LpexView view)
Method declared on LpexCursorListener. Called when the Lpex editor cursor changes to a different element. This method calls its subclass to translate between the current line number and a prompt page identifier string.


displayHelp

public void displayHelp(String strHelpResourceID)
Requests that the help for the given help resource identifier be displayed. The parser is asked to map the resource identifier to the help page identifier in the form "/pluginname/html/pagename.htm". The workbench is asked to display the help page.

Specified by:
displayHelp in interface IISeriesEditorPromptAdapter

displayMessageHelp

public void displayMessageHelp(String strMessageID)
Requests that the help for the given message identifier be displayed. The parser is asked to map the message identifier to the help page identifier in the form "/pluginname/html/pagename.htm". The workbench is asked to display the help page.

Specified by:
displayMessageHelp in interface IISeriesEditorPromptAdapter

getPromptChangeListener

public IISeriesEditorPromptChangeListener getPromptChangeListener()
Return the prompt change listener

Specified by:
getPromptChangeListener in interface IISeriesEditorPromptAdapter
Returns:
listener, or null if this is not the prompter for the parser for the primary lpex view

getPromptEncoding

public String getPromptEncoding()
Returns the codepage that the editor is in.

Specified by:
getPromptEncoding in interface IISeriesEditorPromptAdapter

getPromptFont

public Font getPromptFont()
Returns the font that the editor is using.

Specified by:
getPromptFont in interface IISeriesEditorPromptAdapter

getPromptFormatLine

public abstract String getPromptFormatLine(String strPromptPageId)
Subclasses must translate between from a prompt page identifier to a format line string.

Specified by:
getPromptFormatLine in interface IISeriesEditorPromptAdapter

getPromptMaxLineLength

public int getPromptMaxLineLength()
Returns the maximum line length of all editor text lines excluding the sequence/prefix area, or -1 if unknown. This is the same as ISeriesEditorParser.getTextLimit.

Specified by:
getPromptMaxLineLength in interface IISeriesEditorPromptAdapter

getPromptPageId

public abstract String getPromptPageId(int iElement)
Subclasses must translate from a Element number to a prompt page identifier string.


getPromptPageIndex

public abstract int getPromptPageIndex(int iElement)
Subclasses must translate from a Element number to a prompt page index.

Specified by:
getPromptPageIndex in interface IISeriesEditorPromptAdapter

getPromptGroup

public ISeriesEditorPromptGroup getPromptGroup()
Method declared in IISeriesEditorPromptAdapter. Loads and parses an XML file containing field information for prompting, and content assist.

Specified by:
getPromptGroup in interface IISeriesEditorPromptAdapter

getRetainLowerCase

public boolean getRetainLowerCase()
Method declared on IISeriesEditorPromptAdapter. The default implementation returns false indicating that fields generated from combo box choices are to be in upper case.

Specified by:
getRetainLowerCase in interface IISeriesEditorPromptAdapter

getPromptUserInterfaceDefinitionURL

protected URL getPromptUserInterfaceDefinitionURL()
Method declared on IISeriesEditorPromptAdapter Returns the URL of the XML file that contains the user interface definitions for each of the prompt pages.


promptLineChanged

public void promptLineChanged(int iLineNumber,
                              String strText)
Deprecated. 

The editor is being notified by the prompter that the line of text has been changed by the user within the prompt view. The editor is to replace the line text at the line number with the given line text.

Specified by:
promptLineChanged in interface IISeriesEditorPromptAdapter

promptElementChanged

public void promptElementChanged(int iElementNumber,
                                 String strText)
The editor is being notified by the prompter that the Element of text has been changed by the user within the prompt view. The editor is to replace the Element text at the Element number with the given Element text.

Specified by:
promptElementChanged in interface IISeriesEditorPromptAdapter

removePromptChangeListener

public void removePromptChangeListener(IISeriesEditorPromptChangeListener listener)
Description copied from interface: IISeriesEditorPromptAdapter
The editor is to remove a prompt change listener from its list of listeners.

Specified by:
removePromptChangeListener in interface IISeriesEditorPromptAdapter

setInsertModeAction

public void setInsertModeAction(Action actionInsertMode)
Description copied from interface: IISeriesEditorPromptAdapter
Gives the adapter the action that tells it whether a new line should be created when the prompt view's apply button is pressed, or whether an existing line should be replaced.

Specified by:
setInsertModeAction in interface IISeriesEditorPromptAdapter

setUserInterfaceDefinitionFilename

public void setUserInterfaceDefinitionFilename(String strFilename)

Rational Developer for Power Systems Software
V7.6

Copyright © 2011 IBM Corp. All Rights Reserved.

Note: This documentation is for part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.