类javax.swing.DefaultCellEditor源码实例Demo

下面列出了怎么用javax.swing.DefaultCellEditor的API类实例代码及写法,或者点击链接到github查看源代码。

源代码1 项目: jdk8u_jdk   文件: Test6505027.java
public Test6505027(JFrame main) {
    Container container = main;
    if (INTERNAL) {
        JInternalFrame frame = new JInternalFrame();
        frame.setBounds(OFFSET, OFFSET, WIDTH, HEIGHT);
        frame.setVisible(true);

        JDesktopPane desktop = new JDesktopPane();
        desktop.add(frame, new Integer(1));

        container.add(desktop);
        container = frame;
    }
    if (TERMINATE) {
        this.table.putClientProperty(KEY, Boolean.TRUE);
    }
    TableColumn column = this.table.getColumn(COLUMNS[1]);
    column.setCellEditor(new DefaultCellEditor(new JComboBox(ITEMS)));

    container.add(BorderLayout.NORTH, new JTextField());
    container.add(BorderLayout.CENTER, new JScrollPane(this.table));
}
 
源代码2 项目: mars-sim   文件: TableRenderDemo.java
public void setUpSportColumn(JTable table,
                             TableColumn sportColumn) {
    //Set up the editor for the sport cells.
    JComboBox<String> comboBox = new JComboBox<String>();
    comboBox.addItem("Snowboarding");
    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);
}
 
源代码3 项目: openAGV   文件: ContinuousLoadPanel.java
/**
 * Creates a new instance.
 *
 * @param portalProvider The application's portal provider.
 * @param eventSource Where components can register for events.
 */
@Inject
public ContinuousLoadPanel(SharedKernelServicePortalProvider portalProvider,
                           @ApplicationEventBus EventSource eventSource) {
  this.portalProvider = requireNonNull(portalProvider, "portalProvider");
  this.eventSource = requireNonNull(eventSource, "eventSource");

  initComponents();

  JComboBox<TransportOrderData.Deadline> deadlineComboBox = new JComboBox<>();
  deadlineComboBox.addItem(null);
  for (TransportOrderData.Deadline i : TransportOrderData.Deadline.values()) {
    deadlineComboBox.addItem(i);
  }
  DefaultCellEditor deadlineEditor = new DefaultCellEditor(deadlineComboBox);
  toTable.setDefaultEditor(TransportOrderData.Deadline.class, deadlineEditor);

  toTable.putClientProperty("terminateEditOnFocusLost", Boolean.TRUE);
  doTable.putClientProperty("terminateEditOnFocusLost", Boolean.TRUE);
}
 
源代码4 项目: openAGV   文件: ContinuousLoadPanel.java
private void buildTableModels(TransportOrderData transportOrder) {
  requireNonNull(transportOrder, "transportOrder");

  // Drive orders
  locationsComboBox.removeAllItems();
  operationTypesComboBox.removeAllItems();
  SortedSet<Location> sortedLocationSet = new TreeSet<>(Comparators.objectsByName());
  sortedLocationSet.addAll(objectService.fetchObjects(Location.class));
  for (Location i : sortedLocationSet) {
    locationsComboBox.addItem(i.getReference());
  }
  locationsComboBox.addItemListener((ItemEvent e) -> locationsComboBoxItemStateChanged(e));
  doTable.setModel(new DriveOrderTableModel(transportOrder.getDriveOrders()));
  doTable.setDefaultEditor(TCSObjectReference.class, new DefaultCellEditor(locationsComboBox));
  doTable.setDefaultEditor(String.class, new DefaultCellEditor(operationTypesComboBox));

  // Properties
  propertyTable.setModel(new PropertyTableModel(transportOrder.getProperties()));
}
 
源代码5 项目: openjdk-8   文件: Test6505027.java
public Test6505027(JFrame main) {
    Container container = main;
    if (INTERNAL) {
        JInternalFrame frame = new JInternalFrame();
        frame.setBounds(OFFSET, OFFSET, WIDTH, HEIGHT);
        frame.setVisible(true);

        JDesktopPane desktop = new JDesktopPane();
        desktop.add(frame, new Integer(1));

        container.add(desktop);
        container = frame;
    }
    if (TERMINATE) {
        this.table.putClientProperty(KEY, Boolean.TRUE);
    }
    TableColumn column = this.table.getColumn(COLUMNS[1]);
    column.setCellEditor(new DefaultCellEditor(new JComboBox(ITEMS)));

    container.add(BorderLayout.NORTH, new JTextField());
    container.add(BorderLayout.CENTER, new JScrollPane(this.table));
}
 
