/** 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()); }
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
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
private void chckImportActionPerformed( java.awt.event.ActionEvent evt) { // GEN-FIRST:event_chckImportActionPerformed attr.setSkipped(chckImport.isSelected()); importerUI.fireImporterChanged(); } // GEN-LAST:event_chckImportActionPerformed
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