Browse Source

Merge branch 'release/10.0' of https://code.fineres.com/scm/~kerry/design_10.0 into release/10.0

feature/big-screen
kerry 5 years ago
parent
commit
c37c5d39d8
  1. 59
      designer-chart/src/main/java/com/fr/van/chart/designer/component/marker/VanChartCommonMarkerPane.java
  2. 63
      designer-chart/src/main/java/com/fr/van/chart/designer/style/background/VanChartAxisAreaPane.java
  3. 21
      designer-chart/src/main/java/com/fr/van/chart/designer/style/background/radar/VanChartRadarAxisAreaPane.java
  4. BIN
      designer-chart/src/main/resources/com/fr/van/chart/custom/images/custom/icon/cuvette.png
  5. BIN
      designer-chart/src/main/resources/com/fr/van/chart/custom/images/custom/icon/pointer_180.png
  6. BIN
      designer-chart/src/main/resources/com/fr/van/chart/custom/images/custom/icon/pointer_360.png
  7. BIN
      designer-chart/src/main/resources/com/fr/van/chart/custom/images/custom/icon/ring.png
  8. BIN
      designer-chart/src/main/resources/com/fr/van/chart/custom/images/custom/icon/selected/cuvette.png
  9. BIN
      designer-chart/src/main/resources/com/fr/van/chart/custom/images/custom/icon/selected/pointer_180.png
  10. BIN
      designer-chart/src/main/resources/com/fr/van/chart/custom/images/custom/icon/selected/pointer_360.png
  11. BIN
      designer-chart/src/main/resources/com/fr/van/chart/custom/images/custom/icon/selected/ring.png
  12. BIN
      designer-chart/src/main/resources/com/fr/van/chart/custom/images/custom/icon/selected/slot.png
  13. BIN
      designer-chart/src/main/resources/com/fr/van/chart/custom/images/custom/icon/slot.png

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

