|
|
|
@ -258,6 +258,7 @@ public class RichTextToolBar extends BasicPane{
|
|
|
|
|
boolean isSub = RichTextToolBar.this.subPane.isSelected(); |
|
|
|
|
MutableAttributeSet attr = new SimpleAttributeSet(); |
|
|
|
|
if (!isSub && RichTextToolBar.this.superPane.isSelected()) { |
|
|
|
|
RichTextToolBar.this.superPane.setSelected(false); |
|
|
|
|
StyleConstants.setSuperscript(attr, false); |
|
|
|
|
} |
|
|
|
|
// 调用setCharacterAttributes函数设置文本区选择文本的字体
|
|
|
|
@ -273,6 +274,7 @@ public class RichTextToolBar extends BasicPane{
|
|
|
|
|
// 调用setCharacterAttributes函数设置文本区选择文本的字体
|
|
|
|
|
MutableAttributeSet attr = new SimpleAttributeSet(); |
|
|
|
|
if (!isSuper && RichTextToolBar.this.subPane.isSelected()) { |
|
|
|
|
RichTextToolBar.this.subPane.setSelected(false); |
|
|
|
|
StyleConstants.setSubscript(attr, false); |
|
|
|
|
} |
|
|
|
|
StyleConstants.setSuperscript(attr, !isSuper); |
|
|
|
|