當前位置: 首頁>>代碼示例>>Java>>正文


Java DefaultCellEditor.setClickCountToStart方法代碼示例

本文整理匯總了Java中javax.swing.DefaultCellEditor.setClickCountToStart方法的典型用法代碼示例。如果您正苦於以下問題:Java DefaultCellEditor.setClickCountToStart方法的具體用法?Java DefaultCellEditor.setClickCountToStart怎麽用?Java DefaultCellEditor.setClickCountToStart使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在javax.swing.DefaultCellEditor的用法示例。


在下文中一共展示了DefaultCellEditor.setClickCountToStart方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: GranteeTable

import javax.swing.DefaultCellEditor; //導入方法依賴的package包/類
public GranteeTable(GranteeTableModel granteeTableModel) {
	super();
       sorter = new TableSorter(granteeTableModel);
       this.setModel(sorter);
       sorter.setTableHeader(this.getTableHeader());

	getSelectionModel().setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
	getSelectionModel().addListSelectionListener(this);
       DefaultCellEditor groupCellEditor = new DefaultCellEditor(groupGranteeComboBox);
       groupCellEditor.setClickCountToStart(2);
	setDefaultEditor(GroupGrantee.class, groupCellEditor);
       setDefaultRenderer(GroupGrantee.class, new DefaultTableCellRenderer() {
           private static final long serialVersionUID = 4938391147702620699L;

           public Component getTableCellRendererComponent(JTable arg0, Object value, boolean arg2, boolean arg3, int arg4, int arg5) {
               GroupGrantee groupGrantee = (GroupGrantee) value;
               return super.getTableCellRendererComponent(arg0, groupGrantee.getIdentifier(), arg2, arg3, arg4, arg5);
           }
       });
       DefaultCellEditor permissionCellEditor = new DefaultCellEditor(permissionComboBox);
       permissionCellEditor.setClickCountToStart(2);
	setDefaultEditor(Permission.class, permissionCellEditor);
}
 
開發者ID:glycoinfo,項目名稱:eurocarbdb,代碼行數:24,代碼來源:AccessControlDialog.java

示例2: createInputCellEditor

import javax.swing.DefaultCellEditor; //導入方法依賴的package包/類
/** Create cell editor for for the input columns / flow variables. */
private TableCellEditor createInputCellEditor() {
    JComboBox comboBox = new JComboBox();
    comboBox.setRenderer(new InputListCellRenderer());
    if (null != m_spec) {
        for (DataColumnSpec colSpec : m_spec) {
            comboBox.addItem(colSpec);
        }
    }
    if (null != m_flowVars) {
        for (FlowVariable flowVar : m_flowVars.values()) {
            comboBox.addItem(flowVar);
        }
    }
    DefaultCellEditor editor =  new DefaultCellEditor(comboBox);
    editor.setClickCountToStart(2);
    return editor;
}
 
開發者ID:pavloff-de,項目名稱:spark4knime,代碼行數:19,代碼來源:InFieldsTable.java

示例3: getFunctionTableColumn

import javax.swing.DefaultCellEditor; //導入方法依賴的package包/類
/**
 * Creates and returns a {@link TableColumn} in which channels functions
 * are shown.
 * @param model the model of this {@link JTable}
 * @return the {@link TableColumn} showing the channel functions
 */
protected TableColumn getFunctionTableColumn(SourceMontageTableModel model) {
	TableColumn tc = new TableColumn(SourceMontageTableModel.FUNCTION_COLUMN, 200);
	tc.setHeaderValue(model.getColumnName(tc.getModelIndex()));

	ChannelTableCellRenderer channelTableCellRenderer = new ChannelTableCellRenderer();
	tc.setCellRenderer(channelTableCellRenderer);

	ChannelComboBox channelComboBox = new ChannelComboBox();
	channelComboBox.setModel(model.getChannelFunctionsListModel());
	DefaultCellEditor channelCellEditor = new DefaultCellEditor(channelComboBox);
	channelCellEditor.setClickCountToStart(2);
	tc.setCellEditor(channelCellEditor);

	return tc;
}
 
開發者ID:BrainTech,項目名稱:svarog,代碼行數:22,代碼來源:SourceMontageTable.java

示例4: StringTable

import javax.swing.DefaultCellEditor; //導入方法依賴的package包/類
public StringTable(StringTableModel stm) {
    super(stm);
    setShowVerticalLines(true);
    setShowHorizontalLines(true);
    setColumnSelectionAllowed(true);
    DefaultCellEditor dce = new DefaultCellEditor(new JTextField());
    dce.setClickCountToStart(2);
    setDefaultEditor(String.class, dce);
    TableColumnModel cm = getColumnModel();
    cm.getColumn(0).setPreferredWidth(800);
    cm.getColumn(1).setPreferredWidth(2000);
    sp.getViewport().setBackground(Globals.prefs.getColor(JabRefPreferences.TABLE_BACKGROUND));
    getInputMap().put(Globals.getKeyPrefs().getKey(KeyBinding.CLOSE_DIALOG), "close");
    getActionMap().put("close", closeAction);
    getInputMap().put(Globals.getKeyPrefs().getKey(KeyBinding.HELP), "help");
    getActionMap().put("help", helpAction);
}
 
