cytoscape.util.swing
Class WidestStringComboBoxPopupMenuListener
java.lang.Object
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.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
WidestStringComboBoxPopupMenuListener
public WidestStringComboBoxPopupMenuListener()
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
-
Copyright 2010 Cytoscape Consortium. All rights reserved.