forked from External/mage
Big refactoring
I used Intellij IDEA to automatically refactor code to achive 3 goals. 1) get rid of anonymouse classes, and replace the with lamba to get more readeable and clean code (like in TableWaitingDialog). 2) make effectively final variables actually final to avoid inadvertent changes on it in further releases and keep objects as immutable, as possible. 3) Get rid of unused imports (most of the changes) in whole project classes.
This commit is contained in:
parent
a9f2c8c407
commit
076840df53
247 changed files with 1919 additions and 3682 deletions
|
|
@ -134,28 +134,16 @@ public class PickChoiceDialog extends MageDialog {
|
|||
|
||||
btnAutoSelect.setText("Auto select");
|
||||
btnAutoSelect.setToolTipText("If you select an effect with \"Auto select\", this effect will be selected the next time automatically first.");
|
||||
btnAutoSelect.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
btnAutoSelectActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
btnAutoSelect.addActionListener(evt -> btnAutoSelectActionPerformed(evt));
|
||||
|
||||
btnCancel.setText("Cancel");
|
||||
btnCancel.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
btnCancelActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
btnCancel.addActionListener(evt -> btnCancelActionPerformed(evt));
|
||||
|
||||
btnOk.setText("OK");
|
||||
btnOk.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
btnOkActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
btnOk.addActionListener(evt -> btnOkActionPerformed(evt));
|
||||
|
||||
lstChoices.setModel(new javax.swing.AbstractListModel() {
|
||||
String[] strings = { "Item 1", "Item 2", "Item 3", "Item 4", "Item 5" };
|
||||
final String[] strings = { "Item 1", "Item 2", "Item 3", "Item 4", "Item 5" };
|
||||
public int getSize() { return strings.length; }
|
||||
public Object getElementAt(int i) { return strings[i]; }
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue