package com.vci.client.portal.UI.v3.comptdesign.choosedialog; //package plm.portal.v3.uicompt; // //import java.awt.BorderLayout; //import java.awt.Component; //import java.awt.Dialog; //import java.awt.GridBagConstraints; //import java.awt.GridBagLayout; //import java.awt.Insets; //import java.awt.event.ActionEvent; //import java.awt.event.ActionListener; // //import plm.corba.portal.PortalVI; //import plm.portal.utility.Tool; // //import com.vci.base.ui.swing.VCISwingUtil; //import com.vci.base.ui.swing.components.VCIJButton; //import com.vci.base.ui.swing.components.VCIJDialog; //import com.vci.base.ui.swing.components.VCIJLabel; //import com.vci.base.ui.swing.components.VCIJPanel; //import com.vci.base.ui.swing.components.VCIJTextField; //import com.vci.base.ui.swing.components.table.AbstractVCIJTableDataProvider; //import com.vci.base.ui.swing.components.table.VCIJTableDataProvider; //import com.vci.base.ui.swing.components.table.VCIJTableNode; //import com.vci.base.ui.swing.components.table.VCIJTablePanel; // //public class PortalVIChooseDialog extends VCIJDialog { // // /** // * // */ // private static final long serialVersionUID = -3907934612332578043L; // private Dialog ownedDialog = null; // private String title = ""; // private int width = 400; // private int height = 400; // private Component relativeToCompt = null; // // private String btmName = ""; // // // private VCIJLabel lblName = new VCIJLabel("名称"); // private VCIJTextField txtName = new VCIJTextField(""); // private VCIJLabel lblCode = new VCIJLabel("UI上下文"); // private VCIJTextField txtCode = new VCIJTextField(""); // private VCIJButton btnSearch = VCISwingUtil.createVCIJButton("search", "查询", "查询", "search.gif", new ActionListener() { // @Override // public void actionPerformed(ActionEvent e) { // search_actionPerformed(e); // } // }); // private VCIJTableDataProvider dataProvider = null; // private VCIJTablePanel tablePanel = null; // private VCIJButton btnOk = VCISwingUtil.createVCIJButton("ok", "确定", "确定", "accept.png", new ActionListener() { // @Override // public void actionPerformed(ActionEvent e) { // ok_actionPerform(e); // } // }); // private VCIJButton btnCancel = VCISwingUtil.createVCIJButton("cancel", "取消", "取消", "cancel.png", new ActionListener() { // @Override // public void actionPerformed(ActionEvent e) { // cancel_actionPerform(e); // } // }); // // public PortalVIChooseDialog(){ // // } // public void buildDialog(){ // init(); // } // // private void init(){ // setLayout(new BorderLayout()); // add(getNorthSearchPanel(), BorderLayout.NORTH); // add(getCenterContentPanel(), BorderLayout.CENTER); // add(getSouthButtonPanel(), BorderLayout.SOUTH); // setLocationAndSize(); // } // private VCIJPanel getNorthSearchPanel(){ // VCIJPanel pal = new VCIJPanel(new GridBagLayout()); // pal.add(lblName, getGBC(0, 0, 1, 1, 0.0, 0.0, GridBagConstraints.NORTHEAST, GridBagConstraints.NONE, 1)); // pal.add(txtName, getGBC(1, 0, 1, 1, 1.0, 0.0, GridBagConstraints.NORTHWEST, GridBagConstraints.BOTH, 1)); // pal.add(lblCode, getGBC(2, 0, 1, 1, 0.0, 0.0, GridBagConstraints.NORTHEAST, GridBagConstraints.NONE, 1)); // pal.add(txtCode, getGBC(3, 0, 1, 1, 1.0, 0.0, GridBagConstraints.NORTHWEST, GridBagConstraints.BOTH, 1)); // pal.add(btnSearch, getGBC(4, 0, 1, 1, 0.0, 0.0, GridBagConstraints.NORTHEAST, GridBagConstraints.NONE, 1)); // return pal; // } // // private VCIJPanel getCenterContentPanel(){ // VCIJPanel pal = new VCIJPanel(new BorderLayout()); // dataProvider = new AbstractVCIJTableDataProvider() { // @Override // public String[] getSpecialColumns() { // return new String[]{"名称",""}; // } // @Override // public int getTotal() { // return super.total; // } // @Override // public VCIJTableNode getNewRowNode(PortalVI dataObj) { // VCIJTableNode dataNode = new VCIJTableNode(dataObj); // String[] columns = getSpecialColumns(); // int index = 0; // dataNode.setPropertyValue(columns[index++], dataObj.id); // dataNode.setPropertyValue(columns[index++], ""); // return dataNode; // } // @Override // public PortalVI[] getDatas(int pageIndex, int pageSize) { // PortalVI[] res = new PortalVI[0]; //// try{ //// res = Tool.getService().getPagePortalVIArrayByTypeName(typeName, startPage, endPage) //// } // return res; // } // }; // return pal; // } // // private VCIJPanel getSouthButtonPanel(){ // VCIJPanel pal = new VCIJPanel(); // pal.add(btnOk); // pal.add(btnCancel); // return pal; // } // private GridBagConstraints getGBC(int gridx, int gridy, int gridwidth, int gridheight, double weightx, double weighty, int anchor, int fill, int padxy) { // return new GridBagConstraints(gridx, gridy, gridwidth, gridheight, weightx, weighty, anchor, fill, new Insets(padxy, padxy, padxy, padxy), padxy, padxy); // } // private void setLocationAndSize(){ // setTitle(getTitle()); // setSize(getWidth(), getHeight()); // setLocationRelativeTo(getRelativeToCompt()); // } // private void search_actionPerformed(ActionEvent e){ // // } // private void ok_actionPerform(ActionEvent e){ // // } // private void cancel_actionPerform(ActionEvent e){ // // } // // private void close(DialogResult dialogRes){ // setDialogResult(dialogRes); // setVisible(false); // dispose(); // } // // public Dialog getOwnedDialog() { // return ownedDialog; // } // public void setOwnedDialog(Dialog ownedDialog) { // this.ownedDialog = ownedDialog; // } // public String getTitle() { // return title; // } // public void setTitle(String title) { // this.title = title; // } // public int getWidth() { // return width; // } // public void setWidth(int width) { // this.width = width; // } // public int getHeight() { // return height; // } // public void setHeight(int height) { // this.height = height; // } // public Component getRelativeToCompt() { // return relativeToCompt; // } // public void setRelativeToCompt(Component relativeToCompt) { // this.relativeToCompt = relativeToCompt; // } // public String getBtmName() { // return btmName; // } // public void setBtmName(String btmName) { // this.btmName = btmName; // } //}