org.jclarion.clarion.swing.dnd.DragEvent Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of clarion-runtime Show documentation
Show all versions of clarion-runtime Show documentation
JClarion runtime environment
package org.jclarion.clarion.swing.dnd;
import org.jclarion.clarion.ClarionEvent;
import org.jclarion.clarion.constants.Event;
import org.jclarion.clarion.control.AbstractControl;
public class DragEvent extends ClarionEvent
{
private AbstractControl src;
private AbstractControl target;
private String data;
public DragEvent(AbstractControl src,AbstractControl target,String data) {
super(Event.DRAG,src,true);
this.src=src;
this.target=target;
this.data=data;
}
@Override
public void consume(boolean isConsumed) {
super.consume(isConsumed);
if (isConsumed) {
target.getWindowOwner().post(new DropEvent(src,target,data));
}
}
public String getData()
{
return data;
}
public AbstractControl getSource()
{
return src;
}
public AbstractControl getTarget()
{
return target;
}
public void setData(String id) {
this.data=id;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy