Changeset 9376 in josm for trunk/src/org


Ignore:
Timestamp:
2016-01-10T00:44:47+01:00 (9 years ago)
Author:
simon04
Message:

see #12300 - Fix headless unit tests

Location:
trunk/src/org/openstreetmap/josm/gui/dialogs
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/dialogs/SelectionListDialog.java

    r9369 r9376  
    66
    77import java.awt.Component;
     8import java.awt.GraphicsEnvironment;
    89import java.awt.Rectangle;
    910import java.awt.datatransfer.Transferable;
     
    113114        lstPrimitives.setCellRenderer(new OsmPrimitivRenderer());
    114115        lstPrimitives.setTransferHandler(new SelectionTransferHandler());
    115         lstPrimitives.setDragEnabled(true);
     116        if (!GraphicsEnvironment.isHeadless()) {
     117            lstPrimitives.setDragEnabled(true);
     118        }
    116119
    117120        lstPrimitives.getSelectionModel().addListSelectionListener(actSelect);
  • trunk/src/org/openstreetmap/josm/gui/dialogs/relation/MemberTable.java

    r9368 r9376  
    66import java.awt.Container;
    77import java.awt.Dimension;
     8import java.awt.GraphicsEnvironment;
    89import java.awt.KeyboardFocusManager;
    910import java.awt.event.ActionEvent;
     
    8586        getActionMap().put("selectPreviousColumnCell", new SelectPreviousColumnCellAction());
    8687
    87         setTransferHandler(new MemberTransferHandler());
    88         setFillsViewportHeight(true); // allow drop on empty table
    89         setDragEnabled(true);
    90         setDropMode(DropMode.INSERT_ROWS);
     88        if (!GraphicsEnvironment.isHeadless()) {
     89            setTransferHandler(new MemberTransferHandler());
     90            setFillsViewportHeight(true); // allow drop on empty table
     91            setDragEnabled(true);
     92            setDropMode(DropMode.INSERT_ROWS);
     93        }
    9194    }
    9295
Note: See TracChangeset for help on using the changeset viewer.