cds.aladin
Class ComponentLocator

java.lang.Object
  extended by cds.aladin.ComponentLocator

public class ComponentLocator
extends java.lang.Object

Title : ComponentLocation

Description : finds absolute screen coordinates of a component on the basis of its name

Version:
0.1 (kickoff : 02/02/2004)
Author:
Thomas Boch [CDS]

Constructor Summary
ComponentLocator()
          Constructor
 
Method Summary
 java.awt.Point getLocation(java.awt.Component comp)
          Return absolute coordinates of a given component
 java.awt.Point getLocation(java.awt.Component comp, java.awt.Component stop)
           
 java.awt.Point getLocation(java.lang.String widgetName, WidgetFinder comp)
          Return absolute coordinates of a home-made widget, given its name
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ComponentLocator

public ComponentLocator()
Constructor

Method Detail

getLocation

public java.awt.Point getLocation(java.awt.Component comp)
Return absolute coordinates of a given component

Parameters:
comp - component whose location is searched
Returns:
Point point corresponding to the coordinates on the screen of this component, null if comp is null

getLocation

public java.awt.Point getLocation(java.awt.Component comp,
                                  java.awt.Component stop)

getLocation

public java.awt.Point getLocation(java.lang.String widgetName,
                                  WidgetFinder comp)
Return absolute coordinates of a home-made widget, given its name

Parameters:
widgetName - name of the widget whose location is searched
comp - WidgetFinder where stands widgetName
Returns:
Point points corresponding to the coordinates on the screen of this component, null if widgetName was not found


Copyright © 2009 UDS/CNRS