Skip to content
This repository has been archived by the owner on Jun 12, 2023. It is now read-only.

Commit

Permalink
#29 [Optional Files] Change description from CheckBox for injecting a…
Browse files Browse the repository at this point in the history
…utomatically into the file.
  • Loading branch information
Naoghuman committed Mar 13, 2016
1 parent 4edaf6b commit 7e85e1c
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
1 change: 1 addition & 0 deletions releases/Release_v1.3_2016-03-dd_HH-ss.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ Welcome to `NetBeansIDE-AfterburnerFX-Plugin` with the new release `v1.3`.


#### Refactoring
#37 [Wizard] Add new screenshots for v1.3.
#35 [Wizard] Change description from the CheckBox xy to LowerCase.
#32 [Optional Files] Refactore the description from the CheckBox to create a .properties file.
#30 [Optional Files] Move the CheckBoxes to lowercase to bottom.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,23 +98,26 @@ private void initComponents3() {
});
}

void initValues(String baseName, String packageName,
void initValues(String baseName, String packageName, boolean shouldFXMLtoLowerCase,
boolean shouldCreateCSS, boolean shouldCSStoLowerCase, boolean shouldInjectCSS,
boolean shouldCreateProperties, boolean shouldPropertiesToLowerCase, boolean shouldInjectProperties
) {
this.baseName = baseName;
this.packageName = packageName;

cbShouldCSScreated.setSelected(!shouldCreateCSS);
String info = cbShouldCSSinjected.getText().replace("{0}", baseName); // NOI18N
cbShouldCSSinjected.setText(info);

final String fxmlFileName = shouldFXMLtoLowerCase ? baseName.toLowerCase() : baseName;
cbShouldCSSinjected.setText("Inject the created .css file into the file " + fxmlFileName + ".fxml."); // NOI18N
cbShouldCSSinjected.setSelected(shouldInjectCSS);

cbCSStoLowerCase.setSelected(shouldCSStoLowerCase);

cbShouldPropertiesCreated.setSelected(!shouldCreateProperties);
info = cbShouldPropertiesInjected.getText().replace("{0}", baseName); // NOI18N
cbShouldPropertiesInjected.setText(info);

cbShouldPropertiesInjected.setText("Inject the created .properties file into the file " + fxmlFileName + ".fxml."); // NOI18N
cbShouldPropertiesInjected.setSelected(shouldInjectProperties);

cbPropertiesToLowerCase.setSelected(shouldPropertiesToLowerCase);

cbShouldCSScreated.doClick();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ public void readSettings(WizardDescriptor wiz) {
packageName += File.separator;
}

final boolean shouldFXMLtoLowerCase = NbPreferences.forModule(PluginWizardIterator.class).getBoolean(PROP__FXML_TO_LOWERCASE, Boolean.TRUE);

final boolean shouldCreateCSS = NbPreferences.forModule(PluginWizardIterator.class).getBoolean(PROP__CSS_FILE_SHOULD_CREATE, Boolean.TRUE);
final boolean shouldCSStoLowerCase = NbPreferences.forModule(PluginWizardIterator.class).getBoolean(PROP__CSS_TO_LOWERCASE, Boolean.TRUE);
final boolean shouldInjectCSS = NbPreferences.forModule(PluginWizardIterator.class).getBoolean(PROP__CSS_FILE_SHOULD_INJECT, Boolean.TRUE);
Expand All @@ -77,7 +79,7 @@ public void readSettings(WizardDescriptor wiz) {
final boolean shouldPropertiesToLowerCase = NbPreferences.forModule(PluginWizardIterator.class).getBoolean(PROP__PROPERTIES_TO_LOWERCASE, Boolean.TRUE);
final boolean shouldInjectProperties = NbPreferences.forModule(PluginWizardIterator.class).getBoolean(PROP__PROPERTIES_FILE_SHOULD_INJECT, Boolean.TRUE);

this.getComponent().initValues(baseName, packageName,
this.getComponent().initValues(baseName, packageName, shouldFXMLtoLowerCase,
shouldCreateCSS, shouldCSStoLowerCase, shouldInjectCSS,
shouldCreateProperties, shouldPropertiesToLowerCase, shouldInjectProperties);
}
Expand Down

0 comments on commit 7e85e1c

Please sign in to comment.