package com.vci.client.omd.attribpool.ui;
|
|
import java.awt.BorderLayout;
|
import java.awt.Dimension;
|
import java.awt.GridBagConstraints;
|
import java.awt.GridBagLayout;
|
import java.awt.Insets;
|
import java.awt.event.ActionEvent;
|
import java.awt.event.ActionListener;
|
import java.awt.event.ItemEvent;
|
import java.awt.event.ItemListener;
|
import java.util.ArrayList;
|
import java.util.HashMap;
|
import java.util.Iterator;
|
import javax.swing.BorderFactory;
|
import javax.swing.JButton;
|
import javax.swing.JCheckBox;
|
import javax.swing.JComboBox;
|
import javax.swing.JLabel;
|
import javax.swing.JOptionPane;
|
import javax.swing.JPanel;
|
import javax.swing.JScrollPane;
|
import javax.swing.JTextArea;
|
import javax.swing.JTextField;
|
|
import com.vci.client.omd.enumManager.toOutside.GetEnumForOut;
|
import com.vci.corba.omd.atm.AttribItem;
|
|
public class VTLongPanel extends VTDataTypePanel{
|
|
/**
|
*
|
*/
|
private static final long serialVersionUID = -1103578227258286799L;
|
private JCheckBox cbNull;
|
// private JComboBox combDim;
|
private JTextField tfDefValue;
|
private JTextField tfRage;
|
private JButton btnLar, btnSma, btnLarE, btnSmaE, btnEqu, btnRage, btnUnEqu;
|
private JTextArea taRage;
|
private JButton btnRemove;
|
private HashMap<String, String> detailInfoMap = null;
|
private JPanel rightPanel1, rightPanel2, rightPanel3;
|
private JComboBox combRage1, combRage2;
|
private JTextField tfRage1, tfRage2;
|
private JButton btnRageAdd;
|
private boolean rageFlag = false;
|
//枚举选择
|
private JCheckBox chbEnum;
|
private JComboBox combEnum;
|
private ArrayList<String> valueList;
|
private JComboBox combDefValue;
|
private HashMap<String, ArrayList<String>> enumMap = null;
|
|
public VTLongPanel(){
|
initUI();
|
addListener();
|
}
|
|
private void initUI(){
|
|
this.setLayout(new GridBagLayout());
|
JPanel leftPanel = new JPanel();
|
JPanel rightPanel = new JPanel();
|
|
GridBagConstraints gb = new GridBagConstraints();
|
gb.gridx = 0;
|
gb.gridy = 0;
|
gb.weightx = 1.0;
|
gb.weighty = 1.0;
|
gb.fill = GridBagConstraints.BOTH;
|
|
this.add(leftPanel, gb);
|
gb.gridx = 1;
|
this.add(rightPanel, gb);
|
leftPanel.setPreferredSize(new Dimension(this.getSize().width/2,
|
this.getSize().height));
|
rightPanel.setPreferredSize(new Dimension(this.getSize().width/2,
|
this.getSize().height));
|
|
//设置左边panel的控件
|
leftPanel.setBorder(BorderFactory.createTitledBorder("VTInteger"));
|
leftPanel.setLayout(new BorderLayout());
|
JPanel leftPanel2 = new JPanel();
|
|
JScrollPane spLP1 = new JScrollPane();
|
spLP1.setBorder(null);
|
JScrollPane spLP2 = new JScrollPane();
|
spLP2.setBorder(null);
|
spLP2.setViewportView(leftPanel2);
|
|
leftPanel.add(spLP1, BorderLayout.NORTH);
|
leftPanel.add(spLP2, BorderLayout.CENTER);
|
|
cbNull = new JCheckBox("允许为空");
|
cbNull.setSelected(true);
|
// cbFixLen = new JCheckBox("定长");
|
// leftPanel1.add(cbFixLen);
|
|
leftPanel2.setLayout(new GridBagLayout());
|
//屏蔽使用量纲前 ----start
|
// GridBagConstraints g = new GridBagConstraints();
|
// g.insets = new Insets(10, 5, 0, 5);
|
// g.gridx = 0;
|
// g.gridy = 0;
|
// g.anchor = GridBagConstraints.EAST;
|
// leftPanel2.add(new JLabel("使用量纲"), g);
|
// combDim = new JComboBox();
|
// combDim.addItem("kg");
|
// combDim.addItem("km");
|
// combDim.setPreferredSize(new Dimension(120, 20));
|
// GridBagConstraints g1 = new GridBagConstraints();
|
// g1.insets = new Insets(10, 5, 0, 5);
|
// g1.gridx = 1;
|
// g1.gridy = 0;
|
// g1.weightx = 1.0;
|
// g1.gridwidth = GridBagConstraints.REMAINDER;
|
// leftPanel2.add(combDim, g1);
|
//
|
// g.gridy = 1;
|
// leftPanel2.add(new JLabel("默认值"), g);
|
// tfDefValue = new JTextField(10);
|
// g1.gridy = 1;
|
// leftPanel2.add(tfDefValue, g1);
|
// combDefValue = new JComboBox();
|
// combDefValue.setPreferredSize(new Dimension(120, 25));
|
// leftPanel2.add(combDefValue, g1);
|
//屏蔽使用量纲前 ----end
|
|
//屏蔽使用量纲后 ----start
|
GridBagConstraints g = new GridBagConstraints();
|
g.insets = new Insets(15, 10, 5, 10);
|
g.gridx = 0;
|
g.gridy = 0;
|
g.anchor = GridBagConstraints.WEST;//add by caill 2016.1.15将“默认值”一列左对齐
|
leftPanel2.add(cbNull,g); //add by caill 2016.1.15将“允许为空”放到“默认值”的上面
|
g.gridy = 1;
|
leftPanel2.add(new JLabel("默认值"), g);
|
|
GridBagConstraints g1 = new GridBagConstraints();
|
g1.insets = new Insets(15, 10, 5, 10);
|
g1.gridx = 1;
|
g1.gridy = 1; //add by caill 2016.1.15将下拉框下移
|
//g1.weightx = 1.0;
|
g1.gridwidth = GridBagConstraints.REMAINDER;
|
tfDefValue = new JTextField(30);//add by caill 2016.1.15调整默认值文本框的长度
|
leftPanel2.add(tfDefValue, g1);
|
combDefValue = new JComboBox();
|
combDefValue.setPreferredSize(new Dimension(187, 25));//add by caill 2016.1.15调整默认值下拉框的长度
|
leftPanel2.add(combDefValue, g1);
|
//屏蔽使用量纲后 ----end
|
|
//设置右边panel的控件
|
rightPanel.setBorder(BorderFactory.createTitledBorder("值域"));
|
rightPanel.setLayout(new GridBagLayout());
|
|
rightPanel1 = new JPanel();
|
rightPanel2 = new JPanel();
|
rightPanel3 = new JPanel();
|
|
GridBagConstraints gRight = new GridBagConstraints();
|
gRight.gridx = 0;
|
gRight.gridy = 0;
|
gRight.weightx = 1.0;
|
gRight.weighty = 1.0;
|
gRight.fill = GridBagConstraints.BOTH;
|
|
JScrollPane spRP1 = new JScrollPane();
|
spRP1.setBorder(null);
|
spRP1.setViewportView(rightPanel1);
|
JScrollPane spRP2 = new JScrollPane();
|
spRP2.setBorder(null);
|
spRP2.setViewportView(rightPanel2);
|
JScrollPane spRP3 = new JScrollPane();
|
spRP3.setBorder(null);
|
spRP3.setViewportView(rightPanel3);
|
|
rightPanel.add(spRP1, gRight);
|
gRight.gridy = 1;
|
rightPanel.add(spRP2, gRight);
|
gRight.gridy = 2;
|
rightPanel.add(spRP3, gRight);
|
|
//值域输入框
|
chbEnum = new JCheckBox("使用枚举");
|
combEnum = new JComboBox();
|
combEnum.setVisible(false);
|
combEnum.setPreferredSize(new Dimension(187, 25));//add by caill 2016.1.15调整“使用枚举”下面的下拉框大小
|
tfRage = new JTextField(30);//add by caill 2016.1.15调整“使用枚举”下面的文本框大小
|
//tfRage.setPreferredSize(new Dimension(200, 30));
|
rightPanel1.setLayout(new GridBagLayout());
|
GridBagConstraints grigth1 = new GridBagConstraints();
|
grigth1.anchor = GridBagConstraints.WEST;
|
grigth1.insets = new Insets(5, 5, 5, 5);
|
grigth1.gridx = 0;
|
grigth1.gridy = 0;
|
grigth1.gridwidth = GridBagConstraints.REMAINDER;
|
rightPanel1.add(chbEnum, grigth1);
|
grigth1.gridy = 1;
|
rightPanel1.add(combEnum, grigth1);
|
rightPanel1.add(tfRage, grigth1);
|
//当选择btnRage时, 值域输入框切换为区间选择框
|
combRage1 = new JComboBox();
|
combRage2 = new JComboBox();
|
combRage1.setPreferredSize(new Dimension(50, 20));
|
combRage2.setPreferredSize(new Dimension(50, 20));
|
combRage1.addItem("(");
|
combRage1.addItem("[");
|
combRage2.addItem(")");
|
combRage2.addItem("]");
|
tfRage1 = new JTextField(5);
|
tfRage2 = new JTextField(5);
|
btnRageAdd = new JButton("+");
|
|
|
btnLar = new JButton(">");
|
btnSma = new JButton("<");
|
btnLarE = new JButton(">=");
|
btnSmaE = new JButton("<=");
|
btnEqu = new JButton("=");
|
btnUnEqu = new JButton("!=");
|
btnRage = new JButton("([])");
|
|
|
rightPanel2.setLayout(new GridBagLayout());
|
GridBagConstraints gRP2 = new GridBagConstraints();
|
gRP2.gridx = 0;
|
gRP2.gridy = 0;
|
rightPanel2.add(btnLar, gRP2);
|
gRP2.gridx = 1;
|
rightPanel2.add(btnSma, gRP2);
|
gRP2.gridx = 2;
|
rightPanel2.add(btnLarE, gRP2);
|
gRP2.gridx = 3;
|
gRP2.gridwidth = 0;
|
rightPanel2.add(btnSmaE, gRP2);
|
gRP2.gridx = 0;
|
gRP2.gridy = 1;
|
gRP2.gridwidth = 1;
|
rightPanel2.add(btnEqu, gRP2);
|
gRP2.gridx = 1;
|
rightPanel2.add(btnUnEqu, gRP2);
|
gRP2.gridx = 2;
|
gRP2.gridwidth = 0;
|
rightPanel2.add(btnRage, gRP2);
|
|
rightPanel3.setLayout(new GridBagLayout());
|
taRage = new JTextArea(4, 20);
|
taRage.setLineWrap(true);
|
GridBagConstraints gr3 = new GridBagConstraints();
|
gr3.insets = new Insets(5, 5, 5, 5); //add by caill 2016.1.16调整文本域和“-”之间的距离
|
gr3.gridx = 0;
|
gr3.gridy = 0;
|
gr3.weightx = 0;
|
rightPanel3.add(new JScrollPane(taRage), gr3);
|
gr3.anchor = GridBagConstraints.NORTHWEST;
|
gr3.gridx = 1;
|
gr3.gridwidth = GridBagConstraints.REMAINDER;
|
gr3.insets = new Insets(5, 5, 5, 38);//add by caill 2016.1.16调整文本域和“-”的位置
|
btnRemove = new JButton("-");
|
rightPanel3.add(btnRemove, gr3);
|
|
combDefValue.setVisible(false);
|
initCombEnum();
|
}
|
|
public void addListener(){
|
chbEnum.addItemListener(new ItemListener() {
|
|
@Override
|
public void itemStateChanged(ItemEvent e) {
|
if(chbEnum.isSelected()){
|
combEnum.setVisible(true);
|
tfRage.setVisible(false);
|
btnEqu.setVisible(false);
|
btnRemove.setVisible(false);
|
|
tfDefValue.setVisible(false);
|
combDefValue.setVisible(true);
|
//add by caill start 2016.1.15 当选择属性时,区间显示按钮不显示
|
btnLar.setVisible(false);
|
btnSma.setVisible(false);
|
btnLarE.setVisible(false);
|
btnSmaE.setVisible(false);
|
btnUnEqu.setVisible(false);
|
btnRage.setVisible(false);
|
//add by caill end
|
}else{
|
taRage.setText("");
|
combEnum.setVisible(false);
|
tfRage.setVisible(true);
|
btnEqu.setVisible(true);
|
btnRemove.setVisible(true);
|
|
tfDefValue.setVisible(true);
|
combDefValue.setVisible(false);
|
}
|
setTaRageForEnum();
|
}
|
});
|
|
combEnum.addItemListener(new ItemListener() {
|
|
@Override
|
public void itemStateChanged(ItemEvent e) {
|
setTaRageForEnum();
|
}
|
});
|
btnLar.addActionListener(new ActionListener() {
|
|
@Override
|
public void actionPerformed(ActionEvent e) {
|
if(rageFlag){
|
rageFlag = false;
|
rightPanel1.removeAll();
|
rightPanel1.add(tfRage);
|
rightPanel1.updateUI();
|
return;
|
}
|
String rageStr = tfRage.getText();
|
int rageInt;
|
if(rageStr.equals("")){
|
return;
|
}
|
try{
|
rageInt = Integer.parseInt(rageStr);
|
}catch (NumberFormatException e1){
|
JOptionPane.showMessageDialog(null, "请输入数字");
|
tfRage.setText("");
|
return;
|
}
|
|
String str = ">" + rageInt;
|
if(taRage.getText().equals("")){
|
taRage.setText(str);
|
}else if(taRage.getText().contains(str)){
|
JOptionPane.showMessageDialog(null, "该值域规则已经存在");
|
}else{
|
taRage.setText(taRage.getText() + "\n" + str);
|
}
|
|
}
|
});
|
|
btnSma.addActionListener(new ActionListener() {
|
|
@Override
|
public void actionPerformed(ActionEvent e) {
|
if(rageFlag){
|
rageFlag = false;
|
rightPanel1.removeAll();
|
rightPanel1.add(tfRage);
|
rightPanel1.updateUI();
|
return;
|
}
|
String rageStr = tfRage.getText();
|
int rageInt;
|
if(rageStr.equals("")){
|
return;
|
}
|
try{
|
rageInt = Integer.parseInt(rageStr);
|
}catch (NumberFormatException e1){
|
JOptionPane.showMessageDialog(null, "请输入数字");
|
tfRage.setText("");
|
return;
|
}
|
|
String str = "<" + rageInt;
|
if(taRage.getText().equals("")){
|
taRage.setText(str);
|
}else if(taRage.getText().contains(str)){
|
JOptionPane.showMessageDialog(null, "该值域规则已经存在");
|
}else{
|
taRage.setText(taRage.getText() + "\n" + str);
|
}
|
|
}
|
});
|
|
btnEqu.addActionListener(new ActionListener() {
|
|
@Override
|
public void actionPerformed(ActionEvent e) {
|
if(rageFlag){
|
rageFlag = false;
|
rightPanel1.removeAll();
|
rightPanel1.add(tfRage);
|
rightPanel1.updateUI();
|
return;
|
}
|
String rageStr = tfRage.getText();
|
if(rageStr.equals("")){
|
return;
|
}
|
int rageInt;
|
try{
|
rageInt = Integer.parseInt(rageStr);
|
}catch (NumberFormatException e1){
|
JOptionPane.showMessageDialog(null, "请输入数字");
|
tfRage.setText("");
|
return;
|
}
|
String str = "=" + rageInt;
|
if(taRage.getText().equals("")){
|
taRage.setText(str);
|
}else if(taRage.getText().contains(str)){
|
JOptionPane.showMessageDialog(null, "该值域规则已经存在");
|
}else{
|
taRage.setText(taRage.getText() + "\n" + str);
|
}
|
}
|
});
|
|
btnLarE.addActionListener(new ActionListener() {
|
|
@Override
|
public void actionPerformed(ActionEvent e) {
|
if(rageFlag){
|
rageFlag = false;
|
rightPanel1.removeAll();
|
rightPanel1.add(tfRage);
|
rightPanel1.updateUI();
|
return;
|
}
|
String rageStr = tfRage.getText();
|
int rageInt;
|
if(rageStr.equals("")){
|
return;
|
}
|
try{
|
rageInt = Integer.parseInt(rageStr);
|
}catch (NumberFormatException e1){
|
JOptionPane.showMessageDialog(null, "请输入数字");
|
tfRage.setText("");
|
return;
|
}
|
|
String str = ">=" + rageInt;
|
if(taRage.getText().equals("")){
|
taRage.setText(str);
|
}else if(taRage.getText().contains(str)){
|
JOptionPane.showMessageDialog(null, "该值域规则已经存在");
|
}else{
|
taRage.setText(taRage.getText() + "\n" + str);
|
}
|
|
}
|
});
|
|
btnSmaE.addActionListener(new ActionListener() {
|
|
@Override
|
public void actionPerformed(ActionEvent e) {
|
if(rageFlag){
|
rageFlag = false;
|
rightPanel1.removeAll();
|
rightPanel1.add(tfRage);
|
rightPanel1.updateUI();
|
return;
|
}
|
String rageStr = tfRage.getText();
|
int rageInt;
|
if(rageStr.equals("")){
|
return;
|
}
|
try{
|
rageInt = Integer.parseInt(rageStr);
|
}catch (NumberFormatException e1){
|
JOptionPane.showMessageDialog(null, "请输入数字");
|
tfRage.setText("");
|
return;
|
}
|
|
String str = "<=" + rageInt;
|
if(taRage.getText().equals("")){
|
taRage.setText(str);
|
}else if(taRage.getText().contains(str)){
|
JOptionPane.showMessageDialog(null, "该值域规则已经存在");
|
}else{
|
taRage.setText(taRage.getText() + "\n" + str);
|
}
|
|
}
|
});
|
|
btnUnEqu.addActionListener(new ActionListener() {
|
|
@Override
|
public void actionPerformed(ActionEvent e) {
|
if(rageFlag){
|
rageFlag = false;
|
rightPanel1.removeAll();
|
rightPanel1.add(tfRage);
|
rightPanel1.updateUI();
|
return;
|
}
|
|
String rageStr = tfRage.getText();
|
int rageInt;
|
if(rageStr.equals("")){
|
return;
|
}
|
try{
|
rageInt = Integer.parseInt(rageStr);
|
}catch (NumberFormatException e1){
|
JOptionPane.showMessageDialog(null, "请输入数字");
|
tfRage.setText("");
|
return;
|
}
|
|
String str = "!=" + rageInt;
|
if(taRage.getText().equals("")){
|
taRage.setText(str);
|
}else if(taRage.getText().contains(str)){
|
JOptionPane.showMessageDialog(null, "该值域规则已经存在");
|
}else{
|
taRage.setText(taRage.getText() + "\n" + str);
|
}
|
|
}
|
});
|
|
//将输入框切换为区间选择框
|
btnRage.addActionListener(new ActionListener() {
|
|
@Override
|
public void actionPerformed(ActionEvent e) {
|
if(rageFlag){
|
return;
|
}else{
|
rageFlag = true;
|
rightPanel1.removeAll();
|
rightPanel1.add(combRage1);
|
rightPanel1.add(tfRage1);
|
rightPanel1.add(new JLabel(","));
|
rightPanel1.add(tfRage2);
|
rightPanel1.add(combRage2);
|
rightPanel1.add(btnRageAdd);
|
rightPanel1.updateUI();
|
}
|
|
}
|
});
|
|
btnRageAdd.addActionListener(new ActionListener() {
|
|
@Override
|
public void actionPerformed(ActionEvent e) {
|
String rage1 = tfRage1.getText();
|
if(rage1.equals("") || !rage1.matches("[-+]?[0-9]*")){
|
JOptionPane.showMessageDialog(null, "请输入数字(左)");
|
tfRage1.setText("");
|
return;
|
}
|
|
String rage2 = tfRage2.getText();
|
if(rage2.equals("") || !rage2.matches("[-+]?[0-9]*")){
|
JOptionPane.showMessageDialog(null, "请输入数字(右)");
|
tfRage2.setText("");
|
return;
|
}
|
if(Integer.valueOf(rage1) >= Integer.valueOf(rage2)){
|
JOptionPane.showMessageDialog(null, "无效区间,请重新输入");
|
return;
|
}
|
String str = combRage1.getSelectedItem() + rage1 + "," + rage2 + combRage2.getSelectedItem();
|
if(taRage.getText().equals("")){
|
taRage.setText(str);
|
}else if(taRage.getText().contains(str)){
|
JOptionPane.showMessageDialog(null, "该值域规则已经存在");
|
}else{
|
taRage.setText(taRage.getText() + "\n" + str);
|
}
|
}
|
});
|
btnRemove.addActionListener(new ActionListener() {
|
|
@Override
|
public void actionPerformed(ActionEvent e) {
|
int lastN = taRage.getText().lastIndexOf("\n");
|
if(lastN > 0){
|
taRage.setText(taRage.getText().substring(0, lastN));
|
}else{
|
taRage.setText("");
|
}
|
|
}
|
});
|
}
|
|
/**
|
* 枚举选择框
|
*/
|
private void initCombEnum(){
|
enumMap = new GetEnumForOut().getEnumMap("Integer");
|
combEnum.removeAllItems();
|
|
if(enumMap == null){
|
return;
|
}
|
for(Iterator<String> i = enumMap.keySet().iterator(); i.hasNext();){
|
String emName = i.next();
|
combEnum.addItem(emName);
|
}
|
|
setTaRageForEnum();
|
}
|
|
/**
|
* 默认值选择框
|
*/
|
private void initCombDefValue(){
|
combDefValue.removeAllItems();
|
if(valueList == null || valueList.size() == 0){
|
return;
|
}
|
for(int i = 0; i < valueList.size(); i++){
|
combDefValue.addItem(valueList.get(i));
|
}
|
}
|
private void setTaRageForEnum(){
|
if(!chbEnum.isSelected()){
|
return;
|
}
|
valueList = new ArrayList<String>();
|
String emName = (String) combEnum.getSelectedItem();
|
if(emName == null || emName.equals("")){
|
return;
|
}
|
|
valueList = enumMap.get(emName);
|
String taRageText = "";
|
for(int i = 0; i < valueList.size(); i++){
|
taRageText = taRageText + valueList.get(i);
|
if(i < valueList.size() - 1){
|
taRageText = taRageText + "\n";
|
}
|
}
|
|
taRage.setText(taRageText);
|
|
initCombDefValue();
|
}
|
/**
|
* 获取VTDataType的详细信息
|
* @return
|
*/
|
public HashMap<String, String> getDetailInfo(){
|
detailInfoMap = new HashMap<String, String>();
|
String otherValue = "";
|
|
if(tfDefValue.isVisible()){
|
detailInfoMap.put(VTDataTypePanel.DEFVALUE, tfDefValue.getText());
|
}else{
|
detailInfoMap.put(VTDataTypePanel.DEFVALUE, (String)combDefValue.getSelectedItem());
|
}
|
detailInfoMap.put(VTDataTypePanel.RAGE, taRage.getText().replace("\n", ";"));
|
|
|
// otherValue += VTDataTypePanel.DIMENSION + " = " +
|
// (String)combDim.getSelectedItem() + ";";
|
if(cbNull.isSelected()){
|
otherValue += VTDataTypePanel.ALLOWNULL + " = yes;";
|
}else{
|
otherValue += VTDataTypePanel.ALLOWNULL + " = no;";
|
}
|
|
// if(cbFixLen.isSelected()){
|
// otherValue += VTDataTypePanel.ISFIXLEN + " = yes;";
|
// }else{
|
// otherValue += VTDataTypePanel.ISFIXLEN + " = no;";
|
// }
|
|
otherValue = otherValue.substring(0, otherValue.lastIndexOf(";"));
|
detailInfoMap.put(VTDataTypePanel.OTHER, otherValue);
|
return detailInfoMap;
|
}
|
|
/**
|
* 根据当前状态(查看,创建,修改), 设置相关组件的显示情况
|
* @param flag
|
*/
|
public void updataUIStatus(AttribItem abItem, int flag){
|
if(abItem != null){
|
tfDefValue.setText(abItem.defValue);
|
taRage.setText(abItem.rage.replace(";", "\n"));
|
// String other = abItem.other;
|
// String dimension = getOtherValueByType(other, "dimension");
|
// combDim.setSelectedItem(dimension);
|
}
|
if(flag == 0){
|
cbNull.setEnabled(false);
|
// cbFixLen.setEnabled(false);
|
// combDim.setEnabled(false);
|
tfDefValue.setEditable(false);
|
|
|
//值域输入组件群
|
{
|
chbEnum.setVisible(false);
|
tfRage.setVisible(false);
|
btnLar.setVisible(false);
|
btnSma.setVisible(false);
|
btnLarE.setVisible(false);
|
btnSmaE.setVisible(false);
|
btnEqu.setVisible(false);
|
btnRage.setVisible(false);
|
btnUnEqu.setVisible(false);
|
}
|
|
//值域显示组件群
|
{
|
taRage.setEditable(false);
|
btnRemove.setVisible(false);
|
}
|
}
|
|
if(flag == 1 || flag == 2){
|
cbNull.setEnabled(true);
|
// cbFixLen.setEnabled(true);
|
// combDim.setEnabled(true);
|
tfDefValue.setEditable(true);
|
|
|
//值域输入组件群
|
{
|
chbEnum.setVisible(true);
|
tfRage.setVisible(true);
|
btnLar.setVisible(true);
|
btnSma.setVisible(true);
|
btnLarE.setVisible(true);
|
btnSmaE.setVisible(true);
|
btnEqu.setVisible(true);
|
btnRage.setVisible(true);
|
btnUnEqu.setVisible(true);
|
}
|
|
//值域显示组件群
|
{
|
taRage.setEditable(true);
|
btnRemove.setVisible(true);
|
}
|
}
|
|
}
|
|
}
|