org.biojava.spice.gui
Class AbstractPopupFrame

java.lang.Object
  extended byorg.biojava.spice.gui.AbstractPopupFrame
All Implemented Interfaces:
EventListener, MouseListener, MouseMotionListener
Direct Known Subclasses:
LogPopupFrame, SegmentPopupFrame

public abstract class AbstractPopupFrame
extends Object
implements MouseListener, MouseMotionListener

a class that provides a "floating" frame that follows the position of the cursor the "content" of the panel is provided by the content Container that has to be provided by a class that extends this abstract class

Since:
11:23:08 AM
Version:
%I% %G%
Author:
Andreas Prlic

Field Summary
static int DIST
           
 
Constructor Summary
AbstractPopupFrame()
           
 
Method Summary
protected  JFrame createFrame()
           
protected  void dispatchFrame()
           
protected  void disposeFrame()
          usually the frame is not dispsosed, but just set to invisible!
abstract  Container getContent()
          this class needs to be provided by implementing sub-classes.
protected  void hideFrame()
           
 void interruptTimer()
           
 boolean isShown()
          return a flag if the frame is currently shown
 void markForHide()
          set a flag that this frame will be disposed in X seconds, unless updateFramePosition is called again
 void mouseClicked(MouseEvent arg0)
           
 void mouseDragged(MouseEvent arg0)
          when the mouse is dragged the frame stays at the same location and is not disposed
 void mouseEntered(MouseEvent e)
           
 void mouseExited(MouseEvent arg0)
           
 void mouseMoved(MouseEvent e)
           
 void mousePressed(MouseEvent arg0)
           
 void mouseReleased(MouseEvent arg0)
           
 void repaint()
           
 void resetTimer()
           
 void showFrame()
           
 void updateFramePosition(MouseEvent e)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DIST

public static final int DIST
See Also:
Constant Field Values
Constructor Detail

AbstractPopupFrame

public AbstractPopupFrame()
Method Detail

isShown

public boolean isShown()
return a flag if the frame is currently shown

Returns:
flag is currently being shown

createFrame

protected JFrame createFrame()

dispatchFrame

protected void dispatchFrame()

repaint

public void repaint()

getContent

public abstract Container getContent()
this class needs to be provided by implementing sub-classes. it provides the content that should be displayed in the frame

Returns:
a Component

resetTimer

public void resetTimer()

markForHide

public void markForHide()
set a flag that this frame will be disposed in X seconds, unless updateFramePosition is called again


disposeFrame

protected void disposeFrame()
usually the frame is not dispsosed, but just set to invisible!


hideFrame

protected void hideFrame()

showFrame

public void showFrame()

updateFramePosition

public void updateFramePosition(MouseEvent e)

interruptTimer

public void interruptTimer()

mouseClicked

public void mouseClicked(MouseEvent arg0)
Specified by:
mouseClicked in interface MouseListener

mousePressed

public void mousePressed(MouseEvent arg0)
Specified by:
mousePressed in interface MouseListener

mouseReleased

public void mouseReleased(MouseEvent arg0)
Specified by:
mouseReleased in interface MouseListener

mouseDragged

public void mouseDragged(MouseEvent arg0)
when the mouse is dragged the frame stays at the same location and is not disposed

Specified by:
mouseDragged in interface MouseMotionListener

mouseEntered

public void mouseEntered(MouseEvent e)
Specified by:
mouseEntered in interface MouseListener

mouseExited

public void mouseExited(MouseEvent arg0)
Specified by:
mouseExited in interface MouseListener

mouseMoved

public void mouseMoved(MouseEvent e)
Specified by:
mouseMoved in interface MouseMotionListener