源代码6 项目: dragonwell8_jdk   文件: Test6505027.java
public Test6505027(JFrame main) {
    Container container = main;
    if (INTERNAL) {
        JInternalFrame frame = new JInternalFrame();
        frame.setBounds(OFFSET, OFFSET, WIDTH, HEIGHT);
        frame.setVisible(true);

        JDesktopPane desktop = new JDesktopPane();
        desktop.add(frame, new Integer(1));

        container.add(desktop);
        container = frame;
    }
    if (TERMINATE) {
        this.table.putClientProperty(KEY, Boolean.TRUE);
    }
    TableColumn column = this.table.getColumn(COLUMNS[1]);
    column.setCellEditor(new DefaultCellEditor(new JComboBox(ITEMS)));

    container.add(BorderLayout.NORTH, new JTextField());
    container.add(BorderLayout.CENTER, new JScrollPane(this.table));
}
 
源代码7 项目: nextreports-designer   文件: DesignerTablePanel.java
public void updateGroupByItems(int dragRow, int dropRow) {
    MyRow drag_row = (MyRow) model.getObjectForRow(dragRow);
    JComboBox groupByComboDrag = (JComboBox) ((DefaultCellEditor) table.getCellEditor(dragRow, 6)).getComponent();

    MyRow drop_row = (MyRow) model.getObjectForRow(dropRow);
    JComboBox groupByComboDrop = (JComboBox) ((DefaultCellEditor) table.getCellEditor(dropRow, 6)).getComponent();

    String sDrag = (String) groupByComboDrag.getItemAt(0);
    String sDrop = (String) groupByComboDrop.getItemAt(0);

    if ("".equals(sDrag) && !sDrag.equals(sDrop)) {
        groupByComboDrop.insertItemAt("", 0);
        groupByComboDrag.removeItem("");
    }

    if ("".equals(sDrop) && !sDrop.equals(sDrag)) {
        groupByComboDrag.insertItemAt("", 0);
        groupByComboDrop.removeItem("");
    }
}
 
源代码8 项目: TencentKona-8   文件: Test6505027.java
public Test6505027(JFrame main) {
    Container container = main;
    if (INTERNAL) {
        JInternalFrame frame = new JInternalFrame();
        frame.setBounds(OFFSET, OFFSET, WIDTH, HEIGHT);
        frame.setVisible(true);

        JDesktopPane desktop = new JDesktopPane();
        desktop.add(frame, new Integer(1));

        container.add(desktop);
        container = frame;
    }
    if (TERMINATE) {
        this.table.putClientProperty(KEY, Boolean.TRUE);
    }
    TableColumn column = this.table.getColumn(COLUMNS[1]);
    column.setCellEditor(new DefaultCellEditor(new JComboBox(ITEMS)));

    container.add(BorderLayout.NORTH, new JTextField());
    container.add(BorderLayout.CENTER, new JScrollPane(this.table));
}
 
源代码9 项目: mzmine2   文件: ProjectParametersSetupDialog.java
private void setupTableModel() {

    tablemodelParameterValues = new ParameterTableModel(dataFiles, parameterValues);
    tableParameterValues.setModel(tablemodelParameterValues);

    for (int columnIndex =
        0; columnIndex < (tablemodelParameterValues.getColumnCount() - 1); columnIndex++) {
      UserParameter<?, ?> parameter = tablemodelParameterValues.getParameter(columnIndex + 1);
      if (parameter instanceof ComboParameter) {
        Object choices[] = ((ComboParameter<?>) parameter).getChoices();
        tableParameterValues.getColumnModel().getColumn(columnIndex + 1)
            .setCellEditor(new DefaultCellEditor(new JComboBox<Object>(choices)));
      }
    }

  }
 
源代码10 项目: jdk8u60   文件: Test6505027.java
public Test6505027(JFrame main) {
    Container container = main;
    if (INTERNAL) {
        JInternalFrame frame = new JInternalFrame();
        frame.setBounds(OFFSET, OFFSET, WIDTH, HEIGHT);
        frame.setVisible(true);

        JDesktopPane desktop = new JDesktopPane();
        desktop.add(frame, new Integer(1));

        container.add(desktop);
        container = frame;
    }
    if (TERMINATE) {
        this.table.putClientProperty(KEY, Boolean.TRUE);
    }
    TableColumn column = this.table.getColumn(COLUMNS[1]);
    column.setCellEditor(new DefaultCellEditor(new JComboBox(ITEMS)));

    container.add(BorderLayout.NORTH, new JTextField());
    container.add(BorderLayout.CENTER, new JScrollPane(this.table));
}
 
