// Path: src/main/java/org/robotframework/formslibrary/FormsLibraryException.java
// public class FormsLibraryException extends RuntimeException {
// 
//     private static final long serialVersionUID = 1L;
// 
//     public static final boolean ROBOT_SUPPRESS_NAME = true;
// 
//     public FormsLibraryException(String message) {
//         super(message);
//     }
// 
//     public FormsLibraryException(Throwable t) {
//         super(t);
//     }
// 
//     public FormsLibraryException(String message, Throwable t) {
//         super(message, t);
//     }
// }


import java.awt.Component;
import java.awt.Container;
import java.awt.Point;
import java.awt.Rectangle;
import java.awt.event.KeyEvent;
import java.awt.event.MouseEvent;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import javax.accessibility.AccessibleContext;
import javax.imageio.ImageIO;
import org.robotframework.formslibrary.FormsLibraryException;

	 */
	public static Point getLocationInWindow(Component component) {

		int x = component.getX();
		int y = component.getY();

		Component parent = component.getParent();
		while (parent != null && !ComponentType.EXTENDED_FRAME.matches(parent) && !ComponentType.FORM_DESKTOP.matches(parent)) {
			x = x + parent.getX();
			y = y + parent.getY();
			parent = parent.getParent();
		}

		return new Point(x, y);
	}

	/**
	 * Get the tooltip text for a component.
	 * 
	 * @return text or null if no tooltip is available.
	 */
	private static String getToolTipText(Component component) {

		String text = null;

		try {
			Object toolTip = ObjectUtil.invokeMethod(component, "getToolTipValue()");
			if (toolTip != null) {
				text = (String) ObjectUtil.invokeMethodWithIntArg(toolTip, "getToolTipProperty()", 409);
			}

// Path: src/main/java/org/robotframework/formslibrary/FormsLibraryException.java
// public class FormsLibraryException extends RuntimeException {
// 
//     private static final long serialVersionUID = 1L;
// 
//     public static final boolean ROBOT_SUPPRESS_NAME = true;
// 
//     public FormsLibraryException(String message) {
//         super(message);
//     }
// 
//     public FormsLibraryException(Throwable t) {
//         super(t);
//     }
// 
//     public FormsLibraryException(String message, Throwable t) {
//         super(message, t);
//     }
// }


// Path: src/main/java/org/robotframework/formslibrary/util/ComponentUtil.java
import java.awt.Component;
import java.awt.Container;
import java.awt.Point;
import java.awt.Rectangle;
import java.awt.event.KeyEvent;
import java.awt.event.MouseEvent;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import javax.accessibility.AccessibleContext;
import javax.imageio.ImageIO;
import org.robotframework.formslibrary.FormsLibraryException;

	 */
	public static Point getLocationInWindow(Component component) {

		int x = component.getX();
		int y = component.getY();

		Component parent = component.getParent();
		while (parent != null && !ComponentType.EXTENDED_FRAME.matches(parent) && !ComponentType.FORM_DESKTOP.matches(parent)) {
			x = x + parent.getX();
			y = y + parent.getY();
			parent = parent.getParent();
		}

		return new Point(x, y);
	}

	/**
	 * Get the tooltip text for a component.
	 * 
	 * @return text or null if no tooltip is available.
	 */
	private static String getToolTipText(Component component) {

		String text = null;

		try {
			Object toolTip = ObjectUtil.invokeMethod(component, "getToolTipValue()");
			if (toolTip != null) {
				text = (String) ObjectUtil.invokeMethodWithIntArg(toolTip, "getToolTipProperty()", 409);
			}

		} catch (FormsLibraryException e) {
