Cytoscape 2.8.0 API

cytoscape.util.swing
Class WidestStringComboBoxPopupMenuListener

java.lang.Object
  extended by cytoscape.util.swing.WidestStringComboBoxPopupMenuListener
All Implemented Interfaces:
EventListener, PopupMenuListener

public class WidestStringComboBoxPopupMenuListener
extends Object
implements PopupMenuListener

Author:
Noel Ruddock Listener that can be attached to a JComboBox. When the JComboBox to which it is attached uses a ComboBoxModel that implements WidestStringProvider, the popup list will be resized so that the longest String will be completely visible.

Constructor Summary
WidestStringComboBoxPopupMenuListener()
           
 
Method Summary
 void popupMenuCanceled(PopupMenuEvent e)
          Not interested in this event.
 void popupMenuWillBecomeInvisible(PopupMenuEvent e)
          Not interested in this event.
 void popupMenuWillBecomeVisible(PopupMenuEvent e)
          Resize the popup list based on the longest display string for objects in the model of the JComboBox being listened to.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WidestStringComboBoxPopupMenuListener

public WidestStringComboBoxPopupMenuListener()
Method Detail

popupMenuWillBecomeVisible

public void popupMenuWillBecomeVisible(PopupMenuEvent e)
Resize the popup list based on the longest display string for objects in the model of the JComboBox being listened to. The model must implement WidestStringProvider for the popup to be sized.

Specified by:
popupMenuWillBecomeVisible in interface PopupMenuListener
Parameters:
e -

popupMenuWillBecomeInvisible

public void popupMenuWillBecomeInvisible(PopupMenuEvent e)
Not interested in this event.

Specified by:
popupMenuWillBecomeInvisible in interface PopupMenuListener
Parameters:
e -

popupMenuCanceled

public void popupMenuCanceled(PopupMenuEvent e)
Not interested in this event.

Specified by:
popupMenuCanceled in interface PopupMenuListener
Parameters:
e -

Cytoscape 2.8.0 API

Copyright 2010 Cytoscape Consortium. All rights reserved.