当前位置: 首页>>代码示例>>Java>>正文


Java TextCellEditor.getControl方法代码示例

本文整理汇总了Java中org.eclipse.jface.viewers.TextCellEditor.getControl方法的典型用法代码示例。如果您正苦于以下问题:Java TextCellEditor.getControl方法的具体用法?Java TextCellEditor.getControl怎么用?Java TextCellEditor.getControl使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.eclipse.jface.viewers.TextCellEditor的用法示例。


在下文中一共展示了TextCellEditor.getControl方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: PropertiesEditingSupport

import org.eclipse.jface.viewers.TextCellEditor; //导入方法依赖的package包/类
/**
 * Creates an editing support for the given operating viewer.
 * 
 * @param operatingViewer
 *            the viewer this editing support works for
 * @param editor
 *            the editor which is operated in
 * @param propertiesViewer
 *            the properties group viewer that contains the operating viewer
 */
public PropertiesEditingSupport(ColumnViewer operatingViewer, AbstractSpotterEditor editor,
		PropertiesGroupViewer propertiesViewer) {
	super(operatingViewer);
	this.editor = editor;
	this.propertiesViewer = propertiesViewer;
	Composite parent = (Composite) getViewer().getControl();
	cellDefaultTextEditor = new TextCellEditor(parent);
	cellDefaultTextEditor.getControl().addTraverseListener(new ActivationTraverser(cellDefaultTextEditor));

	cellNumberEditor = new TextCellEditor(parent);
	ControlDecoration decor = new ControlDecoration(cellNumberEditor.getControl(), SWT.LEFT | SWT.TOP);
	cellNumberEditor.addListener(new TextEditorErrorListener(cellNumberEditor, decor));
	cellNumberEditor.getControl().addTraverseListener(new ActivationTraverser(cellNumberEditor));

	cellBooleanEditor = new CustomComboBoxCellEditor(parent, BOOLEAN_VALUES, SWT.DROP_DOWN | SWT.READ_ONLY);
	cellBooleanEditor.setActivationStyle(COMBO_ACTIVATION_STYLE);
	cellBooleanEditor.getControl().addTraverseListener(new ComboActivationTraverser(cellBooleanEditor));
	cellComboBoxEditor = new CustomComboBoxCellEditor(parent, new String[0], SWT.DROP_DOWN | SWT.READ_ONLY);
	cellComboBoxEditor.setActivationStyle(COMBO_ACTIVATION_STYLE);
	cellComboBoxEditor.getControl().addTraverseListener(new ComboActivationTraverser(cellComboBoxEditor));

	cellCustomDialogEditor = new CustomDialogCellEditor(parent);
	cellCustomDialogEditor.getControl().addTraverseListener(new ActivationTraverser(cellCustomDialogEditor));
}
 
开发者ID:sopeco,项目名称:DynamicSpotter,代码行数:35,代码来源:PropertiesEditingSupport.java

示例2: getSimpleTextEditor

import org.eclipse.jface.viewers.TextCellEditor; //导入方法依赖的package包/类
private CellEditor getSimpleTextEditor(Composite parent, FieldDescriptor anot) {
	TextCellEditor ed = new TextCellEditor(parent) {
    @Override
	protected void doSetValue(Object value) {
	String string = value!=null ? value.toString() : "";
	super.doSetValue(string);
    }
};
if (anot!=null && anot.regex().length()>0) {
    Text text = (Text)ed.getControl();
    RegexDecorator deco = new RegexDecorator(text, anot.regex());
    deco.setAllowInvalidValues(false);
}
return ed;
   }
 
开发者ID:eclipse,项目名称:scanning,代码行数:16,代码来源:ModelFieldEditorFactory.java

示例3: InputFieldEditingSupport

