From 744b94bdd26b802ea780476d629d8c3008848d14 Mon Sep 17 00:00:00 2001 From: Konstantin Bulenkov Date: Mon, 11 Sep 2017 22:44:58 +0200 Subject: [PATCH] +withPreferredSize() --- platform/util/src/com/intellij/ui/components/JBPanel.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/platform/util/src/com/intellij/ui/components/JBPanel.java b/platform/util/src/com/intellij/ui/components/JBPanel.java index fc6b6fee1860..41d6b80dc22d 100644 --- a/platform/util/src/com/intellij/ui/components/JBPanel.java +++ b/platform/util/src/com/intellij/ui/components/JBPanel.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2016 JetBrains s.r.o. + * Copyright 2000-2017 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. @@ -91,6 +91,12 @@ public class JBPanel extends JPanel implements JBComponent return (T)this; } + public T withPreferredSize(int width, int height) { + myPreferredWidth = width; + myPreferredHeight = height; + return (T)this; + } + public T withMaximumWidth(int width) { myMaximumWidth = width; return (T)this;