no message
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
package Common.Visual.Windows.Dialog;
|
||||
import Common.Utils.CommonUtils;
|
||||
import Common.Visual.CommonUI;
|
||||
import Common.Utils.Utils_;
|
||||
import Common.Visual.UI_;
|
||||
import Common.Visual.Themes.ThemeElement;
|
||||
import Common.Visual.Fonts.VisualiserFonts;
|
||||
import Common.Utils.TextLog;
|
||||
@@ -35,9 +35,9 @@ public class Dialog<T, F extends DialogFields> extends JDialog implements ThemeE
|
||||
setModal(true);
|
||||
toFront();
|
||||
getContentPane().setLayout(new BorderLayout());
|
||||
lTitle.setFont(CommonUI.getTheme().Fonts.get(VisualiserFonts.Menu));
|
||||
lTitle.setFont(UI_.getTheme().Fonts.get(VisualiserFonts.Menu));
|
||||
if (!getIconPath().isEmpty()) {
|
||||
setIconImage(CommonUtils.getIcon(getIconPath()).getImage());
|
||||
setIconImage(Utils_.getIcon(getIconPath()).getImage());
|
||||
}
|
||||
//делаем титульную надпись в самом окне чтобы не зависеть от языковой политики ОС
|
||||
getContentPane().add(lTitle, BorderLayout.NORTH);
|
||||
@@ -51,7 +51,7 @@ public class Dialog<T, F extends DialogFields> extends JDialog implements ThemeE
|
||||
setDefaultCloseOperation(DO_NOTHING_ON_CLOSE);
|
||||
addWindowListener(new WindowAdapter() {
|
||||
public void windowClosing(WindowEvent e) {
|
||||
CommonUI.windowsStack.pop();
|
||||
UI_.windowsStack.pop();
|
||||
onCancel();
|
||||
onClose();
|
||||
}
|
||||
@@ -65,7 +65,7 @@ public class Dialog<T, F extends DialogFields> extends JDialog implements ThemeE
|
||||
content = (fields = f.newInstance()).getContent();
|
||||
//--?
|
||||
} catch (Exception e) {
|
||||
CommonUtils.MainLog.PrintException(e);
|
||||
Utils_.MainLog.PrintException(e);
|
||||
}
|
||||
}
|
||||
public void onClose() {
|
||||
@@ -117,7 +117,7 @@ public class Dialog<T, F extends DialogFields> extends JDialog implements ThemeE
|
||||
Init(params);
|
||||
ShowTitle();
|
||||
setAlwaysOnTop(isOnTop());
|
||||
CommonUI.windowsStack.push(this);
|
||||
UI_.windowsStack.push(this);
|
||||
setVisible(true);
|
||||
return OK;
|
||||
}
|
||||
@@ -137,7 +137,7 @@ public class Dialog<T, F extends DialogFields> extends JDialog implements ThemeE
|
||||
OK = true;
|
||||
CloseAction();
|
||||
} else
|
||||
CommonUI.Error("Валидация не пройдена:\n" + Log.toString());
|
||||
UI_.Error("Валидация не пройдена:\n" + Log.toString());
|
||||
}
|
||||
protected void onCancel() {
|
||||
CloseAction();
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
package Common.Visual.Windows.Dialog;
|
||||
import Common.Visual.CommonUI;
|
||||
import Common.Visual.UI_;
|
||||
import Common.Visual.Fonts.VisualiserFonts;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
public class DialogTextComboBox extends JComboBox<String> implements DialogFields {
|
||||
public DialogTextComboBox() {
|
||||
setFont(CommonUI.getTheme().Fonts.get(VisualiserFonts.Menu));
|
||||
setFont(UI_.getTheme().Fonts.get(VisualiserFonts.Menu));
|
||||
setEditable(false);
|
||||
}
|
||||
@Override
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
package Common.Visual.Windows.Dialog;
|
||||
import Common.Visual.CommonUI;
|
||||
import Common.Visual.UI_;
|
||||
import Common.Visual.Fonts.VisualiserFonts;
|
||||
|
||||
import javax.swing.*;
|
||||
@@ -8,7 +8,7 @@ public class DialogWrapText extends JTextPane implements DialogFields {
|
||||
public DialogWrapText(){
|
||||
setOpaque(true);
|
||||
setBackground(Color.WHITE);
|
||||
setFont(CommonUI.getTheme().Fonts.get(VisualiserFonts.TreeBold));
|
||||
setFont(UI_.getTheme().Fonts.get(VisualiserFonts.TreeBold));
|
||||
setEditable(false);
|
||||
}
|
||||
@Override
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
package Common.Visual.Windows.Dialog;
|
||||
import Common.Utils.CommonUtils;
|
||||
import Common.Utils.Utils_;
|
||||
|
||||
import javax.swing.*;
|
||||
import javax.swing.filechooser.FileFilter;
|
||||
@@ -9,7 +9,7 @@ public class VDirectoryChooser extends VFileChooser_ {
|
||||
super(title, new FileFilter() {
|
||||
@Override
|
||||
public boolean accept(File f) {
|
||||
return !CommonUtils.ContainsCyrillic(f.getAbsolutePath());
|
||||
return !Utils_.ContainsCyrillic(f.getAbsolutePath());
|
||||
}
|
||||
@Override
|
||||
public String getDescription() {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
package Common.Visual.Windows.Dialog;
|
||||
import Common.Utils.CommonUtils;
|
||||
import Common.Utils.Utils_;
|
||||
|
||||
import javax.swing.*;
|
||||
import javax.swing.filechooser.FileFilter;
|
||||
@@ -20,7 +20,7 @@ public class VFileChooser extends VFileChooser_ {
|
||||
fileChooser.setFileFilter(new FileFilter() {
|
||||
@Override
|
||||
public boolean accept(File f) {
|
||||
return !CommonUtils.ContainsCyrillic(f.getName())
|
||||
return !Utils_.ContainsCyrillic(f.getName())
|
||||
&& (f.isDirectory() || acceptExtensions(f));
|
||||
}
|
||||
@Override
|
||||
@@ -36,7 +36,7 @@ public class VFileChooser extends VFileChooser_ {
|
||||
}
|
||||
public boolean acceptExtensions(File file) {
|
||||
if (Extensions.isEmpty()) return true;
|
||||
String file_ext = CommonUtils.getExtension(file);
|
||||
String file_ext = Utils_.getExtension(file);
|
||||
for (String ext : Extensions)
|
||||
if (ext.equalsIgnoreCase(file_ext)) return true;
|
||||
return false;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
package Common.Visual.Windows;
|
||||
import Common.Utils.CommonUtils;
|
||||
import Common.Utils.Utils_;
|
||||
import Common.Visual.Themes.ThemeElement;
|
||||
import Common.Database.Objects.DBForm.DBForm;
|
||||
|
||||
@@ -10,9 +10,9 @@ import java.awt.event.WindowEvent;
|
||||
public abstract class Form extends JFrame implements ThemeElement {
|
||||
private DBForm dbInfo = null;
|
||||
public Form() {
|
||||
if (getIconPath()!=null) setIconImage(CommonUtils.getIcon(getIconPath()).getImage());
|
||||
if (getIconPath()!=null) setIconImage(Utils_.getIcon(getIconPath()).getImage());
|
||||
SetListener();
|
||||
this.setTitle(CommonUtils.isWindows() ? getWTitleText() : getUTitleText());
|
||||
this.setTitle(Utils_.isWindows() ? getWTitleText() : getUTitleText());
|
||||
pack();
|
||||
setMinimumSize(new Dimension(getDefaultWidth(), getDefaultHeight()));
|
||||
}
|
||||
@@ -54,7 +54,7 @@ public abstract class Form extends JFrame implements ThemeElement {
|
||||
try {
|
||||
LoadWindowParameters();
|
||||
} catch (Exception e) {
|
||||
CommonUtils.MainLog.PrintException(e);
|
||||
Utils_.MainLog.PrintException(e);
|
||||
}
|
||||
setContentPane(getMainPanel());
|
||||
setVisible(true);
|
||||
@@ -63,7 +63,7 @@ public abstract class Form extends JFrame implements ThemeElement {
|
||||
try {
|
||||
SaveWindowParameters();
|
||||
} catch (Exception e) {
|
||||
CommonUtils.MainLog.PrintException(e);
|
||||
Utils_.MainLog.PrintException(e);
|
||||
}
|
||||
setVisible(false);
|
||||
dispose();
|
||||
@@ -73,8 +73,8 @@ public abstract class Form extends JFrame implements ThemeElement {
|
||||
}
|
||||
public void LoadWindowParameters() throws Exception {
|
||||
if (getFormKey()!=null)
|
||||
if (CommonUtils.db.forms.Data.containsKey(getFormKey())) {
|
||||
dbInfo = CommonUtils.db.forms.Data.get(getFormKey());
|
||||
if (Utils_.db.forms.Data.containsKey(getFormKey())) {
|
||||
dbInfo = Utils_.db.forms.Data.get(getFormKey());
|
||||
dbInfo.Apply(this);
|
||||
return;
|
||||
}
|
||||
@@ -85,9 +85,9 @@ public abstract class Form extends JFrame implements ThemeElement {
|
||||
if (getFormKey()!=null) {
|
||||
if (dbInfo != null) {
|
||||
dbInfo.Init(this);
|
||||
CommonUtils.db.Update(dbInfo);
|
||||
Utils_.db.Update(dbInfo);
|
||||
} else
|
||||
CommonUtils.db.Insert(new DBForm(getFormKey(), this));
|
||||
Utils_.db.Insert(new DBForm(getFormKey(), this));
|
||||
}
|
||||
}
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user