skipPreExtensionJS.setSelected(false);
}
}
});
this.preExtensionJS.addFocusListener(new FocusListener() {
@Override
public void focusGained(FocusEvent fe) {
}
@Override
public void focusLost(FocusEvent fe) {
String text = preExtensionJS.getText();
if (text == null || text.trim().isEmpty()) {
text = "min";
preExtensionJS.setText(text);
} else {
text = text.trim();
}
minifyProperty.setPreExtensionJS(text);
}
});
this.separatorJS.addFocusListener(new FocusListener() {
@Override
public void focusGained(FocusEvent fe) {
}
@Override
public void focusLost(FocusEvent fe) {
String text = separatorJS.getText();
if (text == null || text.trim().isEmpty()) {
text = ".";
} else {
text = String.valueOf(text.trim().charAt(0));
}
if (text.equals("<") || text.equals(">")
|| text.equals(":") || text.equals("/")
|| text.equals("\\") || text.equals("|")
|| text.equals("?") || text.equals("*")) {
text = ".";
}
separatorJS.setText(text);
minifyProperty.setSeparatorJS(text.charAt(0));
}
});
this.jsObfuscate.addItemListener(new ItemListener() {
@Override
public void itemStateChanged(ItemEvent e) {
if (e.getStateChange() == ItemEvent.SELECTED) {
minifyProperty.setJsObfuscate(Boolean.TRUE);
} else {
minifyProperty.setJsObfuscate(Boolean.FALSE);
}
}
});
newCSSFile.setSelected(minifyProperty.isNewCSSFile());
preExtensionCSS.setEnabled(minifyProperty.isNewCSSFile());
preExtensionCSS_Label.setEnabled(minifyProperty.isNewCSSFile());
separatorCSS.setEnabled(minifyProperty.isNewCSSFile());
separatorCSS_Label.setEnabled(minifyProperty.isNewCSSFile());
skipPreExtensionCSS.setEnabled(minifyProperty.isNewCSSFile());
this.preExtensionCSS.setText(minifyProperty.getPreExtensionCSS());
this.separatorCSS.setText(minifyProperty.getSeparatorCSS().toString());
this.newCSSFile.addItemListener(new ItemListener() {
@Override
public void itemStateChanged(ItemEvent e) {
if (e.getStateChange() == ItemEvent.SELECTED) {
minifyProperty.setNewCSSFile(Boolean.TRUE);
minifyProperty.setPreExtensionCSS("min");
preExtensionCSS.setText("min");
minifyProperty.setSeparatorCSS('.');
separatorCSS.setText(".");
preExtensionCSS.setEnabled(Boolean.TRUE);
preExtensionCSS_Label.setEnabled(Boolean.TRUE);
separatorCSS.setEnabled(Boolean.TRUE);
separatorCSS_Label.setEnabled(Boolean.TRUE);
if (minifyProperty.isBuildCSSMinify() && minifyProperty.isNewCSSFile()) {
skipPreExtensionCSS.setEnabled(Boolean.TRUE);
minifyProperty.setSkipPreExtensionCSS(Boolean.TRUE);
skipPreExtensionCSS.setSelected(Boolean.TRUE);
}
} else {
minifyProperty.setNewCSSFile(Boolean.FALSE);
preExtensionCSS.setEnabled(Boolean.FALSE);
preExtensionCSS_Label.setEnabled(Boolean.FALSE);
separatorCSS.setEnabled(Boolean.FALSE);
separatorCSS_Label.setEnabled(Boolean.FALSE);
skipPreExtensionCSS.setEnabled(Boolean.FALSE);
minifyProperty.setSkipPreExtensionCSS(Boolean.FALSE);
skipPreExtensionCSS.setSelected(Boolean.FALSE);
}
}
});
this.preExtensionCSS.addFocusListener(new FocusListener() {
@Override
public void focusGained(FocusEvent fe) {
}
@Override
public void focusLost(FocusEvent fe) {
String text = preExtensionCSS.getText();
if (text == null || text.trim().isEmpty()) {
text = "min";
preExtensionCSS.setText(text);
} else {
text = text.trim();
}
minifyProperty.setPreExtensionCSS(text);
}
});
this.separatorCSS.addFocusListener(new FocusListener() {
@Override
public void focusGained(FocusEvent fe) {
}
@Override
public void focusLost(FocusEvent fe) {
String text = separatorCSS.getText();
if (text == null || text.trim().isEmpty()) {
text = ".";
} else {
text = String.valueOf(text.trim().charAt(0));
}
if (text.equals("<") || text.equals(">")
|| text.equals(":") || text.equals("/")
|| text.equals("\\") || text.equals("|")
|| text.equals("?") || text.equals("*")) {
text = ".";
}
separatorCSS.setText(text);
minifyProperty.setSeparatorCSS(text.charAt(0));
}
});
//---------------------------------------------------------------------------------------------//
/* HTML Minify Setting */
newHTMLFile.setSelected(minifyProperty.isNewHTMLFile());
preExtensionHTML.setEnabled(minifyProperty.isNewHTMLFile());
preExtensionHTML_Label.setEnabled(minifyProperty.isNewHTMLFile());
separatorHTML.setEnabled(minifyProperty.isNewHTMLFile());
separatorHTML_Label.setEnabled(minifyProperty.isNewHTMLFile());
skipPreExtensionHTML.setEnabled(minifyProperty.isNewHTMLFile());
this.preExtensionHTML.setText(minifyProperty.getPreExtensionHTML());
this.separatorHTML.setText(minifyProperty.getSeparatorHTML().toString());
this.newHTMLFile.addItemListener(new ItemListener() {
@Override
public void itemStateChanged(ItemEvent e) {
if (e.getStateChange() == ItemEvent.SELECTED) {
minifyProperty.setNewHTMLFile(Boolean.TRUE);
minifyProperty.setPreExtensionHTML("min");
preExtensionHTML.setText("min");
minifyProperty.setSeparatorHTML('.');
separatorHTML.setText(".");
preExtensionHTML.setEnabled(Boolean.TRUE);
preExtensionHTML_Label.setEnabled(Boolean.TRUE);
separatorHTML.setEnabled(Boolean.TRUE);
separatorHTML_Label.setEnabled(Boolean.TRUE);
if (minifyProperty.isBuildHTMLMinify() && minifyProperty.isNewHTMLFile()) {
skipPreExtensionHTML.setEnabled(Boolean.TRUE);
minifyProperty.setSkipPreExtensionHTML(Boolean.TRUE);
skipPreExtensionHTML.setSelected(Boolean.TRUE);
}
} else {
minifyProperty.setNewHTMLFile(Boolean.FALSE);
// minifyProperty.setPreExtensionHTML(null);
// preExtensionHTML.setText("");
// minifyProperty.setSeparatorHTML(null);
// separatorHTML.setText("");
preExtensionHTML.setEnabled(Boolean.FALSE);
preExtensionHTML_Label.setEnabled(Boolean.FALSE);
separatorHTML.setEnabled(Boolean.FALSE);
separatorHTML_Label.setEnabled(Boolean.FALSE);
skipPreExtensionHTML.setEnabled(Boolean.FALSE);
minifyProperty.setSkipPreExtensionHTML(Boolean.FALSE);
skipPreExtensionHTML.setSelected(Boolean.FALSE);
}
//minifyPropertyController.writeMinifyProperty(minifyProperty);
}
});
this.preExtensionHTML.addFocusListener(new FocusListener() {
@Override
public void focusGained(FocusEvent fe) {
}
@Override
public void focusLost(FocusEvent fe) {
String text = preExtensionHTML.getText();
if (text == null || text.trim().isEmpty()) {
text = "min";
preExtensionHTML.setText(text);
} else {
text = text.trim();
}
minifyProperty.setPreExtensionHTML(text);
//minifyPropertyController.writeMinifyProperty(minifyProperty);
}
});
this.separatorHTML.addFocusListener(new FocusListener() {
@Override
public void focusGained(FocusEvent fe) {
}
@Override
public void focusLost(FocusEvent fe) {
String text = separatorHTML.getText();
if (text == null || text.trim().isEmpty()) {
text = ".";
} else {
text = String.valueOf(text.trim().charAt(0));
}
if (text.equals("<") || text.equals(">")
|| text.equals(":") || text.equals("/")
|| text.equals("\\") || text.equals("|")
|| text.equals("?") || text.equals("*")) {
text = ".";
}
separatorHTML.setText(text);
minifyProperty.setSeparatorHTML(text.charAt(0));
//minifyPropertyController.writeMinifyProperty(minifyProperty);
}
});
if (minifyProperty.isBuildInternalCSSMinify()) {
this.buildInternalCSSMinify.setSelected(Boolean.TRUE);
}
if (minifyProperty.isBuildInternalJSMinify()) {
this.buildInternalJSMinify.setSelected(Boolean.TRUE);
}
this.buildInternalCSSMinify.addItemListener(new ItemListener() {
@Override
public void itemStateChanged(ItemEvent e) {
if (e.getStateChange() == ItemEvent.SELECTED) {
minifyProperty.setBuildInternalCSSMinify(Boolean.TRUE);
} else {
minifyProperty.setBuildInternalCSSMinify(Boolean.FALSE);
}
//minifyPropertyController.writeMinifyProperty(minifyProperty);
}
});
this.buildInternalJSMinify.addItemListener(new ItemListener() {
@Override
public void itemStateChanged(ItemEvent e) {
if (e.getStateChange() == ItemEvent.SELECTED) {
minifyProperty.setBuildInternalJSMinify(Boolean.TRUE);
} else {
minifyProperty.setBuildInternalJSMinify(Boolean.FALSE);
}
//minifyPropertyController.writeMinifyProperty(minifyProperty);
}
});
//-----------------------------------------------------------------------------------------------//
/**
* XML Setting *
*/
newXMLFile.setSelected(minifyProperty.isNewXMLFile());
preExtensionXML.setEnabled(minifyProperty.isNewXMLFile());
preExtensionXML_Label.setEnabled(minifyProperty.isNewXMLFile());
separatorXML.setEnabled(minifyProperty.isNewXMLFile());
separatorXML_Label.setEnabled(minifyProperty.isNewXMLFile());
skipPreExtensionXML.setEnabled(minifyProperty.isNewXMLFile());
this.preExtensionXML.setText(minifyProperty.getPreExtensionXML());
this.separatorXML.setText(minifyProperty.getSeparatorXML().toString());
this.newXMLFile.addItemListener(new ItemListener() {
@Override
public void itemStateChanged(ItemEvent e) {
if (e.getStateChange() == ItemEvent.SELECTED) {
minifyProperty.setNewXMLFile(Boolean.TRUE);
minifyProperty.setPreExtensionXML("min");
preExtensionXML.setText("min");
minifyProperty.setSeparatorXML('.');
separatorXML.setText(".");
preExtensionXML.setEnabled(Boolean.TRUE);
preExtensionXML_Label.setEnabled(Boolean.TRUE);
separatorXML.setEnabled(Boolean.TRUE);
separatorXML_Label.setEnabled(Boolean.TRUE);
if (minifyProperty.isBuildXMLMinify() && minifyProperty.isNewXMLFile()) {
skipPreExtensionXML.setEnabled(Boolean.TRUE);
minifyProperty.setSkipPreExtensionXML(Boolean.TRUE);
skipPreExtensionXML.setSelected(Boolean.TRUE);
}
} else {
minifyProperty.setNewXMLFile(Boolean.FALSE);
preExtensionXML.setEnabled(Boolean.FALSE);
preExtensionXML_Label.setEnabled(Boolean.FALSE);
separatorXML.setEnabled(Boolean.FALSE);
separatorXML_Label.setEnabled(Boolean.FALSE);
skipPreExtensionXML.setEnabled(Boolean.FALSE);
minifyProperty.setSkipPreExtensionXML(Boolean.FALSE);
skipPreExtensionXML.setSelected(Boolean.FALSE);
}
}
});
this.preExtensionXML.addFocusListener(new FocusListener() {
@Override
public void focusGained(FocusEvent fe) {
}
@Override
public void focusLost(FocusEvent fe) {
String text = preExtensionXML.getText();
if (text == null || text.trim().isEmpty()) {
text = "min";
preExtensionXML.setText(text);
} else {
text = text.trim();
}
minifyProperty.setPreExtensionXML(text);
}
});
this.separatorXML.addFocusListener(new FocusListener() {
@Override
public void focusGained(FocusEvent fe) {
}
@Override
public void focusLost(FocusEvent fe) {
String text = separatorXML.getText();
if (text == null || text.trim().isEmpty()) {
text = ".";
} else {
text = String.valueOf(text.trim().charAt(0));
}
if (text.equals("<") || text.equals(">")
|| text.equals(":") || text.equals("/")
|| text.equals("\\") || text.equals("|")
|| text.equals("?") || text.equals("*")) {
text = ".";
}
separatorXML.setText(text);
minifyProperty.setSeparatorXML(text.charAt(0));
}
});
//---------------------------------------------------------------------------------------------//
/**
* JSON Setting *
*/
newJSONFile.setSelected(minifyProperty.isNewJSONFile());
preExtensionJSON.setEnabled(minifyProperty.isNewJSONFile());
preExtensionJSON_Label.setEnabled(minifyProperty.isNewJSONFile());
separatorJSON.setEnabled(minifyProperty.isNewJSONFile());
separatorJSON_Label.setEnabled(minifyProperty.isNewJSONFile());
skipPreExtensionJSON.setEnabled(minifyProperty.isNewJSONFile());
this.preExtensionJSON.setText(minifyProperty.getPreExtensionJSON());
this.separatorJSON.setText(minifyProperty.getSeparatorJSON().toString());
this.newJSONFile.addItemListener(new ItemListener() {
@Override
public void itemStateChanged(ItemEvent e) {
if (e.getStateChange() == ItemEvent.SELECTED) {
minifyProperty.setNewJSONFile(Boolean.TRUE);
minifyProperty.setPreExtensionJSON("min");
preExtensionJSON.setText("min");
minifyProperty.setSeparatorJSON('.');
separatorJSON.setText(".");
preExtensionJSON.setEnabled(Boolean.TRUE);
preExtensionJSON_Label.setEnabled(Boolean.TRUE);
separatorJSON.setEnabled(Boolean.TRUE);
separatorJSON_Label.setEnabled(Boolean.TRUE);
if (minifyProperty.isBuildJSONMinify() && minifyProperty.isNewJSONFile()) {
skipPreExtensionJSON.setEnabled(Boolean.TRUE);
minifyProperty.setSkipPreExtensionJSON(Boolean.TRUE);
skipPreExtensionJSON.setSelected(Boolean.TRUE);
}
} else {
minifyProperty.setNewJSONFile(Boolean.FALSE);
preExtensionJSON.setEnabled(Boolean.FALSE);
preExtensionJSON_Label.setEnabled(Boolean.FALSE);
separatorJSON.setEnabled(Boolean.FALSE);
separatorJSON_Label.setEnabled(Boolean.FALSE);
skipPreExtensionJSON.setEnabled(Boolean.FALSE);
minifyProperty.setSkipPreExtensionJSON(Boolean.FALSE);
skipPreExtensionJSON.setSelected(Boolean.FALSE);
}
}
});
this.preExtensionJSON.addFocusListener(new FocusListener() {
@Override
public void focusGained(FocusEvent fe) {
}
@Override
public void focusLost(FocusEvent fe) {
String text = preExtensionJSON.getText();
if (text == null || text.trim().isEmpty()) {
text = "min";
preExtensionJSON.setText(text);
} else {
text = text.trim();
}
minifyProperty.setPreExtensionJSON(text);
}
});
this.separatorJSON.addFocusListener(new FocusListener() {
@Override
public void focusGained(FocusEvent fe) {
}
@Override