開發者ID:JabRef,項目名稱:jabref,代碼行數:18,代碼來源:StringDialog.java

示例5: TreeAttlistDeclAttributeListCustomizer

import javax.swing.DefaultCellEditor; //導入方法依賴的package包/類
public TreeAttlistDeclAttributeListCustomizer() {
    initComponents ();
    attrTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
    
    // Cells should become editable on single mouse click
    final JTextField editorComponent = new JTextField();
    editorComponent.getCaret().setVisible(true);
    final DefaultCellEditor singleClickEditor = new DefaultCellEditor(editorComponent);
    singleClickEditor.setClickCountToStart(1);
    attrTable.setDefaultEditor(String.class, singleClickEditor);
    
    
    initAccessibility();
}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:15,代碼來源:TreeAttlistDeclAttributeListCustomizer.java

示例6: prepareTableEdition

import javax.swing.DefaultCellEditor; //導入方法依賴的package包/類
/**
 * 
 */
private void prepareTableEdition(JTable table) {
	editableField = new JTextField();
	DefaultCellEditor cellEditor = new DefaultCellEditor(editableField);
	cellEditor.setClickCountToStart(1);
	table.setCellEditor(cellEditor);
	table.setEnabled(true);
}
 
開發者ID:guilhebl,項目名稱:routerapp,代碼行數:11,代碼來源:PropertyInteractionWindow.java

示例7: initTable

import javax.swing.DefaultCellEditor; //導入方法依賴的package包/類
private void initTable() {
	String[] columnNames = {"��Ʒ����", "��Ʒ���", "����", "��λ", "���", "��װ", "����",
			"����"};
	((DefaultTableModel) table.getModel())
			.setColumnIdentifiers(columnNames);
	TableColumn column = table.getColumnModel().getColumn(0);
	final DefaultCellEditor editor = new DefaultCellEditor(sp);
	editor.setClickCountToStart(2);
	column.setCellEditor(editor);
}
 
開發者ID:Edward7Zhang,項目名稱:SuperMarketManageSystem,代碼行數:11,代碼來源:JinHuoTuiHuo.java

示例8: initTable

import javax.swing.DefaultCellEditor; //導入方法依賴的package包/類
private void initTable() {
	String[] columnNames = {"��Ʒ����", "��Ʒ���", "����", "��λ", "���", "��װ", "����",
			"����", "����", "��׼�ĺ�"};
	((DefaultTableModel) table.getModel())
			.setColumnIdentifiers(columnNames);
	TableColumn column = table.getColumnModel().getColumn(0);
	final DefaultCellEditor editor = new DefaultCellEditor(sp);
	editor.setClickCountToStart(2);
	column.setCellEditor(editor);
}
 
開發者ID:Edward7Zhang,項目名稱:SuperMarketManageSystem,代碼行數:11,代碼來源:JinHuoDan.java

示例9: initTable

import javax.swing.DefaultCellEditor; //導入方法依賴的package包/類
private void initTable() {
	String[] columnNames = {"��Ʒ����", "��Ʒ���", "��Ӧ��", "����", "��λ", "���", "����",
			"����", "��װ", "����", "��׼�ĺ�"};
	((DefaultTableModel) table.getModel())
			.setColumnIdentifiers(columnNames);
	TableColumn column = table.getColumnModel().getColumn(0);
	final DefaultCellEditor editor = new DefaultCellEditor(sp);
	editor.setClickCountToStart(2);
	column.setCellEditor(editor);
}
 
開發者ID:Edward7Zhang,項目名稱:SuperMarketManageSystem,代碼行數:11,代碼來源:XiaoShouTuiHuo.java

示例10: updateAnnotationSetsList

import javax.swing.DefaultCellEditor; //導入方法依賴的package包/類
protected void updateAnnotationSetsList() {
  String corpusName =
          (corpusToSearchIn.getSelectedItem()
                  .equals(Constants.ENTIRE_DATASTORE))
                  ? null
                  : (String)corpusIds
                          .get(corpusToSearchIn.getSelectedIndex() - 1);
  TreeSet<String> ts = new TreeSet<String>(stringCollator);
  ts.addAll(getAnnotationSetNames(corpusName));
  DefaultComboBoxModel<String> dcbm = new DefaultComboBoxModel<String>(ts.toArray(new String[ts.size()]));
  dcbm.insertElementAt(Constants.ALL_SETS, 0);
  annotationSetsToSearchIn.setModel(dcbm);
  annotationSetsToSearchIn.setSelectedItem(Constants.ALL_SETS);

  // used in the ConfigureStackViewFrame as Annotation type column
  // cell editor
  TreeSet<String> types = new TreeSet<String>(stringCollator);
  types.addAll(getTypesAndFeatures(null, null).keySet());
  // put all annotation types from the datastore
  // combobox used as cell editor
  JComboBox<String> annotTypesBox = new JComboBox<String>();
  annotTypesBox.setMaximumRowCount(10);
  annotTypesBox.setModel(new DefaultComboBoxModel<String>(types.toArray(new String[types.size()])));
  DefaultCellEditor cellEditor = new DefaultCellEditor(annotTypesBox);
  cellEditor.setClickCountToStart(0);
  configureStackViewFrame.getTable().getColumnModel()
          .getColumn(ANNOTATION_TYPE).setCellEditor(cellEditor);
}
 
