Package javax.swing

Examples of javax.swing.JTable$BooleanRenderer


      mcombo.addItem(items[j]);
    }
    mcombo.addItemListener(this);
    mcombo.setSelectedItem(items[((TransformData)dataCopy).getKind()-1]);
   
    JTable mtable = createTableDataPanel(dataCopy);
    transformTables.add(mtable);
    mtransformPanel.add(mtable, BorderLayout.CENTER);
    composedTransformPanel.add(mtransformPanel);
   
    // Then the sub transformations
    for(int i=0;i< ((TransformData)dataCopy).getTransformChildren().size(); i++){
   
      TransformData composedDataCopy = ((TransformData)((TransformData)dataCopy).getTransformChildren().get(i));
      JPanel transformPanel = new JPanel(new BorderLayout());   
      transformTablesPanels.add(transformPanel);
     
      JComboBox combo = new JComboBox();
     
      transformCombos.add(combo);
      transformPanel.add(combo, BorderLayout.NORTH);
      for(int j=0;j<TransformData.FULL;j++){
        combo.addItem(items[j]);
      }
      combo.addItemListener(this);
      combo.setSelectedItem(items[composedDataCopy.getKind()-1]);
     
      JTable table = createTableDataPanel(composedDataCopy);
      transformTables.add(table);
      transformPanel.add(table, BorderLayout.CENTER);

      composedTransformPanel.add(transformPanel);
   
View Full Code Here


  }
 
 
  protected JTable createTableDataPanel(SceneGraphData dataCopy){
    TransformTableModel transformTableModel = new TransformTableModel(dstree,  (TransformData)dataCopy);
    JTable table=new JTable(transformTableModel);
    TableColumn c;
    c=table.getColumn("2");
    c.setPreferredWidth(10);
    c=table.getColumn("3");
    return  table;
  }
View Full Code Here

      for(int j=0;j<TransformData.FULL;j++){
        mcombo.addItem(items[j]);
      }
      mcombo.setSelectedItem(items[newTransform.getKind()-1]);
     
      JTable mtable = createTableDataPanel(newTransform);
     
      transformTables.add(mtable);
      mtransformPanel.add(mtable, BorderLayout.CENTER);
      composedTransformPanel.add(mtransformPanel);
     
View Full Code Here

     
        pb.add(colorPanel, BorderLayout.CENTER);
      }

      else if ( (propertyData[i].getName().startsWith(propertyDataResources.getString("VisibilityPropriety"))) || (propertyData[i].getName().startsWith(propertyDataResources.getString("AxisPropriety")))){
        JTable table = createPropertyCheckBoxTableDataPanel(propertyData[i], propertyDataCopy[i]);
        pb.add(table, BorderLayout.CENTER);
        propertiesTable[i] = table;
      }
      else{
        JTable table = createPropertyTableDataPanel(propertyData[i], propertyDataCopy[i]);
        pb.add(table, BorderLayout.CENTER);
        propertiesTable[i] = table;
      }
     
      pProp.add(pb);
View Full Code Here

      p.add(pProp, BorderLayout.CENTER);
    return p;
  }
 
  protected JTable createPropertyTableDataPanel(PropertyData propertyData, PropertyData propertyDataCopy){
    JTable table=new JTable(new PropertyTableModel( dstree, propertyDataCopy));
    TableColumn c;
    c=table.getColumn("2");
    c.setPreferredWidth(10);
    c=table.getColumn("3");
    return  table;
  }
View Full Code Here

    c=table.getColumn("3");
    return  table;
  }
 
  protected JTable createPropertyCheckBoxTableDataPanel(PropertyData propertyData, PropertyData propertyDataCopy){
    JTable table=new JTable(new PropertyBooleanTableModel( dstree, propertyDataCopy));
    TableColumn c;
    c=table.getColumn("2");
    c.setPreferredWidth(10);
    c=table.getColumn("3");
    return  table;
  }
View Full Code Here

    JLabel addedData= new JLabel(resources.getString("addedData"));
    addedData.setFont(new Font("Dialog", Font.PLAIN,12));
    add(addedData,gbc);
    gbc.gridy++;

    table  = new JTable(new AddedDataTableModel(null));
    table.setPreferredScrollableViewportSize(new Dimension(100, 100));
    table.addMouseListener(this);
    add(new JScrollPane(table),gbc);
    gbc.gridy++;
View Full Code Here

     * This method return the JTable that displays the infos.
     * @return <b>(JTable)</b>  The JTableInfos.
     */
    private JTable getJTableInfos() {
        if (jTableInfos == null) {
            jTableInfos = new JTable() {
                /* (non-Javadoc)
                 * @see javax.swing.JTable#getCellRenderer(int, int)
                 */
                public TableCellRenderer getCellRenderer(int row, int column) {
                    //The result
View Full Code Here

              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

      dstree.setEnabled(source!=null);
  }

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

TOP

Related Classes of javax.swing.JTable$BooleanRenderer

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.