/*
- * Copyright 2000-2012 JetBrains s.r.o.
+ * 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.
import com.intellij.ui.components.panels.HorizontalLayout;
import com.intellij.ui.components.panels.NonOpaquePanel;
import com.intellij.util.ui.JBUI;
-import com.intellij.util.ui.PlatformColors;
import com.intellij.util.ui.UIUtil;
import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull;
}
public HyperlinkLabel createActionLabel(final String text, final Runnable action) {
- HyperlinkLabel label = new HyperlinkLabel(text, PlatformColors.BLUE, getBackground(), PlatformColors.BLUE);
+ HyperlinkLabel label = new HyperlinkLabel(text, getBackground());
label.addHyperlinkListener(new HyperlinkAdapter() {
@Override
protected void hyperlinkActivated(HyperlinkEvent e) {
/*
- * Copyright 2000-2014 JetBrains s.r.o.
+ * 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.
}
public HyperlinkLabel(String text) {
- this(text,
- PlatformColors.BLUE,
- new JBColor(new NotNullProducer<Color>() {
- @NotNull
- @Override
- public Color produce() {
- return UIUtil.getLabelBackground();
- }
- }),
- PlatformColors.BLUE);
+ this(text, UIUtil.getLabelBackground());
+ }
+
+ public HyperlinkLabel(String text, Color background) {
+ this(text, PlatformColors.BLUE, background, PlatformColors.BLUE);
}
public HyperlinkLabel(String text, final Color textForegroundColor, final Color textBackgroundColor, final Color textEffectColor) {