帆软报表设计器源代码。
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

61 lines
2.0 KiB

package com.fr.design.chart.comp;
import com.fine.theme.utils.FineUIScale;
import com.fr.design.gui.ilable.UILabel;
import com.fr.stable.Constants;
import com.fr.stable.CoreConstants;
import com.fr.design.gui.icombobox.LineComboBox;
import com.fr.design.dialog.BasicPane;
import com.fr.design.style.color.ColorSelectBox;
import java.awt.*;
import static com.fine.swing.ui.layout.Layouts.cell;
import static com.fine.swing.ui.layout.Layouts.row;
public class BorderAttriPane extends BasicPane {
private LineComboBox lineCombo;
private ColorSelectBox colorSelectBox;
public BorderAttriPane() {
this(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Line_Style"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Color"));
}
public BorderAttriPane(String lineString, String colorSting) {
this.setLayout(new BorderLayout());
lineCombo = new LineComboBox(CoreConstants.STRIKE_LINE_STYLE_ARRAY_4_CHART);
colorSelectBox = new ColorSelectBox(80);
colorSelectBox.setPreferredSize(FineUIScale.scale(new Dimension(60, 24)));
colorSelectBox.setSelectObject(null);
this.add(row(10, row(cell(new UILabel(lineString + ":")), cell(lineCombo)),
row(cell(new UILabel(colorSting + ":"))), cell(colorSelectBox)).getComponent(), BorderLayout.WEST);
}
public void setLineColor(Color color) {
this.colorSelectBox.setSelectObject(color);
}
public Color getLineColor() {
return this.colorSelectBox.getSelectObject();
}
public void setLineStyle(int style) {
if (style != Constants.LINE_NONE && style != Constants.LINE_THICK
&& style != Constants.LINE_THIN && style != Constants.LINE_MEDIUM) {
style = Constants.LINE_THIN;
}
this.lineCombo.setSelectedLineStyle(style);
}
public int getLineStyle() {
return lineCombo.getSelectedLineStyle();
}
@Override
protected String title4PopupWindow() {
return "Border";
}
}