LPEX
4.4.0

com.ibm.lpex.samples
Class SyncCommand

java.lang.Object
  extended by com.ibm.lpex.samples.SyncCommand
All Implemented Interfaces:
LpexCommand

public class SyncCommand
extends Object
implements LpexCommand

Sample command sync - synchronize the vertical scrolling of two views. Vertical scrolling in the current document view will trigger a similar scrolling of the selected view. Scrolling in the other view does not reciprocate, allowing you to adjust the synchronization when there is a difference in the number of lines between the two views.

For best results ensure the views have the same size, and are either not filtered or filtered on the same terms.

Here is the SyncCommand source code.

To run this sample:

See Also:
All the samples

Constructor Summary
SyncCommand()
           
 
Method Summary
 boolean doCommand(LpexView lpexView, String parameters)
          Runs this command.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SyncCommand

public SyncCommand()
Method Detail

doCommand

public boolean doCommand(LpexView lpexView,
                         String parameters)
Runs this command. Prompts the user for the view to synchronize to current view's vertical scrolling, and starts the synchronized scrolling.

Specified by:
doCommand in interface LpexCommand
Parameters:
lpexView - the document view in which the command was issued
parameters - optional parameter "on" / "off" / "?"

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.