Browse Source
* commit '0dfdc2e68285b2d92514c0c935c66f15407a459c': CHART-11549 箱型图埋点 删除全路径 CHART-11549 修改箱型图条件属性界面 REPORT-31986 服务器数据集默认命名显示缩略名 主要修改: 1.FRGUIPanelFactory中增加了一种垂直布局,水平居左,竖直顶对齐,用以满足bug提出者的需求 2.对VerticalFlowLayout中一些注释错误(原本的注释中是左对齐居中对齐和右对齐,命名却为top,center和bottom,经过调试发现这几个变量实则代表了竖直方向上的顶对齐,居中对齐和底对齐)和命名错误(dealWith写成了dialWith)进行了修改 3.为VerticalFlowLayout中重写的几个方法添加了@Override注解bugfix/10.0
superman
4 years ago
13 changed files with 339 additions and 45 deletions
@ -0,0 +1,83 @@
|
||||
package com.fr.van.chart.box; |
||||
|
||||
import com.fr.base.background.ColorBackground; |
||||
import com.fr.design.beans.BasicBeanPane; |
||||
import com.fr.design.gui.ilable.UILabel; |
||||
import com.fr.design.gui.ispinner.UISpinner; |
||||
import com.fr.design.i18n.Toolkit; |
||||
import com.fr.design.layout.TableLayout; |
||||
import com.fr.plugin.chart.base.AttrBorderWithWidth; |
||||
import com.fr.stable.StringUtils; |
||||
import com.fr.van.chart.designer.TableLayout4VanChartHelper; |
||||
import com.fr.van.chart.designer.component.background.VanChartMarkerBackgroundPane; |
||||
|
||||
import javax.swing.JPanel; |
||||
import java.awt.BorderLayout; |
||||
import java.awt.Component; |
||||
|
||||
public class VanChartBoxBorderPane extends BasicBeanPane<AttrBorderWithWidth> { |
||||
|
||||
private VanChartMarkerBackgroundPane colorBackground; |
||||
private UISpinner lineWidth; |
||||
|
||||
public VanChartBoxBorderPane() { |
||||
colorBackground = new VanChartMarkerBackgroundPane() { |
||||
|
||||
protected Component[][] getPaneComponents() { |
||||
return new Component[][]{ |
||||
new Component[]{null, null}, |
||||
new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Color")), typeComboBox}, |
||||
new Component[]{null, centerPane}, |
||||
}; |
||||
} |
||||
}; |
||||
lineWidth = new UISpinner(0.5, Double.MAX_VALUE, 0.5, 0.5); |
||||
|
||||
Component[][] components = new Component[][]{ |
||||
new Component[]{null, null}, |
||||
new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Line_Width")), lineWidth}, |
||||
new Component[]{colorBackground, null} |
||||
}; |
||||
|
||||
double p = TableLayout.PREFERRED; |
||||
double f = TableLayout.FILL; |
||||
double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH; |
||||
|
||||
double[] columnSize = {f, e}; |
||||
double[] rowSize = {p, p, p}; |
||||
|
||||
JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane(components, rowSize, columnSize); |
||||
this.setLayout(new BorderLayout()); |
||||
this.add(panel, BorderLayout.CENTER); |
||||
} |
||||
|
||||
public void populateBean(AttrBorderWithWidth border) { |
||||
if (border.getBorderColor() != null) { |
||||
this.colorBackground.populate(ColorBackground.getInstance(border.getBorderColor())); |
||||
} |
||||
|
||||
this.lineWidth.setValue(border.getLineWidth()); |
||||
} |
||||
|
||||
public AttrBorderWithWidth updateBean() { |
||||
AttrBorderWithWidth border = new AttrBorderWithWidth(); |
||||
|
||||
ColorBackground colorBackground = this.colorBackground.update(); |
||||
|
||||
if (colorBackground == null) { |
||||
border.setBorderColor(null); |
||||
} else { |
||||
border.setBorderColor(colorBackground.getColor()); |
||||
} |
||||
|
||||
if (this.lineWidth != null) { |
||||
border.setLineWidth(this.lineWidth.getValue()); |
||||
} |
||||
|
||||
return border; |
||||
} |
||||
|
||||
protected String title4PopupWindow() { |
||||
return StringUtils.EMPTY; |
||||
} |
||||
} |
@ -0,0 +1,49 @@
|
||||
package com.fr.van.chart.box.condition; |
||||
|
||||
import com.fr.chart.base.DataSeriesCondition; |
||||
import com.fr.design.condition.ConditionAttributesPane; |
||||
import com.fr.design.i18n.Toolkit; |
||||
import com.fr.plugin.chart.base.AttrBorderWithWidth; |
||||
import com.fr.van.chart.box.VanChartBoxBorderPane; |
||||
import com.fr.van.chart.designer.other.condition.item.AbstractNormalMultiLineConditionPane; |
||||
|
||||
import javax.swing.JPanel; |
||||
|
||||
public class VanChartBoxBorderConditionPane extends AbstractNormalMultiLineConditionPane { |
||||
private VanChartBoxBorderPane borderPane; |
||||
|
||||
protected JPanel initContentPane() { |
||||
borderPane = new VanChartBoxBorderPane(); |
||||
return borderPane; |
||||
} |
||||
|
||||
public VanChartBoxBorderConditionPane(ConditionAttributesPane conditionAttributesPane) { |
||||
super(conditionAttributesPane); |
||||
} |
||||
|
||||
public String nameForPopupMenuItem() { |
||||
return Toolkit.i18nText("Fine-Design_Chart_Border"); |
||||
} |
||||
|
||||
protected String getItemLabelString() { |
||||
return nameForPopupMenuItem(); |
||||
} |
||||
|
||||
protected String title4PopupWindow() { |
||||
return nameForPopupMenuItem(); |
||||
} |
||||
|
||||
public void setDefault() { |
||||
borderPane.populateBean(new AttrBorderWithWidth()); |
||||
} |
||||
|
||||
public void populate(DataSeriesCondition condition) { |
||||
if (condition instanceof AttrBorderWithWidth) { |
||||
this.borderPane.populateBean((AttrBorderWithWidth) condition); |
||||
} |
||||
} |
||||
|
||||
public DataSeriesCondition update() { |
||||
return this.borderPane.updateBean(); |
||||
} |
||||
} |
@ -0,0 +1,51 @@
|
||||
package com.fr.van.chart.box.condition; |
||||
|
||||
import com.fr.chart.base.DataSeriesCondition; |
||||
import com.fr.design.condition.ConditionAttributesPane; |
||||
import com.fr.design.i18n.Toolkit; |
||||
import com.fr.plugin.chart.base.VanChartAttrMarker; |
||||
import com.fr.plugin.chart.box.VanChartAttrNormalMarker; |
||||
import com.fr.plugin.chart.marker.type.MarkerType; |
||||
import com.fr.van.chart.designer.component.VanChartMarkerPane; |
||||
import com.fr.van.chart.designer.other.condition.item.VanChartMarkerConditionPane; |
||||
|
||||
public class VanChartBoxNormalMarkerConditionPane extends VanChartMarkerConditionPane { |
||||
|
||||
public VanChartBoxNormalMarkerConditionPane(ConditionAttributesPane conditionAttributesPane) { |
||||
super(conditionAttributesPane); |
||||
} |
||||
|
||||
public String nameForPopupMenuItem() { |
||||
return Toolkit.i18nText("Fine-Design_Chart_Normal_Value"); |
||||
} |
||||
|
||||
protected String getItemLabelString() { |
||||
return nameForPopupMenuItem(); |
||||
} |
||||
|
||||
protected void initMarkerPane() { |
||||
markerPane = new VanChartMarkerPane() { |
||||
|
||||
protected VanChartAttrMarker createNewAttrMarker() { |
||||
return new VanChartAttrNormalMarker(); |
||||
} |
||||
}; |
||||
} |
||||
|
||||
public void setDefault() { |
||||
VanChartAttrNormalMarker normalMarker = new VanChartAttrNormalMarker(); |
||||
normalMarker.setMarkerType(MarkerType.MARKER_CIRCLE); |
||||
|
||||
markerPane.populate(new VanChartAttrNormalMarker()); |
||||
} |
||||
|
||||
public void populate(DataSeriesCondition condition) { |
||||
if (condition instanceof VanChartAttrNormalMarker) { |
||||
markerPane.populate((VanChartAttrNormalMarker) condition); |
||||
} |
||||
} |
||||
|
||||
public DataSeriesCondition update() { |
||||
return markerPane.update(); |
||||
} |
||||
} |
@ -0,0 +1,51 @@
|
||||
package com.fr.van.chart.box.condition; |
||||
|
||||
import com.fr.chart.base.DataSeriesCondition; |
||||
import com.fr.design.condition.ConditionAttributesPane; |
||||
import com.fr.design.i18n.Toolkit; |
||||
import com.fr.plugin.chart.base.VanChartAttrMarker; |
||||
import com.fr.plugin.chart.box.VanChartAttrOutlierMarker; |
||||
import com.fr.plugin.chart.marker.type.MarkerType; |
||||
import com.fr.van.chart.designer.component.VanChartMarkerPane; |
||||
import com.fr.van.chart.designer.other.condition.item.VanChartMarkerConditionPane; |
||||
|
||||
public class VanChartBoxOutlierMarkerConditionPane extends VanChartMarkerConditionPane { |
||||
|
||||
public VanChartBoxOutlierMarkerConditionPane(ConditionAttributesPane conditionAttributesPane) { |
||||
super(conditionAttributesPane); |
||||
} |
||||
|
||||
public String nameForPopupMenuItem() { |
||||
return Toolkit.i18nText("Fine-Design_Chart_Outlier_Value"); |
||||
} |
||||
|
||||
protected String getItemLabelString() { |
||||
return nameForPopupMenuItem(); |
||||
} |
||||
|
||||
public void setDefault() { |
||||
VanChartAttrOutlierMarker outlierMarker = new VanChartAttrOutlierMarker(); |
||||
outlierMarker.setMarkerType(MarkerType.MARKER_CIRCLE_HOLLOW); |
||||
|
||||
markerPane.populate(outlierMarker); |
||||
} |
||||
|
||||
protected void initMarkerPane() { |
||||
markerPane = new VanChartMarkerPane() { |
||||
|
||||
protected VanChartAttrMarker createNewAttrMarker() { |
||||
return new VanChartAttrOutlierMarker(); |
||||
} |
||||
}; |
||||
} |
||||
|
||||
public void populate(DataSeriesCondition condition) { |
||||
if (condition instanceof VanChartAttrOutlierMarker) { |
||||
markerPane.populate((VanChartAttrOutlierMarker) condition); |
||||
} |
||||
} |
||||
|
||||
public DataSeriesCondition update() { |
||||
return markerPane.update(); |
||||
} |
||||
} |
Loading…
Reference in new issue