This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

View | Details | Raw Unified | Return to bug 223021
Collapse All | Expand All

(-)a/o.n.swing.outline/apichanges.xml (+15 lines)
Lines 108-113 Link Here
108
108
109
<changes>
109
<changes>
110
110
111
    <change id="checkAtProtected">
112
      <api name="etable_outline"/>
113
      <summary>A protected checkAt() method added to Outline</summary>
114
      <version major="1" minor="25"/>
115
      <date day="1" month="2" year="2013"/>
116
      <author login="mentlicher"/>
117
      <compatibility addition="yes" binary="compatible" deprecation="no"/>
118
      <description>
119
        <p>Outline has a checkAt() method to perform a selection/deselection of
120
           a check box on the given row and column.
121
        </p>
122
      </description>
123
      <class package="org.netbeans.swing.outline" name="Outline"/>
124
      <issue number="223021"/>
125
    </change>
111
    <change id="fireQuickFilterChange">
126
    <change id="fireQuickFilterChange">
112
      <api name="etable_outline"/>
127
      <api name="etable_outline"/>
113
      <summary>Ability to listen on changes of Quick Filter</summary>
128
      <summary>Ability to listen on changes of Quick Filter</summary>
(-)a/o.n.swing.outline/manifest.mf (-1 / +1 lines)
Lines 1-5 Link Here
1
Manifest-Version: 1.0
1
Manifest-Version: 1.0
2
OpenIDE-Module: org.netbeans.swing.outline
2
OpenIDE-Module: org.netbeans.swing.outline
3
OpenIDE-Module-Localizing-Bundle: org/netbeans/swing/outline/Bundle.properties
3
OpenIDE-Module-Localizing-Bundle: org/netbeans/swing/outline/Bundle.properties
4
OpenIDE-Module-Specification-Version: 1.24
4
OpenIDE-Module-Specification-Version: 1.25
5
5
(-)a/o.n.swing.outline/src/org/netbeans/swing/outline/Outline.java (-3 / +14 lines)
Lines 839-845 Link Here
839
        return false;
839
        return false;
840
    }
840
    }
841
841
842
    private boolean checkAt(int row, int column, MouseEvent me) {
842
    /**
843
     * Perform a selection/deselection of a check box on the given row and column,
844
     * if a check box exists on the given position.
845
     * @param row The row of the check box
846
     * @param column The column of the check box
847
     * @param me The mouse event that performs the check, or <code>null</code>.
848
     * @return <code>true</code> if a {@link CheckRenderDataProvider} is found
849
     *         on the given row and column, is checkable and enabled and the
850
     *         mouse event is either <code>null</code> or upon the check-box
851
     *         location. Returns <code>false</code> otherwise.
852
     * @since 1.25
853
     */
854
    protected final boolean checkAt(int row, int column, MouseEvent me) {
843
        RenderDataProvider render = getRenderDataProvider();
855
        RenderDataProvider render = getRenderDataProvider();
844
        TableCellRenderer tcr = getDefaultRenderer(Object.class);
856
        TableCellRenderer tcr = getDefaultRenderer(Object.class);
845
        if (render instanceof CheckRenderDataProvider && tcr instanceof DefaultOutlineCellRenderer) {
857
        if (render instanceof CheckRenderDataProvider && tcr instanceof DefaultOutlineCellRenderer) {
Lines 863-870 Link Here
863
                    int chEnd = chStart + chWidth;
875
                    int chEnd = chStart + chWidth;
864
                    //TODO: Translate x/y to position of column if non-0
876
                    //TODO: Translate x/y to position of column if non-0
865
877
866
                    chBoxPosition = (me.getX() > ins.left && me.getX() >= chStart && me.getX() <= chEnd) &&
878
                    chBoxPosition = (me.getX() > ins.left && me.getX() >= chStart && me.getX() <= chEnd);
867
                                    me.getClickCount() == 1;
868
                }
879
                }
869
                if (chBoxPosition) {
880
                if (chBoxPosition) {
870
                    Boolean selected = crender.isSelected(value);
881
                    Boolean selected = crender.isSelected(value);
(-)a/openide.explorer/nbproject/project.xml (-1 / +1 lines)
Lines 54-60 Link Here
54
                    <build-prerequisite/>
54
                    <build-prerequisite/>
55
                    <compile-dependency/>
55
                    <compile-dependency/>
56
                    <run-dependency>
56
                    <run-dependency>
57
                        <specification-version>1.12</specification-version>
57
                        <specification-version>1.25</specification-version>
58
                    </run-dependency>
58
                    </run-dependency>
59
                </dependency>
59
                </dependency>
60
                <dependency>
60
                <dependency>
(-)a/openide.explorer/src/org/openide/explorer/view/OutlineView.java (+3 lines)
Lines 1921-1926 Link Here
1921
            boolean actionPerformed = false;
1921
            boolean actionPerformed = false;
1922
            boolean isTreeColumn = convertColumnIndexToModel(column) == 0;
1922
            boolean isTreeColumn = convertColumnIndexToModel(column) == 0;
1923
            if (isTreeColumn && row != -1 && e instanceof MouseEvent && SwingUtilities.isLeftMouseButton ((MouseEvent) e)) {
1923
            if (isTreeColumn && row != -1 && e instanceof MouseEvent && SwingUtilities.isLeftMouseButton ((MouseEvent) e)) {
1924
                if (checkAt(row, column, (MouseEvent) e)) {
1925
                    return false;
1926
                }
1924
                int clickCount = ((MouseEvent) e).getClickCount();
1927
                int clickCount = ((MouseEvent) e).getClickCount();
1925
                if (clickCount > 1) {
1928
                if (clickCount > 1) {
1926
                    // Default action.
1929
                    // Default action.

Return to bug 223021