Browse Source

REPORT-7790 消息弹框图标

master
yaoh.wu 7 years ago
parent
commit
8ff9278411
  1. 15
      designer-base/src/com/fr/design/gui/UILookAndFeel.java
  2. BIN
      designer-base/src/com/fr/design/images/lookandfeel/Information_Icon_Error_32x32.png
  3. BIN
      designer-base/src/com/fr/design/images/lookandfeel/Information_Icon_OK_32x32.png
  4. 282
      designer-base/src/com/fr/env/RemoteEnv.java
  5. 8
      designer-base/src/com/fr/env/RemoteEnvPane.java

15
designer-base/src/com/fr/design/gui/UILookAndFeel.java

@ -1,6 +1,10 @@
package com.fr.design.gui;
import com.fr.design.gui.borders.*;
import com.fr.design.gui.borders.UIFrameBorder;
import com.fr.design.gui.borders.UIInternalFrameBorder;
import com.fr.design.gui.borders.UITableHeaderBorder;
import com.fr.design.gui.borders.UITableHeaderRolloverBorder;
import com.fr.design.gui.borders.UITextFieldBorder;
import com.fr.design.gui.frpane.UIBasicOptionPaneUI;
import com.fr.design.gui.ibutton.UIBasicButtonUI;
import com.fr.design.gui.ibutton.UIButtonBorder;
@ -28,14 +32,15 @@ import com.fr.design.gui.itree.UITreeUI;
import com.fr.general.FRLogger;
import com.fr.general.IOUtils;
import javax.swing.*;
import javax.swing.ImageIcon;
import javax.swing.UIDefaults;
import javax.swing.border.Border;
import javax.swing.border.EmptyBorder;
import javax.swing.plaf.BorderUIResource;
import javax.swing.plaf.ColorUIResource;
import javax.swing.plaf.basic.BasicBorders;
import javax.swing.plaf.metal.MetalLookAndFeel;
import java.awt.*;
import java.awt.Insets;
import java.net.URL;
/**
@ -158,8 +163,8 @@ public class UILookAndFeel extends MetalLookAndFeel {
table.put("FileChooser.listViewIcon", loadIcon("FileListIcon.png", this));
table.put("FileChooser.newFolderIcon", loadIcon("NewFolderIcon.png", this));
table.put("FileChooser.upFolderIcon", loadIcon("ParentDirectoryIcon.png", this));
table.put("OptionPane.errorIcon", loadIcon("ErrorIcon.png", this));
table.put("OptionPane.informationIcon", loadIcon("InformationIcon.png", this));
table.put("OptionPane.errorIcon", loadIcon("Information_Icon_Error_32x32.png", this));
table.put("OptionPane.informationIcon", loadIcon("Information_Icon_OK_32x32.png", this));
table.put("OptionPane.warningIcon", loadIcon("WarningIcon.png", this));
table.put("OptionPane.questionIcon", loadIcon("QuestionIcon.png", this));
table.put("ScrollPane.border", new UIScrollPaneBorder());

BIN
designer-base/src/com/fr/design/images/lookandfeel/Information_Icon_Error_32x32.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 752 B

BIN
designer-base/src/com/fr/design/images/lookandfeel/Information_Icon_OK_32x32.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 721 B

282
designer-base/src/com/fr/env/RemoteEnv.java vendored

File diff suppressed because it is too large Load Diff

8
designer-base/src/com/fr/env/RemoteEnvPane.java vendored

@ -26,6 +26,7 @@ import javax.swing.JTextPane;
import javax.swing.SwingConstants;
import javax.swing.SwingUtilities;
import javax.swing.ToolTipManager;
import javax.swing.UIManager;
import javax.swing.border.EmptyBorder;
import javax.swing.event.DocumentEvent;
import javax.swing.event.DocumentListener;
@ -478,7 +479,12 @@ public class RemoteEnvPane extends BasicBeanPane<RemoteEnv> {
connect = env.testConnectionWithOutRegisteServer(this);
}
} catch (Exception e) {
JOptionPane.showMessageDialog(this, Inter.getLocText("Datasource-Connection_failed"));
JOptionPane.showMessageDialog(
this,
Inter.getLocText("Datasource-Connection_failed"),
UIManager.getString("OptionPane.messageDialogTitle", this.getLocale()),
JOptionPane.ERROR_MESSAGE
);
FRContext.getLogger().error(e.getMessage(), e);
}
if (connect) {

Loading…
Cancel
Save