mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
reduce using static initializers
This commit is contained in:
+7
-4
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2015 JetBrains s.r.o.
|
||||
* Copyright 2000-2016 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -80,7 +80,6 @@ import java.util.List;
|
||||
*/
|
||||
public class FlatWelcomeFrame extends JFrame implements IdeFrame, AccessibleContextAccessor {
|
||||
private static final String ACTION_GROUP_KEY = "ACTION_GROUP_KEY";
|
||||
private static final String WELCOME_TITLE = "Welcome to " + ApplicationNamesInfo.getInstance().getFullProductName();
|
||||
private final BalloonLayout myBalloonLayout;
|
||||
private final FlatWelcomeScreen myScreen;
|
||||
|
||||
@@ -105,7 +104,7 @@ public class FlatWelcomeFrame extends JFrame implements IdeFrame, AccessibleCont
|
||||
glassPane.setVisible(false);
|
||||
//setUndecorated(true);
|
||||
setContentPane(myScreen.getWelcomePanel());
|
||||
setTitle(WELCOME_TITLE);
|
||||
setTitle(getWelcomeFrameTitle());
|
||||
AppUIUtil.updateWindowIcon(this);
|
||||
final int width = RecentProjectsManager.getInstance().getRecentProjectsActions(false).length == 0 ? 666 : 777;
|
||||
setSize(JBUI.size(width, 460));
|
||||
@@ -187,6 +186,10 @@ public class FlatWelcomeFrame extends JFrame implements IdeFrame, AccessibleCont
|
||||
return accessibleContext;
|
||||
}
|
||||
|
||||
protected String getWelcomeFrameTitle() {
|
||||
return "Welcome to " + ApplicationNamesInfo.getInstance().getFullProductName();
|
||||
}
|
||||
|
||||
private class FlatWelcomeScreen extends JPanel implements WelcomeScreen {
|
||||
private JBSlidingPanel mySlidingPanel = new JBSlidingPanel();
|
||||
public ParameterizedRunnable<List<NotificationType>> myEventListener;
|
||||
@@ -450,7 +453,7 @@ public class FlatWelcomeFrame extends JFrame implements IdeFrame, AccessibleCont
|
||||
@Override
|
||||
public void run() {
|
||||
mySlidingPanel.getRootPane().setDefaultButton(null);
|
||||
setTitle(WELCOME_TITLE);
|
||||
setTitle(getWelcomeFrameTitle());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user