org.salespointframework.core
Class FormSheet.DnDDispatcher

java.lang.Object
  extended by org.salespointframework.core.FormSheet.DnDDispatcher
All Implemented Interfaces:
java.awt.event.AWTEventListener, java.util.EventListener
Enclosing class:
FormSheet

private class FormSheet.DnDDispatcher
extends java.lang.Object
implements java.awt.event.AWTEventListener

this class manages drag'n drop events on this formsheet

Since:
4.0
Author:
Thomas Kissinger

Field Summary
protected  DnDComponent dndComponent
          component that caused the drag
protected  boolean dndInProgress
          true id drag is in progress
protected  DnDComponent hlComponent
          component that is currently highlighted
protected  boolean initialGeasture
          first time of drag event
protected  java.awt.Point lastLocalPoint
          last paint relative to dndComponent
protected  DnDMotionComponent motionCmp
          motion component which is displayed in drag layer
protected  javax.swing.Timer timer
          timer
protected  int transferCount
          count of transfered objects
protected  int transferIndex
          index of transfered object
protected  java.lang.Object transferObject
          object that is transfered
 
Constructor Summary
FormSheet.DnDDispatcher()
          default constructor
 
Method Summary
 void abortDnDOperation()
          abort the dnd operation
 void dndComponentRemoved(DnDComponent dndcmp)
          abort drag operation of DnDComponent was removed
 void eventDispatched(java.awt.AWTEvent event)
          event dispatcher
protected  DnDComponent getAffectedComponent(java.awt.event.MouseEvent me)
          currently affected dnd component
protected  java.awt.Point getLocalPoint(java.awt.event.MouseEvent me, java.awt.Component cmp)
          transform point to local coords
 void paintHiglightEffect(java.awt.Graphics g)
          paint highlight effect on hlComponent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

dndInProgress

protected boolean dndInProgress
true id drag is in progress


dndComponent

protected DnDComponent dndComponent
component that caused the drag


transferObject

protected java.lang.Object transferObject
object that is transfered


transferCount

protected int transferCount
count of transfered objects


motionCmp

protected DnDMotionComponent motionCmp
motion component which is displayed in drag layer


hlComponent

protected DnDComponent hlComponent
component that is currently highlighted


timer

protected javax.swing.Timer timer
timer


transferIndex

protected int transferIndex
index of transfered object


lastLocalPoint

protected java.awt.Point lastLocalPoint
last paint relative to dndComponent


initialGeasture

protected boolean initialGeasture
first time of drag event

Constructor Detail

FormSheet.DnDDispatcher

public FormSheet.DnDDispatcher()
default constructor

Method Detail

getLocalPoint

protected java.awt.Point getLocalPoint(java.awt.event.MouseEvent me,
                                       java.awt.Component cmp)
transform point to local coords

Parameters:
me -
cmp - target component
Returns:
local point

getAffectedComponent

protected DnDComponent getAffectedComponent(java.awt.event.MouseEvent me)
currently affected dnd component

Parameters:
me -
Returns:
affected DnDComponent

dndComponentRemoved

public void dndComponentRemoved(DnDComponent dndcmp)
abort drag operation of DnDComponent was removed

Parameters:
dndcmp -

abortDnDOperation

public void abortDnDOperation()
abort the dnd operation


paintHiglightEffect

public void paintHiglightEffect(java.awt.Graphics g)
paint highlight effect on hlComponent

Parameters:
g -

eventDispatched

public void eventDispatched(java.awt.AWTEvent event)
event dispatcher

Specified by:
eventDispatched in interface java.awt.event.AWTEventListener