|
JClass DesktopViews 6.3.0 API Documentation |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.klg.jclass.util.JCEnvironment
Static routines to provide environment information.
Field Summary | |
static String |
FILE_CHOOSER_MULTI_SELECTS
Swing bug where file chooser does not allow multiple selection of files to work correctly. |
static String |
FOCUS_RECT_IN_JTABLE
Refers to a selection bug in JTable in which the selection
model's anchor and lead do not get updated correctly if rows are added or
deleted from the table's model. |
static String |
HTML_IN_COMPONENTS
Netscape bug that prevents HTML in Swing components from appearing. |
protected static int |
javaVersion
|
protected static String |
javaVersionString
|
static String |
MOTIF_PREFERED_WIDTH_AJUSTMENT
Motif bug where calculating the prefered size of the spinbox renderer is initialy calculated smaller then it needs to be once it is displayed. |
static String |
MOTIF_TREE_LEAF_ICON
Swing bug where Motif Tree Leaf Look and Feel Icon always draws from x = 0, no matter what x value you pass it. |
static String |
PRINTING_USE_2ND_CALL
Calls to the Printable interface's print() method can happen
multiple times per page. |
static String |
SET_RESIZABLE_TO_FALSE_ON_DIALOGS
Motif bug where calling setResizable(false) causes a dialog to
grow without bound. |
protected static String |
vendorString
|
static int |
WORKING_NO
|
static int |
WORKING_UNKNOWN
|
static int |
WORKING_YES
|
Constructor Summary | |
JCEnvironment()
|
Method Summary | |
static Applet |
getApplet(Component comp)
Follows the component's parents until a parent applet is found. |
static AppletContext |
getAppletContext(Applet applet)
Gets the component's applet context. |
static int |
getJavaVersion()
Returns the version of the JDK for easy numeric comparison. |
static String |
getVendorString()
Retrieves and caches the vendor String. |
static String |
getVersionString()
Retrieves and caches the version String. |
static boolean |
inBrowser(Component comp)
Returns true if the component is in an applet in a browser
(in other words, its AppletContext is not null). |
static boolean |
isDesignTime()
Globally useful isDesignTime check. |
static boolean |
isMetal()
Is the current Look and Feel Metal? |
static boolean |
isMotif()
Is the current Look and Feel Motif? |
static boolean |
isNetBeansDesignTime()
Environment is design-time in NetBeans. |
static boolean |
isPJAToolkit()
Returns true if the PJA toolkit is currently being used. |
static boolean |
isVisualCafe()
Environment is Symantec Visual Cafe. |
static boolean |
isWindows()
Is the current Look and Feel Windows? |
static int |
isWorking(String feature)
Returns YES or NO if the answer to the question is
known; otherwise it returns UNKNOWN . |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int WORKING_UNKNOWN
public static final int WORKING_YES
public static final int WORKING_NO
public static final String FILE_CHOOSER_MULTI_SELECTS
public static final String MOTIF_TREE_LEAF_ICON
public static final String SET_RESIZABLE_TO_FALSE_ON_DIALOGS
setResizable(false)
causes a dialog to
grow without bound.
public static final String MOTIF_PREFERED_WIDTH_AJUSTMENT
public static final String HTML_IN_COMPONENTS
public static final String PRINTING_USE_2ND_CALL
print()
method can happen
multiple times per page. In some cases (jdk 1.4 & Windows for one), it is
the second call that has the real graphics class needed for correct
formatting based on printer font metrics.
public static final String FOCUS_RECT_IN_JTABLE
JTable
in which the selection
model's anchor and lead do not get updated correctly if rows are added or
deleted from the table's model. This manifests itself in
JCTreeTable
because we add/delete rows every time we expand or
collapse a node.
protected static String javaVersionString
protected static String vendorString
protected static int javaVersion
Constructor Detail |
public JCEnvironment()
Method Detail |
public static int isWorking(String feature)
YES
or NO
if the answer to the question is
known; otherwise it returns UNKNOWN
.This will be extended in the future as platform specific bugs appear, since many problems are specific to many versions or many different platforms. All knowledge of the problem will be encasulated (hidden) in this class to make it easier to track and implement multiple manifestations of the problem and to make the workarounds more legible and maintainable.
A String based lookup method is used so that the API remains constant, even as this class handles more and more divergent cases.
feature
-
YES
or NO
if the answer to the question is
known; otherwise
it returns UNKNOWN
public static int getJavaVersion()
An additional reason for this is that historically the vendor provided version is sometimes inconsistent. If the version String is not found, or if there is a parsing error, then the return value is -1.
public static String getVersionString()
public static boolean isMotif()
public static boolean isWindows()
public static boolean isMetal()
public static boolean isDesignTime()
isDesignTime
check. This will take into
account environments that don't set java.beans.isDesignTime
.
public static boolean isNetBeansDesignTime()
public static boolean isVisualCafe()
public static String getVendorString()
public static Applet getApplet(Component comp)
comp
-
public static AppletContext getAppletContext(Applet applet)
applet
-
Applet.getAppletContext()
public static boolean inBrowser(Component comp)
true
if the component is in an applet in a browser
(in other words, its AppletContext
is not null).
comp
-
true
if the component is in an applet in a browserpublic static boolean isPJAToolkit()
true
if the PJA toolkit is currently being used.
true
if the PJA toolkit is currently being used.
|
Copyright © 2004 Quest Software Inc.. All rights reserved. |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |