Examples of JTable


Examples of javax.swing.JTable

      dstree.setEnabled(source!=null);
  }

  protected JComponent createTable(){
    tModel=new TableModel();
    JTable table=new JTable(tModel);
    return table;
  }
View Full Code Here

Examples of javax.swing.JTable

        connection_select_table.setSelectionMode( ListSelectionModel.SINGLE_SELECTION );
        connection_select_table.setShowGrid( false );
        // connection_select_table.setCellSelectionEnabled( true );
       
        // when we click on the speed selection table we see the down/up values below
        final JTable cst = connection_select_table;
        connection_select_table.addMouseListener(new MouseAdapter() {
      public void mouseClicked(MouseEvent evt) {
        // int col = cst.getSelectedColumn();
        int row = cst.getSelectedRow();
        String down_speed = (String)cst.getModel().getValueAt(row, 1);
        String up_speed = (String)cst.getModel().getValueAt(row, 2);
        switch(row) {
           case : disableCustomSpeedSettings( true );
                   //true_download_bandwidth.setText("0");
                     //true_upload_bandwidth.setText("0");
                     break;
View Full Code Here

Examples of javax.swing.JTable

 
 

  protected JPanel createTablePanel(String[] titles, String[][] errors){
    JPanel p=new JPanel();
    JTable table  = new JTable(new ErrorsReportingTableModel(errors, titles));
    table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);

    // Fit columns size to all text values
    int tableWidth = setColumnSize(table);
    table.setPreferredScrollableViewportSize(new Dimension(tableWidth, 100));
    p.add(new JScrollPane(table));
    return p;
  }
View Full Code Here

Examples of javax.swing.JTable

              col_set_frame.setSize(400, 300);
              col_set_frame.setLayout(new BorderLayout());
              col_set_frame.add(center_panel,BorderLayout.CENTER);
              col_set_frame.add(right_panel, BorderLayout.EAST);
              col_set_frame.add(bottom_panel, BorderLayout.SOUTH);
              final JTable col_set_table = new JTable();
              //DefaultTableModel col_set_table_model = new DefaultTableModel();
              Object[][] col_set_rows_cols = new Object[14][3];
              int i = 0;
              // col name -> col obj mapping (easy way to map col names to master cols)
              final Map<String,TableColumnExt> cols = new Hashtable<String,TableColumnExt>();
              for(TableColumnExt column : table_columns) {
                if(column.isVisible()) col_set_rows_cols[i][0] = true;
                else col_set_rows_cols[i][0] = false;
                col_set_rows_cols[i][1] = column.getHeaderValue();
                cols.put(column.getHeaderValue().toString(), column);
                ++i;
              }
              col_set_table.setModel(new DefaultTableModel(col_set_rows_cols,
                  new String[] {
                  "Visibility", "Name", "Description"
              })
              {
                      Class[] types = new Class [] {
                          java.lang.Boolean.class, java.lang.String.class, java.lang.String.class
                      };

                      public Class getColumnClass(int columnIndex) {
                          return types [columnIndex];
                      }
                  });
              JScrollPane scroll_pane = new JScrollPane();
              scroll_pane.setViewportView(col_set_table);
              center_panel.add(scroll_pane);
              SwingUtils.setWindowLocationRelativeTo(col_set_frame, parent);
              apply_button.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent event) {
                                    for(int i=0; i<14; i++) {
                                      boolean visibility = Boolean.parseBoolean(col_set_table.getModel().getValueAt(i, 0).toString());
                                      String column_name = col_set_table.getModel().getValueAt(i, 1).toString();
                                      //cols.get(column_name).setVisible(visibility);
                                      if(visibility == false) column_model.removeColumn(cols.get(column_name));
                                      System.out.println("Column from set " + cols.get(column_name).getHeaderValue());
                                      System.out.println("<--->" + column_name + "<---->" + visibility);
                                    }
View Full Code Here

Examples of javax.swing.JTable

    public TransformAnimatorTable() {
        this.setLayout(new BorderLayout());
        _combo = new JComboBox(TransformValues.values());
        _combo.addItemListener(this);
        add(BorderLayout.NORTH, _combo);
        _table = new JTable();
        add(BorderLayout.CENTER, _table);
        _newValue = true;
        _sourceTree=SourceTree.getFromPool("SceneGraphDataChooser");
    }
View Full Code Here

Examples of javax.swing.JTable

                data[i][0] = key;
                data[i][1] = System.getProperty(value);
                ++i;
            }
       
        table = new JTable(data,column_names);
        scroll_pane = new JScrollPane();
        scroll_pane.setViewportView(table);
        this.add(scroll_pane);
      }
View Full Code Here

Examples of javax.swing.JTable

    boolean _newValue;
    final SourceTree _sourceTree;

    public Tuple3fAnimatorTable() {
        this.setLayout(new BorderLayout());
        _table = new JTable();
        add(BorderLayout.CENTER, _table);
        _newValue = true;
        _sourceTree=SourceTree.getFromPool("SceneGraphDataChooser");
    }
View Full Code Here

Examples of javax.swing.JTable

    public TransformTable() {
        this.setLayout(new BorderLayout());
        _combo = new JComboBox(TransformValues.values());
        _combo.addItemListener(this);
        add(BorderLayout.NORTH, _combo);
        _table = new JTable();
        add(BorderLayout.CENTER, _table);
        _newValue = true;
    }
View Full Code Here

Examples of javax.swing.JTable

      }
      splitPane.setLeftComponent(treeScrollPane);

      JScrollPane tableScrollPane;
      {
        table = new JTable(new DefaultTableModel(null, new String[]{"Attribute","Value"}));
        {
          table.setAutoResizeMode(JTable.AUTO_RESIZE_LAST_COLUMN);
          TableColumn column0 = table.getColumnModel().getColumn(0);
          {
            column0.setCellRenderer(new CellRenderer());
View Full Code Here

Examples of javax.swing.JTable

        this.manager = manager;

        model = new PluginTableModel(this);
        if (managePanel)
            model.setManageModel();
        table = new JTable(model);
        model.setTable(table);

        setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));
        setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.