Browse Source

CHART-2099 大屏图表

master
zheng 7 years ago
parent
commit
3218a8b6cf
  1. 27
      designer_base/src/com/fr/design/mainframe/backgroundpane/ColorBackgroundQuickPane.java
  2. 23
      designer_chart/src/com/fr/design/mainframe/chart/gui/style/series/UIColorPickerPane.java
  3. 38
      designer_chart/src/com/fr/plugin/chart/designer/TableLayout4VanChartHelper.java
  4. 11
      designer_chart/src/com/fr/plugin/chart/designer/component/format/VanChartFormatPaneWithCheckBox.java

27
designer_base/src/com/fr/design/mainframe/backgroundpane/ColorBackgroundQuickPane.java

@ -3,13 +3,14 @@ package com.fr.design.mainframe.backgroundpane;
import com.fr.base.background.ColorBackground;
import com.fr.design.event.UIObserverListener;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.style.color.NewColorSelectPane;
import com.fr.general.Background;
import com.fr.general.Inter;
import com.fr.design.style.color.NewColorSelectPane;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
import java.awt.*;
import java.awt.BorderLayout;
import java.awt.Color;
/**
* @author zhou
@ -29,14 +30,22 @@ public class ColorBackgroundQuickPane extends BackgroundQuickPane {
public void populateBean(Background background) {
ColorBackground colorBackgroud = (ColorBackground) background;
this.detailColorSelectPane.setColor(colorBackgroud.getColor());
isBackGroundColor = false;
}
populateColor(colorBackgroud.getColor());
}
public Background updateBean() {
this.detailColorSelectPane.updateUsedColor();
return ColorBackground.getInstance(this.detailColorSelectPane.getNotNoneColor());
}
public Background updateBean() {
return ColorBackground.getInstance(updateColor());
}
public void populateColor(Color color) {
this.detailColorSelectPane.setColor(color);
isBackGroundColor = false;
}
public Color updateColor() {
this.detailColorSelectPane.updateUsedColor();
return this.detailColorSelectPane.getNotNoneColor();
}
public boolean isBackGroundColor(){
return isBackGroundColor;

23
designer_chart/src/com/fr/design/mainframe/chart/gui/style/series/UIColorPickerPane.java

@ -8,6 +8,7 @@ import com.fr.design.constants.UIConstants;
import com.fr.design.dialog.BasicPane;
import com.fr.design.event.UIObserver;
import com.fr.design.event.UIObserverListener;
import com.fr.design.gui.frpane.AbstractAttrNoScrollPane;
import com.fr.design.gui.frpane.UINumberDragPane;
import com.fr.design.gui.ibutton.UIButtonGroup;
import com.fr.design.gui.ilable.BoldFontTextLabel;
@ -22,10 +23,22 @@ import com.fr.general.Inter;
import com.fr.plugin.chart.designer.TableLayout4VanChartHelper;
import com.fr.stable.StringUtils;
import javax.swing.*;
import javax.swing.JComponent;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.SwingConstants;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
import java.awt.*;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Component;
import java.awt.Container;
import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.LayoutManager;
import java.awt.Point;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.util.ArrayList;
@ -672,8 +685,10 @@ public class UIColorPickerPane extends BasicPane implements UIObserver {
}
container = container.getParent();
}
((ChartStylePane)container).initAllListeners();
}
if (container instanceof AbstractAttrNoScrollPane) {
((AbstractAttrNoScrollPane) container).initAllListeners();
}
}
public void updateBean(MapHotAreaColor hotAreaColor) {
hotAreaColor.setMainColor(fillStyleCombox.getSelectObject());

38
designer_chart/src/com/fr/plugin/chart/designer/TableLayout4VanChartHelper.java

@ -6,9 +6,12 @@ import com.fr.design.gui.ilable.UILabel;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import javax.swing.*;
import javax.swing.BorderFactory;
import javax.swing.JPanel;
import javax.swing.SwingConstants;
import javax.swing.border.Border;
import java.awt.*;
import java.awt.Component;
import java.util.Arrays;
/**
* 布局 标题+组件
@ -24,7 +27,18 @@ public class TableLayout4VanChartHelper {
public static final int COMPONENT_INTERVAL =12;
public static final Border SECOND_EDIT_AREA_BORDER = BorderFactory.createEmptyBorder(0,12,0,0);
public static JPanel createExpandablePaneWithTitleTopGap(String title, JPanel panel) {
return new UIExpandablePane(title, EXPANDABLE_PANE_WIDTH, EXPANDABLE_PANE_HIGHT, panel) {
protected void setcontentPanelontentPanelBorder() {
getContentPanel().setBorder(BorderFactory.createEmptyBorder(5, 5, 0, 0));
}
};
}
public static JPanel createExpandablePaneWithTitle(String title, Component[][] components) {
JPanel panel = createGapTableLayoutPane(components);
return createExpandablePaneWithTitle(title, panel);
}
public static JPanel createExpandablePaneWithTitle(String title, JPanel panel) {
return new UIExpandablePane(title, EXPANDABLE_PANE_WIDTH, EXPANDABLE_PANE_HIGHT, panel){
@ -52,6 +66,16 @@ public class TableLayout4VanChartHelper {
return TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, COMPONENT_INTERVAL, LayoutConstants.VGAP_LARGE);
}
public static JPanel createGapTableLayoutPane(Component[][] components) {
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double[] columnSize = {f, EDIT_AREA_WIDTH};
double[] rowSize = new double[components.length];
Arrays.fill(rowSize, p);
return createGapTableLayoutPane(components, rowSize, columnSize);
}
public static JPanel createGapTableLayoutPane(Component[][] components,
double[] rowSize, double[] columnSize) {
@ -125,4 +149,14 @@ public class TableLayout4VanChartHelper {
return TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize);
}
public static JPanel createTableLayoutPane(Component[][] components) {
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double[] columnSize = {p, f};
double[] rowSize = new double[components.length];
Arrays.fill(rowSize, p);
return TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize);
}
}

11
designer_chart/src/com/fr/plugin/chart/designer/component/format/VanChartFormatPaneWithCheckBox.java

@ -1,17 +1,18 @@
package com.fr.plugin.chart.designer.component.format;
import com.fr.base.Style;
import com.fr.design.gui.frpane.AbstractAttrNoScrollPane;
import com.fr.design.gui.frpane.UIBubbleFloatPane;
import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.icheckbox.UICheckBox;
import com.fr.design.gui.style.FormatPane;
import com.fr.general.Inter;
import com.fr.plugin.chart.base.format.AttrTooltipFormat;
import com.fr.plugin.chart.designer.style.VanChartStylePane;
import com.fr.stable.Constants;
import javax.swing.*;
import java.awt.*;
import javax.swing.JPanel;
import java.awt.BorderLayout;
import java.awt.Point;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
@ -28,12 +29,12 @@ public abstract class VanChartFormatPaneWithCheckBox extends JPanel{
private FormatPane formatPane;
private Format format;
private VanChartStylePane parent;
private AbstractAttrNoScrollPane parent;
private JPanel showOnPane;
private boolean isDirty;
public VanChartFormatPaneWithCheckBox(VanChartStylePane parent, JPanel showOnPane) {
public VanChartFormatPaneWithCheckBox(AbstractAttrNoScrollPane parent, JPanel showOnPane) {
this.parent = parent;
this.showOnPane = showOnPane;
this.isDirty = true;

Loading…
Cancel
Save