源代码11 项目: LGoodDatePicker   文件: InternalUtilities.java
/**
 * setDefaultTableEditorsClicks, This sets the number of clicks required to start the default
 * table editors in the supplied table. Typically you would set the table editors to start after
 * 1 click or 2 clicks, as desired.
 *
 * The default table editors of the table editors that are supplied by the JTable class, for
 * Objects, Numbers, and Booleans. Note, the editor which is used to edit Objects, is the same
 * editor used for editing Strings.
 */
public static void setDefaultTableEditorsClicks(JTable table, int clickCountToStart) {
    TableCellEditor editor;
    editor = table.getDefaultEditor(Object.class);
    if (editor instanceof DefaultCellEditor) {
        ((DefaultCellEditor) editor).setClickCountToStart(clickCountToStart);
    }
    editor = table.getDefaultEditor(Number.class);
    if (editor instanceof DefaultCellEditor) {
        ((DefaultCellEditor) editor).setClickCountToStart(clickCountToStart);
    }
    editor = table.getDefaultEditor(Boolean.class);
    if (editor instanceof DefaultCellEditor) {
        ((DefaultCellEditor) editor).setClickCountToStart(clickCountToStart);
    }
}
 
源代码12 项目: marathonv5   文件: TableRenderDemo.java
public void setUpSportColumn(JTable table, TableColumn sportColumn) {
    // Set up the editor for the sport cells.
    JComboBox comboBox = new JComboBox();
    comboBox.addItem("Snowboarding");
    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);
}
 
源代码13 项目: jdk8u-jdk   文件: Test6505027.java
public Test6505027(JFrame main) {
    Container container = main;
    if (INTERNAL) {
        JInternalFrame frame = new JInternalFrame();
        frame.setBounds(OFFSET, OFFSET, WIDTH, HEIGHT);
        frame.setVisible(true);

        JDesktopPane desktop = new JDesktopPane();
        desktop.add(frame, new Integer(1));

        container.add(desktop);
        container = frame;
    }
    if (TERMINATE) {
        this.table.putClientProperty(KEY, Boolean.TRUE);
    }
    TableColumn column = this.table.getColumn(COLUMNS[1]);
    column.setCellEditor(new DefaultCellEditor(new JComboBox(ITEMS)));

    container.add(BorderLayout.NORTH, new JTextField());
    container.add(BorderLayout.CENTER, new JScrollPane(this.table));
}
 
源代码14 项目: netbeans   文件: CodeSetupPanel.java
@Override
public TableCellEditor getCellEditor(int row, int column) {
    if(showParamTypes) {
        String paramName = (String) tableModel.getValueAt(row, 0);
        Class type = (column == 2) ? (Class) tableModel.getValueAt(row, 1) : Boolean.class;

        if (Enum.class.isAssignableFrom(type)) {
            JComboBox combo = new JComboBox(type.getEnumConstants());
            return new DefaultCellEditor(combo);
        } else if (type == Boolean.class || type == Boolean.TYPE) {
            JCheckBox cb = new JCheckBox();
            cb.setHorizontalAlignment(JLabel.CENTER);
            cb.setBorderPainted(true);
            return new DefaultCellEditor(cb);
        } else if (paramName.toLowerCase().contains(Constants.PASSWORD)) {
            return new DefaultCellEditor(new JPasswordField());
        }
    }

    return super.getCellEditor(row, column);
}
 
源代码15 项目: lucene-solr   文件: QueryParserPaneProvider.java
@Override
public void setRangeSearchableFields(Collection<String> rangeSearchableFields) {
  pointRangeQueryTable.setModel(new PointTypesTableModel(rangeSearchableFields));
  pointRangeQueryTable.setShowGrid(true);
  String[] numTypes = Arrays.stream(PointTypesTableModel.NumType.values())
      .map(PointTypesTableModel.NumType::name)
      .toArray(String[]::new);
  JComboBox<String> numTypesCombo = new JComboBox<>(numTypes);
  numTypesCombo.setRenderer((list, value, index, isSelected, cellHasFocus) -> new JLabel(value));
  pointRangeQueryTable.getColumnModel().getColumn(PointTypesTableModel.Column.TYPE.getIndex()).setCellEditor(new DefaultCellEditor(numTypesCombo));
  pointRangeQueryTable.getColumnModel().getColumn(PointTypesTableModel.Column.TYPE.getIndex()).setCellRenderer(
      (table, value, isSelected, hasFocus, row, column) -> new JLabel((String) value)
  );
  pointRangeQueryTable.getColumnModel().getColumn(PointTypesTableModel.Column.FIELD.getIndex()).setPreferredWidth(PointTypesTableModel.Column.FIELD.getColumnWidth());
  pointRangeQueryTable.setPreferredScrollableViewportSize(pointRangeQueryTable.getPreferredSize());

  // set default type to Integer
  for (int i = 0; i < rangeSearchableFields.size(); i++) {
    pointRangeQueryTable.setValueAt(PointTypesTableModel.NumType.INT.name(), i, PointTypesTableModel.Column.TYPE.getIndex());
  }

}
 
