Add Ubuntu font for more consistent UI elements
This commit is contained in:
parent
b7b6c3780c
commit
0b042ec6bf
@ -165,6 +165,9 @@
|
|||||||
</Component>
|
</Component>
|
||||||
<Component class="javax.swing.JLabel" name="jLabel1">
|
<Component class="javax.swing.JLabel" name="jLabel1">
|
||||||
<Properties>
|
<Properties>
|
||||||
|
<Property name="font" type="java.awt.Font" editor="org.netbeans.modules.form.RADConnectionPropertyEditor">
|
||||||
|
<Connection code="MainGUI.ubuntuRegular.deriveFont(11.0F)" type="code"/>
|
||||||
|
</Property>
|
||||||
<Property name="horizontalAlignment" type="int" value="11"/>
|
<Property name="horizontalAlignment" type="int" value="11"/>
|
||||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.form.RADConnectionPropertyEditor">
|
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.form.RADConnectionPropertyEditor">
|
||||||
<Connection code="namemark()" type="code"/>
|
<Connection code="namemark()" type="code"/>
|
||||||
@ -238,6 +241,9 @@
|
|||||||
<SubComponents>
|
<SubComponents>
|
||||||
<Component class="javax.swing.JLabel" name="jLabel3">
|
<Component class="javax.swing.JLabel" name="jLabel3">
|
||||||
<Properties>
|
<Properties>
|
||||||
|
<Property name="font" type="java.awt.Font" editor="org.netbeans.modules.form.RADConnectionPropertyEditor">
|
||||||
|
<Connection code="MainGUI.ubuntuRegular.deriveFont(11.0F)" type="code"/>
|
||||||
|
</Property>
|
||||||
<Property name="horizontalAlignment" type="int" value="11"/>
|
<Property name="horizontalAlignment" type="int" value="11"/>
|
||||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.form.RADConnectionPropertyEditor">
|
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.form.RADConnectionPropertyEditor">
|
||||||
<Connection code="namemark()" type="code"/>
|
<Connection code="namemark()" type="code"/>
|
||||||
@ -343,7 +349,7 @@
|
|||||||
<Group type="102" alignment="1" attributes="0">
|
<Group type="102" alignment="1" attributes="0">
|
||||||
<EmptySpace max="-2" attributes="0"/>
|
<EmptySpace max="-2" attributes="0"/>
|
||||||
<Component id="recentItemsPanel" min="-2" max="-2" attributes="0"/>
|
<Component id="recentItemsPanel" min="-2" max="-2" attributes="0"/>
|
||||||
<EmptySpace pref="145" max="32767" attributes="0"/>
|
<EmptySpace pref="189" max="32767" attributes="0"/>
|
||||||
<Component id="jLabel2" min="-2" max="-2" attributes="0"/>
|
<Component id="jLabel2" min="-2" max="-2" attributes="0"/>
|
||||||
<EmptySpace max="-2" attributes="0"/>
|
<EmptySpace max="-2" attributes="0"/>
|
||||||
</Group>
|
</Group>
|
||||||
@ -353,8 +359,8 @@
|
|||||||
<SubComponents>
|
<SubComponents>
|
||||||
<Component class="javax.swing.JLabel" name="jLabel2">
|
<Component class="javax.swing.JLabel" name="jLabel2">
|
||||||
<Properties>
|
<Properties>
|
||||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
<Property name="font" type="java.awt.Font" editor="org.netbeans.modules.form.RADConnectionPropertyEditor">
|
||||||
<Font name="Tahoma" size="48" style="0"/>
|
<Connection code="MainGUI.ubuntuRegular.deriveFont(48.0F)" type="code"/>
|
||||||
</Property>
|
</Property>
|
||||||
<Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
|
<Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
|
||||||
<Color blue="99" green="99" red="99" type="rgb"/>
|
<Color blue="99" green="99" red="99" type="rgb"/>
|
||||||
|
@ -28,7 +28,9 @@
|
|||||||
package net.apocalypselabs.symat;
|
package net.apocalypselabs.symat;
|
||||||
|
|
||||||
import java.awt.Color;
|
import java.awt.Color;
|
||||||
|
import java.awt.Font;
|
||||||
import java.awt.Graphics;
|
import java.awt.Graphics;
|
||||||
|
import java.awt.GraphicsEnvironment;
|
||||||
import java.awt.event.KeyEvent;
|
import java.awt.event.KeyEvent;
|
||||||
import java.beans.PropertyVetoException;
|
import java.beans.PropertyVetoException;
|
||||||
import java.io.BufferedReader;
|
import java.io.BufferedReader;
|
||||||
@ -36,9 +38,12 @@ import java.io.File;
|
|||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.io.InputStreamReader;
|
import java.io.InputStreamReader;
|
||||||
|
import java.net.URISyntaxException;
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
import java.util.logging.Level;
|
||||||
|
import java.util.logging.Logger;
|
||||||
import javax.swing.ImageIcon;
|
import javax.swing.ImageIcon;
|
||||||
import javax.swing.JInternalFrame;
|
import javax.swing.JInternalFrame;
|
||||||
import javax.swing.ListModel;
|
import javax.swing.ListModel;
|
||||||
@ -66,6 +71,8 @@ public class MainGUI extends javax.swing.JFrame {
|
|||||||
public static boolean updateAvailable = false;
|
public static boolean updateAvailable = false;
|
||||||
public static String updateString = "";
|
public static String updateString = "";
|
||||||
|
|
||||||
|
public static Font ubuntuRegular;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates the main app window and does some quick things that aren't
|
* Creates the main app window and does some quick things that aren't
|
||||||
* threaded in SplashScreen.
|
* threaded in SplashScreen.
|
||||||
@ -319,6 +326,7 @@ public class MainGUI extends javax.swing.JFrame {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
jLabel1.setFont(MainGUI.ubuntuRegular.deriveFont(11.0F));
|
||||||
jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
|
jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
|
||||||
jLabel1.setText(namemark());
|
jLabel1.setText(namemark());
|
||||||
jLabel1.setFocusable(false);
|
jLabel1.setFocusable(false);
|
||||||
@ -369,6 +377,7 @@ public class MainGUI extends javax.swing.JFrame {
|
|||||||
|
|
||||||
jPanel2.setOpaque(false);
|
jPanel2.setOpaque(false);
|
||||||
|
|
||||||
|
jLabel3.setFont(MainGUI.ubuntuRegular.deriveFont(11.0F));
|
||||||
jLabel3.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
|
jLabel3.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
|
||||||
jLabel3.setText(namemark());
|
jLabel3.setText(namemark());
|
||||||
jLabel3.setFocusable(false);
|
jLabel3.setFocusable(false);
|
||||||
@ -444,7 +453,7 @@ public class MainGUI extends javax.swing.JFrame {
|
|||||||
mainPane.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
|
mainPane.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
|
||||||
mainPane.setOpaque(false);
|
mainPane.setOpaque(false);
|
||||||
|
|
||||||
jLabel2.setFont(new java.awt.Font("Tahoma", 0, 48)); // NOI18N
|
jLabel2.setFont(MainGUI.ubuntuRegular.deriveFont(48.0F));
|
||||||
jLabel2.setForeground(new java.awt.Color(153, 153, 153));
|
jLabel2.setForeground(new java.awt.Color(153, 153, 153));
|
||||||
jLabel2.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
|
jLabel2.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
|
||||||
jLabel2.setText("SyMAT");
|
jLabel2.setText("SyMAT");
|
||||||
@ -527,7 +536,7 @@ public class MainGUI extends javax.swing.JFrame {
|
|||||||
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, mainPaneLayout.createSequentialGroup()
|
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, mainPaneLayout.createSequentialGroup()
|
||||||
.addContainerGap()
|
.addContainerGap()
|
||||||
.addComponent(recentItemsPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
.addComponent(recentItemsPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 145, Short.MAX_VALUE)
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 189, Short.MAX_VALUE)
|
||||||
.addComponent(jLabel2)
|
.addComponent(jLabel2)
|
||||||
.addContainerGap())
|
.addContainerGap())
|
||||||
);
|
);
|
||||||
@ -733,8 +742,17 @@ public class MainGUI extends javax.swing.JFrame {
|
|||||||
java.util.logging.Logger.getLogger(MainGUI.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
|
java.util.logging.Logger.getLogger(MainGUI.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
|
||||||
}
|
}
|
||||||
//</editor-fold>
|
//</editor-fold>
|
||||||
|
|
||||||
//</editor-fold>
|
//</editor-fold>
|
||||||
|
|
||||||
|
try {
|
||||||
|
// Ubuntu font for prettifying
|
||||||
|
ubuntuRegular = Font.createFont(Font.TRUETYPE_FONT,
|
||||||
|
new File(MainGUI.class.
|
||||||
|
getResource("resources/Ubuntu-R.ttf").toURI()));
|
||||||
|
} catch (Exception ex) {
|
||||||
|
ubuntuRegular = Font.getFont(Font.SANS_SERIF);
|
||||||
|
}
|
||||||
|
|
||||||
// Command line args
|
// Command line args
|
||||||
for (String arg : args) {
|
for (String arg : args) {
|
||||||
switch (arg) {
|
switch (arg) {
|
||||||
|
@ -42,8 +42,8 @@
|
|||||||
<SubComponents>
|
<SubComponents>
|
||||||
<Component class="javax.swing.JLabel" name="dispLabel">
|
<Component class="javax.swing.JLabel" name="dispLabel">
|
||||||
<Properties>
|
<Properties>
|
||||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
<Property name="font" type="java.awt.Font" editor="org.netbeans.modules.form.RADConnectionPropertyEditor">
|
||||||
<Font name="Tahoma" size="18" style="0"/>
|
<Connection code="MainGUI.ubuntuRegular.deriveFont(20.0F)" type="code"/>
|
||||||
</Property>
|
</Property>
|
||||||
<Property name="horizontalAlignment" type="int" value="0"/>
|
<Property name="horizontalAlignment" type="int" value="0"/>
|
||||||
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
|
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
|
||||||
|
@ -79,7 +79,7 @@ public class SplashScreen extends javax.swing.JFrame {
|
|||||||
});
|
});
|
||||||
getContentPane().setLayout(null);
|
getContentPane().setLayout(null);
|
||||||
|
|
||||||
dispLabel.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N
|
dispLabel.setFont(MainGUI.ubuntuRegular.deriveFont(20.0F));
|
||||||
dispLabel.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
|
dispLabel.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
|
||||||
dispLabel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/net/apocalypselabs/symat/splash.gif"))); // NOI18N
|
dispLabel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/net/apocalypselabs/symat/splash.gif"))); // NOI18N
|
||||||
dispLabel.setText("<html><br><br> ");
|
dispLabel.setText("<html><br><br> ");
|
||||||
|
@ -1017,5 +1017,103 @@
|
|||||||
Public License instead of this License. But first, please read<br>
|
Public License instead of this License. But first, please read<br>
|
||||||
http://www.gnu.org/philosophy/why-not-lgpl.html .<br>
|
http://www.gnu.org/philosophy/why-not-lgpl.html .<br>
|
||||||
</p>
|
</p>
|
||||||
|
<p><br></p>
|
||||||
|
<p>-------------------------------<br>
|
||||||
|
UBUNTU FONT LICENCE Version 1.0<br>
|
||||||
|
-------------------------------<br>
|
||||||
|
<br>
|
||||||
|
PREAMBLE<br>
|
||||||
|
This licence allows the licensed fonts to be used, studied, modified and
|
||||||
|
redistributed freely. The fonts, including any derivative works, can be
|
||||||
|
bundled, embedded, and redistributed provided the terms of this licence
|
||||||
|
are met. The fonts and derivatives, however, cannot be released under
|
||||||
|
any other licence. The requirement for fonts to remain under this
|
||||||
|
licence does not require any document created using the fonts or their
|
||||||
|
derivatives to be published under this licence, as long as the primary
|
||||||
|
purpose of the document is not to be a vehicle for the distribution of
|
||||||
|
the fonts.
|
||||||
|
<br>
|
||||||
|
DEFINITIONS<br>
|
||||||
|
"Font Software" refers to the set of files released by the Copyright
|
||||||
|
Holder(s) under this licence and clearly marked as such. This may
|
||||||
|
include source files, build scripts and documentation.
|
||||||
|
<br>
|
||||||
|
"Original Version" refers to the collection of Font Software components
|
||||||
|
as received under this licence.
|
||||||
|
<br>
|
||||||
|
"Modified Version" refers to any derivative made by adding to, deleting,
|
||||||
|
or substituting -- in part or in whole -- any of the components of the
|
||||||
|
Original Version, by changing formats or by porting the Font Software to
|
||||||
|
a new environment.
|
||||||
|
<br>
|
||||||
|
"Copyright Holder(s)" refers to all individuals and companies who have a
|
||||||
|
copyright ownership of the Font Software.
|
||||||
|
<br>
|
||||||
|
"Substantially Changed" refers to Modified Versions which can be easily
|
||||||
|
identified as dissimilar to the Font Software by users of the Font
|
||||||
|
Software comparing the Original Version with the Modified Version.
|
||||||
|
<br>
|
||||||
|
To "Propagate" a work means to do anything with it that, without
|
||||||
|
permission, would make you directly or secondarily liable for
|
||||||
|
infringement under applicable copyright law, except executing it on a
|
||||||
|
computer or modifying a private copy. Propagation includes copying,
|
||||||
|
distribution (with or without modification and with or without charging
|
||||||
|
a redistribution fee), making available to the public, and in some
|
||||||
|
countries other activities as well.
|
||||||
|
<br>
|
||||||
|
PERMISSION & CONDITIONS<br>
|
||||||
|
This licence does not grant any rights under trademark law and all such
|
||||||
|
rights are reserved.
|
||||||
|
<br>
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
|
copy of the Font Software, to propagate the Font Software, subject to
|
||||||
|
the below conditions:
|
||||||
|
<br>
|
||||||
|
1) Each copy of the Font Software must contain the above copyright
|
||||||
|
notice and this licence. These can be included either as stand-alone
|
||||||
|
text files, human-readable headers or in the appropriate machine-
|
||||||
|
readable metadata fields within text or binary files as long as those
|
||||||
|
fields can be easily viewed by the user.
|
||||||
|
<br>
|
||||||
|
2) The font name complies with the following:
|
||||||
|
(a) The Original Version must retain its name, unmodified.
|
||||||
|
(b) Modified Versions which are Substantially Changed must be renamed to
|
||||||
|
avoid use of the name of the Original Version or similar names entirely.
|
||||||
|
(c) Modified Versions which are not Substantially Changed must be
|
||||||
|
renamed to both (i) retain the name of the Original Version and (ii) add
|
||||||
|
additional naming elements to distinguish the Modified Version from the
|
||||||
|
Original Version. The name of such Modified Versions must be the name of
|
||||||
|
the Original Version, with "derivative X" where X represents the name of
|
||||||
|
the new work, appended to that name.
|
||||||
|
<br>
|
||||||
|
3) The name(s) of the Copyright Holder(s) and any contributor to the
|
||||||
|
Font Software shall not be used to promote, endorse or advertise any
|
||||||
|
Modified Version, except (i) as required by this licence, (ii) to
|
||||||
|
acknowledge the contribution(s) of the Copyright Holder(s) or (iii) with
|
||||||
|
their explicit written permission.
|
||||||
|
<br>
|
||||||
|
4) The Font Software, modified or unmodified, in part or in whole, must
|
||||||
|
be distributed entirely under this licence, and must not be distributed
|
||||||
|
under any other licence. The requirement for fonts to remain under this
|
||||||
|
licence does not affect any document created using the Font Software,
|
||||||
|
except any version of the Font Software extracted from a document
|
||||||
|
created using the Font Software may only be distributed under this
|
||||||
|
licence.
|
||||||
|
<br>
|
||||||
|
TERMINATION<br>
|
||||||
|
This licence becomes null and void if any of the above conditions are
|
||||||
|
not met.
|
||||||
|
<br>
|
||||||
|
DISCLAIMER<br>
|
||||||
|
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
|
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
||||||
|
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
|
||||||
|
COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
||||||
|
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||||
|
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
||||||
|
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||||
|
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER
|
||||||
|
DEALINGS IN THE FONT SOFTWARE.
|
||||||
|
</p>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
BIN
src/net/apocalypselabs/symat/resources/Ubuntu-R.ttf
Normal file
BIN
src/net/apocalypselabs/symat/resources/Ubuntu-R.ttf
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user