From cbce82c2425c620d2488cb6ad8e24c42f42ec162 Mon Sep 17 00:00:00 2001 From: Konstantin Bulenkov Date: Mon, 7 Sep 2015 20:14:04 +0200 Subject: [PATCH] Utility interface for icons with scaling option --- .../intellij/openapi/util/ScalableIcon.java | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 platform/util/src/com/intellij/openapi/util/ScalableIcon.java diff --git a/platform/util/src/com/intellij/openapi/util/ScalableIcon.java b/platform/util/src/com/intellij/openapi/util/ScalableIcon.java new file mode 100644 index 000000000000..93eea6d40c65 --- /dev/null +++ b/platform/util/src/com/intellij/openapi/util/ScalableIcon.java @@ -0,0 +1,30 @@ +/* + * Copyright 2000-2015 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.util; + +import javax.swing.*; + +/** + * @author Konstantin Bulenkov + * @since 15.0 + */ +public interface ScalableIcon extends Icon { + /** + * @param scaleFactor scale + * @return scaled icon with width getIconWidth() * scaleFactor and height getIconHeight() * scaleFactor + */ + Icon scale(float scaleFactor); +}