Ejemplo n.º 1
0
 public void setEditable(boolean isEditable) {
   isEditable_ = isEditable;
   if (inputType_.equals("ALPHA") || inputType_.equals("KANJI") || inputType_.equals("NUMERIC")) {
     ((JTextField) component).setEditable(isEditable_);
     ((JTextField) component).setFocusable(isEditable_);
   }
   if (inputType_.equals("DATE")) {
     ((XFDateField) component).setEditable(isEditable_);
     ((XFDateField) component).setFocusable(isEditable_);
     int fieldWidth = XFUtility.getWidthOfDateValue(dialog_.getSession().getDateFormat(), 14);
     if (isEditable_) {
       this.setBounds(
           this.getBounds().x, this.getBounds().y, 150 + fieldWidth, XFUtility.FIELD_UNIT_HEIGHT);
     } else {
       this.setBounds(
           this.getBounds().x, this.getBounds().y, 124 + fieldWidth, XFUtility.FIELD_UNIT_HEIGHT);
     }
   }
   if (inputType_.equals("LISTBOX")) {
     ((JComboBox) component).setEditable(isEditable_);
     ((JComboBox) component).setFocusable(isEditable_);
   }
   if (inputType_.equals("CHECKBOX")) {
     ((JCheckBox) component).setEnabled(isEditable_);
     ((JCheckBox) component).setFocusable(isEditable_);
   }
 }