_executeButton.addComponentsToToolbar(toolBar); final JXStatusBar statusBar = WidgetFactory.createStatusBar(_statusLabel); final RightInformationPanel rightInformationPanel = new RightInformationPanel(_glassPane);
centerPanel.setBorder(WidgetUtils.BORDER_TOP_PADDING); final JXStatusBar statusBar = WidgetFactory.createStatusBar(_statusLabel); final DescriptionLabel descriptionLabel = new DescriptionLabel(); descriptionLabel.setText("Configure the datastore's column names");
final JXStatusBar statusBar = WidgetFactory.createStatusBar(_statusLabel);
@Override protected JComponent getDialogContent() { final DCPanel formPanel = new DCPanel(); // temporary variable to make it easier to refactor the layout WidgetUtils.addToGridBag(DCLabel.bright("Datastore name:"), formPanel, 0, 0); WidgetUtils.addToGridBag(_datastoreNameField, formPanel, 1, 0); final DCPanel checkBoxPanel = new DCPanel().setTitledBorder("Contained datastores"); checkBoxPanel.setLayout(new VerticalLayout(4)); for (final JCheckBox checkBox : _checkBoxes) { checkBoxPanel.add(checkBox); } final JScrollPane checkBoxScrollPane = WidgetUtils.scrolleable(checkBoxPanel); checkBoxScrollPane.setPreferredSize(new Dimension(checkBoxPanel.getWidth(), 300)); checkBoxScrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED); checkBoxScrollPane.setBackground(_outerPanel.getBackground()); WidgetUtils.addToGridBag(checkBoxScrollPane, formPanel, 0, 1, 2, 1); final DCPanel buttonPanel = getButtonPanel(); final DCPanel centerPanel = new DCPanel(); centerPanel.setLayout(new VerticalLayout(4)); centerPanel.add(formPanel); centerPanel.add(buttonPanel); final JXStatusBar statusBar = WidgetFactory.createStatusBar(_statusLabel); _outerPanel.setLayout(new BorderLayout()); _outerPanel.add(centerPanel, BorderLayout.CENTER); _outerPanel.add(statusBar, BorderLayout.SOUTH); return _outerPanel; }
final JXStatusBar statusBar = WidgetFactory.createStatusBar(_statusLabel);
@Override protected JComponent getDialogContent() { final DCPanel driverClassOuterPanel = new DCPanel().setTitledBorder("Driver class name"); driverClassOuterPanel.add(_driverClassNameComboBox); final JButton addButton = WidgetFactory.createSmallButton(IconUtils.ACTION_ADD_DARK); addButton.addActionListener(e -> addFilenameTextField()); final JButton removeButton = WidgetFactory.createSmallButton(IconUtils.ACTION_REMOVE_DARK); removeButton.addActionListener(e -> removeFilenameTextField()); final DCPanel filesButtonPanel = new DCPanel(); filesButtonPanel.setBorder(new EmptyBorder(0, 4, 0, 0)); filesButtonPanel.setLayout(new VerticalLayout(2)); filesButtonPanel.add(addButton); filesButtonPanel.add(removeButton); final DCPanel filesOuterPanel = new DCPanel().setTitledBorder("Driver JAR file(s)"); filesOuterPanel.setLayout(new BorderLayout()); filesOuterPanel.add(_filesPanel, BorderLayout.CENTER); filesOuterPanel.add(filesButtonPanel, BorderLayout.EAST); final DCPanel buttonPanel = DCPanel.flow(Alignment.RIGHT, _addDriverButton); final DCPanel mainPanel = new DCPanel(); mainPanel.setLayout(new VerticalLayout(4)); mainPanel.add(driverClassOuterPanel); mainPanel.add(filesOuterPanel); mainPanel.add(buttonPanel); final DCPanel outerPanel = new DCPanel(); outerPanel.setLayout(new BorderLayout()); outerPanel.add(mainPanel, BorderLayout.CENTER); outerPanel.add(WidgetFactory.createStatusBar(_statusLabel), BorderLayout.SOUTH); outerPanel.setPreferredSize(400, 350); return outerPanel; }
final JXStatusBar statusBar = WidgetFactory.createStatusBar(_statusLabel);
@Override protected JComponent getDialogContent() { final DCPanel formPanel = new DCPanel(); formPanel.setLayout(new GridBagLayout()); int row = 0; WidgetUtils.addToGridBag(DCLabel.bright("Cluster name:"), formPanel, 0, row); WidgetUtils.addToGridBag(_nameTextField, formPanel, 1, row); row++; WidgetUtils.addToGridBag(DCLabel.bright("Description:"), formPanel, 0, row); WidgetUtils.addToGridBag(_descriptionTextField, formPanel, 1, row); row++; WidgetUtils.addToGridBag(DCLabel.bright("File system URI:"), formPanel, 0, row); WidgetUtils.addToGridBag(_fileSystemURITextField, formPanel, 1, row); final DCPanel buttonPanel = DCPanel.flow(Alignment.CENTER, _saveButton, _cancelButton); final DescriptionLabel descriptionLabel = new DescriptionLabel("Fill out the connection information needed " + "for DataCleaner to connect directly to the Apache Hadoop namenode and HDFS."); final DCPanel centerPanel = new DCPanel(); centerPanel.setLayout(new BorderLayout()); centerPanel.add(descriptionLabel, BorderLayout.NORTH); centerPanel.add(formPanel, BorderLayout.CENTER); centerPanel.add(buttonPanel, BorderLayout.SOUTH); final JXStatusBar statusBar = WidgetFactory.createStatusBar(_statusLabel); final DCPanel outerPanel = new DCPanel(); outerPanel.setLayout(new BorderLayout()); outerPanel.add(centerPanel, BorderLayout.CENTER); outerPanel.add(statusBar, BorderLayout.SOUTH); validateAndUpdate(); outerPanel.setPreferredSize(getDialogWidth(), 300); return outerPanel; }