我正在制作一个自定义的DocumentFilter。为此,我的类覆盖了replace和remove.Once方法,我在那些我称为super.replace、super.remove的方法中进行了一些检查。
虽然我也想使用replace和remove,而不调用本地KeyEvents调用的相同方法,例如当我收到一条消息时。为此,我使用以下方法:
public void replaceUpdate(InputCommand cmd) {
super.replace(hereGoesFB, cmd.offset, cmd.length, cmd.text, null);
}问题是我需要DocumentFilter.FilterBypass来调用上面方法上的super.replace(),但是我找不到如何使用这个静态类。有什么方法可以从我当前的DocumentFilter中检索它吗?谢谢
发布于 2013-07-18 06:44:50
这个问题解决了,我相信最终我不需要拿到滤镜,记不住但应该结题了。
https://stackoverflow.com/questions/9165761
复制相似问题