|
LPEX 3.6.6 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.lpex.core.LpexViewAdapter
com.ibm.lpex.samples.CursorHairline
public class CursorHairline
Sample class to display a vertical hairline.
Installing this class in a document view adds a vertical hairline that either tracks the cursor, or is fixed at the cursor location in effect when it is installed.
Here is the CursorHairline source code.
A user profile (such as TestUserProfile
) can install this feature
in a document view by calling, for example:
CursorHairline.install(lpexView, false);
The code fragment below sets the hairline at column 81 (assuming a fixed-pitch font):
// import com.ibm.lpex.samples.CursorHairline; String currentPosition = lpexView.query("displayPosition"); lpexView.doCommand("set displayPosition 81"); CursorHairline.install(lpexView, false); lpexView.doCommand("screenShow view"); lpexView.doCommand("set displayPosition " + currentPosition);
See also HairlineCommand
as an example of an editor command that
controls the display of the cursor hairline.
All the samples
Method Summary | |
---|---|
void |
disposed(LpexView lpexView)
View listener - the view is being disposed. |
static void |
install(LpexView lpexView,
boolean trackCursor)
Installs the hairline in the given document view. |
void |
paintControl(PaintEvent e)
Text window paint listener - paint event notification. |
void |
shown(LpexView lpexView)
View listener - the view has been refreshed. |
static void |
uninstall(LpexView lpexView)
Uninstalls the cursor hairline from the given view. |
void |
widgetDisposed(DisposeEvent e)
Text window dispose listener - the window is being disposed. |
Methods inherited from class com.ibm.lpex.core.LpexViewAdapter |
---|
readonly, renamed, renaming, saved, saving, showing, updateProfile |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static void install(LpexView lpexView, boolean trackCursor)
trackCursor
- true = hairline follows the cursor, or
false = fixed hairline at the current positionpublic static void uninstall(LpexView lpexView)
public void shown(LpexView lpexView)
shown
in interface LpexViewListener
shown
in class LpexViewAdapter
LpexViewListener.showing(com.ibm.lpex.core.LpexView)
public void disposed(LpexView lpexView)
disposed
in interface LpexViewListener
disposed
in class LpexViewAdapter
public void widgetDisposed(DisposeEvent e)
public void paintControl(PaintEvent e)
|
LPEX 3.6.6 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |