Package jimm.datavision.gui

Source Code of jimm.datavision.gui.PreMoveInfo

package jimm.datavision.gui;
import jimm.datavision.field.Rectangle;
import java.awt.Point;

/**
* We save pre-move information because we need to know the original
* mouse position, we may need to the field's original position, and
* because we need to know our original position when finally moving.
*
* @author Jim Menard, <a href="mailto:jimm@io.com">jimm@io.com</a>
*/
public class PreMoveInfo {

public Rectangle origBounds;
public Point startMouseScreenPos;
public Point screenPos;
public SectionWidget sectionWidget;

/**
* Constructor.
*
* @param fw a field widget
* @param mouseScreenPos the location of the mouse in screen coordinates
*/
PreMoveInfo(FieldWidget fw, Point mouseScreenPos) {
    origBounds = new Rectangle(fw.getField().getBounds());
    sectionWidget = fw.getSectionWidget();
    screenPos = fw.getComponent().getLocationOnScreen();
    startMouseScreenPos = mouseScreenPos;
}
}
TOP

Related Classes of jimm.datavision.gui.PreMoveInfo

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.