Changeset 9184


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

Fixes for Java 1.5.0.

Location:
trunk/gli/src/org/greenstone/gatherer
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/gli/src/org/greenstone/gatherer/cdm/Subcollection.java

    r9161 r9184  
    105105    // Object may be a String
    106106    if (object instanceof String) {
    107         return getName().compareTo(object);
     107        return getName().compareTo((String) object);
    108108    }
    109109
  • trunk/gli/src/org/greenstone/gatherer/gems/GEMS.java

    r9116 r9184  
    499499        if (event_source == file_new) {
    500500        AddSetActionListener rah = new AddSetActionListener();
    501         rah.show();
     501        rah.setVisible(true);
     502        // rah.show();
    502503     
    503504        return;
     
    512513               
    513514                SetSelectionDialog m = new SetSelectionDialog();
    514                 m.show();
     515        m.setVisible(true);
     516                // m.show();
    515517                   
    516518                //once we have clicked 'ok' on the jdialog above, then we should have
  • 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.