Browse Source

Merge branch 'release/10.0' of http://code.fineres.com/scm/~harrison/design into release/10.0

feature/big-screen
Harrison 4 years ago
parent
commit
c64778ee84
  1. 1
      designer-chart/src/main/java/com/fr/van/chart/custom/VanChartCustomDataPane.java
  2. 12
      designer-chart/src/main/java/com/fr/van/chart/custom/VanChartCustomPlotDataContentsTabPane.java
  3. 39
      designer-chart/src/main/java/com/fr/van/chart/designer/style/axis/VanChartBaseAxisPane.java
  4. 10
      designer-realize/src/main/java/com/fr/design/cell/editor/RichTextToolBar.java

1
designer-chart/src/main/java/com/fr/van/chart/custom/VanChartCustomDataPane.java

@ -27,6 +27,7 @@ public class VanChartCustomDataPane extends ChartDataPane {
}
contentsTabPane = new VanChartCustomPlotDataContentsTabPane((VanChartCustomPlot)chart.getPlot(), VanChartCustomDataPane.this, listener);
contentsTabPane.setSupportCellData(isSupportCellData());
content.add(contentsTabPane, BorderLayout.CENTER);
return content;

12
designer-chart/src/main/java/com/fr/van/chart/custom/VanChartCustomPlotDataContentsTabPane.java