@ -1,12 +1,14 @@
package com.fr.van.chart.designer.component.marker;
import com.fr.chart.chartglyph.Marker;
import com.fr.design.i18n.Toolkit;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.constants.LayoutConstants;
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.i18n.Toolkit;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.plugin.chart.base.VanChartAttrMarker;
import com.fr.plugin.chart.marker.type.MarkerType;
import com.fr.van.chart.designer.TableLayout4VanChartHelper;
@ -42,29 +44,31 @@ public class VanChartCommonMarkerPane extends BasicBeanPane<VanChartAttrMarker>
MarkerType.MARKER_TRIANGLE_HOLLOW
};
private static Marker[] normalMarkers = null;
protected static Marker[] getNormalMarkers() {
if(normalMarkers == null){
if (normalMarkers == null) {
normalMarkers = new Marker[NORMAL_TYPES.length];
int i = 0;
for(MarkerType markerType : NORMAL_TYPES){
for (MarkerType markerType : NORMAL_TYPES) {
normalMarkers[i++] = Marker.createMarker(markerType);
}
}
return normalMarkers;
}
private static Marker[] normalMarkersWithAuto = null;
protected static Marker[] getNormalMarkersWithAuto() {
if (normalMarkers == null) {
normalMarkers = new Marker[NORMAL_TYPES.length + 1];
normalMarkers[0] = Marker.createMarker(MarkerType.MARKER_AUTO);
if (normalMarkersWithAuto == null) {
normalMarkersWithAuto = new Marker[NORMAL_TYPES.length + 1];
normalMarkersWithAuto[0] = Marker.createMarker(MarkerType.MARKER_AUTO);
int i = 1;
for (MarkerType markerType : NORMAL_TYPES) {
normalMarkers[i++] = Marker.createMarker(markerType);
normalMarkersWithAuto[i++] = Marker.createMarker(markerType);
}
}
return normalMarkers;
return normalMarkersWithAuto;
}
//没有无这个选项
@ -79,11 +83,12 @@ public class VanChartCommonMarkerPane extends BasicBeanPane<VanChartAttrMarker>
MarkerType.MARKER_TRIANGLE_HOLLOW
};
private static Marker[] mapMarkers = null;
protected static Marker[] getMapScatterMarkers() {
if(mapMarkers == null){
if (mapMarkers == null) {
mapMarkers = new Marker[MAP_TYPES.length];
int i = 0;
for(MarkerType markerType : MAP_TYPES){
for (MarkerType markerType : MAP_TYPES) {
mapMarkers[i++] = Marker.createMarker(markerType);
}
}
@ -98,11 +103,12 @@ public class VanChartCommonMarkerPane extends BasicBeanPane<VanChartAttrMarker>
MarkerType.MARKER_STAR
};
private static Marker[] ganttMarkers = null;
protected static Marker[] getGanttMarkers() {
if(ganttMarkers == null){
if (ganttMarkers == null) {
ganttMarkers = new Marker[GANTT_TYPES.length];
int i = 0;
for(MarkerType markerType : GANTT_TYPES){
for (MarkerType markerType : GANTT_TYPES) {
ganttMarkers[i++] = Marker.createMarker(markerType);
}
}
@ -119,11 +125,23 @@ public class VanChartCommonMarkerPane extends BasicBeanPane<VanChartAttrMarker>
public VanChartCommonMarkerPane() {
markerTypeComboBox = new MarkerComboBox(getMarkers());
markerFillColor = new VanChartMarkerBackgroundPane(){
markerFillColor = new VanChartMarkerBackgroundPane() {
protected JPanel initContentPanel() {
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH;
double[] columnSize = {f, e};
double[] rowSize = {p, p, p};
return TableLayoutHelper.createGapTableLayoutPane(getPaneComponents(), rowSize, columnSize, 0, LayoutConstants.VGAP_MEDIUM);
}
protected Component[][] getPaneComponents() {
return new Component[][]{
new Component[]{typeComboBox, null},
new Component[]{centerPane, null},
new Component[]{null, null},
new Component[]{null, typeComboBox},
new Component[]{null, centerPane},
};
}
};
@ -173,7 +191,7 @@ public class VanChartCommonMarkerPane extends BasicBeanPane<VanChartAttrMarker>
protected double[] getColumnSize() {
double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH;
double d = TableLayout4VanChartHelper.DESCRIPTION_AREA_WIDTH;
return new double[] {d, e};
return new double[]{d, e};
}
protected Marker[] getMarkers() {
@ -195,7 +213,7 @@ public class VanChartCommonMarkerPane extends BasicBeanPane<VanChartAttrMarker>
@Override
public void populateBean(VanChartAttrMarker marker) {
if(marker == null){
if (marker == null) {
marker = new VanChartAttrMarker();
marker.setCommon(true);
}
@ -210,9 +228,10 @@ public class VanChartCommonMarkerPane extends BasicBeanPane<VanChartAttrMarker>
markerFillColor.populate(marker.getColorBackground());
}
protected MarkerType populateMarkType(VanChartAttrMarker marker){
protected MarkerType populateMarkType(VanChartAttrMarker marker) {
return marker.getMarkerType();
}
/**
* Update.
*/
@ -223,14 +242,14 @@ public class VanChartCommonMarkerPane extends BasicBeanPane<VanChartAttrMarker>
return marker;
}
public void updateBean(VanChartAttrMarker marker){
public void updateBean(VanChartAttrMarker marker) {
marker.setCommon(true);
updateColor(marker);
marker.setRadius(radius.getValue());
marker.setMarkerType(MarkerType.parse(markerTypeComboBox.getSelectedMarkder().getMarkerType()));
}
protected void updateColor(VanChartAttrMarker marker){
protected void updateColor(VanChartAttrMarker marker) {
marker.setColorBackground(markerFillColor.update());
}
}

63
designer-chart/src/main/java/com/fr/van/chart/designer/style/background/VanChartAxisAreaPane.java

@ -32,9 +32,6 @@ public class VanChartAxisAreaPane extends BasicBeanPane<Plot> {
private static final int PREFERRED_WIDTH = 100;
protected ColorSelectBox horizontalGridLine;
protected ColorSelectBox verticalGridLine;
protected AlertLineListControlPane alertLine;
private UIButtonGroup isDefaultIntervalBackground;
@ -44,8 +41,10 @@ public class VanChartAxisAreaPane extends BasicBeanPane<Plot> {
private ColorSelectBox verticalColorBackground;
protected BackgroundListControlPane customIntervalBackground;
private LineTypeComboBox horizonLineType;//横向线型
private LineTypeComboBox verticalLineType;//纵向线型
private LineTypeComboBox horizonLineType;
private LineTypeComboBox verticalLineType;
private ColorSelectBox horizontalColorBox;
private ColorSelectBox verticalColorBox;
private JPanel horizontalColorPane;
private JPanel verticalColorPane;
@ -53,9 +52,9 @@ public class VanChartAxisAreaPane extends BasicBeanPane<Plot> {
initComponents();
}
protected void initComponents() {
horizontalGridLine = new ColorSelectBox(PREFERRED_WIDTH);
verticalGridLine = new ColorSelectBox(PREFERRED_WIDTH);
private void initComponents() {
horizontalColorBox = new ColorSelectBox(PREFERRED_WIDTH);
verticalColorBox = new ColorSelectBox(PREFERRED_WIDTH);
horizonLineType = new LineTypeComboBox(new LineType[]{LineType.NONE, LineType.SOLID, LineType.DASHED});
verticalLineType = new LineTypeComboBox(new LineType[]{LineType.NONE, LineType.SOLID, LineType.DASHED});
@ -77,23 +76,33 @@ public class VanChartAxisAreaPane extends BasicBeanPane<Plot> {
}
protected JPanel createGridLinePane() {
initGridLineComponents();
JPanel panel = new JPanel(new BorderLayout(0, 4));
panel.add(createSingleGridLinePane(Toolkit.i18nText("Fine-Design_Chart_Direction_Horizontal"), true), BorderLayout.NORTH);
panel.add(createSingleGridLinePane(Toolkit.i18nText("Fine-Design_Chart_Direction_Vertical"), false), BorderLayout.CENTER);
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Toolkit.i18nText("Fine-Design_Chart_Grid_Line"), panel);
}
protected void initGridLineComponents() {
Component[][] upComponent = new Component[][]{
new Component[]{null, null},
new Component[]{null, horizontalGridLine}
new Component[]{null, horizontalColorBox}
};
horizontalColorPane = TableLayout4VanChartHelper.createGapTableLayoutPane(upComponent);
Component[][] downComponent = new Component[][]{
new Component[]{null, null},
new Component[]{null, verticalGridLine}
new Component[]{null, verticalColorBox}
};
verticalColorPane = TableLayout4VanChartHelper.createGapTableLayoutPane(downComponent);
horizonLineType.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
if (horizontalGridLine == null || horizonLineType == null) {
if (horizontalColorBox == null || horizonLineType == null) {
return;
}
horizontalColorPane.setVisible(horizonLineType.getSelectedItem() != LineType.NONE);
@ -103,7 +112,7 @@ public class VanChartAxisAreaPane extends BasicBeanPane<Plot> {
verticalLineType.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
if (verticalGridLine == null || verticalLineType == null) {
if (verticalColorBox == null || verticalLineType == null) {
return;
}
verticalColorPane.setVisible(verticalLineType.getSelectedItem() != LineType.NONE);
@ -111,22 +120,20 @@ public class VanChartAxisAreaPane extends BasicBeanPane<Plot> {
});
checkColorBoxVisible();
}
JPanel horizonLineTypePane = TableLayout4VanChartHelper.createGapTableLayoutPane(Toolkit.i18nText("Fine-Design_Chart_Direction_Horizontal"), horizonLineType);
JPanel horizontal = new JPanel(new BorderLayout());
horizontal.add(horizonLineTypePane, BorderLayout.NORTH);
horizontal.add(horizontalColorPane, BorderLayout.CENTER);
protected JPanel createSingleGridLinePane(String title, boolean isHorizontal) {
LineTypeComboBox lineTypeComboBox = isHorizontal ? horizonLineType : verticalLineType;
JPanel colorSelectPane = isHorizontal ? horizontalColorPane : verticalColorPane;
JPanel verticalLineTypePane = TableLayout4VanChartHelper.createGapTableLayoutPane(Toolkit.i18nText("Fine-Design_Chart_Direction_Vertical"), verticalLineType);
JPanel vertical = new JPanel(new BorderLayout());
vertical.add(verticalLineTypePane, BorderLayout.NORTH);
vertical.add(verticalColorPane, BorderLayout.CENTER);
JPanel lineTypePane = TableLayout4VanChartHelper.createGapTableLayoutPane(title, lineTypeComboBox);
JPanel panel = new JPanel(new BorderLayout(0, 4));
panel.add(horizontal, BorderLayout.NORTH);
panel.add(vertical, BorderLayout.CENTER);
JPanel singleGridLinePane = new JPanel(new BorderLayout());
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Toolkit.i18nText("Fine-Design_Chart_Grid_Line"), panel);
singleGridLinePane.add(lineTypePane, BorderLayout.NORTH);
singleGridLinePane.add(colorSelectPane, BorderLayout.CENTER);
return singleGridLinePane;
}
protected JPanel createAlertLinePane() {
@ -213,12 +220,12 @@ public class VanChartAxisAreaPane extends BasicBeanPane<Plot> {
VanChartAxis defaultYAxis = rectanglePlot.getDefaultYAxis();
if (defaultXAxis != null) {
verticalGridLine.setSelectObject(defaultXAxis.getMainGridColor());
verticalColorBox.setSelectObject(defaultXAxis.getMainGridColor());
verticalLineType.setSelectedItem(defaultXAxis.getGridLineType());
}
if (defaultYAxis != null) {
horizontalGridLine.setSelectObject(defaultYAxis.getMainGridColor());
horizontalColorBox.setSelectObject(defaultYAxis.getMainGridColor());
horizonLineType.setSelectedItem(defaultYAxis.getGridLineType());
}
}
@ -246,12 +253,12 @@ public class VanChartAxisAreaPane extends BasicBeanPane<Plot> {
VanChartAxis defaultYAxis = rectanglePlot.getDefaultYAxis();
if (defaultXAxis != null) {
defaultXAxis.setMainGridColor(verticalGridLine.getSelectObject());
defaultXAxis.setMainGridColor(verticalColorBox.getSelectObject());
defaultXAxis.setGridLineType((LineType) verticalLineType.getSelectedItem());
}
if (defaultYAxis != null) {
defaultYAxis.setMainGridColor(horizontalGridLine.getSelectObject());
defaultYAxis.setMainGridColor(horizontalColorBox.getSelectObject());
defaultYAxis.setGridLineType((LineType) horizonLineType.getSelectedItem());
}
}

21
designer-chart/src/main/java/com/fr/van/chart/designer/style/background/radar/VanChartRadarAxisAreaPane.java

@ -3,15 +3,14 @@ package com.fr.van.chart.designer.style.background.radar;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.TableLayout;
import com.fr.van.chart.designer.TableLayout4VanChartHelper;
import com.fr.van.chart.designer.style.background.AlertLineListControlPane;
import com.fr.van.chart.designer.style.background.BackgroundListControlPane;
import com.fr.van.chart.designer.style.background.VanChartAxisAreaPane;
import javax.swing.JPanel;
import java.awt.BorderLayout;
import java.awt.Component;
import java.util.Arrays;
/**
* 样式-背景-绘图区背景-雷达图只有Y轴的配置间隔背景网格线警戒线
@ -23,24 +22,18 @@ public class VanChartRadarAxisAreaPane extends VanChartAxisAreaPane {
//雷达图只有横向的y轴的网格线配置
@Override
protected JPanel createGridLinePane() {
initGridLineComponents();
JPanel panel = new JPanel(new BorderLayout(0, 4));
panel.add(createSingleGridLinePane(Toolkit.i18nText("Fine-Design_Chart_Grid_Line"), true), BorderLayout.CENTER);
Component[][] components = new Component[][]{
new Component[]{null,null},
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Color")),horizontalGridLine},
};
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH;
double[] row = new double[components.length];
Arrays.fill(row, p);
double[] col = {f, e};
JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane(components, row, col);
return TableLayout4VanChartHelper.createExpandablePaneWithTitle(Toolkit.i18nText("Fine-Design_Chart_Grid_Line"), panel);
}
protected Component[][] getIntervalPaneComponents() {
return new Component[][]{
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Color")),horizontalColorBackground},
new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Color")), horizontalColorBackground},
};
}

BIN
designer-chart/src/main/resources/com/fr/van/chart/custom/images/custom/icon/cuvette.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 574 B

After

Width:  |  Height:  |  Size: 739 B

BIN
designer-chart/src/main/resources/com/fr/van/chart/custom/images/custom/icon/pointer_180.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

BIN
designer-chart/src/main/resources/com/fr/van/chart/custom/images/custom/icon/pointer_360.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

BIN
designer-chart/src/main/resources/com/fr/van/chart/custom/images/custom/icon/ring.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
designer-chart/src/main/resources/com/fr/van/chart/custom/images/custom/icon/selected/cuvette.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 771 B

BIN
designer-chart/src/main/resources/com/fr/van/chart/custom/images/custom/icon/selected/pointer_180.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

BIN
designer-chart/src/main/resources/com/fr/van/chart/custom/images/custom/icon/selected/pointer_360.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

BIN
designer-chart/src/main/resources/com/fr/van/chart/custom/images/custom/icon/selected/ring.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
designer-chart/src/main/resources/com/fr/van/chart/custom/images/custom/icon/selected/slot.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

BIN
designer-chart/src/main/resources/com/fr/van/chart/custom/images/custom/icon/slot.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Loading…
Cancel
Save