Browse Source

CHART-2893 910

final/10.0
zheng 6 years ago
parent
commit
b4d54d6348
  1. 6
      designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartMarkerPane.java
  2. 4
      designer-chart/src/main/java/com/fr/van/chart/designer/component/marker/VanChartCommonMarkerPane.java
  3. 14
      designer-chart/src/main/java/com/fr/van/chart/gantt/designer/style/series/VanChartGanttCommonMarkerPane.java
  4. 4
      designer-chart/src/main/java/com/fr/van/chart/gantt/designer/style/series/VanChartGanttSeriesPane.java

6
designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartMarkerPane.java

@ -3,7 +3,6 @@ package com.fr.van.chart.designer.component;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.dialog.BasicPane;
import com.fr.design.gui.ibutton.UIButtonGroup;
import com.fr.plugin.chart.base.VanChartAttrMarker;
import com.fr.van.chart.designer.TableLayout4VanChartHelper;
import com.fr.van.chart.designer.component.marker.VanChartCommonMarkerPane;
@ -25,7 +24,7 @@ public class VanChartMarkerPane extends BasicPane {
private JPanel centerPane;
private CardLayout cardLayout;
private BasicBeanPane commonMarkerPane;
private VanChartCommonMarkerPane commonMarkerPane;
private BasicBeanPane imageMarkerPane;
@ -75,7 +74,7 @@ public class VanChartMarkerPane extends BasicPane {
return new VanChartImageMarkerPane();
}
protected BasicBeanPane<VanChartAttrMarker> createCommonMarkerPane() {
protected VanChartCommonMarkerPane createCommonMarkerPane() {
return new VanChartCommonMarkerPane(){
protected double[] getcolumnSize () {
double s = TableLayout4VanChartHelper.SECOND_EDIT_AREA_WIDTH;
@ -111,6 +110,7 @@ public class VanChartMarkerPane extends BasicPane {
commonMarkerPane.populateBean(marker);
} else {
imageMarkerPane.populateBean(marker);
commonMarkerPane.setDefaultValue();
}
checkCenterPane();

4
designer-chart/src/main/java/com/fr/van/chart/designer/component/marker/VanChartCommonMarkerPane.java

@ -6,7 +6,6 @@ import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.ispinner.UISpinner;
import com.fr.design.gui.xcombox.MarkerComboBox;
import com.fr.design.layout.TableLayout;
import com.fr.plugin.chart.base.VanChartAttrMarker;
import com.fr.plugin.chart.marker.type.MarkerType;
import com.fr.van.chart.designer.TableLayout4VanChartHelper;
@ -154,6 +153,9 @@ public class VanChartCommonMarkerPane extends BasicBeanPane<VanChartAttrMarker>
return "commonMarker";
}
public void setDefaultValue() {
}
@Override
public void populateBean(VanChartAttrMarker marker) {
if(marker == null){

14
designer-chart/src/main/java/com/fr/van/chart/gantt/designer/style/series/VanChartGanttCommonMarkerPane.java

@ -4,11 +4,11 @@ import com.fr.base.background.ColorBackground;
import com.fr.chart.chartglyph.Marker;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.mainframe.chart.gui.ColorSelectBoxWithOutTransparent;
import com.fr.plugin.chart.base.VanChartAttrMarker;
import com.fr.plugin.chart.marker.type.MarkerType;
import com.fr.van.chart.designer.component.marker.VanChartCommonMarkerPane;
import java.awt.Color;
import java.awt.Component;
/**
@ -44,6 +44,16 @@ public class VanChartGanttCommonMarkerPane extends VanChartCommonMarkerPane {
@Override
protected void updateColor(VanChartAttrMarker marker) {
marker.setColorBackground(ColorBackground.getInstance(colorSelect.getSelectObject()));
Color color = colorSelect.getSelectObject();
color = color == null ? new Color(248, 182, 44) : color;
marker.setColorBackground(ColorBackground.getInstance(color));
}
@Override
public void setDefaultValue() {
getMarkerPane().setSelectedMarker(Marker.createMarker(MarkerType.MARKER_STAR));
colorSelect.setSelectObject(new Color(248, 182, 44));
}
}

4
designer-chart/src/main/java/com/fr/van/chart/gantt/designer/style/series/VanChartGanttSeriesPane.java

@ -9,12 +9,12 @@ import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.chart.gui.ChartStylePane;
import com.fr.design.mainframe.chart.gui.ColorSelectBoxWithOutTransparent;
import com.fr.plugin.chart.base.VanChartAttrMarker;
import com.fr.plugin.chart.gantt.VanChartGanttPlot;
import com.fr.stable.CoreConstants;
import com.fr.van.chart.designer.TableLayout4VanChartHelper;
import com.fr.van.chart.designer.component.VanChartMarkerPane;
import com.fr.van.chart.designer.component.marker.VanChartCommonMarkerPane;
import com.fr.van.chart.designer.style.series.VanChartAbstractPlotSeriesPane;
import javax.swing.JPanel;
@ -82,7 +82,7 @@ public class VanChartGanttSeriesPane extends VanChartAbstractPlotSeriesPane {
protected JPanel createMarkerPane() {
markerPane = new VanChartMarkerPane(){
@Override
protected BasicBeanPane<VanChartAttrMarker> createCommonMarkerPane() {
protected VanChartCommonMarkerPane createCommonMarkerPane() {
return new VanChartGanttCommonMarkerPane();
}

Loading…
Cancel
Save