canvas.addPaintListener(new PaintListener() {
public void paintControl(PaintEvent e) {
String versionText = BaseMessages.getString(PKG,
"SplashDialog.Version") + " " + Const.VERSION; //$NON-NLS-1$ //$NON-
NLS-2$
StringBuilder sb = new StringBuilder();
String line = null;
try {
BufferedReader reader = new BufferedReader(new
InputStreamReader(Splash.class.getClassLoader().getResourceAsStream("or
g/pentaho/di/ui/core/dialog/license/license.txt"))); //$NON-NLS-1$
while((line = reader.readLine()) != null) {
sb.append(line + System.getProperty("line.separator"));
//$NON-NLS-1$
}
} catch (Exception ex) {
sb.append(""); //$NON-NLS-1$
Log.warn(BaseMessages.getString(PKG,
"SplashDialog.LicenseTextNotFound")); //$NON-NLS-1$
}
String licenseText = sb.toString();
e.gc.drawImage(kettle_image, 0, 0);
// If this is a Milestone or RC release, warn the user
if (Const.RELEASE.equals(Const.ReleaseType.MILESTONE)) {
versionText = BaseMessages.getString(PKG,
"SplashDialog.DeveloperRelease") + " - " + versionText; //$NON-NLS-
1$ //$NON-NLS-2$
drawVersionWarning(e);
} else if
(Const.RELEASE.equals(Const.ReleaseType.RELEASE_CANDIDATE)) {
versionText = BaseMessages.getString(PKG,
"SplashDialog.ReleaseCandidate") + " - " + versionText; //$NON-NLS-
1$//$NON-NLS-2$
}
else if (Const.RELEASE.equals(Const.ReleaseType.PREVIEW)) {
versionText = BaseMessages.getString(PKG,
"SplashDialog.PreviewRelease") + " - " + versionText;
//$NON-NLS-1$//$NON-NLS-2$