157 |
{ |
{ |
158 |
AbstractButton button = (AbstractButton) e.getSource(); |
AbstractButton button = (AbstractButton) e.getSource(); |
159 |
ButtonModel model = button.getModel(); |
ButtonModel model = button.getModel(); |
160 |
if ((e.getModifiersEx() & InputEvent.BUTTON1_DOWN_MASK) != 0) |
if (e.getButton() == MouseEvent.BUTTON1) |
161 |
{ |
{ |
162 |
// It is important that these transitions happen in this order. |
// It is important that these transitions happen in this order. |
163 |
model.setArmed(true); |
model.setArmed(true); |
179 |
{ |
{ |
180 |
AbstractButton button = (AbstractButton) e.getSource(); |
AbstractButton button = (AbstractButton) e.getSource(); |
181 |
ButtonModel model = button.getModel(); |
ButtonModel model = button.getModel(); |
182 |
if ((e.getModifiersEx() & InputEvent.BUTTON1_DOWN_MASK) != 0) |
if (e.getButton() == MouseEvent.BUTTON1) |
183 |
{ |
{ |
184 |
// It is important that these transitions happen in this order. |
// It is important that these transitions happen in this order. |
185 |
model.setPressed(false); |
model.setPressed(false); |