|
192 | 192 | end |
193 | 193 | properties |
194 | 194 | MouseClickedCallback = '' |
195 | | - MouseDraggedCallback = '' |
196 | | - MouseMotionFcn = '' |
| 195 | + %MouseDraggedCallback = '' |
| 196 | + %MouseMotionFcn = '' |
197 | 197 | end |
198 | 198 | properties(Dependent = true) |
199 | 199 | Parent |
|
318 | 318 | p.addParamValue('FontSize',10); |
319 | 319 | p.addParamValue('FontWeight','normal'); |
320 | 320 | p.addParamValue('MouseClickedCallback',''); |
321 | | - p.addParamValue('MouseDraggedCallback',''); |
322 | | - p.addParamValue('MouseMotionFcn',''); |
| 321 | + %p.addParamValue('MouseDraggedCallback',''); |
| 322 | + %p.addParamValue('MouseMotionFcn',''); |
323 | 323 | p.addParamValue('Parent',[]); |
324 | 324 | p.addParamValue('Position',[0 0 1 1]); |
325 | 325 | p.addParamValue('RowHeight',20); |
@@ -447,14 +447,14 @@ function create(obj, ParamsToSet) |
447 | 447 | set(CbProps,'MouseClickedCallback',@(src,e)onMouseClick(obj,e,'table')) |
448 | 448 | set(CbProps,'MousePressedCallback',@(src,e)onButtonDown(obj,e,'table')) |
449 | 449 | set(CbProps,'MouseReleasedCallback',@(src,e)onButtonUp(obj,e,'table')) |
450 | | - set(CbProps,'MouseDraggedCallback',@(src,e)onMouseDrag(obj,e,'table')) |
451 | | - set(CbProps,'MouseMovedCallback',@(src,e)onMouseMotion(obj,e,'table')) |
| 450 | + %set(CbProps,'MouseDraggedCallback',@(src,e)onMouseDrag(obj,e,'table')) |
| 451 | + %set(CbProps,'MouseMovedCallback',@(src,e)onMouseMotion(obj,e,'table')) |
452 | 452 | CbProps = handle(jScrollPane,'CallbackProperties'); |
453 | 453 | set(CbProps,'MouseClickedCallback',@(src,e)onMouseClick(obj,e,'scrollpane')) |
454 | 454 | set(CbProps,'MousePressedCallback',@(src,e)onButtonDown(obj,e,'scrollpane')) |
455 | 455 | set(CbProps,'MouseReleasedCallback',@(src,e)onButtonUp(obj,e,'scrollpane')) |
456 | | - set(CbProps,'MouseDraggedCallback',@(src,e)onMouseDrag(obj,e,'scrollpane')) |
457 | | - set(CbProps,'MouseMovedCallback',@(src,e)onMouseMotion(obj,e,'scrollpane')) |
| 456 | + %set(CbProps,'MouseDraggedCallback',@(src,e)onMouseDrag(obj,e,'scrollpane')) |
| 457 | + %set(CbProps,'MouseMovedCallback',@(src,e)onMouseMotion(obj,e,'scrollpane')) |
458 | 458 |
|
459 | 459 | % Get the column model |
460 | 460 | jColumnModel = jTable.getColumnModel(); |
@@ -1776,59 +1776,59 @@ function onMouseClick(obj,e,location) |
1776 | 1776 | end %function onMouseClick |
1777 | 1777 |
|
1778 | 1778 |
|
1779 | | - function onMouseDrag(obj,e,location) |
1780 | | - |
1781 | | - if obj.Debug, disp('onMouseDrag'); end |
1782 | | - |
1783 | | - if callbacksEnabled(obj) && ~isempty(obj.MouseDraggedCallback) |
1784 | | - |
1785 | | - if obj.Debug, disp('onMouseDrag - entered'); end |
1786 | | - |
1787 | | - % Get the position clicked |
1788 | | - x = e.getX; |
1789 | | - y = e.getY; |
1790 | | - |
1791 | | - % Get the cell clicked |
1792 | | - row = obj.JTable.rowAtPoint(e.getPoint) + 1; |
1793 | | - col = obj.JTable.columnAtPoint(e.getPoint) + 1; |
1794 | | - |
1795 | | - % Call the custom callback |
1796 | | - e1 = struct(... |
1797 | | - 'Position',[x,y],... |
1798 | | - 'Location',location,... |
1799 | | - 'Cell',[row col]); |
1800 | | - hgfeval(obj.MouseDraggedCallback,obj,e1); |
1801 | | - |
1802 | | - end |
1803 | | - |
1804 | | - end %function |
1805 | | - |
1806 | | - function onMouseMotion(obj,e,location) |
1807 | | - |
1808 | | - %if obj.Debug, disp('onMouseMotion'); end |
1809 | | - |
1810 | | - if callbacksEnabled(obj) && ~isempty(obj.MouseMotionFcn) |
1811 | | - |
1812 | | - if obj.Debug, disp('onMouseMotion - entered'); end |
1813 | | - |
1814 | | - % Get the position clicked |
1815 | | - x = e.getX; |
1816 | | - y = e.getY; |
1817 | | - |
1818 | | - % Get the cell clicked |
1819 | | - row = obj.JTable.rowAtPoint(e.getPoint) + 1; |
1820 | | - col = obj.JTable.columnAtPoint(e.getPoint) + 1; |
1821 | | - |
1822 | | - % Call the custom callback |
1823 | | - e1 = struct(... |
1824 | | - 'Position',[x,y],... |
1825 | | - 'Location',location,... |
1826 | | - 'Cell',[row col]); |
1827 | | - hgfeval(obj.MouseMotionFcn,obj,e1); |
1828 | | - |
1829 | | - end |
1830 | | - |
1831 | | - end %function |
| 1779 | +% function onMouseDrag(obj,e,location) |
| 1780 | +% |
| 1781 | +% if obj.Debug, disp('onMouseDrag'); end |
| 1782 | +% |
| 1783 | +% if callbacksEnabled(obj) && ~isempty(obj.MouseDraggedCallback) |
| 1784 | +% |
| 1785 | +% if obj.Debug, disp('onMouseDrag - entered'); end |
| 1786 | +% |
| 1787 | +% % Get the position clicked |
| 1788 | +% x = e.getX; |
| 1789 | +% y = e.getY; |
| 1790 | +% |
| 1791 | +% % Get the cell clicked |
| 1792 | +% row = obj.JTable.rowAtPoint(e.getPoint) + 1; |
| 1793 | +% col = obj.JTable.columnAtPoint(e.getPoint) + 1; |
| 1794 | +% |
| 1795 | +% % Call the custom callback |
| 1796 | +% e1 = struct(... |
| 1797 | +% 'Position',[x,y],... |
| 1798 | +% 'Location',location,... |
| 1799 | +% 'Cell',[row col]); |
| 1800 | +% hgfeval(obj.MouseDraggedCallback,obj,e1); |
| 1801 | +% |
| 1802 | +% end |
| 1803 | +% |
| 1804 | +% end %function |
| 1805 | + |
| 1806 | +% function onMouseMotion(obj,e,location) |
| 1807 | +% |
| 1808 | +% %if obj.Debug, disp('onMouseMotion'); end |
| 1809 | +% |
| 1810 | +% if callbacksEnabled(obj) && ~isempty(obj.MouseMotionFcn) |
| 1811 | +% |
| 1812 | +% if obj.Debug, disp('onMouseMotion - entered'); end |
| 1813 | +% |
| 1814 | +% % Get the position clicked |
| 1815 | +% x = e.getX; |
| 1816 | +% y = e.getY; |
| 1817 | +% |
| 1818 | +% % Get the cell clicked |
| 1819 | +% row = obj.JTable.rowAtPoint(e.getPoint) + 1; |
| 1820 | +% col = obj.JTable.columnAtPoint(e.getPoint) + 1; |
| 1821 | +% |
| 1822 | +% % Call the custom callback |
| 1823 | +% e1 = struct(... |
| 1824 | +% 'Position',[x,y],... |
| 1825 | +% 'Location',location,... |
| 1826 | +% 'Cell',[row col]); |
| 1827 | +% hgfeval(obj.MouseMotionFcn,obj,e1); |
| 1828 | +% |
| 1829 | +% end |
| 1830 | +% |
| 1831 | +% end %function |
1832 | 1832 |
|
1833 | 1833 |
|
1834 | 1834 | function onSelectionChanged(obj, ~, eventData) |
|
0 commit comments