JGraphpad Pro
v6.0.5.0


com.jgraph.pad.util
Class JGraphpadMouseAdapter

java.lang.Object
  extended byjava.awt.event.MouseAdapter
      extended bycom.jgraph.pad.util.JGraphpadMouseAdapter
All Implemented Interfaces:
EventListener, MouseListener

public class JGraphpadMouseAdapter
extends MouseAdapter

Simpify the creation of popup menus.


Field Summary
protected  String configName
          Holds the name of the configuration to be returned from JGraphpad.NAME_UICONFIG.
protected  JGraphEditor editor
          References the enclosing editor.
 
Constructor Summary
JGraphpadMouseAdapter(JGraphEditor editor, String configName)
          Constructs a new mouse adapter for the specified enclosing editor and popup menu configuration name.
 
Method Summary
 String getConfigName()
           
 Node getPopupMenuConfiguration(MouseEvent event)
          Hook for subclassers to return a configuration for the popup menu.
 void mouseReleased(MouseEvent event)
          Displays a popup menu.
 void setConfigName(String configName)
           
 
Methods inherited from class java.awt.event.MouseAdapter
mouseClicked, mouseEntered, mouseExited, mousePressed
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

editor

protected JGraphEditor editor
References the enclosing editor.


configName

protected String configName
Holds the name of the configuration to be returned from JGraphpad.NAME_UICONFIG.

Constructor Detail

JGraphpadMouseAdapter

public JGraphpadMouseAdapter(JGraphEditor editor,
                             String configName)
Constructs a new mouse adapter for the specified enclosing editor and popup menu configuration name.

Parameters:
editor - The enclosing editor.
configName - The name of the popup menu configuration.
Method Detail

getPopupMenuConfiguration

public Node getPopupMenuConfiguration(MouseEvent event)
Hook for subclassers to return a configuration for the popup menu.

Parameters:
event - The object that describes the event.
Returns:
Returns the configuration for the popup menu.

mouseReleased

public void mouseReleased(MouseEvent event)
Displays a popup menu.

Parameters:
event - The object that describes the event.

getConfigName

public String getConfigName()
Returns:
Returns the configName.

setConfigName

public void setConfigName(String configName)
Parameters:
configName - The configName to set.

JGraphpad Pro
v6.0.5.0


Copyright (C) 2005 JGraph.com. All rights reserved.