|
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.Utilities
public final class Utilities
Various LPEX internal-use (non-API) utilities.
Method Summary | |
---|---|
static void |
addStatusLineListener(LpexWindow lpexWindow,
StatusLineListener listener)
|
static void |
commentUncommentCobolLines(LpexView lpexView,
int commentOffset,
boolean comment)
Implements CobolParser's comment and uncomment actions. |
static String |
currentPopupMenu(LpexView lpexView)
Returns the current value for building the pop-up menu for the view. |
static int |
fullTextToTextPosition(LpexView lpexView,
int element,
int position)
Could be made public API?! |
static int |
getBaseline(LpexView lpexView)
|
static LpexDocumentLocation |
getTextLocationAtPoint(LpexView lpexView,
int x,
int y)
Returns the document position at the given coordinates inside the text of this view's text window. |
static int |
notifyTruncateDocument(LpexView lpexView,
LpexDocumentListener listener,
int textLimit)
Issues document-listener notifications for the text-limit truncation of a document as done during save. |
static void |
notifyTruncateDocumentRestore(LpexView lpexView,
LpexDocumentListener listener,
int textLimit,
int firstTruncatedElement)
Issues document-listener notifications to restore the changes resulting from the text-limit truncation of a document as done during save. |
static void |
processLpexKey(LpexView lpexView,
String lpexKey)
|
static void |
profileChanged()
|
static void |
removeStatusLineListener(LpexWindow lpexWindow,
StatusLineListener listener)
|
static void |
resetText(LpexView lpexView,
String text,
boolean keepEnvironment)
Like LpexView#setText(text), but tries to keep the same edit environment. |
static void |
setProfileHandler(ProfileHandler profileHandler)
|
static int |
textToFullTextPosition(LpexView lpexView,
int element,
int position)
Could be made public API?! |
static void |
unnumber(LpexView lpexView,
boolean trim)
Implements RDz LPEX Editor's UNNUMBER command. |
static boolean |
updateText(LpexView lpexView,
int line,
int position,
int deleteToLine,
int deleteToPosition,
String text)
SWT JLPEX alef.DocumentAdapter call to update LPEX text from stream-oriented IDocument. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static boolean updateText(LpexView lpexView, int line, int position, int deleteToLine, int deleteToPosition, String text)
line
- lineposition
- full-text positiondeleteToLine
- 1st delete-to linedeleteToPosition
- 1st delete-to full-text positiontext
- 2nd [full] text to insertpublic static void resetText(LpexView lpexView, String text, boolean keepEnvironment)
public static void addStatusLineListener(LpexWindow lpexWindow, StatusLineListener listener)
public static void removeStatusLineListener(LpexWindow lpexWindow, StatusLineListener listener)
public static int textToFullTextPosition(LpexView lpexView, int element, int position)
public static int fullTextToTextPosition(LpexView lpexView, int element, int position)
public static int getBaseline(LpexView lpexView)
public static void processLpexKey(LpexView lpexView, String lpexKey)
public static String currentPopupMenu(LpexView lpexView)
public static LpexDocumentLocation getTextLocationAtPoint(LpexView lpexView, int x, int y)
If the x coordinate of the point is beyond the center of a character, the returned position is after that character.
public static int notifyTruncateDocument(LpexView lpexView, LpexDocumentListener listener, int textLimit)
During a save operation, text elements saved to the file are truncated to the text-limit value in effect, under these conditions:
notifyTruncateDocumentRestore(com.ibm.lpex.core.LpexView, com.ibm.lpex.core.LpexDocumentListener, int, int)
public static void notifyTruncateDocumentRestore(LpexView lpexView, LpexDocumentListener listener, int textLimit, int firstTruncatedElement)
notifyTruncateDocument(com.ibm.lpex.core.LpexView, com.ibm.lpex.core.LpexDocumentListener, int)
public static void commentUncommentCobolLines(LpexView lpexView, int commentOffset, boolean comment)
commentOffset
- comment's offset in the elementcomment
- true
= add line comments, or
false
= remove line comments from the start of the line's textpublic static void setProfileHandler(ProfileHandler profileHandler)
public static void profileChanged()
public static void unnumber(LpexView lpexView, boolean trim)
|
LPEX 3.6.6 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |