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

(-)openide/src/org/openide/WizardDescriptor.java (-23 / +66 lines)
Line 995 Link Here
995
                wizardPanel.setSelectedIndex(contentSelectedIndex);
Lines 1055-1058 Link Here
1055
        JTextArea ta = new JTextArea();
1056
        private JTextArea ta = new JTextArea();
1056
        JLabel numberLabel;
1057
        private JLabel numberLabel;
1057
        int selected = -1;
1058
        private JLabel spaceLabel;
1058
        boolean contentNumbered;
1059
        private int selected = -1;
1059
--
1060
        private boolean contentNumbered;
Line 1060 Link Here
1062
        private int preferredWidth;
1063
Line 1067 Link Here
1071
            preferredWidth = wrappingWidth;
Lines 1075-1076 Link Here
1075
            int taWidth = wrappingWidth - 12 - 12;
1076
            
Line 1095 Link Here
1095
            taWidth -= 25;
1098
            
1096
--
1099
            spaceLabel = new JLabel();
1100
            spaceLabel.setBorder(BorderFactory.createEmptyBorder());
1101
            spaceLabel.setFont(ta.getFont());
1102
            spaceLabel.setOpaque(false);
1103
            
1104
            JPanel rightPanel = new JPanel();
1105
            rightPanel.setLayout(new BorderLayout());
1106
            rightPanel.setOpaque(false);
Line 1098 Link Here
1098
            ta.setSize(taWidth, 
1109
            ta.setSize(preferredWidth - 49, 
1099
--
Lines 1100-1101 Link Here
1100
1111
            
1101
            add(ta, BorderLayout.CENTER);
1112
            rightPanel.add(ta, BorderLayout.CENTER);
1102
--
1113
            rightPanel.add(spaceLabel, BorderLayout.WEST);
1114
            
1115
            add(rightPanel, BorderLayout.CENTER);
Line 1113 Link Here
1127
            String s = (String)value;
Line 1121 Link Here
1136
            if (s == null) {
1137
                s = ""; // NOI18N
1138
            }
1139
            
1140
            int leadingSpaces = 0;
1141
            while (leadingSpaces < s.length() &&
1142
                Character.isSpaceChar(s.charAt(leadingSpaces))) {
1143
                    
1144
                leadingSpaces++;
1145
            }
1146
            
1147
            if (leadingSpaces > 0) {
1148
                spaceLabel.setPreferredSize(null);
1149
                spaceLabel.setText(s.substring(0, leadingSpaces));
1150
            } else {
1151
                spaceLabel.setText(""); // NOI18N
1152
                spaceLabel.setPreferredSize(new Dimension(0,0));
1153
            }
1154
Lines 1123-1125 Link Here
1123
            }
1157
            } 
1124
           
1158
1125
            ta.setText((String)value);
1159
            ta.setSize((int)(preferredWidth - 
1126
--
1160
                numberLabel.getPreferredSize().getWidth() - 
1161
                spaceLabel.getPreferredSize().getWidth()), 12);
1162
            
1163
            ta.setText(s.trim());
1164
1165
            invalidate();
1166
            validate();
1167
            
Line 1242 Link Here
1284
            contentList.setFixedCellWidth(leftDimension.width);
Lines 1282-1283 Link Here
1282
                    list.revalidate();
1283
                    list.repaint();
Line 1285 Link Here
1326
                    list.setFixedCellHeight(0);
1327
                    list.setFixedCellHeight(-1);
1328
                    setSelectedIndex(0);
1329
                    SwingUtilities.invokeLater(new Runnable() {
1330
                        public void run() {
1331
                            setSelectedIndex(selectedIndex);
1332
                        }
1333
                    });
Lines 1310-1311 Link Here
1310
                        list.setFixedCellWidth(0);
1359
                        list.setFixedCellHeight(0);
1311
                        list.setFixedCellWidth(-1);
1360
                        list.setFixedCellHeight(-1);
1312
--

Return to bug 21322