Lines 707-712
Link Here
|
707 |
boolean isTreeColumn = isTreeColumnIndex(column); |
707 |
boolean isTreeColumn = isTreeColumnIndex(column); |
708 |
if (isTreeColumn && e instanceof MouseEvent) { |
708 |
if (isTreeColumn && e instanceof MouseEvent) { |
709 |
MouseEvent me = (MouseEvent) e; |
709 |
MouseEvent me = (MouseEvent) e; |
|
|
710 |
// It may be a request to check/uncheck a check-box |
711 |
if (checkAt(row, column, me)) { |
712 |
return false; |
713 |
} |
710 |
TreePath path = getLayoutCache().getPathForRow(convertRowIndexToModel(row)); |
714 |
TreePath path = getLayoutCache().getPathForRow(convertRowIndexToModel(row)); |
711 |
if (!getOutlineModel().isLeaf(path.getLastPathComponent())) { |
715 |
if (!getOutlineModel().isLeaf(path.getLastPathComponent())) { |
712 |
int handleWidth = DefaultOutlineCellRenderer.getExpansionHandleWidth(); |
716 |
int handleWidth = DefaultOutlineCellRenderer.getExpansionHandleWidth(); |
Lines 764-773
Link Here
|
764 |
return false; |
768 |
return false; |
765 |
} |
769 |
} |
766 |
} |
770 |
} |
767 |
// It may be a request to check/uncheck a check-box |
|
|
768 |
if (checkAt(row, column, me)) { |
769 |
return false; |
770 |
} |
771 |
} |
771 |
} |
772 |
|
772 |
|
773 |
boolean res = false; |
773 |
boolean res = false; |
Lines 814-820
Link Here
|
814 |
return false; |
814 |
return false; |
815 |
} |
815 |
} |
816 |
|
816 |
|
817 |
private boolean checkAt(int row, int column, MouseEvent me) { |
817 |
protected final boolean checkAt(int row, int column, MouseEvent me) { |
818 |
RenderDataProvider render = getRenderDataProvider(); |
818 |
RenderDataProvider render = getRenderDataProvider(); |
819 |
TableCellRenderer tcr = getDefaultRenderer(Object.class); |
819 |
TableCellRenderer tcr = getDefaultRenderer(Object.class); |
820 |
if (render instanceof CheckRenderDataProvider && tcr instanceof DefaultOutlineCellRenderer) { |
820 |
if (render instanceof CheckRenderDataProvider && tcr instanceof DefaultOutlineCellRenderer) { |
Lines 838-845
Link Here
|
838 |
int chEnd = chStart + chWidth; |
838 |
int chEnd = chStart + chWidth; |
839 |
//TODO: Translate x/y to position of column if non-0 |
839 |
//TODO: Translate x/y to position of column if non-0 |
840 |
|
840 |
|
841 |
chBoxPosition = (me.getX() > ins.left && me.getX() >= chStart && me.getX() <= chEnd) && |
841 |
chBoxPosition = (me.getX() > ins.left && me.getX() >= chStart && me.getX() <= chEnd); |
842 |
me.getClickCount() == 1; |
|
|
843 |
} |
842 |
} |
844 |
if (chBoxPosition) { |
843 |
if (chBoxPosition) { |
845 |
Boolean selected = crender.isSelected(value); |
844 |
Boolean selected = crender.isSelected(value); |