開發者ID:GateNLP,項目名稱:gate-core,代碼行數:29,代碼來源:LuceneDataStoreSearchGUI.java

示例11: createTreeCellEditor

import javax.swing.DefaultCellEditor; //導入方法依賴的package包/類
@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;
}
 
開發者ID:SunburstApps,項目名稱:OpenJSharp,代碼行數:15,代碼來源:SynthTreeUI.java

示例12: createTreeCellEditor

import javax.swing.DefaultCellEditor; //導入方法依賴的package包/類
@Override
protected TreeCellEditor createTreeCellEditor() {
    @SuppressWarnings("serial") // anonymous class
    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;
}
 
開發者ID:AdoptOpenJDK,項目名稱:openjdk-jdk10,代碼行數:16,代碼來源:SynthTreeUI.java

示例13: createTreeCellEditor

import javax.swing.DefaultCellEditor; //導入方法依賴的package包/類
/**
* This is invoked if a <code>TreeCellEditor</code>
* is not supplied in the constructor.
* It returns a <code>TextField</code> editor.
* @return a new <code>TextField</code> editor
*/
protected TreeCellEditor createTreeCellEditor() {
Border              aBorder = UIManager.getBorder("Tree.editorBorder");
DefaultCellEditor   editor = new DefaultCellEditor
(new DefaultTextField(aBorder)) {
public boolean shouldSelectCell(EventObject event) {
    boolean retValue = super.shouldSelectCell(event);
    return retValue;
}
};

// One click to edit.
editor.setClickCountToStart(1);
return editor;
}
 
開發者ID:javalovercn,項目名稱:j2se_for_android,代碼行數:21,代碼來源:DefaultTreeCellEditor.java

示例14: AbstractInstrumentsDbTable

import javax.swing.DefaultCellEditor; //導入方法依賴的package包/類
/**
 * Creates a new instance of <code>AbstractInstrumentsDbTable</code>
 */
public AbstractInstrumentsDbTable(InstrumentsDbTableModel model, String tablePrefix) {
	super(model);
	setView(CC.getViewConfig().getInstrumentsDbTableView());
	
	this.tablePrefix = tablePrefix;
	loadColumnsVisibleState();
	loadColumnWidths();
	
	setAutoResizeMode(AUTO_RESIZE_OFF);
	
	rowSorter = new InstrumentsDbTableRowSorter(getModel());
	setRowSorter(rowSorter);
	
	loadSortOrder();
	
	RowSorterListener l = new RowSorterListener() {
		public void
		sorterChanged(RowSorterEvent e) {
			if(e.getType() != SORT_ORDER_CHANGED) return;
			rowSorterChanged();
		}
	};
	
	getRowSorter().addRowSorterListener(l);
	
	putClientProperty("JTable.autoStartsEdit", false);
	
	nameEditor = new DefaultCellEditor(tfEditor);
	nameEditor.setClickCountToStart(5);
	
	if( getModel().getShowDummyColumn()) {
		TableColumn dummy;
		dummy = getColumnModel().getColumn(getModel().getDummyColumnIndex());
		dummy.setPreferredWidth(10);
	}
}
 
開發者ID:lxlxlo,項目名稱:LS-jsampler,代碼行數:40,代碼來源:AbstractInstrumentsDbTable.java

示例15: createTreeCellEditor

import javax.swing.DefaultCellEditor; //導入方法依賴的package包/類
/**
 * This is invoked if a TreeCellEditor is not supplied in the constructor.
 * It returns a TextField editor.
 *
 * @return a new TextField editor
 */
protected TreeCellEditor createTreeCellEditor()
{
  Border border = UIManager.getBorder("Tree.editorBorder");
  JTextField tf = new DefaultTreeCellEditor.DefaultTextField(border);
  DefaultCellEditor editor = new DefaultCellEditor(tf);
  editor.setClickCountToStart(1);
  realEditor = editor;
  return editor;
}
 
開發者ID:vilie,項目名稱:javify,代碼行數:16,代碼來源:DefaultTreeCellEditor.java


注:本文中的javax.swing.DefaultCellEditor.setClickCountToStart方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。