Changeset 10613 in josm for trunk


Ignore:
Timestamp:
2016-07-23T18:56:48+02:00 (8 years ago)
Author:
Don-vip
Message:

see #12478 - do not try to enable dragging in headless mode

Location:
trunk/src/org/openstreetmap/josm/gui
Files:
3 edited

Legend:

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

    r10611 r10613  
    88import java.awt.Dimension;
    99import java.awt.Font;
     10import java.awt.GraphicsEnvironment;
    1011import java.awt.Point;
    1112import java.awt.Rectangle;
     
    11151116            super(dataModel);
    11161117            dataModel.setLayerList(this);
    1117             setDragEnabled(true);
     1118            if (!GraphicsEnvironment.isHeadless()) {
     1119                setDragEnabled(true);
     1120            }
    11181121            setDropMode(DropMode.INSERT_ROWS);
    11191122            setTransferHandler(new LayerListTransferHandler());
  • trunk/src/org/openstreetmap/josm/gui/dialogs/relation/MemberTable.java

    r10611 r10613  
    7171            setTransferHandler(new MemberTransferHandler());
    7272            setFillsViewportHeight(true); // allow drop on empty table
    73             setDragEnabled(true);
     73            if (!GraphicsEnvironment.isHeadless()) {
     74                setDragEnabled(true);
     75            }
    7476            setDropMode(DropMode.INSERT_ROWS);
    7577        }
  • trunk/src/org/openstreetmap/josm/gui/preferences/ToolbarPreferences.java

    r10611 r10613  
    77import java.awt.Container;
    88import java.awt.Dimension;
     9import java.awt.GraphicsEnvironment;
    910import java.awt.GridBagLayout;
    1011import java.awt.GridLayout;
     
    765766            });
    766767
    767             selectedList.setDragEnabled(true);
     768            if (!GraphicsEnvironment.isHeadless()) {
     769                selectedList.setDragEnabled(true);
     770            }
    768771            selectedList.setTransferHandler(new SelectedListTransferHandler());
    769772
     
    792795                }
    793796            });
    794             actionsTree.setDragEnabled(true);
     797            if (!GraphicsEnvironment.isHeadless()) {
     798                actionsTree.setDragEnabled(true);
     799            }
    795800            actionsTree.getSelectionModel().addTreeSelectionListener(e -> updateEnabledState());
    796801
Note: See TracChangeset for help on using the changeset viewer.