LPEX
3.6.8

com.ibm.lpex.core
Interface LpexFieldsProvider


public interface LpexFieldsProvider

Interface LpexFieldsProvider defines a provider of field settings for the text elements in a document view. Editing fields are usually defined for column-sensitive editing in source documents of programming languages such as RPG.

The fields editor parameter is scoped to the document view. It is, therefore, suitable for defining editing fields which are uniform across the entire document, or for current-line editing operations when the application editor sets a new fields value each time the cursor moves to a new line. It cannot, however, handle situations in which an editing operation (such as a document-wide find and replace) operates on various text lines with different field settings.

Create a class that implements this interface, and register an instance of it in each document view of interest. When asked for the editing fields in a given element, return an array of the corresponding start columns.

When an LpexFieldsProvider is set in a document view, the fields parameter is not used by the editor for that view.

See Also:
LpexView.setFieldsProvider(com.ibm.lpex.core.LpexFieldsProvider)

Method Summary
 int[] getFields(LpexView lpexView, int element)
          This method is invoked when the editor must query the editing fields defined for a text element.
 

Method Detail

getFields

int[] getFields(LpexView lpexView,
                int element)
This method is invoked when the editor must query the editing fields defined for a text element. Return an array of ascending integers for the fields defined.

Parameters:
lpexView - the document view
element - the ordinal of the text element for which the fields setting is queried
Returns:
an array of ascending integers defining the start columns of the editing fields of the element, or null if no editing fields are defined for this element

LPEX
3.6.8

Copyright © 2013 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.