示例#1
0
 /** Creates new form AttributeProp */
 public AttributeProp(AttributeDraft atrd, ImporterUI importerUI) {
   this.attr = atrd;
   this.importerUI = importerUI;
   initComponents();
   setType(atrd.getJavaType());
   setRole(atrd.getRole().toString());
   setAttrName(atrd.getName());
 }
示例#2
0
 private void cbRoleItemStateChanged(
     java.awt.event.ItemEvent evt) { // GEN-FIRST:event_cbRoleItemStateChanged
   if (evt.getStateChange() == ItemEvent.SELECTED) {
     String strRole = (String) cbRole.getSelectedItem();
     AttributeRole role = BasicAttrRole.valueOf(strRole.toUpperCase());
     if (attr.getRole() != role) {
       attr.setRole(role);
       LOG.info("attr {} role changed to {}", attr.getName(), role.toString());
       importerUI.fireImporterChanged();
     }
   }
 } // GEN-LAST:event_cbRoleItemStateChanged
示例#3
0
 private void cbTypeItemStateChanged(
     java.awt.event.ItemEvent evt) { // GEN-FIRST:event_cbTypeItemStateChanged
   if (evt.getStateChange() == ItemEvent.SELECTED) {
     String item = (String) cbType.getSelectedItem();
     Class<?> type = stringToClass(item);
     if (type != attr.getJavaType()) {
       attr.setJavaType(type);
       LOG.info("attr {} type changed to {}", attr.getName(), type);
       importerUI.fireImporterChanged();
     }
   }
 } // GEN-LAST:event_cbTypeItemStateChanged
示例#4
0
 private void chckImportActionPerformed(
     java.awt.event.ActionEvent evt) { // GEN-FIRST:event_chckImportActionPerformed
   attr.setSkipped(chckImport.isSelected());
   importerUI.fireImporterChanged();
 } // GEN-LAST:event_chckImportActionPerformed
示例#5
0
 private void tfNameActionPerformed(
     java.awt.event.ActionEvent evt) { // GEN-FIRST:event_tfNameActionPerformed
   attr.setName(tfName.getName());
   // TODO: call reload
   importerUI.fireImporterChanged();
 } // GEN-LAST:event_tfNameActionPerformed