| 1775 | |
| 1776 | /// {@inheritDoc} |
| 1777 | @Override |
| 1778 | public void pointerPressed(int x, int y) { |
| 1779 | if (!isEnabled()) { |
| 1780 | return; |
| 1781 | } |
| 1782 | if (fixedSelection > FIXED_NONE_BOUNDRY) { |
| 1783 | // for a fixed list we need to store the initial drag position |
| 1784 | if (isSmoothScrolling()) { |
| 1785 | if (orientation != HORIZONTAL) { |
| 1786 | fixedDraggedPosition = y; |
| 1787 | } else { |
| 1788 | fixedDraggedPosition = x; |
| 1789 | } |
| 1790 | if (isDragActivated()) { |
| 1791 | int selected = getCurrentSelected(); |
| 1792 | model.setSelectedIndex(selected); |
| 1793 | fixedDraggedMotion = null; |
| 1794 | fixedDraggedAnimationPosition = 0; |
| 1795 | } |
| 1796 | fixedDraggedSelection = getModel().getSelectedIndex(); |
| 1797 | } |
| 1798 | } |
| 1799 | // prevent a hover event from activating the drag in case of a click screen, |
| 1800 | // this is essential for the Storm device |
| 1801 | setDragActivated(false); |
| 1802 | int current = model.getSelectedIndex(); |
| 1803 | int selection = pointerSelect(x, y); |
| 1804 | |
| 1805 | if (selection > -1 && fixedSelection < FIXED_NONE_BOUNDRY) { |
| 1806 | model.setSelectedIndex(selection); |
| 1807 | } |
| 1808 | fireOnRelease = current == selection; |
| 1809 | |
| 1810 | super.pointerPressed(x, y); |
| 1811 | } |
| 1812 | |
| 1813 | /// {@inheritDoc} |
| 1814 | @Override |