Ignore:
Timestamp:
2005-02-25T10:41:48+13:00 (19 years ago)
Author:
mdewsnip
Message:

Fixes for Java 1.5.0.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gli/src/org/greenstone/gatherer/gui/GComboBox.java

    r8255 r9184  
    317317
    318318    protected ComboPopup createPopup() {
    319         BasicComboPopup popup = new BasicComboPopup( comboBox ) {
    320             public void show() {
    321             if(comboBox.getMaximumRowCount() > 0) {
    322                 Dimension popupSize = new Dimension( comboBox.getWidth(), getPopupHeightForRowCount( comboBox.getMaximumRowCount()));
    323                 Rectangle popupBounds = new Rectangle( 0, 0, popupSize.width, popupSize.height);
    324                 scroller.setMaximumSize( popupBounds.getSize() );
    325                 scroller.setPreferredSize( popupBounds.getSize() );
    326                 scroller.setMinimumSize( popupBounds.getSize() );
    327                 list.invalidate();
    328                 int selectedIndex = comboBox.getSelectedIndex();
    329                 if ( selectedIndex == -1 ) {
    330                 list.clearSelection();
    331                 }
    332                 else {
    333                 list.setSelectedIndex( selectedIndex );
    334                 }
    335                 list.ensureIndexIsVisible( list.getSelectedIndex() );
    336                 setLightWeightPopupEnabled( comboBox.isLightWeightPopupEnabled() );
    337                 show(arrowButton, arrowButton.getSize().width - (popupSize.width + 4), arrowButton.getSize().height);
    338             }
    339             }
    340         };
     319        BasicComboPopup popup = new BasicComboPopup(comboBox);
     320        // ---- I don't know why this code is here... maybe it is needed for the Mac? ----
     321//      {
     322//          public void show() {
     323//          if(comboBox.getMaximumRowCount() > 0) {
     324//              Dimension popupSize = new Dimension( comboBox.getWidth(), getPopupHeightForRowCount( comboBox.getMaximumRowCount()));
     325//              Rectangle popupBounds = new Rectangle( 0, 0, popupSize.width, popupSize.height);
     326//              scroller.setMaximumSize( popupBounds.getSize() );
     327//              scroller.setPreferredSize( popupBounds.getSize() );
     328//              scroller.setMinimumSize( popupBounds.getSize() );
     329//              list.invalidate();
     330//              int selectedIndex = comboBox.getSelectedIndex();
     331//              if ( selectedIndex == -1 ) {
     332//              list.clearSelection();
     333//              }
     334//              else {
     335//              list.setSelectedIndex( selectedIndex );
     336//              }
     337//              list.ensureIndexIsVisible( list.getSelectedIndex() );
     338//              setLightWeightPopupEnabled( comboBox.isLightWeightPopupEnabled() );
     339//              show(arrowButton, arrowButton.getSize().width - (popupSize.width + 4), arrowButton.getSize().height);
     340//          }
     341//          }
     342//      };
    341343        popup.getAccessibleContext().setAccessibleParent(comboBox);
    342344        return popup;
Note: See TracChangeset for help on using the changeset viewer.