List of usage examples for com.intellij.openapi.ui ComponentWithBrowseButton getChildComponent
@NotNull
public final Comp getChildComponent()
From source file:com.intellij.execution.junit2.configuration.JUnitConfigurable.java
License:Apache License
private void installDocuments() { for (int i = 0; i < myTestLocations.length; i++) { final LabeledComponent testLocation = getTestLocation(i); final JComponent component = testLocation.getComponent(); final ComponentWithBrowseButton field; final Object document; if (component instanceof TextFieldWithBrowseButton) { field = (TextFieldWithBrowseButton) component; document = new PlainDocument(); ((TextFieldWithBrowseButton) field).getTextField().setDocument((Document) document); myModel.setJUnitDocument(i, document); } else if (component instanceof EditorTextFieldWithBrowseButton) { field = (ComponentWithBrowseButton) component; document = ((EditorTextField) field.getChildComponent()).getDocument(); myModel.setJUnitDocument(i, document); } else {/*from www . j av a2 s . co m*/ field = myPatternTextField; document = new PlainDocument(); ((TextFieldWithBrowseButton) field).getTextField().setDocument((Document) document); myModel.setJUnitDocument(i, document); } myBrowsers[i].setField(field); } }
From source file:com.intellij.lang.ant.config.impl.configuration.BuildFilePropertiesPanel.java
License:Apache License
private static void setLabelFor(JLabel label, ComponentWithBrowseButton component) { label.setLabelFor(component.getChildComponent()); }