Overview

 
Package  Use  Tree  Serialized  Deprecated  Index  Help 
SWT LPEX
v3.0.0
 PREV CLASS   NEXT CLASS FRAMES    NO FRAMES  
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


 

com.ibm.lpex.core
Class LpexUtilities

java.lang.Object
  extended bycom.ibm.lpex.core.LpexUtilities


public final class LpexUtilities
extends Object

This class implements utilities which resolve differences between supported development platforms and/or operating systems. This implementation is for SWT LPEX, the Eclipse technology version of the editor.


Method Summary
static org.eclipse.swt.graphics.FontData[] fontDataFromString(String fontDataString)
          Returns the array of SWT FontData objects described by the given fontDataString.
static String fontDataToString(org.eclipse.swt.graphics.FontData[] fontData)
          Return a string representation of the given array of SWT FontData objects.
static int getPlatform()
          Return the underlying development platform of this LPEX widget.
static String getUserHomeDirectory()
          Retrieve the default directory for LPEX settings.
static boolean okToUse(org.eclipse.swt.widgets.Widget widget)
          Query whether the specified SWT Widget is usable.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

 

 

getPlatform

public static int getPlatform()

Return the underlying development platform of this LPEX widget.

Returns:
LpexConstants.PLATFORM_SWT - Eclipse (SWT)


 

 

okToUse

public static boolean okToUse(org.eclipse.swt.widgets.Widget widget)

Query whether the specified SWT Widget is usable.

Parameters:
widget - the Widget to check
Returns:
false if the widget is null or disposed


 

 

getUserHomeDirectory

public static String getUserHomeDirectory()

Retrieve the default directory for LPEX settings. See also the defaultProfile and editorLog parameters.

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\\Application Data\IBM\LpexEditor
   Windows NT:
     %SystemDrive%:\\Profiles\\Application Data\IBM\LpexEditor
   Unix:
     /home//.ibm/LpexEditor 

Editor applications may use a different directory.

Returns:
the OS-dependent path for saving the application settings


 

 

fontDataToString

public static String fontDataToString(org.eclipse.swt.graphics.FontData[] fontData)

Return a string representation of the given array of SWT FontData objects. The string representation has the form "FontData;FontData". It only includes the non-null entries.

Parameters:
fontData - an array of one or more FontData objects
See Also:
fontDataFromString(java.lang.String)


 

 

fontDataFromString

public static org.eclipse.swt.graphics.FontData[] fontDataFromString(String fontDataString)

Returns the array of SWT FontData objects described by the given fontDataString. The string is in the form "FontData;FontData".

Parameters:
fontDataString - string representation of one or more FontData objects
See Also:
fontDataToString(org.eclipse.swt.graphics.FontData[])


 

Overview

 
Package  Use  Tree  Serialized  Deprecated  Index  Help 
SWT LPEX
v3.0.0
 PREV CLASS   NEXT CLASS FRAMES    NO FRAMES  
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD