mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-05-26 10:57:26 +00:00
Added Directory selection dialog in directory configs in advanced settings
This commit is contained in:
@@ -454,9 +454,12 @@ public class AdvancedSettingsDialog extends AppDialog {
|
||||
tf.setMaximumSize(new Dimension(Integer.MAX_VALUE, tf.getPreferredSize().height));
|
||||
|
||||
c = tf;
|
||||
if (confFile != null) { //|| confDirectory != null) {
|
||||
if (confFile != null) {
|
||||
c = new ConfigurationFileSelection(item, confFile, val.toString(), description);
|
||||
}
|
||||
if (confDirectory != null) {
|
||||
c = new ConfigurationDirectorySelection(item, val.toString(), description);
|
||||
}
|
||||
} else if (itemType == Boolean.class) {
|
||||
JCheckBox cb = new JCheckBox();
|
||||
cb.setSelected((Boolean) item.get());
|
||||
@@ -493,6 +496,9 @@ public class AdvancedSettingsDialog extends AppDialog {
|
||||
if (toLabelComponent instanceof ConfigurationFileSelection) {
|
||||
toLabelComponent = ((ConfigurationFileSelection) toLabelComponent).getTextField();
|
||||
}
|
||||
if (toLabelComponent instanceof ConfigurationDirectorySelection) {
|
||||
toLabelComponent = ((ConfigurationDirectorySelection) toLabelComponent).getTextField();
|
||||
}
|
||||
l.setLabelFor(toLabelComponent);
|
||||
configPanel.add(c);
|
||||
} catch (IllegalArgumentException | IllegalAccessException ex) {
|
||||
@@ -560,6 +566,8 @@ public class AdvancedSettingsDialog extends AppDialog {
|
||||
Class itemType = (Class<?>) itemType2;
|
||||
if (c instanceof ConfigurationFileSelection) {
|
||||
value = ((ConfigurationFileSelection) c).getValue();
|
||||
} else if (c instanceof ConfigurationDirectorySelection) {
|
||||
value = ((ConfigurationDirectorySelection) c).getValue();
|
||||
} else if (name.equals("gui.skin")) {
|
||||
value = ((SkinSelect) ((JComboBox<SkinSelect>) c).getSelectedItem()).className;
|
||||
} else if (itemType == String.class) {
|
||||
|
||||
Reference in New Issue
Block a user