Package org.eobjects.datacleaner.panels

Examples of org.eobjects.datacleaner.panels.DCPanel


        addRenderedResult(component);
      }
    }

    DCPanel panel = new DCPanel(WidgetUtils.BG_COLOR_LESS_DARK, WidgetUtils.BG_COLOR_DARK);
    panel.setLayout(new BorderLayout());
    panel.add(WidgetUtils.scrolleable(_taskPaneContainer), BorderLayout.CENTER);

    Dimension preferredSize = panel.getPreferredSize();
    int height = preferredSize.height < 400 ? preferredSize.height + 100 : preferredSize.height;
    int width = preferredSize.width < 500 ? 500 : preferredSize.width;
    panel.setPreferredSize(width, height);

    return panel;
  }
View Full Code Here


  public void addRenderedResult(JComponent component) {
    ImageIcon icon = imageManager.getImageIcon("images/actions/drill-to-detail.png");
    JXTaskPane taskPane = WidgetFactory.createTaskPane("Detailed results", icon);

    final DCPanel taskPanePanel = new DCPanel(WidgetUtils.BG_COLOR_BRIGHT, WidgetUtils.BG_COLOR_BRIGHTEST);
    taskPanePanel.setBorder(new EmptyBorder(4, 4, 4, 4));
    taskPanePanel.setLayout(new BorderLayout());
    taskPanePanel.add(component);

    taskPane.add(taskPanePanel);

    _taskPaneContainer.add(taskPane);
  }
View Full Code Here

          _availableValues.put(getName(value), value);
        }
      }
    }

    DCPanel buttonPanel = new DCPanel();
    buttonPanel.setLayout(new HorizontalLayout(2));

    JButton selectAllButton = new JButton("Select all");
    selectAllButton.addActionListener(SELECT_ALL_LISTENER);
    buttonPanel.add(selectAllButton);

    JButton selectNoneButton = new JButton("Select none");
    selectNoneButton.addActionListener(SELECT_NONE_LISTENER);
    buttonPanel.add(selectNoneButton);

    add(buttonPanel);

    _checkBoxes = new JCheckBox[_availableValues.size()];
    if (_checkBoxes.length == 0) {
View Full Code Here

        final ChartPanel chartPanel = new ChartPanel(chart);
        displayChartCallback.displayChart(chartPanel);
      }
    };

    final DCPanel panel = createActionableValuePanel(measureName, Alignment.LEFT, action, "images/chart-types/bar.png");
    table.setValueAt(panel, row, 0);
  }
View Full Code Here

  }

  public static DCPanel createActionableValuePanel(Object value, Alignment alignment, ActionListener action,
      String iconImagePath) {
    final JLabel label = new JLabel(getLabelText(value));
    final DCPanel panel = new DCPanel();
    panel.add(label);

    panel.setLayout(new FlowLayout(alignment.getFlowLayoutAlignment(), 0, 0));

    if (action != null && iconImagePath != null) {
      final JButton button = WidgetFactory.createSmallButton(iconImagePath);
      button.addActionListener(action);
      panel.add(Box.createHorizontalStrut(4));
      panel.add(button);
    }

    return panel;
  }
View Full Code Here

        logoutButton.setEnabled(false);
      }
    });
    logoutButton.setEnabled(_userPreferences.isLoggedIn());

    final DCPanel userRegistrationPanel = new DCPanel().setTitledBorder("User registration");
    userRegistrationPanel.add(DCLabel.dark("Logged in as:"));
    userRegistrationPanel.add(usernameTextField);
    userRegistrationPanel.add(logoutButton);

    final FilenameTextField saveDatastoreDirectoryField = new FilenameTextField(
        _userPreferences.getSaveDatastoreDirectory(), true);
    saveDatastoreDirectoryField.setFile(_userPreferences.getSaveDatastoreDirectory());
    saveDatastoreDirectoryField.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
    saveDatastoreDirectoryField.addFileSelectionListener(new FileSelectionListener() {
      @Override
      public void onSelected(FilenameTextField filenameTextField, File file) {
        _userPreferences.setSaveDatastoreDirectory(file);
      }
    });

    final DCPanel directoriesPanel = new DCPanel().setTitledBorder("Files & directories");
    directoriesPanel.add(DCLabel.dark("Written datastores:"));
    directoriesPanel.add(saveDatastoreDirectoryField);

    final DCPanel panel = new DCPanel(WidgetUtils.BG_COLOR_BRIGHT, WidgetUtils.BG_COLOR_BRIGHTEST);
    panel.setLayout(new VerticalLayout(4));
    panel.add(userRegistrationPanel);
    panel.add(getQuickAnalysisPanel());
    panel.add(directoriesPanel);

    return panel;
  }
View Full Code Here

      protected void onChange(DocumentEvent event) {
        actionListener.actionPerformed(null);
      }
    });

    final DCPanel quickAnalysisPanel = new DCPanel().setTitledBorder("Quick analysis");
    WidgetUtils.addToGridBag(DCLabel.dark("Max columns per analyzer:"), quickAnalysisPanel, 0, 0);
    WidgetUtils.addToGridBag(columnsTextField, quickAnalysisPanel, 1, 0);
    WidgetUtils.addToGridBag(valueDistributionCheckBox, quickAnalysisPanel, 0, 1, 2, 1);
    WidgetUtils.addToGridBag(patternFinderCheckBox, quickAnalysisPanel, 0, 2, 2, 1);
    return quickAnalysisPanel;
