mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-15 02:59:33 +07:00
@NonNls for label locations
GitOrigin-RevId: 48fe779eb1ca93402bf03042b49a7523408884d1
This commit is contained in:
committed by
intellij-monorepo-bot
parent
fdb6714a2b
commit
339e4811ed
@@ -8,6 +8,7 @@ import com.intellij.ui.PanelWithAnchor;
|
||||
import com.intellij.ui.components.JBLabel;
|
||||
import com.intellij.util.ArrayUtil;
|
||||
import com.intellij.util.ui.UIUtil;
|
||||
import org.jetbrains.annotations.NonNls;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@@ -16,7 +17,7 @@ import java.awt.*;
|
||||
import java.util.Objects;
|
||||
|
||||
public class LabeledComponent<Comp extends JComponent> extends JPanel implements PanelWithAnchor {
|
||||
private static final String[] LABEL_BORDER_CONSTRAINS = {BorderLayout.NORTH, BorderLayout.EAST, BorderLayout.SOUTH, BorderLayout.WEST};
|
||||
private static final @NonNls String[] LABEL_BORDER_CONSTRAINS = {BorderLayout.NORTH, BorderLayout.EAST, BorderLayout.SOUTH, BorderLayout.WEST};
|
||||
|
||||
private final JBLabel myLabel = new JBLabel();
|
||||
private Comp myComponent;
|
||||
@@ -99,14 +100,14 @@ public class LabeledComponent<Comp extends JComponent> extends JPanel implements
|
||||
myLabel.setEnabled(enabled);
|
||||
}
|
||||
|
||||
public void setLabelLocation(String borderConstrains) {
|
||||
public void setLabelLocation(@NonNls String borderConstrains) {
|
||||
if (ArrayUtil.indexOf(LABEL_BORDER_CONSTRAINS, borderConstrains) >= 0 && !borderConstrains.equals(myLabelConstraints)) {
|
||||
myLabelConstraints = borderConstrains;
|
||||
insertLabel();
|
||||
}
|
||||
}
|
||||
|
||||
public String getLabelLocation() {
|
||||
public @NonNls String getLabelLocation() {
|
||||
return myLabelConstraints;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user