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

Variable Index

 o BACKGROUND_COLOR
The default background color.
 o 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.
 o FOREGROUND_COLOR
The default foreground color.
 o HAS_COPY_AREA_BUG
True if the JDK has the java.awt.Graphics#copyArea() bug.
 o HAS_FOCUS_BUG
True if the JDK has the sun.awt.windows.WWindowPeer#getFocusPeer() bug.
 o IS_DIRECT_NOTIFICATION
If true, notifies listeners directly without using the event queue.
 o USE_DOUBLE_BUFFER
The default double buffer policy.

Constructor Index

 o AWTResources()

Method Index

 o checkComponentState(Component)
Checks the component state for the specified component.
 o getIcon(Class, String)
Returns the resource icon indicated by the specified class and file.
 o getResourceBoolean(String, boolean)
Returns the resource boolean indicated by the specified key.
 o getResourceColor(String, Color)
Returns the resource color indicated by the specified key.
 o getResourceInteger(String, int)
Returns the resource integer indicated by the specified key.
 o getResourceString(String)
Returns the resource string indicated by the specified key.
 o getResourceString(String, String)
Returns the resource string indicated by the specified key.

Variables

 o FOREGROUND_COLOR
 public static final Color FOREGROUND_COLOR
The default foreground color.

 o BACKGROUND_COLOR
 public static final Color BACKGROUND_COLOR
The default background color.

 o USE_DOUBLE_BUFFER
 public static boolean USE_DOUBLE_BUFFER
The default double buffer policy.

 o IS_DIRECT_NOTIFICATION
 public static boolean IS_DIRECT_NOTIFICATION
If true, notifies listeners directly without using the event queue.

 o 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.

 o 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.

 o 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.

Constructors

 o AWTResources
 public AWTResources()

Methods

 o 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.
 o 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.
 o 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.
 o 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.
 o 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.
 o 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.
 o 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