Esempio n. 1
0
  private void initComponents() {
    filtergroup = new ButtonGroup();
    tabbedPane = new JTabbedPane();
    filterViolationPanel = new JPanel();
    ruletypePanel = new JScrollPane();
    ruletypeTable = new JTable();
    violationtypePanel = new JScrollPane();
    violationtypeTable = new JTable();
    pathFilterPanel = new JPanel();
    pathFilterScrollPane = new JScrollPane();
    pathFilterTable = new JTable();
    addPath = new JButton();
    removePath = new JButton();
    save = new JButton();
    cancel = new JButton();
    showFilteredValues = new JRadioButton();
    hideFilteredValues = new JRadioButton();

    setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
    setResizable(false);
    setModal(true);
    DialogUtils.alignCenter(this);

    ruletypeTable.setAutoCreateRowSorter(true);
    ruletypeTable.setAutoResizeMode(javax.swing.JTable.AUTO_RESIZE_ALL_COLUMNS);
    ruletypeTable.setFillsViewportHeight(true);
    ruletypeTable.getTableHeader().setResizingAllowed(false);
    ruletypeTable.getTableHeader().setReorderingAllowed(false);
    ruletypePanel.setViewportView(ruletypeTable);

    violationtypeTable.setFillsViewportHeight(true);
    violationtypeTable.getTableHeader().setReorderingAllowed(false);
    violationtypePanel.setViewportView(violationtypeTable);

    pathFilterTable.setAutoResizeMode(javax.swing.JTable.AUTO_RESIZE_LAST_COLUMN);
    pathFilterTable.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
    pathFilterTable.setFillsViewportHeight(true);
    pathFilterTable.getTableHeader().setResizingAllowed(false);
    pathFilterTable.getTableHeader().setReorderingAllowed(false);
    pathFilterScrollPane.setViewportView(pathFilterTable);

    addPath.addActionListener(
        new ActionListener() {
          @Override
          public void actionPerformed(ActionEvent evt) {
            addPathActionPerformed();
          }
        });

    removePath.addActionListener(
        new ActionListener() {
          @Override
          public void actionPerformed(ActionEvent evt) {
            removePathActionPerformed();
          }
        });

    save.addActionListener(
        new ActionListener() {
          @Override
          public void actionPerformed(ActionEvent evt) {
            saveActionPerformed();
          }
        });

    cancel.addActionListener(
        new ActionListener() {
          @Override
          public void actionPerformed(ActionEvent evt) {
            cancelActionPerformed();
          }
        });

    hideFilteredValues.addActionListener(
        new ActionListener() {
          @Override
          public void actionPerformed(ActionEvent evt) {
            setSelectedFilterValues(false);
          }
        });

    showFilteredValues.addActionListener(
        new ActionListener() {
          @Override
          public void actionPerformed(ActionEvent evt) {
            setSelectedFilterValues(true);
          }
        });

    filtergroup.add(showFilteredValues);

    filtergroup.add(hideFilteredValues);
    hideFilteredValues.setSelected(true);

    createFilterViolationPanelLayout();
    createPathFilterPanelLayout();
    createBaseLayout();
    setSize(800, 600);
  }
Esempio n. 2
0
 private void newModule() {
   AddModuleValuesJDialog addModuleFrame = new AddModuleValuesJDialog(this);
   DialogUtils.alignCenter(addModuleFrame);
   addModuleFrame.initGUI();
 }