源代码16 项目: netbeans   文件: DDTable.java
DDTable(String[] headers, String titleKey, Editable editable) {
    super(new Object[0][headers.length], headers);
    this.headers = headers;
    this.titleKey = titleKey;
    this.editable = editable;
    this.darkerColor = getBackground().darker();

    setModel(new DDTableModel(headers, editable));
    setColors(editable);
    this.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
    setIntercellSpacing(new Dimension(margin, margin));
    DefaultCellEditor dce = new DefaultCellEditor(new CellText(this));
    dce.setClickCountToStart(1);
    getColumnModel().getColumn(0).setCellEditor(dce);
    getColumnModel().getColumn(1).setCellEditor(dce);
}
 
源代码17 项目: snap-desktop   文件: NamesAssociationDialog.java
@Override
public void actionPerformed(ActionEvent e) {
    associationModel.addAlias("...");
    removeButton.setEnabled(true);
    aliasNameScrollPane.repaint();
    int rowIndex = 0;
    for (String aliasName : associationModel.getAliasNames()) {
        if (aliasName.equals("...")) {
            break;
        }
        rowIndex++;
    }
    DefaultCellEditor editor = (DefaultCellEditor) aliasNames.getCellEditor(rowIndex, 0);
    aliasNames.editCellAt(rowIndex, 0);
    final JTextField textField = (JTextField) editor.getComponent();
    textField.requestFocus();
    textField.selectAll();
}
 
@Override
public TableCellEditor getCellEditor(int row, int column) {
	List<String> usedTypes = new LinkedList<String>();
	for (int i = 0; i < Ontology.VALUE_TYPE_NAMES.length; i++) {
		if ((i != Ontology.ATTRIBUTE_VALUE) && (i != Ontology.FILE_PATH)
				&& (!Ontology.ATTRIBUTE_VALUE_TYPE.isA(i, Ontology.DATE_TIME))) {
			usedTypes.add(Ontology.ATTRIBUTE_VALUE_TYPE.mapIndex(i));
		}
	}
	String[] valueTypes = new String[usedTypes.size()];
	int vCounter = 0;
	for (String type : usedTypes) {
		valueTypes[vCounter++] = type;
	}
	JComboBox<String> typeBox = new JComboBox<>(valueTypes);
	typeBox.setBackground(javax.swing.UIManager.getColor("Table.cellBackground"));
	return new DefaultCellEditor(typeBox);
}
 
源代码19 项目: hottub   文件: Test6505027.java
public Test6505027(JFrame main) {
    Container container = main;
    if (INTERNAL) {
        JInternalFrame frame = new JInternalFrame();
        frame.setBounds(OFFSET, OFFSET, WIDTH, HEIGHT);
        frame.setVisible(true);

        JDesktopPane desktop = new JDesktopPane();
        desktop.add(frame, new Integer(1));

        container.add(desktop);
        container = frame;
    }
    if (TERMINATE) {
        this.table.putClientProperty(KEY, Boolean.TRUE);
    }
    TableColumn column = this.table.getColumn(COLUMNS[1]);
    column.setCellEditor(new DefaultCellEditor(new JComboBox(ITEMS)));

    container.add(BorderLayout.NORTH, new JTextField());
    container.add(BorderLayout.CENTER, new JScrollPane(this.table));
}
 
源代码20 项目: ramus   文件: TableCellEditorFactory.java
private TableCellEditor createBaseQualifierEditor() {
    List<Qualifier> qualifiers = engine.getQualifiers();
    Collections.sort(qualifiers, new Comparator<Qualifier>() {
        @Override
        public int compare(Qualifier o1, Qualifier o2) {
            return collator.compare(o1.getName(), o2.getName());
        }
    });

    JComboBox box = new JComboBox();

    box.addItem(null);
    for (Qualifier qualifier : qualifiers)
        box.addItem(qualifier);

    return new DefaultCellEditor(box);
}
 
