|
|
|
@ -10,6 +10,7 @@ import com.fr.design.gui.ibutton.UIRadioButton;
|
|
|
|
|
import com.fr.design.gui.icheckbox.UICheckBox; |
|
|
|
|
import com.fr.design.gui.icombobox.UIComboBox; |
|
|
|
|
import com.fr.design.gui.ilable.UILabel; |
|
|
|
|
import com.fr.design.gui.ispinner.UISpinner; |
|
|
|
|
import com.fr.design.gui.itextfield.UINumberField; |
|
|
|
|
import com.fr.design.gui.itextfield.UITextField; |
|
|
|
|
import com.fr.design.gui.itree.filetree.ReportletPane; |
|
|
|
@ -39,6 +40,10 @@ import java.awt.event.ActionListener;
|
|
|
|
|
import java.util.ArrayList; |
|
|
|
|
import java.util.List; |
|
|
|
|
|
|
|
|
|
import static com.fine.swing.ui.layout.Layouts.column; |
|
|
|
|
import static com.fine.swing.ui.layout.Layouts.row; |
|
|
|
|
import static com.fine.swing.ui.layout.Layouts.cell; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 热点链接部分 上方 定义特征 样式 报表 等属性的界面. |
|
|
|
|
* |
|
|
|
@ -143,12 +148,11 @@ public class ReportletHyperNorthPane extends AbstractHyperNorthPane<ReportletHyp
|
|
|
|
|
JPanel reportletNamePane = FRGUIPaneFactory.createBorderLayout_S_Pane(); |
|
|
|
|
// 路径输入框
|
|
|
|
|
reportPathTextField = new UITextField(20); |
|
|
|
|
reportletNamePane.add(reportPathTextField, BorderLayout.CENTER); |
|
|
|
|
|
|
|
|
|
// 选择路径按钮
|
|
|
|
|
browserButton = new UIButton(Toolkit.i18nText("Fine-Design_Basic_Select")); |
|
|
|
|
browserButton.setPreferredSize(new Dimension(browserButton.getPreferredSize().width, 20)); |
|
|
|
|
reportletNamePane.add(browserButton, BorderLayout.EAST); |
|
|
|
|
|
|
|
|
|
browserButton.addActionListener(new ActionListener() { |
|
|
|
|
@Override |
|
|
|
|
public void actionPerformed(ActionEvent evt) { |
|
|
|
@ -165,6 +169,11 @@ public class ReportletHyperNorthPane extends AbstractHyperNorthPane<ReportletHyp
|
|
|
|
|
reportletDialog.setVisible(true); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
reportletNamePane.add(row(10, |
|
|
|
|
cell(reportPathTextField).weight(0.85), |
|
|
|
|
cell(browserButton).weight(0.15) |
|
|
|
|
).getComponent()); |
|
|
|
|
return reportletNamePane; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -274,19 +283,19 @@ public class ReportletHyperNorthPane extends AbstractHyperNorthPane<ReportletHyp
|
|
|
|
|
*/ |
|
|
|
|
@Override |
|
|
|
|
protected JPanel setFootPanel() { |
|
|
|
|
JPanel content = new JPanel(new FlowLayout(FlowLayout.LEFT, 0, 0)); |
|
|
|
|
JPanel content = new JPanel(new BorderLayout()); |
|
|
|
|
|
|
|
|
|
// 参数传递方式下拉框
|
|
|
|
|
postComboBox = new UIComboBox(new String[]{"GET", "POST"}); |
|
|
|
|
postComboBox.setPreferredSize(new Dimension(60, 20)); |
|
|
|
|
postComboBox.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); |
|
|
|
|
content.add(postComboBox); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
showParameterInterface = new UICheckBox(Toolkit.i18nText("Fine-Design_Basic_Parameter_UI_Display")); |
|
|
|
|
|
|
|
|
|
showParameterInterface.setBorder(BorderFactory.createEmptyBorder(0, 20, 0, 0)); |
|
|
|
|
content.add(showParameterInterface); |
|
|
|
|
content.add(row(10, |
|
|
|
|
cell(postComboBox).weight(0.75), |
|
|
|
|
cell(showParameterInterface).weight(0.25) |
|
|
|
|
).getComponent()); |
|
|
|
|
return content; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -324,7 +333,7 @@ public class ReportletHyperNorthPane extends AbstractHyperNorthPane<ReportletHyp
|
|
|
|
|
// 是否有重命名属性
|
|
|
|
|
if (this.needRenamePane) { |
|
|
|
|
itemNameTextField = new UITextField(); |
|
|
|
|
Component[] renameComponents = new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Basic_Hyperlink_Name") + ":"), itemNameTextField}; |
|
|
|
|
Component[] renameComponents = new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Basic_Hyperlink_Name")), itemNameTextField}; |
|
|
|
|
dialogComponents.add(renameComponents); |
|
|
|
|
othersComponents.add(renameComponents); |
|
|
|
|
} |
|
|
|
@ -333,7 +342,7 @@ public class ReportletHyperNorthPane extends AbstractHyperNorthPane<ReportletHyp
|
|
|
|
|
private void initHeaderPanel(List<Component[]> dialogComponents, List<Component[]> othersComponents) { |
|
|
|
|
//最上方位置的面板
|
|
|
|
|
JPanel headerPane = this.setHeaderPanel(); |
|
|
|
|
Component[] headerComponents = new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Basic_Hyperlink_Reportlet") + ":"), headerPane}; |
|
|
|
|
Component[] headerComponents = new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Basic_Hyperlink_Reportlet")), headerPane}; |
|
|
|
|
dialogComponents.add(headerComponents); |
|
|
|
|
othersComponents.add(headerComponents); |
|
|
|
|
} |
|
|
|
@ -343,10 +352,9 @@ public class ReportletHyperNorthPane extends AbstractHyperNorthPane<ReportletHyp
|
|
|
|
|
UIComboBox targetFrameComboBox = new UIComboBox(getTargetFrames()); |
|
|
|
|
this.setTargetFrameComboBox(targetFrameComboBox); |
|
|
|
|
targetFrameComboBox.setEditable(false); |
|
|
|
|
targetFrameComboBox.setPreferredSize(new Dimension(100, 20)); |
|
|
|
|
JPanel targetFramePanel = new JPanel(new FlowLayout(FlowLayout.LEFT, 0, 0)); |
|
|
|
|
JPanel targetFramePanel = new JPanel(new BorderLayout()); |
|
|
|
|
targetFramePanel.add(targetFrameComboBox); |
|
|
|
|
Component[] targetComponents = new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Basic_Hyperlink_Link_Opened_In") + ":"), targetFramePanel}; |
|
|
|
|
Component[] targetComponents = new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Basic_Hyperlink_Link_Opened_In")), targetFramePanel}; |
|
|
|
|
dialogComponents.add(targetComponents); |
|
|
|
|
othersComponents.add(targetComponents); |
|
|
|
|
} |
|
|
|
@ -355,36 +363,26 @@ public class ReportletHyperNorthPane extends AbstractHyperNorthPane<ReportletHyp
|
|
|
|
|
// 对话框标题
|
|
|
|
|
titleFiled = new TinyFormulaPane(); |
|
|
|
|
titleFiled.getUITextField().setColumns(15); |
|
|
|
|
final JPanel titlePanel = new JPanel(new FlowLayout(FlowLayout.LEFT, 0, 0)); |
|
|
|
|
final JPanel titlePanel = new JPanel(new BorderLayout()); |
|
|
|
|
titlePanel.add(titleFiled); |
|
|
|
|
Component[] titleComponents = new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Basic_Hyperlink_Dialog_Title") + ":"), titlePanel}; |
|
|
|
|
Component[] titleComponents = new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Basic_Hyperlink_Dialog_Title")), titlePanel}; |
|
|
|
|
dialogComponents.add(titleComponents); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private void initDialogSizePanel(List<Component[]> dialogComponents) {// 对话框大小
|
|
|
|
|
final JPanel sizeJPanel = new JPanel(new FlowLayout(FlowLayout.LEFT, 0, 0)); |
|
|
|
|
UILabel heightLabel = new UILabel(Toolkit.i18nText("Fine-Design_Chart_Height") + ":"); |
|
|
|
|
heightLabel.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 10)); |
|
|
|
|
sizeJPanel.add(heightLabel); |
|
|
|
|
UINumberField heightTextFiled = new UINumberField(); |
|
|
|
|
heightTextFiled.setMinValue(0); |
|
|
|
|
heightTextFiled.canFillNegativeNumber(false); |
|
|
|
|
heightTextFiled.setText(String.valueOf(DEFAULT_H_VALUE)); |
|
|
|
|
heightTextFiled.setPreferredSize(new Dimension(40, 20)); |
|
|
|
|
sizeJPanel.add(heightTextFiled); |
|
|
|
|
final JPanel sizeJPanel = new JPanel(new BorderLayout()); |
|
|
|
|
UILabel heightLabel = new UILabel(Toolkit.i18nText("Fine-Design_Chart_Height")); |
|
|
|
|
UISpinner heightTextFiled = new UISpinner(0, Integer.MAX_VALUE, 1, DEFAULT_H_VALUE); |
|
|
|
|
this.setHeightTextFiled(heightTextFiled); |
|
|
|
|
UILabel widthLabel = new UILabel(Toolkit.i18nText("Fine-Design_Basic_Designer_Width") + ":"); |
|
|
|
|
widthLabel.setBorder(BorderFactory.createEmptyBorder(0, 10, 0, 10)); |
|
|
|
|
sizeJPanel.add(widthLabel); |
|
|
|
|
UINumberField widthTextFiled = new UINumberField(); |
|
|
|
|
widthTextFiled.setMinValue(0); |
|
|
|
|
widthTextFiled.canFillNegativeNumber(false); |
|
|
|
|
widthTextFiled.setText(String.valueOf(DEFAULT_V_VALUE)); |
|
|
|
|
widthTextFiled.setPreferredSize(new Dimension(40, 20)); |
|
|
|
|
sizeJPanel.add(widthTextFiled); |
|
|
|
|
UILabel widthLabel = new UILabel(Toolkit.i18nText("Fine-Design_Basic_Designer_Width")); |
|
|
|
|
UISpinner widthTextFiled = new UISpinner(0, Integer.MAX_VALUE, 1, DEFAULT_V_VALUE); |
|
|
|
|
this.setWidthTextFiled(widthTextFiled); |
|
|
|
|
sizeJPanel.add(column(8, |
|
|
|
|
row(10, cell(heightLabel).weight(0.2), cell(heightTextFiled).weight(0.8)), |
|
|
|
|
row(10, cell(widthLabel).weight(0.2), cell(widthTextFiled).weight(0.8)) |
|
|
|
|
).getComponent()); |
|
|
|
|
sizeJPanel.setVisible(true); |
|
|
|
|
dialogComponents.add(new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Basic_Hyperlink_Dialog_Size") + ":"), sizeJPanel}); |
|
|
|
|
dialogComponents.add(new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Basic_Hyperlink_Dialog_Size")), sizeJPanel}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private void initDialogLocationPanel(List<Component[]> dialogComponents) { |
|
|
|
@ -408,13 +406,13 @@ public class ReportletHyperNorthPane extends AbstractHyperNorthPane<ReportletHyp
|
|
|
|
|
leftLabel.setBorder(BorderFactory.createEmptyBorder(0, 15, 0, 10)); |
|
|
|
|
leftLocation = new UINumberField(); |
|
|
|
|
leftLocation.setMinValue(0); |
|
|
|
|
leftLocation.setPreferredSize(new Dimension(40, 20)); |
|
|
|
|
leftLocation.setPreferredSize(new Dimension(60, 20)); |
|
|
|
|
// 位置 距上
|
|
|
|
|
final UILabel topLabel = new UILabel(Toolkit.i18nText("Fine-Design_Basic_Hyperlink_Dialog_Position_Top")); |
|
|
|
|
topLabel.setBorder(BorderFactory.createEmptyBorder(0, 10, 0, 10)); |
|
|
|
|
topLocation = new UINumberField(); |
|
|
|
|
topLocation.setMinValue(0); |
|
|
|
|
topLocation.setPreferredSize(new Dimension(40, 20)); |
|
|
|
|
topLocation.setPreferredSize(new Dimension(60, 20)); |
|
|
|
|
|
|
|
|
|
locationPanel.add(leftLabel); |
|
|
|
|
locationPanel.add(leftLocation); |
|
|
|
@ -439,13 +437,13 @@ public class ReportletHyperNorthPane extends AbstractHyperNorthPane<ReportletHyp
|
|
|
|
|
center.addChangeListener(actionListener); |
|
|
|
|
custom.addChangeListener(actionListener); |
|
|
|
|
|
|
|
|
|
dialogComponents.add(new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Basic_Hyperlink_Dialog_Show_Position") + ":"), locationPanel}); |
|
|
|
|
dialogComponents.add(new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Basic_Hyperlink_Dialog_Show_Position")), locationPanel}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private void initFooterPanel(List<Component[]> dialogComponents, List<Component[]> othersComponents) { |
|
|
|
|
// 最下方的配置面板
|
|
|
|
|
// 参数传递方式
|
|
|
|
|
Component[] footerComponents = new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Basic_Reportlet_Parameter_Type") + ":"), this.setFootPanel()}; |
|
|
|
|
Component[] footerComponents = new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Basic_Reportlet_Parameter_Type")), this.setFootPanel()}; |
|
|
|
|
dialogComponents.add(footerComponents); |
|
|
|
|
othersComponents.add(footerComponents); |
|
|
|
|
} |
|
|
|
|