Package org.owasp.jbrofuzz.ui.tablemodels

Examples of org.owasp.jbrofuzz.ui.tablemodels.SingleColumnModel


        BorderFactory.createTitledBorder(" Categories "), BorderFactory
        .createEmptyBorder(1, 1, 1, 1)));
    // categoriesPanel.setBounds(10, 20, 220, 430);
    // this.add(categoriesPanel);

    categoriesTableModel = new SingleColumnModel(" Category Name ");
    categoriesTableModel.setData(m.getJBroFuzz().getDatabase()
        .getAllCategories());

    categoriesTable = new JTable(categoriesTableModel);

    sorter = new TableRowSorter<SingleColumnModel>(categoriesTableModel);
    categoriesTable.setRowSorter(sorter);

    categoriesTable.getTableHeader().setToolTipText("Click to sort by row");
    categoriesTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);

    categoriesTable.setFont(new Font("Lucida Sans Typewriter", Font.BOLD,
        14));
    categoriesTable.setRowHeight(30);
    categoriesTable.getSelectionModel().addListSelectionListener(
        new CategoriesRowListener(this));

    categoriesTable.setBackground(Color.BLACK);
    categoriesTable.setForeground(Color.WHITE);

    // Right click: Open, Cut, Copy, Paste, Select All, Properties
    popupTable(categoriesTable, false, false, true, false, false, false);

    final JScrollPane categoryTableScrollPane = new JScrollPane(
        categoriesTable);
    categoryTableScrollPane.setVerticalScrollBarPolicy(20);
    categoryTableScrollPane.setHorizontalScrollBarPolicy(30);
    // categoryTableScrollPane.setPreferredSize(new Dimension(200, 390));
    categoriesPanel.add(categoryTableScrollPane);

    // Fuzzers: Second table with one column of all the generators of the
    //

    fuzzersPanel = new JPanel(new BorderLayout());
    fuzzersPanel.setBorder(BorderFactory.createCompoundBorder(BorderFactory
        .createTitledBorder(" Select a Category "), BorderFactory
        .createEmptyBorder(1, 1, 1, 1)));

    fuzzersTableModel = new SingleColumnModel(" Fuzzer Name ");

    fuzzersTable = new JTable(fuzzersTableModel);

    sorter2 = new TableRowSorter<SingleColumnModel>(fuzzersTableModel);
    fuzzersTable.setRowSorter(sorter2);

    fuzzersTable.getTableHeader().setToolTipText("Click to sort by row");
    fuzzersTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);

    fuzzersTable.setFont(new Font("Lucida Sans Typewriter", Font.BOLD, 14));
    fuzzersTable.setRowHeight(30);
    fuzzersTable.getSelectionModel().addListSelectionListener(
        new FuzzersRowListener(this));
    fuzzersTable.setBackground(Color.BLACK);
    fuzzersTable.setForeground(Color.WHITE);

    // Right click: Open, Cut, Copy, Paste, Select All, Properties
    popupTable(fuzzersTable, false, false, true, false, false, false);

    final JScrollPane nameTextAreaTextScrollPane = new JScrollPane(
        fuzzersTable);
    nameTextAreaTextScrollPane.setVerticalScrollBarPolicy(20);
    nameTextAreaTextScrollPane.setHorizontalScrollBarPolicy(30);
    // nameTextAreaTextScrollPane.setPreferredSize(new Dimension(200, 310));
    fuzzersPanel.add(Box.createRigidArea(new Dimension(0, 50)),
        BorderLayout.NORTH);
    fuzzersPanel.add(nameTextAreaTextScrollPane, BorderLayout.CENTER);

    // Payloads Table: Payload table with one column of all the generators
    // of
    // the selected category

    payloadsTableModel = new SingleColumnModel(" Payloads ");

    payloadsTable = new JTable(payloadsTableModel);
    payloadsTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);

    payloadsTable