源代码21 项目: portmapper   文件: EditPresetDialog.java
private Component getPortsPanel() {
    final ActionMap actionMap = app.getContext().getActionMap(this.getClass(), this);

    final JPanel portsPanel = new JPanel(new MigLayout("", "", ""));
    portsPanel.setBorder(
            BorderFactory.createTitledBorder(app.getResourceMap().getString("preset_dialog.ports.title")));

    tableModel = new PortsTableModel(app, ports);
    portsTable = new JTable(tableModel);
    portsTable.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
    portsTable.getSelectionModel()
            .addListSelectionListener(e -> firePropertyChange(PROPERTY_PORT_SELECTED, false, isPortSelected()));
    final JComboBox<Protocol> protocolComboBox = new JComboBox<>();
    protocolComboBox.addItem(Protocol.TCP);
    protocolComboBox.addItem(Protocol.UDP);
    portsTable.getColumnModel().getColumn(0).setCellEditor(new DefaultCellEditor(protocolComboBox));

    portsPanel.add(new JScrollPane(portsTable), "spany 3");

    portsPanel.add(new JButton(actionMap.get(ACTION_ADD_PORT)), "wrap");
    portsPanel.add(new JButton(actionMap.get(ACTION_ADD_PORT_RANGE)), "wrap");
    portsPanel.add(new JButton(actionMap.get(ACTION_REMOVE_PORT)), "wrap");

    return portsPanel;
}
 
源代码22 项目: gameserver   文件: GamedataEditorRenderFactory.java
@Override
public TableCellEditor getCellEditor(int row, int column, 
		String columnName, TableModel tableModel, JTable table) {
	if ( "value".equals(columnName) || "default".equals(columnName) ) {
		int modelColIndex = table.convertColumnIndexToModel(column);
		int modelRowIndex = table.convertRowIndexToModel(row);
		Object value =  this.tableModel.getValueAt(modelRowIndex, modelColIndex);
		if ( value instanceof BasicDBList ) {
			MongoDBArrayEditor editor =  new MongoDBArrayEditor();
			editor.setDBObject((BasicDBList)value);
			return editor;
		} else {
			JXTextField field = new JXTextField(value.toString());
			field.setPreferredSize(new Dimension(100, 36));
			field.setBorder(null);
			return new DefaultCellEditor(field);
		}
	}
	return null;
}
 
源代码23 项目: constellation   文件: MappingPanel.java
private static void setColumn(final JTable table, final int columnIndex, final ArrayList<String> values0) {
    // Copy the list of labels into a String[] with a leading "" as the default "no choice" value.
    final String[] values = new String[values0.size() + 1];
    values[0] = "";
    for (int i = 0; i < values0.size(); i++) {
        values[i + 1] = values0.get(i);
    }

    final TableColumn tcol = table.getColumnModel().getColumn(columnIndex);
    tcol.setCellRenderer(new MappingCellRenderer(values));
    tcol.setCellEditor(new DefaultCellEditor(new JComboBox<>(values)));
}
 
源代码24 项目: openAGV   文件: DriverGUI.java
private void initCommAdaptersComboBox(VehicleEntry vehicleEntry,
                                      int rowIndex,
                                      SingleCellEditor adapterCellEditor) {
  final CommAdapterComboBox comboBox = new CommAdapterComboBox();
  commAdapterRegistry.findFactoriesFor(vehicleEntry.getVehicle())
      .forEach(factory -> comboBox.addItem(factory));
  // Set the selection to the attached comm adapter, (The vehicle is already attached to a comm
  // adapter due to auto attachment on startup.)
  comboBox.setSelectedItem(vehicleEntry.getCommAdapterFactory());
  comboBox.setRenderer(new AdapterFactoryCellRenderer());
  comboBox.addPopupMenuListener(new BoundsPopupMenuListener());
  comboBox.addItemListener((ItemEvent evt) -> {
    if (evt.getStateChange() == ItemEvent.DESELECTED) {
      return;
    }

    // If we selected a comm adapter that's already attached, do nothing.
    if (Objects.equals(evt.getItem(), vehicleEntry.getCommAdapterFactory())) {
      LOG.debug("{} is already attached to: {}", vehicleEntry.getVehicleName(), evt.getItem());
      return;
    }

    int reply = JOptionPane.showConfirmDialog(
        null,
        bundle.getString("CommAdapterComboBox.confirmation.driverChange.text"),
        bundle.getString("CommAdapterComboBox.confirmation.driverChange.title"),
        JOptionPane.YES_NO_OPTION);
    if (reply == JOptionPane.NO_OPTION) {
      return;
    }

    attachManager.attachAdapterToVehicle(getSelectedVehicleName(),
                                         (VehicleCommAdapterFactory) comboBox.getSelectedItem());
  });
  adapterCellEditor.setEditorAt(rowIndex, new DefaultCellEditor(comboBox));

  vehicleEntry.addPropertyChangeListener(comboBox);
}
 
