Lines 52-57
Link Here
|
52 |
import javax.swing.text.JTextComponent; |
52 |
import javax.swing.text.JTextComponent; |
53 |
import org.netbeans.editor.GuardedException; |
53 |
import org.netbeans.editor.GuardedException; |
54 |
import org.openide.awt.Mnemonics; |
54 |
import org.openide.awt.Mnemonics; |
|
|
55 |
import org.openide.util.ImageUtilities; |
55 |
import org.openide.util.NbBundle; |
56 |
import org.openide.util.NbBundle; |
56 |
|
57 |
|
57 |
public final class ReplaceBar extends JPanel { |
58 |
public final class ReplaceBar extends JPanel { |
Lines 118-127
Link Here
|
118 |
leftSeparator.setOrientation(SwingConstants.VERTICAL); |
119 |
leftSeparator.setOrientation(SwingConstants.VERTICAL); |
119 |
add(leftSeparator); |
120 |
add(leftSeparator); |
120 |
|
121 |
|
121 |
replaceButton = new JButton(); |
122 |
replaceButton = SearchButton.createFindButton("org/netbeans/modules/editor/search/resources/replace.png", null); // NOI18N |
122 |
Mnemonics.setLocalizedText(replaceButton, NbBundle.getMessage(ReplaceBar.class, "CTL_ReplaceNext")); // NOI18N |
|
|
123 |
replaceButton.setToolTipText(NbBundle.getMessage(ReplaceBar.class, "TOOLTIP_ReplaceText")); // NOI18N |
123 |
replaceButton.setToolTipText(NbBundle.getMessage(ReplaceBar.class, "TOOLTIP_ReplaceText")); // NOI18N |
124 |
replaceButton.setMargin(BUTTON_INSETS); |
|
|
125 |
replaceButton.setEnabled(!getSearchBar().getIncSearchTextField().getText().isEmpty()); |
124 |
replaceButton.setEnabled(!getSearchBar().getIncSearchTextField().getText().isEmpty()); |
126 |
replaceButton.addActionListener(new ActionListener() { |
125 |
replaceButton.addActionListener(new ActionListener() { |
127 |
|
126 |
|
Lines 132-141
Link Here
|
132 |
}); |
131 |
}); |
133 |
add(replaceButton); |
132 |
add(replaceButton); |
134 |
|
133 |
|
135 |
replaceAllButton = new JButton(); |
134 |
replaceAllButton = SearchButton.createFindButton("org/netbeans/modules/editor/search/resources/replace_all.png", null); // NOI18N |
136 |
Mnemonics.setLocalizedText(replaceAllButton, NbBundle.getMessage(ReplaceBar.class, "CTL_ReplaceAll")); |
|
|
137 |
replaceAllButton.setToolTipText(NbBundle.getMessage(ReplaceBar.class, "TOOLTIP_ReplaceText")); // NOI18N |
135 |
replaceAllButton.setToolTipText(NbBundle.getMessage(ReplaceBar.class, "TOOLTIP_ReplaceText")); // NOI18N |
138 |
replaceAllButton.setMargin(BUTTON_INSETS); |
|
|
139 |
replaceAllButton.setEnabled(!getSearchBar().getIncSearchTextField().getText().isEmpty()); |
136 |
replaceAllButton.setEnabled(!getSearchBar().getIncSearchTextField().getText().isEmpty()); |
140 |
replaceAllButton.addActionListener(new ActionListener() { |
137 |
replaceAllButton.addActionListener(new ActionListener() { |
141 |
|
138 |
|