View Full Code Here


        BorderFactory.createTitledBorder(" Categories "), BorderFactory
        .createEmptyBorder(1, 1, 1, 1)));
    categoriesPanel.setBounds(10, 20, 190, SIZE_Y - 70);
    this.add(categoriesPanel);

    catTableModel = new SingleColumnModel(" Category Name ");
    categoriesTable = new JTable(catTableModel);
    categoriesTable.setName(NAME_CATEGORY);
    popup(categoriesTable);

    categoriesTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
    catTableModel.setData(mWindow.getJBroFuzz().getDatabase()
        .getAllCategories());

    final TableRowSorter<SingleColumnModel> sorter =
      new TableRowSorter<SingleColumnModel>(catTableModel);
    categoriesTable.setRowSorter(sorter);

    categoriesTable.setFont(new Font("Verdana", Font.BOLD, 10));
    categoriesTable.setRowHeight(30);
    categoriesTable.getSelectionModel().addListSelectionListener(
        new CategoriesRowListener());
    categoriesTable.setBackground(Color.BLACK);
    categoriesTable.setForeground(Color.WHITE);

    categoriesTable.addKeyListener(new KeyAdapter() {
      @Override
      public void keyPressed(final KeyEvent kEvent) {
        if (kEvent.getKeyCode() == 27) {
          PayloadsDialog.this.dispose();
        }
      }
    });

    final JScrollPane catScrollPane = new JScrollPane(
        categoriesTable);
    catScrollPane.setVerticalScrollBarPolicy(20);
    catScrollPane.setHorizontalScrollBarPolicy(30);
    catScrollPane.setPreferredSize(new Dimension(170, SIZE_Y - 110));
    categoriesPanel.add(catScrollPane);

    // Fuzzers : The middle area displaying the list of fuzzers by name

    fuzzersPanel = new JPanel();
    fuzzersPanel.setBorder(BorderFactory.createCompoundBorder(BorderFactory
        .createTitledBorder(" Select a Category "), BorderFactory
        .createEmptyBorder(1, 1, 1, 1)));
    fuzzersPanel.setBounds(210, 20, 180, 250);
    this.add(fuzzersPanel);

    fTableModel = new SingleColumnModel(" Fuzzer Name ");
    fuzzersTable = new JTable(fTableModel);
    fuzzersTable.setName(NAME_FUZZER);
    popup(fuzzersTable);

    sorter2 = new TableRowSorter<SingleColumnModel>(fTableModel);
    fuzzersTable.setRowSorter(sorter2);

    fuzzersTable.setFont(new Font("Verdana", Font.BOLD, 10));
    fuzzersTable.setRowHeight(30);
    fuzzersTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
    fuzzersTable.getSelectionModel().addListSelectionListener(
        new FuzzersRowListener());
    fuzzersTable.setBackground(Color.BLACK);
    fuzzersTable.setForeground(Color.WHITE);
    /*
     * fuzzersTable.addMouseListener(new MouseAdapter(){ @Override public
     * void mouseClicked(final MouseEvent e){ if (e.getClickCount() == 1){
     * okBut.setEnabled(true); // String exploit = (String)
     * nameTable.getModel().getValueAt(nameTable.getSelectedRow(), 0); //
     * new ExploitViewer(mWindow, exploit, ExploitViewer.VIEW_EXPLOIT); } } } );
     */
    fuzzersTable.addKeyListener(new KeyAdapter() {
      @Override
      public void keyPressed(final KeyEvent kEvent) {
        if (kEvent.getKeyCode() == 27) {
          PayloadsDialog.this.dispose();
        }
      }
    });

    final JScrollPane nameScrollPane = new JScrollPane(
        fuzzersTable);
    nameScrollPane.setVerticalScrollBarPolicy(20);
    nameScrollPane.setHorizontalScrollBarPolicy(30);
    nameScrollPane
    .setPreferredSize(new Dimension(160, SIZE_Y - 190));
    fuzzersPanel.add(nameScrollPane);

    // Payloads : A JSplitPane with a table and a textArea

    payloadsPanel = new JPanel();
    payloadsPanel.setBorder(BorderFactory.createCompoundBorder(
        BorderFactory.createTitledBorder(" Select a Fuzzer "),
        BorderFactory.createEmptyBorder(1, 1, 1, 1)));
    payloadsPanel.setBounds(400, 20, 260, 190);
    payloadsPanel.setLayout(new BoxLayout(payloadsPanel, BoxLayout.Y_AXIS));
    this.add(payloadsPanel);

    pTableModel = new SingleColumnModel(" Payloads ");
    payloadsTable = new JTable(pTableModel);
    payloadsTable.setName(NAME_PAYLOAD);
    popup(payloadsTable);

    payloadsTable.setFont(new Font("Verdana", Font.BOLD, 10));
View Full Code Here

TOP

Related Classes of org.owasp.jbrofuzz.ui.tablemodels.SingleColumnModel

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.