List of usage examples for com.intellij.openapi.ui TextFieldWithBrowseButton getText
@NotNull
@Override
public String getText()
From source file:org.jetbrains.jet.plugin.compiler.configuration.KotlinCompilerConfigurableTab.java
License:Apache License
private static boolean isModified(@NotNull TextFieldWithBrowseButton chooser, @Nullable String currentValue) { return !StringUtil.equals(StringUtil.nullize(chooser.getText(), true), currentValue); }
From source file:org.jetbrains.plugins.javaFX.packaging.JavaFxArtifactPropertiesEditor.java
License:Apache License
private static boolean isModified(final String title, TextFieldWithBrowseButton tf) { return !Comparing.strEqual(title, tf.getText().trim()); }
From source file:org.jetbrains.tfsIntegration.ui.FieldWithButtonCellEditor.java
License:Apache License
public FieldWithButtonCellEditor(boolean pathCompletion, final Helper<T> helper) { super(new JTextField()); setClickCountToStart(1);//from w ww . j av a 2 s. co m final TextFieldWithBrowseButton field = pathCompletion ? new TextFieldWithBrowseButton() : new TextFieldWithBrowseButton.NoPathCompletion(); field.setOpaque(false); field.getTextField().setBorder(BorderFactory.createEmptyBorder()); field.getButton().addActionListener(new ActionListener() { public void actionPerformed(final ActionEvent e) { String result = helper.processButtonClick(field.getText()); if (result != null) { field.setText(result); } } }); delegate = new EditorDelegate() { public void setValue(Object value) { //noinspection unchecked field.setText(helper.toStringRepresentation((T) value)); } @Nullable public Object getCellEditorValue() { return helper.fromStringRepresentation(field.getText()); } public boolean shouldSelectCell(EventObject anEvent) { if (anEvent instanceof MouseEvent) { MouseEvent e = (MouseEvent) anEvent; return e.getID() != MouseEvent.MOUSE_DRAGGED; } return true; } }; editorComponent = field; }