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


Java StyledTextContent类代码示例

本文整理汇总了Java中org.eclipse.swt.custom.StyledTextContent的典型用法代码示例。如果您正苦于以下问题:Java StyledTextContent类的具体用法?Java StyledTextContent怎么用?Java StyledTextContent使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: newStyledText

import org.eclipse.swt.custom.StyledTextContent; //导入依赖的package包/类
/**
 * Creates a StyledText instance with a given content, and an SwtWindow
 * which will be installed as
 * VerifyKeylistener, FocusListener, KeyListener and Mouselistener
 */
public static StyledText newStyledText(final Composite parent, 
                                       final int style, 
                                       final StyledTextContent styledTextContent, 
                                       final SwtWindow swtWindow, 
                                       final int firstVisibleLine)
{
  if (Thread.currentThread() != getDisplay().getThread())
  {
    Resultable res = new Resultable() {public void run() {result = newStyledText(parent, style, styledTextContent, swtWindow, firstVisibleLine);}};
    getDisplay().syncExec(res);
    return (StyledText) res.result;
  }
  else {
    StyledText styledText = new StyledText(parent,  style);
    styledText.setContent(styledTextContent);
    styledText.setTopIndex(firstVisibleLine);
    styledText.addVerifyKeyListener(swtWindow);
    styledText.addFocusListener(swtWindow);
    styledText.addKeyListener(swtWindow);
    styledText.addMouseListener(swtWindow);
    return styledText;
  }
}
 
开发者ID:spurious,项目名称:kawa-mirror,代码行数:29,代码来源:SwtHelper.java

示例2: SwtWindowWidget

import org.eclipse.swt.custom.StyledTextContent; //导入依赖的package包/类
public SwtWindowWidget(Composite parent, 
                       StyledTextContent styledTextContent, 
                       int firstVisibleLine)
{
 super(parent, 0);
 
 setBackground(new Color(getDisplay(), 0, 0, 0));
 GridLayout layout = new GridLayout();
 layout.numColumns = 1;
 layout.horizontalSpacing = layout.verticalSpacing = 2;
 layout.marginWidth = layout.marginHeight = 2;
 setLayout(layout);
 
 styledText = new StyledText(this,  SWT.H_SCROLL | SWT.V_SCROLL);
 styledText.setContent(styledTextContent);
 styledText.setTopIndex(firstVisibleLine);
 styledText.setLayoutData(new GridData(GridData.FILL_BOTH));

 modeline = new StyledText(this, SWT.SINGLE | SWT.READ_ONLY);
 modeline.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
}
 
开发者ID:spurious,项目名称:kawa-mirror,代码行数:22,代码来源:SwtWindowWidget.java

示例3: showTexts

import org.eclipse.swt.custom.StyledTextContent; //导入依赖的package包/类
/**
 * Shows the texts in the GUI from the current cursor position. 
 */
public void showTexts(){
	for(int i = 0; i < 7; i++){
		StyledTextContent field = null;
		switch(i){
		case CODE: field = gui.getCodeText(); break;
		case HEAP: field = gui.getHeapText(); break;
		case TRAIL: field = gui.getTrailText(); break;
		case RUNTIMEVARS: field = gui.getRuntimeVariablesText(); break;
		case TRACE: field = gui.getTraceText(); break;
		case STACK: field = gui.getStackText(); break;
		case REGISTERS: field = gui.getRegistersText(); break;
		} 
		field.setText(data[i].get(cursor)); 
	}
}
 
开发者ID:BasTesterink,项目名称:WAM,代码行数:19,代码来源:GUI.java

示例4: getSetContentMethod

import org.eclipse.swt.custom.StyledTextContent; //导入依赖的package包/类
private static Method getSetContentMethod(Object styledTextRenderer) throws NoSuchMethodException {
	// if (SET_CONTENT_METHOD == null) {
	Method SET_CONTENT_METHOD = styledTextRenderer.getClass().getDeclaredMethod("setContent",
			new Class[] { StyledTextContent.class });
	SET_CONTENT_METHOD.setAccessible(true);
	// }
	return SET_CONTENT_METHOD;
}
 
