use of com.intellij.ui.DocumentAdapter in project azure-tools-for-java by Microsoft.
the class VirtualNetworkDialog method createUIComponents.
private void createUIComponents() {
// todo: add name validator
txtName = new ValidationDebouncedTextInput();
txtName.setRequired(true);
txtSubnetName = new ValidationDebouncedTextInput();
txtSubnetName.setRequired(true);
txtAddressSpace = new ValidationDebouncedTextInput();
txtAddressSpace.setRequired(true);
txtAddressSpace.setValidator(() -> validateSubnet(txtAddressSpace.getValue()));
txtAddressSpace.getDocument().addDocumentListener(new DocumentAdapter() {
@Override
protected void textChanged(@NotNull DocumentEvent e) {
lblAddressSpaceDetails.setText(getSubnetInfo(txtAddressSpace.getValue()));
}
});
txtSubnetAddressRange = new ValidationDebouncedTextInput();
txtSubnetAddressRange.setRequired(true);
txtSubnetAddressRange.setValidator(() -> validateSubnet(txtSubnetAddressRange.getValue()));
txtSubnetAddressRange.getDocument().addDocumentListener(new DocumentAdapter() {
@Override
protected void textChanged(@NotNull DocumentEvent e) {
lblSubnetAddressDetails.setText(getSubnetInfo(txtSubnetAddressRange.getValue()));
}
});
}
Aggregations