import org.eclipse.jface.viewers.TextCellEditor; //导入方法依赖的package包/类
public InputFieldEditingSupport(TableViewer  viewer) {
	super(viewer);
	this.viewer = viewer;
	//cellEditor = new TextCellEditor(viewer.getTable(), SWT.MULTI | SWT.WRAP | SWT.BORDER);
	cellEditor = new TextCellEditor(viewer.getTable());
	
	final Text aaa = (Text)cellEditor.getControl();
}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:9,代码来源:InputFieldEditingSupport.java

示例4: initCellEditor

import org.eclipse.jface.viewers.TextCellEditor; //导入方法依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
protected void initCellEditor() {
    final TextCellEditor editor = (TextCellEditor) getCellEditor();

    if (note.getText() != null) {
        editor.setValue(note.getText());
    }

    final Text text = (Text) editor.getControl();

    text.selectAll();
}
 
开发者ID:roundrop,项目名称:ermasterr,代码行数:16,代码来源:NoteEditManager.java

示例5: initCellEditor

import org.eclipse.jface.viewers.TextCellEditor; //导入方法依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
protected void initCellEditor() {
	TextCellEditor editor = (TextCellEditor) this.getCellEditor();

	if (note.getText() != null) {
		editor.setValue(note.getText());
	}

	Text text = (Text) editor.getControl();

	text.selectAll();
}
 
开发者ID:kozake,项目名称:ermaster-k,代码行数:16,代码来源:NoteEditManager.java

示例6: initCellEditor

import org.eclipse.jface.viewers.TextCellEditor; //导入方法依赖的package包/类
@Override
protected void initCellEditor() {
    final TextCellEditor editor = (TextCellEditor) getCellEditor();
    if (note.getNoteText() != null) {
        editor.setValue(note.getNoteText());
    }
    final Text text = (Text) editor.getControl();
    text.selectAll();
}
 
开发者ID:dbflute-session,项目名称:erflute,代码行数:10,代码来源:WalkerNoteEditManager.java

示例7: TextEditorErrorListener

import org.eclipse.jface.viewers.TextCellEditor; //导入方法依赖的package包/类
/**
 * Creates a new text editor error listener.
 * 
 * @param textCellEditor
 *            the associated text cell editor
 * @param decor
 *            the control decoration
 */
public TextEditorErrorListener(TextCellEditor textCellEditor, ControlDecoration decor) {
	this.textCellEditor = textCellEditor;
	textCtrl = (Text) textCellEditor.getControl();
	this.decor = decor;
	decor.setImage(DECOR_IMG);
	decor.setShowOnlyOnFocus(true);
	decor.setShowHover(true);
	decor.hide();
	decor.hideHover();
}
 
开发者ID:sopeco,项目名称:DynamicSpotter,代码行数:19,代码来源:TextEditorErrorListener.java

示例8: initCellEditor

import org.eclipse.jface.viewers.TextCellEditor; //导入方法依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
protected void initCellEditor()
{
	TextCellEditor editor = (TextCellEditor) this.getCellEditor();

	if ((textArea).getTextArea() != null) {
		editor.setValue((textArea).getTextArea());
	}

	Text text = (Text) editor.getControl();

	text.selectAll();
}
 
开发者ID:winture,项目名称:wt-studio,代码行数:17,代码来源:TextAreaEditManager.java

示例9: addTextEditor

import org.eclipse.jface.viewers.TextCellEditor; //导入方法依赖的package包/类
/**
 * Adds the text editor.
 * 
 * @param table
 *            the table
 * @param cellEditor
 *            the cell editor
 * @param position
 *            the position
 */
protected void addTextEditor(Table table, CellEditor[] cellEditor, Map<String, Integer> columns, String columnsName){
	
	cellEditor[columns.get(columnsName)]=new TextCellEditor(table);
	if(columnsName.equals(Messages.PRECISION) || columnsName.equals(Messages.SCALE)){
			TextCellEditor editor = (TextCellEditor) cellEditor[columns.get(columnsName)];
			Text txt = (Text) editor.getControl();
			txt.setTextLimit(2);
		}
}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:20,代码来源:GridWidgetCommonBuilder.java


注:本文中的org.eclipse.jface.viewers.TextCellEditor.getControl方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。