LPEX
4.4.0

com.ibm.lpex.alef.preferences
Class ViewParserPreferencePage

java.lang.Object
  extended by FieldEditorPreferencePage
      extended by com.ibm.lpex.alef.preferences.LpexFieldEditorPreferencePage
          extended by com.ibm.lpex.alef.preferences.ViewParserPreferencePage

public class ViewParserPreferencePage
extends LpexFieldEditorPreferencePage

Parser preference page for an LPEX view. It handles the parser, updateProfile.noParser, and parseAfterEveryKey settings for the view, and the maintainBidiMark setting for the view's document.


Field Summary
protected  com.ibm.lpex.alef.preferences.LpexBooleanFieldEditor _disableParsingCheckBox
          The "Disable parsing" checkbox.
protected  com.ibm.lpex.alef.preferences.LpexBooleanFieldEditor _maintainBidiMarksCheckBox
          The "Maintain bidi marks" checkbox.
protected  com.ibm.lpex.alef.preferences.LpexBooleanFieldEditor _parseAfterEveryKeyCheckBox
          The "Parse after every key" checkbox.
protected  com.ibm.lpex.alef.preferences.LpexListEditor _parserList
          The list editor for document parsers selectable for the view.
 
Constructor Summary
ViewParserPreferencePage(LpexView lpexView)
          Constructor.
 
Method Summary
protected  Control createContents(Composite parent)
          Creates and returns the SWT control for the customized body of this preference page.
protected  void createFieldEditors()
          Creates this preference page's field editors.
 void dispose()
          Disposes the SWT resources allocated by this dialog page.
protected  String getDefaultParser(LpexView lpexView)
          Determines the default parser for the specified view's document.
protected  String[] getParserList(LpexView lpexView)
          Returns the parsers for the "Document parser" list field of this page.
protected  void performDefaults()
          "Restore Defaults" button pressed.
 boolean performOk()
          "OK" / "Apply" button pressed.
protected  void performReset()
          "Reset" button pressed.
 void setVisible(boolean visible)
          Sets the visibility of this preference page.
 
Methods inherited from class com.ibm.lpex.alef.preferences.LpexFieldEditorPreferencePage
contributeButtons, fieldEditorsCreated, init
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_parserList

protected com.ibm.lpex.alef.preferences.LpexListEditor _parserList
The list editor for document parsers selectable for the view.


_disableParsingCheckBox

protected com.ibm.lpex.alef.preferences.LpexBooleanFieldEditor _disableParsingCheckBox
The "Disable parsing" checkbox.


_parseAfterEveryKeyCheckBox

protected com.ibm.lpex.alef.preferences.LpexBooleanFieldEditor _parseAfterEveryKeyCheckBox
The "Parse after every key" checkbox.


_maintainBidiMarksCheckBox

protected com.ibm.lpex.alef.preferences.LpexBooleanFieldEditor _maintainBidiMarksCheckBox
The "Maintain bidi marks" checkbox.

Constructor Detail

ViewParserPreferencePage

public ViewParserPreferencePage(LpexView lpexView)
Constructor.

Method Detail

createContents

protected Control createContents(Composite parent)
Creates and returns the SWT control for the customized body of this preference page. Overridden in order to set the context help for the page.


createFieldEditors

protected void createFieldEditors()
Creates this preference page's field editors. Called by FieldEditorPreferencePage#createContents().

Method fieldEditorsCreated() will be called after the fields of this preference page are created and set to their initial value. A subclass may then disable any of them:

   _parserList.setEnabled(false);
   _disableParsingCheckBox.setEnabled(false);
   _parseAfterEveryKeyCheckBox.setEnabled(false);
   _maintainBidiMarksCheckBox.setEnabled(false);


getParserList

protected String[] getParserList(LpexView lpexView)
Returns the parsers for the "Document parser" list field of this page. Called by createFieldEditors().

The default implementation of this method returns the parsers specified by the globally-scoped updateProfile.parsers parameter.

Parameters:
lpexView - the document view currently associated with this preference page

setVisible

public void setVisible(boolean visible)
Sets the visibility of this preference page. Extended in order to update the page with the settings of the active view of an LpexMultiWindow each time this page is made visible.


dispose

public void dispose()
Disposes the SWT resources allocated by this dialog page. Extended in order to clear the last used document parser when this page is disposed.


performOk

public boolean performOk()
"OK" / "Apply" button pressed. Commits any new updated values by running the updateProfile command in the view, and ensures the change is reflected correctly on its screen.


performDefaults

protected void performDefaults()
"Restore Defaults" button pressed. Sets the page fields to the default parser / editor settings.


performReset

protected void performReset()
"Reset" button pressed. Restores the initial preference page settings.

Overrides:
performReset in class LpexFieldEditorPreferencePage
See Also:
LpexFieldEditorPreferencePage.contributeButtons(Composite)

getDefaultParser

protected String getDefaultParser(LpexView lpexView)
Determines the default parser for the specified view's document. Called by performDefaults().


LPEX
4.4.0

Copyright � 2016 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.