|
|
|
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";
|
|
|
|
}
|
|
|
|
}
|