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 56781
Collapse All | Expand All

(-)api/doc/org/openide/explorer/doc-files/api.html (+8 lines)
Lines 499-504 Link Here
499
            TreeTableView.setProperties (Node.Property[]).
499
            TreeTableView.setProperties (Node.Property[]).
500
        </TD>
500
        </TD>
501
    </TR>
501
    </TR>
502
    <TR> 
503
        <TD> ColumnMnemonicCharTTV</TD>
504
        <TD> String </TD>
505
        <TD> When set, this parameter contains the mnemonic character for column's 
506
            display name (e.g. in <I>Change Visible Columns</I> dialog window).
507
            If not set, no mnemonic will be displayed.
508
        </TD>
509
    </TR>
502
</TABLE>
510
</TABLE>
503
511
504
<H2><A name="custom_property_editors"> Customizing property editors </a></H2>
512
<H2><A name="custom_property_editors"> Customizing property editors </a></H2>
(-)api/doc/changes/apichanges.xml (+15 lines)
Lines 116-121 Link Here
116
<changes>
116
<changes>
117
117
118
    <change>
118
    <change>
119
        <api name="explorer"/>
120
        <summary>Added a new <&quot;>ColumnMnemonicCharTTV<&quot;> property to 
121
        the <code>org.openide.explorer.view.NodeTableModel</code> class.</summary>
122
        <version major="5" minor="9"/>
123
        <date day="28" month="3" year="2005"/>
124
        <compatibility addition="yes"/>
125
        <description>
126
            The new property allows to specify mnemonic character for display names
127
            of <code>TreeTableView</code> columns.
128
        </description>
129
        <class package="org.openide.explorer.view" name="NodeTableModel"/>
130
        <issue number="55074"/>
131
    </change>
132
133
    <change>
119
        <api name="editor"/>
134
        <api name="editor"/>
120
        <summary>Added a new SHOW_TOFRONT constant to the <code>org.openide.text.Line</code> class.</summary>
135
        <summary>Added a new SHOW_TOFRONT constant to the <code>org.openide.text.Line</code> class.</summary>
121
        <version major="5" minor="8"/>
136
        <version major="5" minor="8"/>
(-)src/org/openide/explorer/view/NodeTableModel.java (+7 lines)
Lines 19-24 Link Here
19
import javax.swing.*;
19
import javax.swing.*;
20
import java.awt.*;
20
import java.awt.*;
21
import java.util.ArrayList;
21
import java.util.ArrayList;
22
import java.util.HashMap;
22
import java.util.TreeMap;
23
import java.util.TreeMap;
23
import java.util.Iterator;
24
import java.util.Iterator;
24
25
Lines 46-51 Link Here
46
    static final String ATTR_DESCENDING_ORDER = "DescendingOrderTTV"; // NOI18N
47
    static final String ATTR_DESCENDING_ORDER = "DescendingOrderTTV"; // NOI18N
47
    private static final String ATTR_ORDER_NUMBER = "OrderNumberTTV"; // NOI18N
48
    private static final String ATTR_ORDER_NUMBER = "OrderNumberTTV"; // NOI18N
48
    private static final String ATTR_TREE_COLUMN = "TreeColumnTTV"; // NOI18N
49
    private static final String ATTR_TREE_COLUMN = "TreeColumnTTV"; // NOI18N
50
    private static final String ATTR_MNEMONIC_CHAR = "ColumnMnemonicCharTTV"; // NOI18N
49
    
51
    
50
    /** all columns of model */
52
    /** all columns of model */
51
    ArrayColumn[] allPropertyColumns = new ArrayColumn[]{};
53
    ArrayColumn[] allPropertyColumns = new ArrayColumn[]{};
Lines 565-575 Link Here
565
567
566
        String boxtext;
568
        String boxtext;
567
        TreeMap sort = new TreeMap();
569
        TreeMap sort = new TreeMap();
570
        HashMap mnemonics = new HashMap();
568
        for (int i = 0; i < allPropertyColumns.length; i++) {
571
        for (int i = 0; i < allPropertyColumns.length; i++) {
569
            oldvalues[i] = isVisible( allPropertyColumns[i].getProperty() );
572
            oldvalues[i] = isVisible( allPropertyColumns[i].getProperty() );
570
            boxtext = allPropertyColumns[i].getProperty().getDisplayName()
573
            boxtext = allPropertyColumns[i].getProperty().getDisplayName()
571
                + ": " + allPropertyColumns[i].getProperty().getShortDescription(); // NOI18N
574
                + ": " + allPropertyColumns[i].getProperty().getShortDescription(); // NOI18N
572
            sort.put( boxtext, new Integer( i ));
575
            sort.put( boxtext, new Integer( i ));
576
            mnemonics.put( boxtext, allPropertyColumns[i].getProperty().getValue( ATTR_MNEMONIC_CHAR ) );
573
        }
577
        }
574
578
575
        Iterator it = sort.keySet().iterator();
579
        Iterator it = sort.keySet().iterator();
Lines 580-585 Link Here
580
            JCheckBox b = new JCheckBox( boxtext, oldvalues[i] );
584
            JCheckBox b = new JCheckBox( boxtext, oldvalues[i] );
581
            b.getAccessibleContext().setAccessibleName( allPropertyColumns[i].getProperty().getDisplayName() );
585
            b.getAccessibleContext().setAccessibleName( allPropertyColumns[i].getProperty().getDisplayName() );
582
            b.getAccessibleContext().setAccessibleDescription( allPropertyColumns[i].getProperty().getShortDescription() );
586
            b.getAccessibleContext().setAccessibleDescription( allPropertyColumns[i].getProperty().getShortDescription() );
587
            Object mnemonicChar = mnemonics.get( boxtext );
588
            if( null != mnemonicChar && mnemonicChar.toString().length() > 0 )
589
                b.setMnemonic( mnemonicChar.toString().charAt(0) );
583
            sortpointer[j] = i;
590
            sortpointer[j] = i;
584
            panel.add(b, gridBagConstraints);
591
            panel.add(b, gridBagConstraints);
585
            boxes.add(b);
592
            boxes.add(b);

Return to bug 56781