|
LPEX 3.6.7 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.lpex.core.LpexUtilities
public final class LpexUtilities
This class implements various utilities which have dependency on a particular development platform and/or operating system. This implementation is for SWT LPEX, the Eclipse technology version of the editor.
Method Summary | |
---|---|
static Widget |
commandLineFocusWidget(LpexView lpexView)
Returns the command line widget with the input focus, if any. |
static FontData[] |
fontDataFromString(String fontDataString)
Returns the array of SWT FontData objects described by the given fontDataString . |
static String |
fontDataToString(FontData[] fontData)
Returns a string representation of the given array of SWT FontData objects. |
static int |
getPlatform()
Returns the underlying development platform of this LPEX widget. |
static String |
getUserHomeDirectory()
Returns the default directory for LPEX settings. |
static boolean |
okToUse(Widget widget)
Query whether the specified SWT Widget is usable. |
static void |
setHelp(MenuItem menuItem,
String contextHelpId)
Sets the context help for a menu item. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static int getPlatform()
LpexConstants.PLATFORM_SWT
- Eclipse (SWT)public static boolean okToUse(Widget widget)
widget
- the Widget to check
false
if the widget is null
or disposedpublic static Widget commandLineFocusWidget(LpexView lpexView)
public static String getUserHomeDirectory()
This directory is platform dependent. It is assembled using the "user.home" Java system property. This is the resulting path on various platforms:
Windows XP, 2000: %SystemDrive%:\Documents and Settings\<userid>\Application Data\IBM\LpexEditor Windows NT: %SystemDrive%:\\Profiles\<userid>\Application Data\IBM\LpexEditor Unix: /home/<userid>/.ibm/LpexEditor
Editor applications may use a different directory.
public static String fontDataToString(FontData[] fontData)
fontData
- an array of one or more FontData objectsfontDataFromString(java.lang.String)
public static FontData[] fontDataFromString(String fontDataString)
fontDataString
.
The string is in the form "FontData;FontData".
fontDataString
- string representation of one or more FontData objects, or
null
if incorrect fontDataString
fontDataToString(FontData[])
public static void setHelp(MenuItem menuItem, String contextHelpId)
|
LPEX 3.6.7 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |