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.
73 lines
2.1 KiB
73 lines
2.1 KiB
package com.eco.plugin.xxxx.xxxx.serverdata; |
|
|
|
import com.fr.design.data.datapane.preview.PreviewTablePane; |
|
import com.fr.design.data.tabledata.tabledatapane.AbstractTableDataPane; |
|
import com.fr.design.gui.ibutton.UIButton; |
|
import com.fr.design.i18n.Toolkit; |
|
import com.fr.general.IOUtils; |
|
import javax.swing.*; |
|
import java.awt.*; |
|
import java.awt.event.ActionEvent; |
|
import java.awt.event.ActionListener; |
|
|
|
|
|
public class UserHttpTableDataPane extends AbstractTableDataPane<UserHttpTableData> { |
|
public UserHttpTableDataPane() { |
|
super(); |
|
createContent(); |
|
} |
|
|
|
|
|
|
|
@Override |
|
public void populateBean(UserHttpTableData ob) { |
|
if (ob == null) { |
|
return; |
|
} |
|
|
|
} |
|
|
|
@Override |
|
public UserHttpTableData updateBean() { |
|
UserHttpTableData tableData = new UserHttpTableData(); |
|
return tableData; |
|
} |
|
|
|
@Override |
|
protected String title4PopupWindow() { |
|
return Toolkit.i18nText("用户数据集"); |
|
} |
|
|
|
|
|
private void createContent() { |
|
setLayout(new BorderLayout()); |
|
JPanel contentPane = new JPanel(); |
|
contentPane.setLayout(new BorderLayout()); |
|
add(contentPane, BorderLayout.CENTER); |
|
|
|
JPanel connectionPanel = new JPanel(new FlowLayout(FlowLayout.LEFT, 10, 5)); |
|
|
|
UIButton previewButton = createIconButton("Fine-Design_Basic_Preview", "/com/fr/design/images/m_file/preview.png"); |
|
previewButton.addActionListener(new ActionListener() { |
|
public void actionPerformed(ActionEvent e) { |
|
PreviewTablePane.previewTableData(updateBean()); |
|
} |
|
}); |
|
connectionPanel.add(previewButton); |
|
contentPane.add(connectionPanel, BorderLayout.NORTH); |
|
} |
|
|
|
/** |
|
* 获取图标按钮 |
|
* |
|
* @param toolTip 提示信息,国际化key |
|
* @param iconPath 图标路径 |
|
* @return |
|
*/ |
|
public static UIButton createIconButton(String toolTip, String iconPath) { |
|
UIButton iconButton = new UIButton(IOUtils.readIcon(iconPath)); |
|
iconButton.setToolTipText(Toolkit.i18nText(toolTip)); |
|
return iconButton; |
|
} |
|
|
|
}
|
|
|