Package javax.swing

Examples of javax.swing.DefaultCellEditor


        try {
            TableColumn roleColumn = this
                    .getColumn(ResourceTreeTableModel.strResourceRoleForTask);
            comboBox.setEditable(false);
            roleColumn.setCellEditor(new DefaultCellEditor(comboBox));
        } catch (IllegalArgumentException ex) {

        }
    }
View Full Code Here


    mainTable.setIntercellSpacing(new Dimension(3, 3));
    mainTable.setDefaultRenderer(String.class, new JPdfSelectionTableRenderer());

    TableColumnModel mainTableColModel = mainTable.getColumnModel();
    mainTableColModel.getColumn(AbstractPdfSelectionTableModel.PASSWORD).setCellEditor(
        new DefaultCellEditor(new JPasswordField()));

    TableColumn tc = mainTableColModel.getColumn(AbstractPdfSelectionTableModel.ROW_NUM);
    tc.setPreferredWidth(25);
    tc.setMaxWidth(35);
View Full Code Here

            max = Double.POSITIVE_INFINITY;
        }
        outlineTable.setDefaultRenderer(TimeInterval.class, timeIntervalsRenderer = new TimeIntervalsRenderer(min, max, timeIntervalGraphics));

        //Use default string editor for them:
        outlineTable.setDefaultEditor(NumberList.class, new DefaultCellEditor(new JTextField()));
        outlineTable.setDefaultEditor(DynamicBigDecimal.class, new DefaultCellEditor(new JTextField()));
        outlineTable.setDefaultEditor(DynamicBigInteger.class, new DefaultCellEditor(new JTextField()));
        outlineTable.setDefaultEditor(DynamicByte.class, new DefaultCellEditor(new JTextField()));
        outlineTable.setDefaultEditor(DynamicDouble.class, new DefaultCellEditor(new JTextField()));
        outlineTable.setDefaultEditor(DynamicFloat.class, new DefaultCellEditor(new JTextField()));
        outlineTable.setDefaultEditor(DynamicInteger.class, new DefaultCellEditor(new JTextField()));
        outlineTable.setDefaultEditor(DynamicLong.class, new DefaultCellEditor(new JTextField()));
        outlineTable.setDefaultEditor(DynamicShort.class, new DefaultCellEditor(new JTextField()));
        outlineTable.setDefaultEditor(TimeInterval.class, new DefaultCellEditor(new JTextField()));
    }
View Full Code Here

            max = Double.POSITIVE_INFINITY;
        }
        table.setDefaultRenderer(TimeInterval.class, timeIntervalsRenderer = new TimeIntervalsRenderer(min, max, timeIntervalGraphics));

        //Use default string editor for them:
        table.setDefaultEditor(NumberList.class, new DefaultCellEditor(new JTextField()));
        table.setDefaultEditor(DynamicBigDecimal.class, new DefaultCellEditor(new JTextField()));
        table.setDefaultEditor(DynamicBigInteger.class, new DefaultCellEditor(new JTextField()));
        table.setDefaultEditor(DynamicByte.class, new DefaultCellEditor(new JTextField()));
        table.setDefaultEditor(DynamicDouble.class, new DefaultCellEditor(new JTextField()));
        table.setDefaultEditor(DynamicFloat.class, new DefaultCellEditor(new JTextField()));
        table.setDefaultEditor(DynamicInteger.class, new DefaultCellEditor(new JTextField()));
        table.setDefaultEditor(DynamicLong.class, new DefaultCellEditor(new JTextField()));
        table.setDefaultEditor(DynamicShort.class, new DefaultCellEditor(new JTextField()));
        table.setDefaultEditor(TimeInterval.class, new DefaultCellEditor(new JTextField()));
    }
View Full Code Here

        authTable.getTableHeader().setDefaultRenderer(new HeaderAsPropertyRenderer());
        authTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
        authTable.setPreferredScrollableViewportSize(new Dimension(100, 70));

        TableColumn passwordColumn = authTable.getColumnModel().getColumn(AuthManager.COL_PASSWORD);
        passwordColumn.setCellEditor(new DefaultCellEditor(new JPasswordField()));
        passwordColumn.setCellRenderer(new PasswordCellRenderer());

        JPanel panel = new JPanel(new BorderLayout(0, 5));
        panel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(),
                JMeterUtils.getResString("auths_stored"))); //$NON-NLS-1$
View Full Code Here

          JComboBox comboBox = new JComboBox();
          for (int j = 0; j < av.length; j++) {
            comboBox.addItem(av[j]);
          }
          values[i] = av[0]; //preset the first value from list
          table.setMyCellEditor(new DefaultCellEditor(comboBox),i);
        }

        //handle default value
        if (currentStateVar.getDefaultValue() != null) {
          String val = currentStateVar.getDefaultValue().toString();
View Full Code Here

        this.setBorder(BorderFactory.createEmptyBorder(3, 3, 0, 3));

        comboBox = new JComboBox(dictionnaireTable.getTypes().toArray());

        table = new JTable(dictionnaireTable);
        table.getColumn(Utilities.getLangueMessage (Constantes.MESSAGE_TYPE)).setCellEditor(new DefaultCellEditor(comboBox));

        table.getColumnModel().getColumn(3).setMaxWidth(100);
        table.getColumnModel().getColumn(4).setMaxWidth(50);
        table.setRowHeight(4, 1);
        table.setAutoCreateRowSorter(true;   // Bug #456345
View Full Code Here

    comboBox.addItem("Rowing");
    comboBox.addItem("Knitting");
    comboBox.addItem("Speed reading");
    comboBox.addItem("Pool");
    comboBox.addItem("None of the above");
    sportColumn.setCellEditor(new DefaultCellEditor(comboBox));
    // Set up tool tips for the sport cells.
    DefaultTableCellRenderer renderer = new DefaultTableCellRenderer();
    renderer.setToolTipText("Click for combo box");
    sportColumn.setCellRenderer(renderer);
  }
View Full Code Here

    comboBox.addItem("Rowing");
    comboBox.addItem("Knitting");
    comboBox.addItem("Speed reading");
    comboBox.addItem("Pool");
    comboBox.addItem("None of the above");
    sportColumn.setCellEditor(new DefaultCellEditor(comboBox));
    // Set up tool tips for the sport cells.
    DefaultTableCellRenderer renderer = new DefaultTableCellRenderer();
    renderer.setToolTipText("Click for combo box");
    sportColumn.setCellRenderer(renderer);
  }
View Full Code Here

    final TestTable table = new TestTable(3, 3);

    private MyWindow() {
      super(Bug219_editTableCellWithEditorHavingCustomDocument_Test.class);
      addComponents(table);
      DefaultCellEditor cellEditor = new DefaultCellEditor(new JTextField(new ExampleDocument(this), "", 10));
      table.getColumnModel().getColumn(COLUMN).setCellEditor(cellEditor);
      table.cellEditable(ROW, COLUMN, true);
    }
View Full Code Here

TOP

Related Classes of javax.swing.DefaultCellEditor

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.