mengao
7 years ago
20 changed files with 263 additions and 123 deletions
@ -0,0 +1,37 @@ |
|||||||
|
package com.fr.plugin.chart.designer.component.format; |
||||||
|
|
||||||
|
import com.fr.design.gui.icombobox.UIComboBox; |
||||||
|
import com.fr.design.gui.ilable.UILabel; |
||||||
|
import com.fr.design.gui.style.FRFontPane; |
||||||
|
import com.fr.design.gui.style.FormatPane; |
||||||
|
import com.fr.design.layout.TableLayout; |
||||||
|
import com.fr.general.Inter; |
||||||
|
import com.fr.plugin.chart.designer.TableLayout4VanChartHelper; |
||||||
|
|
||||||
|
import javax.swing.*; |
||||||
|
import java.awt.*; |
||||||
|
|
||||||
|
/** |
||||||
|
* Created by mengao on 2017/8/14. |
||||||
|
*/ |
||||||
|
public class DataSheetFormatPane extends FormatPane { |
||||||
|
protected Component[][] getComponent(JPanel fontPane, JPanel centerPane, FRFontPane frFontPane) { |
||||||
|
return new Component[][]{ |
||||||
|
new Component[]{null, centerPane}, |
||||||
|
}; |
||||||
|
} |
||||||
|
|
||||||
|
protected void setTypeComboBoxPane(UIComboBox typeComboBox) { |
||||||
|
double f = TableLayout.FILL; |
||||||
|
double p = TableLayout.PREFERRED; |
||||||
|
double[] rowSize = {p, p}; |
||||||
|
double[] columnSize = {p, f}; |
||||||
|
Component[][] components = new Component[][]{ |
||||||
|
new Component[]{null, null}, |
||||||
|
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_DataType") + " ", SwingConstants.LEFT), typeComboBox}, |
||||||
|
|
||||||
|
}; |
||||||
|
JPanel panel = TableLayout4VanChartHelper.createGapTableLayoutPane(components, rowSize, columnSize); |
||||||
|
this.add(panel, BorderLayout.NORTH); |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,36 @@ |
|||||||
|
package com.fr.plugin.chart.designer.component.label; |
||||||
|
|
||||||
|
import com.fr.design.gui.ilable.UILabel; |
||||||
|
import com.fr.design.layout.TableLayout; |
||||||
|
import com.fr.general.Inter; |
||||||
|
import com.fr.plugin.chart.designer.TableLayout4VanChartHelper; |
||||||
|
import com.fr.plugin.chart.designer.component.VanChartLabelContentPane; |
||||||
|
import com.fr.plugin.chart.designer.style.VanChartStylePane; |
||||||
|
|
||||||
|
import javax.swing.*; |
||||||
|
import java.awt.*; |
||||||
|
|
||||||
|
/** |
||||||
|
* Created by mengao on 2017/8/13. |
||||||
|
*/ |
||||||
|
public class LabelContentPane4Gauge extends VanChartLabelContentPane { |
||||||
|
|
||||||
|
public LabelContentPane4Gauge(VanChartStylePane parent, JPanel showOnPane) { |
||||||
|
super(parent, showOnPane); |
||||||
|
} |
||||||
|
|
||||||
|
protected JPanel getContentPane (){ |
||||||
|
double p = TableLayout.PREFERRED; |
||||||
|
double f = TableLayout.FILL; |
||||||
|
double[] column = {p, f}; |
||||||
|
double[] row = {p,p,p}; |
||||||
|
Component[][] components = new Component[][]{ |
||||||
|
new Component[]{null,null}, |
||||||
|
new Component[]{new UILabel(Inter.getLocText("Plugin-ChartF_Content")),content}, |
||||||
|
new Component[]{null,getCenterPane()}, |
||||||
|
|
||||||
|
}; |
||||||
|
|
||||||
|
return TableLayout4VanChartHelper.createGapTableLayoutPane(components,row,column); |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,40 @@ |
|||||||
|
package com.fr.plugin.chart.designer.style.label; |
||||||
|
|
||||||
|
import com.fr.chart.chartattr.Plot; |
||||||
|
import com.fr.design.gui.ibutton.UIButtonGroup; |
||||||
|
import com.fr.design.layout.TableLayoutHelper; |
||||||
|
import com.fr.design.mainframe.chart.gui.style.ChartTextAttrPane; |
||||||
|
import com.fr.general.Inter; |
||||||
|
import com.fr.plugin.chart.designer.TableLayout4VanChartHelper; |
||||||
|
import com.fr.plugin.chart.designer.style.VanChartStylePane; |
||||||
|
|
||||||
|
import javax.swing.*; |
||||||
|
import java.awt.*; |
||||||
|
|
||||||
|
/** |
||||||
|
* Created by mengao on 2017/8/13. |
||||||
|
*/ |
||||||
|
public class VanChartGaugeLabelDetailPane extends VanChartPlotLabelDetailPane { |
||||||
|
|
||||||
|
public VanChartGaugeLabelDetailPane(Plot plot, VanChartStylePane parent) { |
||||||
|
super(plot, parent); |
||||||
|
} |
||||||
|
|
||||||
|
protected JPanel createLabelStylePane(double[] row, double[] col, Plot plot) { |
||||||
|
style = new UIButtonGroup<Integer>(new String[]{Inter.getLocText("Plugin-ChartF_Automatic"), |
||||||
|
Inter.getLocText("Plugin-ChartF_Custom")}); |
||||||
|
textFontPane = new ChartTextAttrPane(); |
||||||
|
|
||||||
|
initStyleListener(); |
||||||
|
|
||||||
|
return TableLayoutHelper.createTableLayoutPane(getLabelStyleComponents(plot),row,col); |
||||||
|
} |
||||||
|
|
||||||
|
protected JPanel getLabelPositionPane (Component[][] comps, double[] row, double[] col){ |
||||||
|
return TableLayoutHelper.createTableLayoutPane(comps,row,col); |
||||||
|
} |
||||||
|
|
||||||
|
protected JPanel createTableLayoutPaneWithTitle(String title, JPanel panel) { |
||||||
|
return TableLayout4VanChartHelper.createGapTableLayoutPane(title, panel); |
||||||
|
} |
||||||
|
} |
Loading…
Reference in new issue