View Full Code Here

      public void actionPerformed(ActionEvent e) {
        _userPreferences.setProxyEnabled(proxyCheckBox.isSelected());
      }
    });

    final DCPanel proxyPanel = new DCPanel().setTitledBorder("Proxy settings");

    final JTextField proxyHostField = WidgetFactory.createTextField("Proxy host");
    proxyHostField.setText(_userPreferences.getProxyHostname());
    proxyHostField.getDocument().addDocumentListener(new DCDocumentListener() {
      @Override
      protected void onChange(DocumentEvent e) {
        _userPreferences.setProxyHostname(proxyHostField.getText());
      }
    });
    WidgetUtils.addToGridBag(new JLabel("Proxy host"), proxyPanel, 0, 0);
    WidgetUtils.addToGridBag(proxyHostField, proxyPanel, 1, 0);

    final JTextField proxyPortField = WidgetFactory.createTextField("Proxy port");
    proxyPortField.setDocument(new NumberDocument());
    proxyPortField.getDocument().addDocumentListener(new DCDocumentListener() {
      @Override
      protected void onChange(DocumentEvent event) {
        int port;
        try {
          port = Integer.parseInt(proxyPortField.getText());
        } catch (Exception e) {
          port = 8080;
        }
        _userPreferences.setProxyPort(port);
      }
    });
    proxyPortField.setText("" + _userPreferences.getProxyPort());
    WidgetUtils.addToGridBag(new JLabel("Proxy port"), proxyPanel, 0, 1);
    WidgetUtils.addToGridBag(proxyPortField, proxyPanel, 1, 1);

    final JCheckBox proxyAuthCheckBox = new JCheckBox("Enable authentication?",
        _userPreferences.isProxyAuthenticationEnabled());
    proxyAuthCheckBox.setOpaque(false);
    proxyAuthCheckBox.addActionListener(new ActionListener() {
      @Override
      public void actionPerformed(ActionEvent e) {
        _userPreferences.setProxyAuthenticationEnabled(proxyAuthCheckBox.isSelected());
      }
    });

    final DCPanel proxyAuthPanel = new DCPanel().setTitledBorder("Proxy authentication");
    final JTextField proxyUsernameField = WidgetFactory.createTextField("Username");
    proxyUsernameField.setText(_userPreferences.getProxyUsername());
    proxyUsernameField.getDocument().addDocumentListener(new DCDocumentListener() {
      @Override
      protected void onChange(DocumentEvent event) {
        _userPreferences.setProxyUsername(proxyUsernameField.getText());
      }
    });
    WidgetUtils.addToGridBag(new JLabel("Username"), proxyAuthPanel, 0, 0);
    WidgetUtils.addToGridBag(proxyUsernameField, proxyAuthPanel, 1, 0);

    final JPasswordField proxyPasswordField = new JPasswordField(_userPreferences.getProxyPassword());
    proxyPasswordField.getDocument().addDocumentListener(new DCDocumentListener() {
      @Override
      protected void onChange(DocumentEvent event) {
        _userPreferences.setProxyPassword(String.valueOf(proxyPasswordField.getPassword()));
      }
    });
    WidgetUtils.addToGridBag(new JLabel("Password"), proxyAuthPanel, 0, 1);
    WidgetUtils.addToGridBag(proxyPasswordField, proxyAuthPanel, 1, 1);

    WidgetUtils.addToGridBag(proxyAuthCheckBox, proxyPanel, 0, 2, 2, 1);
    WidgetUtils.addToGridBag(proxyAuthPanel, proxyPanel, 0, 3, 2, 1);

    ActionListener actionListener = new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        proxyHostField.setEnabled(proxyCheckBox.isSelected());
        proxyPortField.setEnabled(proxyCheckBox.isSelected());
        proxyAuthCheckBox.setEnabled(proxyCheckBox.isSelected());
        proxyUsernameField.setEnabled(proxyAuthCheckBox.isSelected() && proxyCheckBox.isSelected());
        proxyPasswordField.setEnabled(proxyAuthCheckBox.isSelected() && proxyCheckBox.isSelected());
      }
    };
    proxyCheckBox.addActionListener(actionListener);
    proxyAuthCheckBox.addActionListener(actionListener);

    // use ActionListener to initialize components
    actionListener.actionPerformed(null);

    final DCPanel networkTabPanel = new DCPanel(WidgetUtils.BG_COLOR_BRIGHT, WidgetUtils.BG_COLOR_BRIGHTEST);
    networkTabPanel.setLayout(new BorderLayout());
    networkTabPanel.add(proxyCheckBox, BorderLayout.NORTH);
    networkTabPanel.add(proxyPanel, BorderLayout.CENTER);

    return networkTabPanel;
  }
View Full Code Here

    return networkTabPanel;
  }

  private DCPanel getPerformanceTab() {
    DCPanel panel = new DCPanel(WidgetUtils.BG_COLOR_BRIGHT, WidgetUtils.BG_COLOR_BRIGHTEST);

    int row = 0;

    TaskRunner taskRunner = _configuration.getTaskRunner();
    WidgetUtils.addToGridBag(new JLabel("Task runner type:"), panel, 0, row);
View Full Code Here

    WidgetUtils.addToGridBag(descriptionLabel, panel, 0, row, 2, 1);
    return panel;
  }

  private DCPanel getMemoryTab() {
    final DCPanel panel = new DCPanel(WidgetUtils.BG_COLOR_BRIGHT, WidgetUtils.BG_COLOR_BRIGHTEST);

    final JLabel maxMemoryLabel = new JLabel("? kb", JLabel.RIGHT);
    final JLabel totalMemoryLabel = new JLabel("? kb", JLabel.RIGHT);
    final JLabel usedMemoryLabel = new JLabel("? kb", JLabel.RIGHT);
    final JLabel freeMemoryLabel = new JLabel("? kb", JLabel.RIGHT);
View Full Code Here

TOP

Related Classes of org.eobjects.datacleaner.panels.DCPanel

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.