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.
91 lines
3.1 KiB
91 lines
3.1 KiB
package com.fr.plugins.dsgroup.ui; |
|
|
|
/** |
|
* Created by phetran_ye on 2018/8/7. |
|
*/ |
|
import com.fr.design.data.tabledata.tabledatapane.AbstractTableDataPane; |
|
import com.fr.design.gui.itextfield.UITextField; |
|
import com.fr.design.i18n.Toolkit; |
|
import com.fr.design.mainframe.WestRegionContainerPane; |
|
import com.fr.plugins.dsgroup.fun.DSGroupTableData; |
|
import javax.swing.*; |
|
import java.awt.*; |
|
|
|
public class DSGroupPane extends AbstractTableDataPane<DSGroupTableData> { |
|
|
|
//private static final String PREVIEW_BUTTON = Inter.getLocText("Preview"); |
|
|
|
|
|
private UITextField contentTextField; |
|
private DSGroupTableData tableData; |
|
|
|
|
|
public DSGroupPane() { |
|
WestRegionContainerPane wp=WestRegionContainerPane.getInstance(); |
|
setLayout(new BorderLayout()); |
|
//add(createToolBar(), BorderLayout.NORTH); |
|
JPanel contentPane = new JPanel(); |
|
JLabel infoLbl=new JLabel(); |
|
String info="<html><body>提示:<br>"; |
|
info+="1.选中分组,然后添加数据集即可在该分组下添加数据集。<br>"; |
|
info+="2.拖动数据集到某分组上即可将数据集添加到该分组下。<br>"; |
|
info+="3.拖动数据集到数据集面板空白处即可将该数据集移到最外部。<br> </body></html>"; |
|
infoLbl.setText(info); |
|
contentPane.setLayout(new BorderLayout()); |
|
contentPane.add(infoLbl, BorderLayout.NORTH); |
|
add(contentPane, BorderLayout.CENTER); |
|
} |
|
|
|
/*private JToolBar createToolBar() { |
|
ToolBarDef toolBarDef = new ToolBarDef(); |
|
//toolBarDef.addShortCut(new PreviewQueryTableDataAction()); |
|
UIToolbar editToolBar = ToolBarDef.createJToolBar(); |
|
toolBarDef.updateToolBar(editToolBar); |
|
return editToolBar; |
|
}*/ |
|
|
|
/* private void addChildrenToParent(JPanel contentPane) { |
|
double p = TableLayout.PREFERRED; |
|
double f = TableLayout.FILL; |
|
double[] rowSize = {p}; |
|
double[] columnSize = {p, f}; |
|
|
|
JPanel panel = TableLayoutHelper.createTableLayoutPane(new Component[][]{ |
|
{new UILabel("名字"), contentTextField = new UITextField()} |
|
}, rowSize, columnSize); |
|
contentPane.add(panel, BorderLayout.CENTER); |
|
}*/ |
|
|
|
@Override |
|
public void populateBean(DSGroupTableData ob) { |
|
/*if (ob != null) { |
|
contentTextField.setText(ob.getText()); |
|
}*/ |
|
tableData=ob; |
|
} |
|
|
|
@Override |
|
public DSGroupTableData updateBean() { |
|
//DSGroupTableData tableData = new DSGroupTableData(); |
|
//tableData.setText(contentTextField.getText()); |
|
return tableData; |
|
} |
|
|
|
@Override |
|
protected String title4PopupWindow() { |
|
return Toolkit.i18nText("Data_Set_Group"); |
|
} |
|
|
|
/*private class PreviewQueryTableDataAction extends UpdateAction { |
|
public PreviewQueryTableDataAction() { |
|
this.setName(PREVIEW_BUTTON); |
|
this.setMnemonic('P'); |
|
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/m_file/preview.png")); |
|
} |
|
|
|
public void actionPerformed(ActionEvent evt) { |
|
PreviewTablePane.previewTableData(DSGroupPane.this.updateBean()); |
|
} |
|
}*/ |
|
} |
|
|
|
|