MDateSelector

mseries.ui
Class ScreenUtilities

java.lang.Object
  extended by mseries.ui.ScreenUtilities

public class ScreenUtilities
extends Object


Constructor Summary
ScreenUtilities()
           
 
Method Summary
static Point convertScreenLocationToParent(Container parent, int x, int y)
          Given a point ona screen this method calculates the absolute point in the parent container (Frame)
static HashSet<KeyStroke> getDefaultFocusTraversalKeys(int id)
           
static Dialog getParentDialog(Component child)
           
static Frame getParentFrame(Component child)
           
static Container getParentWindow(Component c)
          Finds the parent container (Window, JRootPane) of the component.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ScreenUtilities

public ScreenUtilities()
Method Detail

getParentWindow

public static Container getParentWindow(Component c)
Finds the parent container (Window, JRootPane) of the component. This is useful for drawing components in the container since all co-ords are reltive to the component and not its parent

Parameters:
c - the component
Returns:
its parent

convertScreenLocationToParent

public static Point convertScreenLocationToParent(Container parent,
                                                  int x,
                                                  int y)
Given a point ona screen this method calculates the absolute point in the parent container (Frame)


getParentDialog

public static Dialog getParentDialog(Component child)
Returns:
a Dialog that is the first one in the hierarchy containing the component passed component

getParentFrame

public static Frame getParentFrame(Component child)
Returns:
a Frame that is the first one in the hierarchy containing the component passed component

getDefaultFocusTraversalKeys

public static HashSet<KeyStroke> getDefaultFocusTraversalKeys(int id)
Returns:
a set of KeyStrokes for traversal of custom components

MDateSelector

Copyright © 2001-2007 M Newstead. All Rights Reserved.