mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
cleanup: use max
GitOrigin-RevId: 514f93308e81f93afbf31224bdeb4bf97b315ac9
This commit is contained in:
committed by
intellij-monorepo-bot
parent
16e7df49a1
commit
081f7bcb3a
@@ -34,7 +34,6 @@ import static javax.swing.SwingConstants.LEFT;
|
||||
import static javax.swing.SwingUtilities.layoutCompoundLabel;
|
||||
|
||||
public class SeparatorWithText extends JComponent implements Accessible {
|
||||
|
||||
private String myCaption;
|
||||
private int myPrefWidth;
|
||||
private int myAlignment;
|
||||
@@ -74,7 +73,7 @@ public class SeparatorWithText extends JComponent implements Accessible {
|
||||
}
|
||||
|
||||
private Dimension getPreferredFontSize() {
|
||||
Dimension size = new Dimension(myPrefWidth < 0 ? 0 : myPrefWidth, 1);
|
||||
Dimension size = new Dimension(Math.max(myPrefWidth, 0), 1);
|
||||
String caption = getCaption();
|
||||
if (caption != null) {
|
||||
FontMetrics fm = getFontMetrics(getFont());
|
||||
|
||||
Reference in New Issue
Block a user