| | |
| | | import com.vci.base.ui.swing.components.VCIJPanel; |
| | | import com.vci.base.ui.swing.components.table.AbstractVCIJTableDataProvider; |
| | | import com.vci.base.ui.swing.components.table.VCIJTablePanel; |
| | | import com.vci.ubcs.codeapply.object.BaseModel; |
| | | import com.vci.ubcs.codeapply.object.UIFormRefer; |
| | | import org.apache.poi.ss.formula.functions.T; |
| | | |
| | | import java.awt.*; |
| | | import java.util.HashMap; |
| | | import java.util.Map; |
| | | |
| | | public class CodeDataMainPanel extends VCIJPanel { |
| | | |
| | | /** |
| | | * 自定义顶部控件区域 |
| | | */ |
| | | private VCIJPanel customTopPanel = null; |
| | | private AttarSearchPanel customTopPanel = null; |
| | | private UIFormRefer uiFormRefer; |
| | | private CodeDataMainPanelActionListener actionListener = new CodeDataMainPanelActionListener(this); |
| | | private VCIJButton btnSearch = VCISwingUtil.createVCIJButton("search", "查询", "查询", "search.png", actionListener); |
| | |
| | | public CodeDataMainPanel(UIFormRefer uiFormRefer) { |
| | | this.uiFormRefer=uiFormRefer; |
| | | } |
| | | |
| | | private Map<String,String> customCondtionMap=new HashMap<>(); |
| | | public void buildPanel(){ |
| | | this.init(); |
| | | } |
| | |
| | | /** |
| | | * 根据类型显示table |
| | | */ |
| | | private VCIJTablePanel<T> tablePanel = null; |
| | | private AbstractVCIJTableDataProvider<T> dataProvider = null; |
| | | private VCIJTablePanel<BaseModel> tablePanel = null; |
| | | private AbstractVCIJTableDataProvider<BaseModel> dataProvider = null; |
| | | private VCIJPanel createCenterDataTablePanel() { |
| | | tablePanel = new VCIJTablePanel<T>(dataProvider); |
| | | tablePanel = new VCIJTablePanel<BaseModel>(dataProvider); |
| | | //tablePanel.setCustomButtons(getCombinedButtons()); |
| | | tablePanel.setShowExport(true); |
| | | tablePanel.setShowPaging(true); |
| | | tablePanel.setShowProgressBar(false); |
| | | tablePanel.setPageButtonFlowAlign(FlowLayout.CENTER); |
| | | tablePanel.setCustomButtonFlowAlign(FlowLayout.CENTER); |
| | | tablePanel.buildTablePanel(); |
| | |
| | | return palRes; |
| | | } |
| | | |
| | | public VCIJPanel getCustomTopPanel() { |
| | | public AttarSearchPanel getCustomTopPanel() { |
| | | return customTopPanel; |
| | | } |
| | | |
| | | public void setCustomTopPanel(VCIJPanel customTopPanel) { |
| | | public void setCustomTopPanel(AttarSearchPanel customTopPanel) { |
| | | this.customTopPanel = customTopPanel; |
| | | } |
| | | |
| | | public VCIJTablePanel<T> getTablePanel() { |
| | | public VCIJTablePanel<BaseModel> getTablePanel() { |
| | | return tablePanel; |
| | | } |
| | | |
| | | public void setTablePanel(VCIJTablePanel<T> tablePanel) { |
| | | public void setTablePanel(VCIJTablePanel<BaseModel> tablePanel) { |
| | | this.tablePanel = tablePanel; |
| | | } |
| | | |
| | |
| | | this.uiFormRefer = uiFormRefer; |
| | | } |
| | | |
| | | public AbstractVCIJTableDataProvider<T> getDataProvider() { |
| | | public AbstractVCIJTableDataProvider<BaseModel> getDataProvider() { |
| | | return dataProvider; |
| | | } |
| | | |
| | | public void setDataProvider(AbstractVCIJTableDataProvider<T> dataProvider) { |
| | | public void setDataProvider(AbstractVCIJTableDataProvider<BaseModel> dataProvider) { |
| | | this.dataProvider = dataProvider; |
| | | } |
| | | |
| | | public Map<String, String> getCustomCondtionMap() { |
| | | if(this.getCustomTopPanel()!=null){ |
| | | Map<String,String> newCustomCondtionMap= this.getCustomTopPanel().getAttrSearchFilterString(); |
| | | customCondtionMap.putAll(newCustomCondtionMap); |
| | | } |
| | | return customCondtionMap; |
| | | } |
| | | |
| | | public void setCustomCondtionMap(Map<String, String> customCondtionMap) { |
| | | this.customCondtionMap = customCondtionMap; |
| | | } |
| | | |
| | | /** |
| | | * 清空条件 |
| | | * <p>Description: </p> |
| | | * |
| | | * @author liujw |
| | | */ |
| | | public void clearCustomTopPanel(){ |
| | | customCondtionMap.clear(); |
| | | AttarSearchPanel search = (AttarSearchPanel)getCustomTopPanel(); |
| | | search.clear(); |
| | | } |
| | | } |