开发者ID:angelozerr,项目名称:codelens-eclipse,代码行数:9,代码来源:StyledTextPatcher.java

示例5: setContent

import org.eclipse.swt.custom.StyledTextContent; //导入依赖的package包/类
public static void setContent(final StyledText styledText, final StyledTextContent bufferContent)
{
  if (Thread.currentThread() != getDisplay().getThread())
  {
    Runnable run = new Resultable() {public void run() {setContent (styledText, bufferContent);}}; 
    getDisplay().syncExec(run);
  }
  else
  {
    styledText.setContent(bufferContent);
  }

}
 
开发者ID:spurious,项目名称:kawa-mirror,代码行数:14,代码来源:SwtHelper.java

示例6: getStyledTextContentChangedAndStoreNew

import org.eclipse.swt.custom.StyledTextContent; //导入依赖的package包/类
private boolean getStyledTextContentChangedAndStoreNew() {
    StyledTextContent currentContent = this.styledText.getContent();
    StyledTextContent oldContent = this.content;
    if (currentContent != oldContent) {
        //Important: the content may change during runtime, so, we have to stop listening the old one and
        //start listening the new one.
        if (oldContent != null) {
            oldContent.removeTextChangeListener(this);
        }
        this.content = currentContent;
        currentContent.addTextChangeListener(this);
        return true;
    }
    return false;
}
 
开发者ID:fabioz,项目名称:Pydev,代码行数:16,代码来源:VerticalIndentGuidesPainter.java

示例7: getBufferContent

import org.eclipse.swt.custom.StyledTextContent; //导入依赖的package包/类
public StyledTextContent getBufferContent()
{
  return bufferContent;
}
 
开发者ID:spurious,项目名称:kawa-mirror,代码行数:5,代码来源:SwtBuffer.java

示例8: setTextContent

import org.eclipse.swt.custom.StyledTextContent; //导入依赖的package包/类
public void setTextContent(StyledTextContent textContent)
{
	this.textContent = textContent;
}
 
开发者ID:piiiiq,项目名称:Black,代码行数:5,代码来源:textFile.java

示例9: getTextContent

import org.eclipse.swt.custom.StyledTextContent; //导入依赖的package包/类
public StyledTextContent getTextContent()
{
	return textContent;
}
 
开发者ID:piiiiq,项目名称:Black,代码行数:5,代码来源:textFile.java

示例10: getCodeText

import org.eclipse.swt.custom.StyledTextContent; //导入依赖的package包/类
public StyledTextContent getCodeText() {
	return styledText_5.getContent();
}
 
开发者ID:BasTesterink,项目名称:WAM,代码行数:4,代码来源:GUIWindow.java

示例11: getStackText

import org.eclipse.swt.custom.StyledTextContent; //导入依赖的package包/类
public StyledTextContent getStackText() {
	return styledText_3.getContent();
}
 
开发者ID:BasTesterink,项目名称:WAM,代码行数:4,代码来源:GUIWindow.java

示例12: getTraceText

import org.eclipse.swt.custom.StyledTextContent; //导入依赖的package包/类
public StyledTextContent getTraceText() {
	return styledText_6.getContent();
}
 
开发者ID:BasTesterink,项目名称:WAM,代码行数:4,代码来源:GUIWindow.java

示例13: getTrailText

import org.eclipse.swt.custom.StyledTextContent; //导入依赖的package包/类
public StyledTextContent getTrailText() {
	return styledText_4.getContent();
}
 
开发者ID:BasTesterink,项目名称:WAM,代码行数:4,代码来源:GUIWindow.java

示例14: getRuntimeVariablesText

import org.eclipse.swt.custom.StyledTextContent; //导入依赖的package包/类
public StyledTextContent getRuntimeVariablesText() {
	return styledText.getContent();
}
 
开发者ID:BasTesterink,项目名称:WAM,代码行数:4,代码来源:GUIWindow.java

示例15: getRegistersText

import org.eclipse.swt.custom.StyledTextContent; //导入依赖的package包/类
public StyledTextContent getRegistersText() {
	return styledText_1.getContent();
}
 
开发者ID:BasTesterink,项目名称:WAM,代码行数:4,代码来源:GUIWindow.java


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