equal
deleted
inserted
replaced
94 throw new AWTException("headless environment"); |
94 throw new AWTException("headless environment"); |
95 } |
95 } |
96 init(GraphicsEnvironment.getLocalGraphicsEnvironment() |
96 init(GraphicsEnvironment.getLocalGraphicsEnvironment() |
97 .getDefaultScreenDevice()); |
97 .getDefaultScreenDevice()); |
98 int tmpMask = 0; |
98 int tmpMask = 0; |
|
99 |
99 if (Toolkit.getDefaultToolkit().areExtraMouseButtonsEnabled()){ |
100 if (Toolkit.getDefaultToolkit().areExtraMouseButtonsEnabled()){ |
100 for (int i = 0; i < peer.getNumberOfButtons(); i++){ |
101 if (Toolkit.getDefaultToolkit() instanceof SunToolkit) { |
101 tmpMask |= InputEvent.getMaskForButton(i+1); |
102 final int buttonsNumber = ((SunToolkit)(Toolkit.getDefaultToolkit())).getNumberOfButtons(); |
|
103 for (int i = 0; i < buttonsNumber; i++){ |
|
104 tmpMask |= InputEvent.getMaskForButton(i+1); |
|
105 } |
102 } |
106 } |
103 } |
107 } |
104 tmpMask |= InputEvent.BUTTON1_MASK| |
108 tmpMask |= InputEvent.BUTTON1_MASK| |
105 InputEvent.BUTTON2_MASK| |
109 InputEvent.BUTTON2_MASK| |
106 InputEvent.BUTTON3_MASK| |
110 InputEvent.BUTTON3_MASK| |