From 0c4797badaa6e5493221ed2c7614466ec77007de Mon Sep 17 00:00:00 2001 From: Ekaterina Tuzova Date: Tue, 10 Jun 2014 15:20:18 +0400 Subject: [PATCH] added abstract action tied with panel to be able to draw not only buttons on welcome screen --- .../AbstractActionWithPanel.java | 27 +++++++++++++ .../impl/welcomeScreen/CardActionsPanel.java | 40 +++++++++---------- .../impl/welcomeScreen/NewWelcomeScreen.java | 2 +- 3 files changed, 48 insertions(+), 21 deletions(-) create mode 100644 platform/platform-impl/src/com/intellij/openapi/wm/impl/welcomeScreen/AbstractActionWithPanel.java diff --git a/platform/platform-impl/src/com/intellij/openapi/wm/impl/welcomeScreen/AbstractActionWithPanel.java b/platform/platform-impl/src/com/intellij/openapi/wm/impl/welcomeScreen/AbstractActionWithPanel.java new file mode 100644 index 000000000000..cc9564d9e800 --- /dev/null +++ b/platform/platform-impl/src/com/intellij/openapi/wm/impl/welcomeScreen/AbstractActionWithPanel.java @@ -0,0 +1,27 @@ +/* + * Copyright 2000-2013 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.intellij.openapi.wm.impl.welcomeScreen; + +import com.intellij.openapi.actionSystem.AnAction; +import com.intellij.openapi.project.DumbAware; + +import javax.swing.*; + +public abstract class AbstractActionWithPanel extends AnAction implements DumbAware { + + public abstract JPanel createPanel(); + +} diff --git a/platform/platform-impl/src/com/intellij/openapi/wm/impl/welcomeScreen/CardActionsPanel.java b/platform/platform-impl/src/com/intellij/openapi/wm/impl/welcomeScreen/CardActionsPanel.java index 08ce9caa0db5..598d0f46ac74 100644 --- a/platform/platform-impl/src/com/intellij/openapi/wm/impl/welcomeScreen/CardActionsPanel.java +++ b/platform/platform-impl/src/com/intellij/openapi/wm/impl/welcomeScreen/CardActionsPanel.java @@ -27,6 +27,7 @@ import com.intellij.openapi.actionSystem.impl.PresentationFactory; import com.intellij.openapi.ui.GraphicsConfig; import com.intellij.openapi.util.IconLoader; import com.intellij.ui.JBCardLayout; +import com.intellij.ui.JBColor; import com.intellij.ui.LightColors; import com.intellij.util.ui.CenteredIcon; import com.intellij.util.ui.GraphicsUtil; @@ -63,31 +64,26 @@ public class CardActionsPanel extends JPanel { withBottomFiller.add(card, BorderLayout.NORTH); myContent.add(withBottomFiller, cardId); - List