mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Remove erroneous external annotation
GitOrigin-RevId: 5dc6b1656abc52e49916be810ff784942b29e5d0
This commit is contained in:
committed by
intellij-monorepo-bot
parent
4230b5e6a8
commit
d6f6990fc3
@@ -1,8 +0,0 @@
|
||||
<root>
|
||||
<item
|
||||
name='com.intellij.util.ui.UIUtilities java.lang.String clipString(javax.swing.JComponent, java.awt.FontMetrics, java.lang.String, int)'>
|
||||
<annotation name='org.jetbrains.annotations.Contract'>
|
||||
<val name="pure" val="true"/>
|
||||
</annotation>
|
||||
</item>
|
||||
</root>
|
||||
+2
@@ -3,6 +3,7 @@
|
||||
|
||||
package com.intellij.openapi.wm.impl.customFrameDecorations.header.titleLabel
|
||||
|
||||
import org.jetbrains.annotations.Contract
|
||||
import sun.swing.SwingUtilities2
|
||||
import java.awt.FontMetrics
|
||||
import java.io.File
|
||||
@@ -12,6 +13,7 @@ open class ClippingTitle(prefix: String = " - ", suffix: String = "") : DefaultP
|
||||
companion object {
|
||||
const val ellipsisSymbol = "\u2026"
|
||||
|
||||
@Contract(pure = true)
|
||||
fun clipString(component: JComponent, string: String, maxWidth: Int, fileSeparatorChar: String = File.separator): String {
|
||||
val fm = component.getFontMetrics(component.font)
|
||||
val symbolWidth = SwingUtilities2.stringWidth(component, fm, ellipsisSymbol)
|
||||
|
||||
Reference in New Issue
Block a user