Conversation
Still a few interface related problems need to be fixed, but functionality for mass conversion is done.
Mass convert for MOS v1 works well, but some bugs still exist. MOS v2 still needs to be tested.
Mingun
left a comment
There was a problem hiding this comment.
I've not checked code in the IDE yet. As I see you mostly move large amounts of code to another place. Unfortunately, GitHub interface don't allow to notice that clearly. I recommend in this case make special commits that just moves existing code with minimal and absolutely necessary changes to facilitate reviewers work. So, can you rebase your changes to follow that suggestion?
You change a GUI in this PR. Can you attach a screenshot or two (before/after) with the notable differences highlighted?
| } | ||
| return this; | ||
| } | ||
| } No newline at end of file |
There was a problem hiding this comment.
There a several files without newline in the end. I think, it is better to have it.
| @@ -0,0 +1,44 @@ | |||
| package org.infinity.gui; | |||
There was a problem hiding this comment.
Please add a license header as in the other files
| @@ -0,0 +1,44 @@ | |||
| package org.infinity.gui; | |||
|
|
|||
| import javax.swing.*; | |||
There was a problem hiding this comment.
It is better to avoid wildcard imports. They can unexpectedly stop working in new Java versions, because new classes can be added to the packages.
| /** | ||
| * Creates a JProgressBar with the range 0,100. | ||
| */ | ||
| public ProgressCellRenderer(){ |
There was a problem hiding this comment.
Please use consistent code style -- space between braces
| int index = sValue.indexOf('%'); | ||
| if (index != -1) { | ||
| int p = 0; | ||
| try{ |
| bOutputV2.addActionListener(this); | ||
| c = ViewerUtil.setGBC(c, 0, 0, 1, 1, 0.0, 0.0, GridBagConstraints.LINE_START, | ||
| GridBagConstraints.NONE, new Insets(0, 4, 0, 0), 0, 0); | ||
| GridBagConstraints.NONE, new Insets(0, 4, 0, 0), 0, 0); |
There was a problem hiding this comment.
Here and below: seems to be unnecessary whitespace-only change
| // c = ViewerUtil.setGBC(c, 0, 0, 1, 1, 0.0, 0.0, GridBagConstraints.LINE_START, | ||
| // GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0); | ||
| // pButtons.add(cbCloseOnExit, c); |
There was a problem hiding this comment.
Please remove unused code instead of commenting it
| for(String outPutTableFiles : getTableInputPaths()) { | ||
| Path file = FileManager.resolve(outPutTableFiles); | ||
| if(!Files.isRegularFile(file)) { |
There was a problem hiding this comment.
Spaces
| for(String outPutTableFiles : getTableInputPaths()) { | |
| Path file = FileManager.resolve(outPutTableFiles); | |
| if(!Files.isRegularFile(file)) { | |
| for (String outPutTableFiles : getTableInputPaths()) { | |
| Path file = FileManager.resolve(outPutTableFiles); | |
| if (!Files.isRegularFile(file)) { |
| for(File fileSelected : filePaths) { | ||
| System.out.println(fileSelected.getName()); | ||
| } |
There was a problem hiding this comment.
Use Logger or remove
| for(File fileSelected : filePaths) { | |
| System.out.println(fileSelected.getName()); | |
| } | |
| for (File fileSelected : filePaths) { | |
| System.out.println(fileSelected.getName()); | |
| } |
| ArrayList<String> list = new ArrayList<>(); | ||
| if(tfOutputTableV1.getModel().getRowCount() > 0) { | ||
| for (int i = 0; i < tfOutputTableV1.getModel().getRowCount(); i++) { | ||
| list.add(tfOutputTableV1.getModel().getValueAt(i, 0).toString()); | ||
| } |
There was a problem hiding this comment.
At least you can do that:
| ArrayList<String> list = new ArrayList<>(); | |
| if(tfOutputTableV1.getModel().getRowCount() > 0) { | |
| for (int i = 0; i < tfOutputTableV1.getModel().getRowCount(); i++) { | |
| list.add(tfOutputTableV1.getModel().getValueAt(i, 0).toString()); | |
| } | |
| final int count = tfOutputTableV1.getModel().getRowCount(); | |
| if (count > 0) { | |
| final ArrayList<String> list = new ArrayList<>(count); | |
| for (int i = 0; i < count; i++) { | |
| list.add(tfOutputTableV1.getModel().getValueAt(i, 0).toString()); | |
| } |
But it is better to use your own TableModel class which will contain data you need
Here is the GUI before removing the close checkbox. I made this video awhile ago. |
|
Think I addressed many issues. |
|
Nice work! However, I've noticed a couple of issues that should be fixed.
And more of an aesthetic issue, the content of the "PVRZ-based" tab would probably look better if it were aligned at the top. |
|
I think we are in a good spot now. Let me know what you think. |
|
It works nicely now! I'd like to make three more suggestions though:
|
I've added the ability to mass-convert MOS types.