Ignore:
Timestamp:
2016-01-23T04:49:01+01:00 (8 years ago)
Author:
Don-vip
Message:

code refactoring for unit tests / headless mode

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/widgets/JosmComboBox.java

    r9546 r9576  
    44import java.awt.Component;
    55import java.awt.Dimension;
    6 import java.awt.GraphicsEnvironment;
    7 import java.awt.Toolkit;
    86import java.awt.event.MouseAdapter;
    97import java.awt.event.MouseEvent;
     
    2422import javax.swing.plaf.basic.ComboPopup;
    2523import javax.swing.text.JTextComponent;
     24
     25import org.openstreetmap.josm.gui.util.GuiHelper;
    2626
    2727/**
     
    167167        if (prototype != null) {
    168168            setPrototypeDisplayValue(prototype);
    169             int screenHeight = GraphicsEnvironment.isHeadless() ? 600 : Toolkit.getDefaultToolkit().getScreenSize().height;
     169            int screenHeight = GuiHelper.getScreenSize().height;
    170170            // Compute maximum number of visible items based on the preferred size of the combo box.
    171171            // This assumes that items have the same height as the combo box, which is not granted by the look and feel
Note: See TracChangeset for help on using the changeset viewer.