org.jgraph.plaf.basic.BasicGraphDropTargetListener Class Reference

Inheritance diagram for org.jgraph.plaf.basic.BasicGraphDropTargetListener:

org.jgraph.plaf.basic.BasicGraphUI.GraphDropTargetListener List of all members.

Public Member Functions

 BasicGraphDropTargetListener ()
synchronized void actionPerformed (ActionEvent e)
void dragEnter (DropTargetDragEvent e)
void dragOver (DropTargetDragEvent e)
void dragExit (DropTargetEvent e)
void drop (DropTargetDropEvent e)
void dropActionChanged (DropTargetDragEvent e)

Protected Member Functions

void saveComponentState (JComponent c)
void restoreComponentState (JComponent c)
void restoreComponentStateForDrop (JComponent c)
void updateInsertionLocation (JComponent c, Point p)

Package Functions

void updateAutoscrollRegion (JComponent c)
void autoscroll (JComponent c, Point pos)

Static Package Functions

static JComponent getComponent (DropTargetEvent e)

Private Member Functions

void initPropertiesIfNecessary ()
void cleanup ()

Private Attributes

Timer timer
Point lastPosition
Rectangle outer = new Rectangle()
Rectangle inner = new Rectangle()
int hysteresis = 10
boolean canImport
JComponent component

Constructor & Destructor Documentation

org.jgraph.plaf.basic.BasicGraphDropTargetListener.BasicGraphDropTargetListener  ) 
 

construct a DropTargetAutoScroller


Member Function Documentation

synchronized void org.jgraph.plaf.basic.BasicGraphDropTargetListener.actionPerformed ActionEvent  e  ) 
 

The timer fired, perform autoscroll if the pointer is within the autoscroll region.

Parameters:
e the ActionEvent

void org.jgraph.plaf.basic.BasicGraphDropTargetListener.autoscroll JComponent  c,
Point  pos
[package]
 

Perform an autoscroll operation. This is implemented to scroll by the unit increment of the Scrollable using scrollRectToVisible. If the cursor is in a corner of the autoscroll region, more than one axis will scroll.

void org.jgraph.plaf.basic.BasicGraphDropTargetListener.cleanup  )  [private]
 

Cleans up internal state after the drop has finished (either succeeded or failed).

void org.jgraph.plaf.basic.BasicGraphDropTargetListener.dragEnter DropTargetDragEvent  e  ) 
 

Reimplemented in org.jgraph.plaf.basic.BasicGraphUI.GraphDropTargetListener.

void org.jgraph.plaf.basic.BasicGraphDropTargetListener.dragExit DropTargetEvent  e  ) 
 

void org.jgraph.plaf.basic.BasicGraphDropTargetListener.dragOver DropTargetDragEvent  e  ) 
 

void org.jgraph.plaf.basic.BasicGraphDropTargetListener.drop DropTargetDropEvent  e  ) 
 

void org.jgraph.plaf.basic.BasicGraphDropTargetListener.dropActionChanged DropTargetDragEvent  e  ) 
 

Reimplemented in org.jgraph.plaf.basic.BasicGraphUI.GraphDropTargetListener.

static JComponent org.jgraph.plaf.basic.BasicGraphDropTargetListener.getComponent DropTargetEvent  e  )  [static, package]
 

void org.jgraph.plaf.basic.BasicGraphDropTargetListener.initPropertiesIfNecessary  )  [private]
 

Initializes the internal properties if they haven't been already inited. This is done lazily to avoid loading of desktop properties.

void org.jgraph.plaf.basic.BasicGraphDropTargetListener.restoreComponentState JComponent  c  )  [protected]
 

called to restore the state of a component in case a drop is not performed.

Reimplemented in org.jgraph.plaf.basic.BasicGraphUI.GraphDropTargetListener.

void org.jgraph.plaf.basic.BasicGraphDropTargetListener.restoreComponentStateForDrop JComponent  c  )  [protected]
 

called to restore the state of a component in case a drop is performed.

void org.jgraph.plaf.basic.BasicGraphDropTargetListener.saveComponentState JComponent  c  )  [protected]
 

called to save the state of a component in case it needs to be restored because a drop is not performed.

Reimplemented in org.jgraph.plaf.basic.BasicGraphUI.GraphDropTargetListener.

void org.jgraph.plaf.basic.BasicGraphDropTargetListener.updateAutoscrollRegion JComponent  c  )  [package]
 

Update the geometry of the autoscroll region. The geometry is maintained as a pair of rectangles. The region can cause a scroll if the pointer sits inside it for the duration of the timer. The region that causes the timer countdown is the area between the two rectangles.

This is implemented to use the visible area of the component as the outer rectangle and the insets are based upon the Scrollable information (if any). If the Scrollable is scrollable along an axis, the step increment is used as the autoscroll inset. If the component is not scrollable, the insets will be zero (i.e. autoscroll will not happen).

void org.jgraph.plaf.basic.BasicGraphDropTargetListener.updateInsertionLocation JComponent  c,
Point  p
[protected]
 

called to set the insertion location to match the current mouse pointer coordinates.

Reimplemented in org.jgraph.plaf.basic.BasicGraphUI.GraphDropTargetListener.


Member Data Documentation

boolean org.jgraph.plaf.basic.BasicGraphDropTargetListener.canImport [private]
 

JComponent org.jgraph.plaf.basic.BasicGraphDropTargetListener.component [private]
 

The current component. The value is cached from the drop events and used by the timer. When a drag exits or a drop occurs, this value is cleared.

int org.jgraph.plaf.basic.BasicGraphDropTargetListener.hysteresis = 10 [private]
 

Rectangle org.jgraph.plaf.basic.BasicGraphDropTargetListener.inner = new Rectangle() [private]
 

Point org.jgraph.plaf.basic.BasicGraphDropTargetListener.lastPosition [private]
 

Rectangle org.jgraph.plaf.basic.BasicGraphDropTargetListener.outer = new Rectangle() [private]
 

Timer org.jgraph.plaf.basic.BasicGraphDropTargetListener.timer [private]
 


The documentation for this class was generated from the following file:
Generated on Sun May 28 19:13:17 2006 for Digimod by  doxygen 1.4.6-NO