Skip to content

Commit

Permalink
Code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
benchdoos committed Oct 12, 2018
1 parent b3d2ce7 commit 56fe1c5
Showing 1 changed file with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public class SptFileViewPanel extends JPanel implements Cleanable {
private File original;


public SptFileViewPanel(File original, File folder) throws Exception {
public SptFileViewPanel(File original, File folder) throws IOException {
$$$setupUI$$$();
this.original = original;
this.folder = folder;
Expand Down Expand Up @@ -201,7 +201,6 @@ private void createUIComponents() {
}

private void fillDetailImage(DetailEntity entity) {
Component component = this;
if (entity == null) {
imageButton.setIcon(null);
imageButton.setText("нет изображения");
Expand Down Expand Up @@ -405,13 +404,10 @@ private void initKeyBindings() {
}

private void initKeyListeners() {
Component c = this;
imageButton.addActionListener(e -> {
onImageButton(c);
});
imageButton.addActionListener(e -> onImageButton());
}

private void onImageButton(Component c) {
private void onImageButton() {
final TreeSPTRecord selectedTreeSptRecord = JTreeUtils.getSelectedTreeSptRecord(tree);
if (selectedTreeSptRecord != null) {
DetailEntity entity = selectedTreeSptRecord.getDetail();
Expand Down

0 comments on commit 56fe1c5

Please sign in to comment.