本文整理匯總了Java中com.intellij.openapi.ui.TextFieldWithBrowseButton.setEditable方法的典型用法代碼示例。如果您正苦於以下問題:Java TextFieldWithBrowseButton.setEditable方法的具體用法?Java TextFieldWithBrowseButton.setEditable怎麽用?Java TextFieldWithBrowseButton.setEditable使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類com.intellij.openapi.ui.TextFieldWithBrowseButton
的用法示例。
在下文中一共展示了TextFieldWithBrowseButton.setEditable方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: EnableCustomPaths
import com.intellij.openapi.ui.TextFieldWithBrowseButton; //導入方法依賴的package包/類
private void EnableCustomPaths(boolean isEnabled) {
for (TextFieldWithBrowseButton c : new TextFieldWithBrowseButton[] {
handlerOutputLocationBrowseButton,
intentOutputLocationBrowseButton,
utterancesOutputLocationBrowseButton,
customTypesOutputLocationBrowseButton
}) {
c.setEditable(isEnabled);
c.setEnabled(isEnabled);
c.setButtonEnabled(isEnabled);
}
handlerOutputFileLabel.setEnabled(isEnabled);
intentOutputFileLabel.setEnabled(isEnabled);
utterancesOutputFileLabel.setEnabled(isEnabled);
customTypesOutputFileLabel.setEnabled(isEnabled);
configProvider.useCustomPaths(isEnabled);
handlerOutputLocationBrowseButton.setText(configProvider.getHandlerOutputLocation());
intentOutputLocationBrowseButton.setText(configProvider.getIntentOutputLocation());
utterancesOutputLocationBrowseButton.setText(configProvider.getUtterancesOutputLocation());
customTypesOutputLocationBrowseButton.setText(configProvider.getCustomTypesOutputLocation());
}
示例2: PathMappingsComponent
import com.intellij.openapi.ui.TextFieldWithBrowseButton; //導入方法依賴的package包/類
public PathMappingsComponent() {
super();
final TextFieldWithBrowseButton pathTextField = new TextFieldWithBrowseButton();
pathTextField.setEditable(false);
setComponent(pathTextField);
setText("Path mappings:");
getComponent().addActionListener(new ActionListener() {
@Override
public void actionPerformed(final ActionEvent e) {
showConfigureMappingsDialog();
}
});
}
示例3: createCenterPanel
import com.intellij.openapi.ui.TextFieldWithBrowseButton; //導入方法依賴的package包/類
@Nullable
protected JComponent createCenterPanel() {
JPanel panel = new JPanel(new GridBagLayout());
GridBagConstraints gc = new GridBagConstraints();
gc.insets = new Insets(2, 2, 2, 2);
gc.gridwidth = 1;
gc.gridheight = 1;
gc.gridx = 0;
gc.gridy = 0;
gc.anchor = GridBagConstraints.WEST;
gc.fill = GridBagConstraints.NONE;
gc.weightx = 0;
gc.weighty = 0;
panel.add(new JLabel("Export:"), gc);
gc.gridx += 1;
gc.gridwidth = 2;
gc.weightx = 1;
gc.fill = GridBagConstraints.HORIZONTAL;
JLabel urlLabel = new JLabel(myURL.toString());
urlLabel.setFont(urlLabel.getFont().deriveFont(Font.BOLD));
panel.add(urlLabel, gc);
gc.gridy += 1;
gc.gridwidth = 1;
gc.gridx = 0;
gc.weightx = 0;
gc.fill = GridBagConstraints.NONE;
panel.add(new JLabel("Destination:"), gc);
gc.gridx += 1;
gc.gridwidth = 2;
gc.weightx = 1;
gc.fill = GridBagConstraints.HORIZONTAL;
myPathField = new TextFieldWithBrowseButton(this);
myPathField.setText(myFile.getAbsolutePath());
myPathField.setEditable(false);
panel.add(myPathField, gc);
gc.gridy += 1;
gc.gridx = 0;
gc.weightx = 0;
gc.gridwidth = 3;
gc.fill = GridBagConstraints.NONE;
// other options.
final JLabel depthLabel = new JLabel(SvnBundle.message("label.depth.text"));
depthLabel.setToolTipText(SvnBundle.message("label.depth.description"));
panel.add(depthLabel, gc);
++ gc.gridx;
myDepth = new DepthCombo(false);
panel.add(myDepth, gc);
depthLabel.setLabelFor(myDepth);
gc.gridx = 0;
gc.gridy += 1;
myForceCheckbox = new JCheckBox("Replace existing files");
myForceCheckbox.setSelected(true);
panel.add(myForceCheckbox, gc);
gc.gridy += 1;
myExternalsCheckbox = new JCheckBox("Include externals locations");
myExternalsCheckbox.setSelected(true);
panel.add(myExternalsCheckbox, gc);
gc.gridy += 1;
gc.gridwidth = 2;
panel.add(new JLabel("Override 'native' EOLs with:"), gc);
gc.gridx += 2;
gc.gridwidth = 1;
myEOLStyleBox = new JComboBox(new Object[] {"None", "LF", "CRLF", "CR"});
panel.add(myEOLStyleBox, gc);
gc.gridy += 1;
gc.gridwidth = 3;
gc.gridx = 0;
gc.weightx = 1;
gc.weighty = 1;
gc.anchor = GridBagConstraints.SOUTH;
gc.fill = GridBagConstraints.HORIZONTAL;
panel.add(new JSeparator(), gc);
return panel;
}