|
|
|
@ -8,7 +8,6 @@ import javax.swing.BorderFactory;
|
|
|
|
|
import javax.swing.JPanel; |
|
|
|
|
import java.awt.BorderLayout; |
|
|
|
|
import java.awt.Dimension; |
|
|
|
|
import java.text.Format; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 封装格式panel,管理 AttributeChangeListener |
|
|
|
@ -43,14 +42,21 @@ public class TextFormatPaneContainer extends AbstractAttrNoScrollPane {
|
|
|
|
|
return formatPane.getPreferredSize(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 根据单元格样式填充面板设置 |
|
|
|
|
* |
|
|
|
|
* @param style 单元格样式 |
|
|
|
|
*/ |
|
|
|
|
public void populateBean(Style style) { |
|
|
|
|
formatPane.populateBean(style); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public Format update() { |
|
|
|
|
return formatPane.update(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 根据面板设置获取修改后的单元格样式 |
|
|
|
|
* |
|
|
|
|
* @param style 单元格当前样式 |
|
|
|
|
* @return 更新后的单元格样式 |
|
|
|
|
*/ |
|
|
|
|
public Style update(Style style) { |
|
|
|
|
return formatPane.update(style); |
|
|
|
|
} |
|
|
|
@ -66,6 +72,9 @@ public class TextFormatPaneContainer extends AbstractAttrNoScrollPane {
|
|
|
|
|
super.addAttributeChangeListener(listener); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 恢复使用AttributeChangeListener |
|
|
|
|
*/ |
|
|
|
|
public void restoreAttributeChangeListener() { |
|
|
|
|
super.addAttributeChangeListener(oldListner); |
|
|
|
|
} |
|
|
|
|