рефакторинг
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
package Visual_DVM_2021.UI.Main;
|
||||
import Common.Constants.Constants;
|
||||
import Common.Current;
|
||||
import Common.Database.DBObject;
|
||||
import Common.Global;
|
||||
@@ -188,7 +189,7 @@ public abstract class ComparisonForm<T extends DBObject> {
|
||||
//предполагаем что оба объекта есть и мы можем получить с них текст.
|
||||
protected void Compare() throws Exception {
|
||||
events_on = false;
|
||||
current_diff_line = Utils.Nan;
|
||||
current_diff_line = Constants.Nan;
|
||||
colors.clear();
|
||||
//-----------------------------------------------------------------------------------------------
|
||||
Body.setText("");
|
||||
@@ -252,7 +253,7 @@ public abstract class ComparisonForm<T extends DBObject> {
|
||||
}
|
||||
public void Show() throws Exception {
|
||||
events_on = false;
|
||||
current_diff_line = Utils.Nan;
|
||||
current_diff_line = Constants.Nan;
|
||||
colors.clear();
|
||||
//----------------------------------------------------------------------------------------------
|
||||
Body.setText("");
|
||||
@@ -339,7 +340,7 @@ public abstract class ComparisonForm<T extends DBObject> {
|
||||
//</editor-fold>
|
||||
slave.master = this;
|
||||
bPrevious.addActionListener(e -> {
|
||||
if (current_diff_line != Utils.Nan) {
|
||||
if (current_diff_line != Constants.Nan) {
|
||||
if (current_diff_line > 0)
|
||||
current_diff_line--;
|
||||
else
|
||||
@@ -348,7 +349,7 @@ public abstract class ComparisonForm<T extends DBObject> {
|
||||
}
|
||||
});
|
||||
bNext.addActionListener(e -> {
|
||||
if (current_diff_line != Utils.Nan) {
|
||||
if (current_diff_line != Constants.Nan) {
|
||||
if (current_diff_line < colors.size() - 1)
|
||||
current_diff_line++;
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user