LPEX
4.4.0

com.ibm.lpex.samples
Class SetDateAction

java.lang.Object
  extended by com.ibm.lpex.samples.SetDateAction
All Implemented Interfaces:
LpexAction

public class SetDateAction
extends Object
implements LpexAction

Sample action setDate - set the sequence-numbers date in the selected range. Use this action to modify the textual part of the sequence numbers in all the currently-selected visible lines. The user is prompted for the new text. Note that LPEX doesn't record changes to the sequence numbers in its undo stack.

Here is the SetDateAction source code.

To run this sample:

See Also:
All the samples

Nested Class Summary
static class SetDateAction.SetDate
          Sample command setDate - set the sequence-numbers date in the selected range.
 
Field Summary
static LpexCommand doSetDateCommand
          Helper command, issued by our prompt's input command, to set the new sequence-numbers text (specified in parameters), in all the visible selected lines, or in the current line if there is no selection.
static LpexAction setDateAction
          Variation of SetDateAction that can be used, for example from a user profile, when the doSetDate helper command has already been defined in the view.
 
Constructor Summary
SetDateAction()
           
 
Method Summary
 boolean available(LpexView lpexView)
          Returns the availability of this action.
 void doAction(LpexView lpexView)
          Runs the action.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

setDateAction

public static LpexAction setDateAction
Variation of SetDateAction that can be used, for example from a user profile, when the doSetDate helper command has already been defined in the view. It does not check for, nor defines, the doSetDate command.


doSetDateCommand

public static final LpexCommand doSetDateCommand
Helper command, issued by our prompt's input command, to set the new sequence-numbers text (specified in parameters), in all the visible selected lines, or in the current line if there is no selection. This command must be registered in a view with the name doSetDate.

Constructor Detail

SetDateAction

public SetDateAction()
Method Detail

doAction

public void doAction(LpexView lpexView)
Runs the action. Prompts the user for a new date, then updates the sequence numbers for all the visible selected lines.

Uses the input built-in editor command, which in turn issues the doSetDate helper command defined in here. It checks for, and if needed registers, an instance of the doSetDate command in the view.

Specified by:
doAction in interface LpexAction
Parameters:
lpexView - the document view in which the action is issued

available

public boolean available(LpexView lpexView)
Returns the availability of this action. The action can be run in any visible, writable view of a document with sequence numbers which have a textual part.

Specified by:
available in interface LpexAction
Parameters:
lpexView - the document view for which the action availability is queried

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.