All Packages Class Hierarchy This Package Previous Next Index
Class jp.kyasu.awt.AWTResources
java.lang.Object
|
+----jp.kyasu.awt.AWTResources
- public class AWTResources
- extends Object
The AWTResources
class provides the resources shared in
this package.
- Version:
- 20 Nov 1999
- Author:
- Kazuki YASUMATSU
-
BACKGROUND_COLOR
- The default background color.
-
CAN_OPEN_POPUP_IN_MODAL_DIALOG
- True if a pop-up window can receive the events even when the pop-up
window is opend within a modal dialog.
-
FOREGROUND_COLOR
- The default foreground color.
-
HAS_COPY_AREA_BUG
- True if the JDK has the
java.awt.Graphics#copyArea()
bug.
-
HAS_FOCUS_BUG
- True if the JDK has the
sun.awt.windows.WWindowPeer#getFocusPeer()
bug.
-
IS_DIRECT_NOTIFICATION
- If true, notifies listeners directly without using the event queue.
-
USE_DOUBLE_BUFFER
- The default double buffer policy.
-
AWTResources()
-
-
checkComponentState(Component)
- Checks the component state for the specified component.
-
getIcon(Class, String)
- Returns the resource icon indicated by the specified class and file.
-
getResourceBoolean(String, boolean)
- Returns the resource boolean indicated by the specified key.
-
getResourceColor(String, Color)
- Returns the resource color indicated by the specified key.
-
getResourceInteger(String, int)
- Returns the resource integer indicated by the specified key.
-
getResourceString(String)
- Returns the resource string indicated by the specified key.
-
getResourceString(String, String)
- Returns the resource string indicated by the specified key.
FOREGROUND_COLOR
public static final Color FOREGROUND_COLOR
- The default foreground color.
BACKGROUND_COLOR
public static final Color BACKGROUND_COLOR
- The default background color.
USE_DOUBLE_BUFFER
public static boolean USE_DOUBLE_BUFFER
- The default double buffer policy.
IS_DIRECT_NOTIFICATION
public static boolean IS_DIRECT_NOTIFICATION
- If true, notifies listeners directly without using the event queue.
HAS_FOCUS_BUG
public static boolean HAS_FOCUS_BUG
- True if the JDK has the
sun.awt.windows.WWindowPeer#getFocusPeer()
bug.
Because of this bug, if a lightwight component is focus traversable,
an application will be hung up.
This bug has been fixed from JDK1.1.5.
CAN_OPEN_POPUP_IN_MODAL_DIALOG
public static boolean CAN_OPEN_POPUP_IN_MODAL_DIALOG
- True if a pop-up window can receive the events even when the pop-up
window is opend within a modal dialog.
HAS_COPY_AREA_BUG
public static boolean HAS_COPY_AREA_BUG
- True if the JDK has the
java.awt.Graphics#copyArea()
bug.
This bug has arised from JDK1.2.
AWTResources
public AWTResources()
getResourceString
public static String getResourceString(String key)
- Returns the resource string indicated by the specified key.
- Parameters:
- key - the name of the resource.
- Returns:
- the string value of the resource, or
null
if there is no resource with that key.
getResourceString
public static String getResourceString(String key,
String def)
- Returns the resource string indicated by the specified key.
- Parameters:
- key - the name of the resource.
- def - a default value.
- Returns:
- the string value of the resource, or the default value
if there is no resource with that key.
getResourceInteger
public static int getResourceInteger(String key,
int def)
- Returns the resource integer indicated by the specified key.
- Parameters:
- key - the name of the resource.
- def - a default integer.
- Returns:
- the integer value of the resource, or the default integer
if there is no resource with that key.
getResourceBoolean
public static boolean getResourceBoolean(String key,
boolean def)
- Returns the resource boolean indicated by the specified key.
- Parameters:
- key - the name of the resource.
- def - a default boolean.
- Returns:
- the boolean value of the resource, or the default boolean
if there is no resource with that key.
getResourceColor
public static Color getResourceColor(String key,
Color def)
- Returns the resource color indicated by the specified key.
- Parameters:
- key - the name of the resource.
- def - a default color.
- Returns:
- the color value of the resource, or the default color
if there is no resource with that key.
getIcon
public static VImage getIcon(Class baseClass,
String file)
- Returns the resource icon indicated by the specified class and file.
- Parameters:
- baseClass - the base class.
- file - a file name.
- Returns:
- the icon of the resource, or the default null icon
if there is no resource with that key.
checkComponentState
public static void checkComponentState(Component comp)
- Checks the component state for the specified component.
If HAS_FOCUS_BUG
is true, an application should use
jp.kyasu.awt.{Dialog,Frame,Window} instead of
java.awt.{Dialog,Frame,Window}.
If a top frame has a menu bar on windows, an application should
wrap a lightweight component in a native component, so that pop-up
menu and getLocationOnScreen()
work correctly.
- Throws: IllegalComponentStateException
- if the component
state is illegal.
All Packages Class Hierarchy This Package Previous Next Index