This commit is contained in:
Wisser
2021-03-22 07:56:28 +01:00
parent ee79873c03
commit 53cd4a58e2
4 changed files with 17 additions and 19 deletions
+1 -1
View File
@@ -62,7 +62,7 @@
</AuxValues>
<Constraints>
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
<GridBagConstraints gridX="0" gridY="0" gridWidth="2" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="12" insetsLeft="12" insetsBottom="12" insetsRight="12" anchor="17" weightX="0.0" weightY="0.0"/>
<GridBagConstraints gridX="0" gridY="0" gridWidth="2" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="12" insetsRight="12" anchor="17" weightX="0.0" weightY="0.0"/>
</Constraint>
</Constraints>
</Component>
+2 -3
View File
@@ -39,8 +39,7 @@ public class About extends javax.swing.JDialog {
"Jailer Database Tools",
"Database Subsetting and Relational Data Browsing",
"");
ImageIcon imageIcon = UIUtil.readImage("/jailer.png");
infoBar.setIcon(imageIcon);
infoBar.setIcon(UIUtil.jailerLogo);
UIUtil.replace(nameLabel, infoBar);
jTextField4.setText(JailerVersion.VERSION);
@@ -145,7 +144,7 @@ public class About extends javax.swing.JDialog {
gridBagConstraints.gridy = 0;
gridBagConstraints.gridwidth = 2;
gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
gridBagConstraints.insets = new java.awt.Insets(12, 12, 12, 12);
gridBagConstraints.insets = new java.awt.Insets(0, 0, 12, 12);
getContentPane().add(nameLabel, gridBagConstraints);
forumTextField.setEditable(false);
@@ -128,8 +128,6 @@ public abstract class DataModelManagerDialog extends javax.swing.JFrame {
private Font normal = new Font(font.getName(), font.getStyle() & ~Font.BOLD, font.getSize());
private Font bold = new Font(font.getName(), font.getStyle() | Font.BOLD, font.getSize());
private static ImageIcon jailerLogo;
/**
* Creates new.
*/
@@ -185,20 +183,8 @@ public abstract class DataModelManagerDialog extends javax.swing.JFrame {
setIconImage(imageIcon.getImage());
} catch (Throwable t) {
}
String name = "/net/sf/jailer/ui/resource" + "/jailer.png";
try {
if (jailerLogo == null) {
jailerLogo = new ImageIcon(ImageIO.read(UIUtil.class.getResource(name)));
}
} catch (Throwable t1) {
UIUtil.invokeLater(8, () -> UIUtil.showException(null, "Error", new IOException("unable to load image " + name + ": " + t1.getMessage(), t1), UIUtil.EXCEPTION_CONTEXT_MB_USER_ERROR));
jailerLogo = null;
}
ImageIcon imageIcon = jailerLogo;
if (imageIcon != null) {
imageIcon = UIUtil.scaleIcon(imageIcon, 1.0 / 3.0);
}
ImageIcon imageIcon = UIUtil.jailerLogo;
infoBar.setIcon(imageIcon);
infoBarJM.setIcon(imageIcon);
infoBarConnection.setIcon(imageIcon);
+13
View File
@@ -1140,6 +1140,19 @@ public class UIUtil {
return null;
}
public static ImageIcon jailerLogo;
static {
String name = "/net/sf/jailer/ui/resource" + "/jailer.png";
try {
jailerLogo = new ImageIcon(ImageIO.read(UIUtil.class.getResource(name)));
jailerLogo = UIUtil.scaleIcon(jailerLogo, 1.0 / 3.0);
} catch (Throwable t1) {
UIUtil.invokeLater(8, () -> UIUtil.showException(null, "Error", new IOException("unable to load image " + name + ": " + t1.getMessage(), t1), UIUtil.EXCEPTION_CONTEXT_MB_USER_ERROR));
jailerLogo = null;
}
}
private static Constructor<?> baseMultiResolutionImageClassConstructor = null;
private static boolean baseMultiResolutionImageClassExists = true;