Issue#31 Removed method choosenDirectory
This commit is contained in:
parent
2925a8090b
commit
2145d9b4cd
@ -26,8 +26,6 @@ import java.awt.Cursor;
|
|||||||
import java.awt.event.ActionEvent;
|
import java.awt.event.ActionEvent;
|
||||||
import java.awt.event.ActionListener;
|
import java.awt.event.ActionListener;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.IOException;
|
|
||||||
import java.security.NoSuchAlgorithmException;
|
|
||||||
import java.util.ResourceBundle;
|
import java.util.ResourceBundle;
|
||||||
|
|
||||||
import javax.swing.Box;
|
import javax.swing.Box;
|
||||||
@ -84,17 +82,12 @@ public class CheckPanel extends JPanel
|
|||||||
@Override
|
@Override
|
||||||
public void actionPerformed(final ActionEvent e)
|
public void actionPerformed(final ActionEvent e)
|
||||||
{
|
{
|
||||||
try
|
File choosenFile = CheckDirectorySelector.showSelectorDialog(CheckPanel.this, null);
|
||||||
|
if ((choosenFile != null) && choosenFile.exists())
|
||||||
{
|
{
|
||||||
CheckPanel.this.fileToCheckField.setText(choosenDirectory());
|
CheckPanel.this.fileToCheckField.setText(choosenFile.getAbsolutePath());
|
||||||
}
|
CheckPanel.this.fileToCheckField
|
||||||
catch (IOException exception)
|
.setCaretPosition(CheckPanel.this.fileToCheckField.getText().length());
|
||||||
{
|
|
||||||
logger.error("IOexception ", exception);
|
|
||||||
}
|
|
||||||
catch (NoSuchAlgorithmException exception)
|
|
||||||
{
|
|
||||||
logger.error("NoSuchAlgorithm ", exception);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -159,7 +152,6 @@ public class CheckPanel extends JPanel
|
|||||||
{
|
{
|
||||||
logger.error("SibaException ", exception);
|
logger.error("SibaException ", exception);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
btnNewButton_1.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
|
btnNewButton_1.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
|
||||||
@ -170,32 +162,6 @@ public class CheckPanel extends JPanel
|
|||||||
actionPanel.add(verticalStrut_1);
|
actionPanel.add(verticalStrut_1);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @return
|
|
||||||
* @throws IOException
|
|
||||||
* @throws NoSuchAlgorithmException
|
|
||||||
*/
|
|
||||||
public String choosenDirectory() throws IOException, NoSuchAlgorithmException
|
|
||||||
{
|
|
||||||
String result;
|
|
||||||
|
|
||||||
File choosenFile = CheckDirectorySelector.showSelectorDialog(CheckPanel.this, null);
|
|
||||||
if ((choosenFile != null) && choosenFile.exists())
|
|
||||||
{
|
|
||||||
this.fileToCheckField.setText(choosenFile.getAbsolutePath());
|
|
||||||
this.fileToCheckField.setCaretPosition(this.fileToCheckField.getText().length());
|
|
||||||
result = choosenFile.getAbsolutePath();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
result = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param sourceDirectory
|
* @param sourceDirectory
|
||||||
|
Loading…
x
Reference in New Issue
Block a user