源代码25 项目: openAGV   文件: ContinuousLoadPanel.java
@Override
public void initialize() {
  if (isInitialized()) {
    return;
  }

  // Get a kernel reference.
  try {
    sharedPortal = portalProvider.register();
  }
  catch (ServiceUnavailableException exc) {
    LOG.warn("Kernel unavailable", exc);
    return;
  }

  objectService = (TCSObjectService) sharedPortal.getPortal().getPlantModelService();

  Set<Vehicle> vehicles = new TreeSet<>(Comparators.objectsByName());
  vehicles.addAll(objectService.fetchObjects(Vehicle.class));
  JComboBox<TCSObjectReference<Vehicle>> vehiclesComboBox = new JComboBox<>();
  vehiclesComboBox.addItem(null);
  vehiclesComboBox.setRenderer(new StringListCellRenderer<>(x -> x == null ? "" : x.getName()));
  for (Vehicle curVehicle : vehicles) {
    vehiclesComboBox.addItem(curVehicle.getReference());
  }
  DefaultCellEditor vehicleEditor = new DefaultCellEditor(vehiclesComboBox);
  toTable.setDefaultEditor(TCSObjectReference.class, vehicleEditor);
  toTable.setDefaultRenderer(
      TCSObjectReference.class,
      new StringTableCellRenderer<TCSObjectReference<?>>(x -> x == null ? "" : x.getName()));

  doTable.getSelectionModel().addListSelectionListener(event -> updateElementStates());
  propertyTable.getSelectionModel().addListSelectionListener(event -> updateElementStates());
  
  updateElementStates();

  initialized = true;
}
 
源代码26 项目: jdk1.8-source-analysis   文件: SynthTreeUI.java
@Override
protected TreeCellEditor createTreeCellEditor() {
    JTextField tf = new JTextField() {
        @Override
        public String getName() {
            return "Tree.cellEditor";
        }
    };
    DefaultCellEditor editor = new DefaultCellEditor(tf);

    // One click to edit.
    editor.setClickCountToStart(1);
    return editor;
}
 
源代码27 项目: jdk8u_jdk   文件: SynthTreeUI.java
@Override
protected TreeCellEditor createTreeCellEditor() {
    JTextField tf = new JTextField() {
        @Override
        public String getName() {
            return "Tree.cellEditor";
        }
    };
    DefaultCellEditor editor = new DefaultCellEditor(tf);

    // One click to edit.
    editor.setClickCountToStart(1);
    return editor;
}
 
源代码28 项目: TencentKona-8   文件: SynthTreeUI.java
@Override
protected TreeCellEditor createTreeCellEditor() {
    JTextField tf = new JTextField() {
        @Override
        public String getName() {
            return "Tree.cellEditor";
        }
    };
    DefaultCellEditor editor = new DefaultCellEditor(tf);

    // One click to edit.
    editor.setClickCountToStart(1);
    return editor;
}
 
源代码29 项目: jdk8u60   文件: SynthTreeUI.java
@Override
protected TreeCellEditor createTreeCellEditor() {
    JTextField tf = new JTextField() {
        @Override
        public String getName() {
            return "Tree.cellEditor";
        }
    };
    DefaultCellEditor editor = new DefaultCellEditor(tf);

    // One click to edit.
    editor.setClickCountToStart(1);
    return editor;
}
 
源代码30 项目: JDKSourceCode1.8   文件: SynthTreeUI.java
@Override
protected TreeCellEditor createTreeCellEditor() {
    JTextField tf = new JTextField() {
        @Override
        public String getName() {
            return "Tree.cellEditor";
        }
    };
    DefaultCellEditor editor = new DefaultCellEditor(tf);

    // One click to edit.
    editor.setClickCountToStart(1);
    return editor;
}
 
 类所在包
 同包方法