org.eclipse.swt.widgets.Text.addSegmentListener()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(1.5k)|赞(0)|评价(0)|浏览(108)

本文整理了Java中org.eclipse.swt.widgets.Text.addSegmentListener()方法的一些代码示例,展示了Text.addSegmentListener()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Text.addSegmentListener()方法的具体详情如下:
包路径:org.eclipse.swt.widgets.Text
类名称:Text
方法名:addSegmentListener

Text.addSegmentListener介绍

[英]Adds a segment listener.

A SegmentEvent is sent whenever text content is being modified or a segment listener is added or removed. You can customize the appearance of text by indicating certain characters to be inserted at certain text offsets. This may be used for bidi purposes, e.g. when adjacent segments of right-to-left text should not be reordered relative to each other. E.g., multiple Java string literals in a right-to-left language should generally remain in logical order to each other, that is, the way they are stored.

Warning: This API is currently only implemented on Windows and GTK. SegmentEvents won't be sent on Cocoa.
[中]添加一个段侦听器。
无论何时修改文本内容或添加或删除段侦听器,都会发送SegmentEvent。可以通过指示要在特定文本偏移处插入的特定字符来自定义文本的外观。这可用于bidi目的,例如,当从右到左文本的相邻段不应相互重新排序时。例如,从右到左语言中的多个Java字符串文字通常应保持彼此之间的逻辑顺序,即它们的存储方式。
警告:此API目前仅在Windows和GTK上实现。SegmentEvent不会用可可粉发送。

代码示例

代码示例来源:origin: org.eclipse.platform/org.eclipse.jface

SegmentListener listener = getSegmentListener(handlingType);
if (listener != null) {
  field.addSegmentListener(listener);
  if (InternalPolicy.DEBUG_BIDI_UTILS) {
    int color = 0;

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jface

SegmentListener listener = getSegmentListener(handlingType);
if (listener != null) {
  field.addSegmentListener(listener);
  if (InternalPolicy.DEBUG_BIDI_UTILS) {
    int color = 0;

相关文章

微信公众号

最新文章

更多

Text类方法