use of de.alpharogroup.swing.bind.StringBindingListener in project bundle-app-ui by astrapi69.
the class ImportBundleApplicationStartPanel method onInitializeComponents.
@Override
protected void onInitializeComponents() {
super.onInitializeComponents();
fileChooser = new JFileChooser();
fileChooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
lblWelcomeImportHeader = new javax.swing.JLabel();
lblBundleAppName = new javax.swing.JLabel();
txtBundleAppName = new javax.swing.JTextField();
final Model<String> bundleAppNameModel = model(from(getModelObject().getModelObject()).getBundleAppName());
txtBundleAppName.getDocument().addDocumentListener(new StringBindingListener(bundleAppNameModel));
txtBundleAppName.addActionListener(e -> onBundleAppName(e));
lblHeaderChooseBundleAppName = new javax.swing.JLabel();
btnChooseRootDir = new javax.swing.JButton();
btnChooseRootDir.addActionListener(actionEvent -> onChooseRootDir(actionEvent));
lblChooseRootDir = new javax.swing.JLabel();
lblDefaultLocale = new javax.swing.JLabel();
cmbDefaultLocale = new javax.swing.JComboBox<>(LocalesComboBoxModel.get());
cmbDefaultLocale.addItemListener(e -> onChangeDefaultLocale(e));
final Model<Locale> defaultLocaleModel = model(from(getModelObject().getModelObject()).getDefaultLocale());
cmbDefaultLocale.setRenderer(new LocalesComboBoxRenderer(defaultLocaleModel));
lblSelectedRootDir = new javax.swing.JLabel();
txtSelectedRootDir = new javax.swing.JTextField();
lblWelcomeImportHeader.setText("Import of an existing application with the bundle-manager ");
lblBundleAppName.setText("Application name");
lblHeaderChooseBundleAppName.setText("Give your imported bundle-application a name");
btnChooseRootDir.setText("Choose root directory");
lblChooseRootDir.setText("Choose the root directory of your project");
lblDefaultLocale.setText("Choose default locale");
lblSelectedRootDir.setText("Selected root directory of your project");
txtSelectedRootDir.setText("None");
}
Aggregations