@ -22,10 +22,21 @@ import java.util.Map;
* Created by Fangjie on 2016/4/29.
*/
public class VanChartCustomPlotDataContentsTabPane extends VanChartCustomPlotTabPane<VanChartCustomPlot, ChartCollection> {
private boolean supportCellData = true;
public VanChartCustomPlotDataContentsTabPane(VanChartCustomPlot plot, VanChartCustomDataPane parent, AttributeChangeListener listener) {
super(plot, parent, listener);
}
public boolean isSupportCellData() {
return supportCellData;
}
public void setSupportCellData(boolean supportCellData) {
this.supportCellData = supportCellData;
}
@Override
protected void initTabTitle() {
@ -60,6 +71,7 @@ public class VanChartCustomPlotDataContentsTabPane extends VanChartCustomPlotTab
for (int i = 0; i < customPlotList.size(); i++){
//根据不同的plot创建不同的数据配置界面
ChartDataPane contentPane = new VanChartDataPane(listener);
contentPane.setSupportCellData(supportCellData);
paneList.add(contentPane);
}

39
designer-chart/src/main/java/com/fr/van/chart/designer/style/axis/VanChartBaseAxisPane.java

@ -54,11 +54,13 @@ public class VanChartBaseAxisPane extends FurtherBasicBeanPane<VanChartAxis> {
private static final long serialVersionUID = -5717246802333308973L;
private static final double ROTATION_MAX = 90.0;
protected UIButtonGroup showTitle;
protected TinyFormulaPane titleContent;
protected UIButtonGroup<Integer> titleAlignPane;
protected UIToggleButton titleUseHtml;
protected ChartTextAttrPane titleTextAttrPane;
protected UINumberDragPane titleTextRotation;
protected JPanel titlePane;
protected UIButtonGroup showLabel;
protected ChartTextAttrPane labelTextAttrPane;
@ -108,6 +110,7 @@ public class VanChartBaseAxisPane extends FurtherBasicBeanPane<VanChartAxis> {
public void setParentPane(VanChartStylePane parent) {
htmlLabelPane.setParent(parent);
}
protected void reLayoutPane(boolean isXAxis) {
this.removeAll();
this.add(createContentPane(isXAxis), BorderLayout.CENTER);
@ -135,6 +138,7 @@ public class VanChartBaseAxisPane extends FurtherBasicBeanPane<VanChartAxis> {
}
protected JPanel createTitlePane(double[] row, double[] col, boolean isXAxis) {
showTitle = new UIButtonGroup(new String[]{Toolkit.i18nText("Fine-Design_Chart_Use_Show"), Toolkit.i18nText("Fine-Design_Chart_Hidden")});
titleAlignPane = isXAxis ? getXAxisTitleAlignPane() : getYAxisTitleAlignPane();
titleAlignPane.setSelectedItem(Constants.CENTER);
titleContent = new TinyFormulaPane();
@ -158,9 +162,21 @@ public class VanChartBaseAxisPane extends FurtherBasicBeanPane<VanChartAxis> {
UIComponentUtils.wrapWithBorderLayoutPane(titleTextRotation)
},
};
titlePane = TableLayout4VanChartHelper.createGapTableLayoutPane(components, row, col);
JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane(components, row, col);
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(PaneTitleConstants.CHART_STYLE_TITLE_TITLE, panel);
JPanel showTitlePane = TableLayout4VanChartHelper.createGapTableLayoutPane(Toolkit.i18nText("Fine-Design_Chart_Axis_Title"), showTitle);
showTitle.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
checkTitlePane();
}
});
JPanel jPanel = new JPanel(new BorderLayout());
jPanel.add(showTitlePane, BorderLayout.NORTH);
jPanel.add(titlePane, BorderLayout.CENTER);
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(PaneTitleConstants.CHART_STYLE_TITLE_TITLE, jPanel);
}
private UIButtonGroup<Integer> getXAxisTitleAlignPane() {
@ -171,6 +187,7 @@ public class VanChartBaseAxisPane extends FurtherBasicBeanPane<VanChartAxis> {
return new UIButtonGroup<Integer>(alignmentIconArray, alignment);
}
private UIButtonGroup<Integer> getYAxisTitleAlignPane() {
Icon[] alignmentIconArray = {BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/v_top_normal.png"),
BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/v_center_normal.png"),
@ -462,6 +479,7 @@ public class VanChartBaseAxisPane extends FurtherBasicBeanPane<VanChartAxis> {
protected void checkAllUse() {
checkCardPane();
checkLabelPane();
checkTitlePane();
//区域显示策略 恢复用注释。删除下面一行。
checkMaxProPortionUse();
@ -505,6 +523,12 @@ public class VanChartBaseAxisPane extends FurtherBasicBeanPane<VanChartAxis> {
}
}
protected void checkTitlePane() {
if (showTitle != null && titlePane != null) {
titlePane.setVisible(showTitle.getSelectedIndex() == 0);
}
}
private void checkLabelGapAndStylePane() {
if (overlapHandleTypeGroup != null && labelGapStylePane != null) {
boolean visible = overlapHandleTypeGroup.getSelectedItem() == OverlapHandleType.INTERVAL;
@ -528,6 +552,7 @@ public class VanChartBaseAxisPane extends FurtherBasicBeanPane<VanChartAxis> {
/**
* 是否是指定类型
*
* @param ob 对象
* @return 是否是指定类型
*/
@ -537,6 +562,7 @@ public class VanChartBaseAxisPane extends FurtherBasicBeanPane<VanChartAxis> {
/**
* title应该是一个属性不只是对话框的标题时用到与其他组件结合时也会用得到
*
* @return 绥化狂标题
*/
@Override
@ -550,6 +576,7 @@ public class VanChartBaseAxisPane extends FurtherBasicBeanPane<VanChartAxis> {
public void reset() {
}
@Override
public void populateBean(VanChartAxis axis) {
populateTitle(axis);
@ -569,6 +596,9 @@ public class VanChartBaseAxisPane extends FurtherBasicBeanPane<VanChartAxis> {
//标题
private void populateTitle(VanChartAxis axis) {
if (showTitle != null) {
showTitle.setSelectedIndex(axis.isShowAxisTitle() ? 0 : 1);
}
Title axisTitle = axis.getTitle();
if (axisTitle != null) {
if (axisTitle.getTextObject() instanceof BaseFormula && titleContent != null) {
@ -690,8 +720,12 @@ public class VanChartBaseAxisPane extends FurtherBasicBeanPane<VanChartAxis> {
updateFormat(axis);
}
//标题
private void updateTitle(VanChartAxis axis) {
if (showTitle != null) {
axis.setShowAxisTitle(showTitle.getSelectedIndex() == 0);
}
Title axisTitle = axis.getTitle();
if (axisTitle == null) {
axisTitle = new Title();
@ -810,6 +844,7 @@ public class VanChartBaseAxisPane extends FurtherBasicBeanPane<VanChartAxis> {
/**
* X坐标轴不同类型切换,new一个新的
*
* @param axisName 坐标轴名称
* @return 新的axis
*/

10
designer-realize/src/main/java/com/fr/design/cell/editor/RichTextToolBar.java

@ -256,8 +256,11 @@ public class RichTextToolBar extends BasicPane{
@Override
public void actionPerformed(ActionEvent e) {
boolean isSub = RichTextToolBar.this.subPane.isSelected();
// 调用setCharacterAttributes函数设置文本区选择文本的字体
MutableAttributeSet attr = new SimpleAttributeSet();
if (!isSub && RichTextToolBar.this.superPane.isSelected()) {
StyleConstants.setSuperscript(attr, false);
}
// 调用setCharacterAttributes函数设置文本区选择文本的字体
StyleConstants.setSubscript(attr, !isSub);
setCharacterAttributes(RichTextToolBar.this.textPane, attr, false);
}
@ -269,6 +272,9 @@ public class RichTextToolBar extends BasicPane{
boolean isSuper = RichTextToolBar.this.superPane.isSelected();
// 调用setCharacterAttributes函数设置文本区选择文本的字体
MutableAttributeSet attr = new SimpleAttributeSet();
if (!isSuper && RichTextToolBar.this.subPane.isSelected()) {
StyleConstants.setSubscript(attr, false);
}
StyleConstants.setSuperscript(attr, !isSuper);
setCharacterAttributes(RichTextToolBar.this.textPane, attr, false);
}
@ -402,7 +408,7 @@ public class RichTextToolBar extends BasicPane{
bold.setSelected(isBold);
italic.setSelected(isItalic);
underline.setSelected(isUnderline);
subPane.setSelected(isSubscript);
subPane.setSelected(isSuperscript ? false : isSubscript);
superPane.setSelected(isSuperscript);
//为什么字体名称, 大小, 颜色, 不需要去判断是否全相同呢
//因为如果全相同, 则设置为第一个字符的样式, 如果不全相同, 那么默认也设置成第一个字符的样式.

Loading…
Cancel
Save