Merge remote-tracking branch 'origin/master'

This commit is contained in:
Dmitry Jemerov
2012-12-07 14:30:18 +01:00
12 changed files with 144 additions and 98 deletions
@@ -13,8 +13,8 @@
<grid row="9" column="0" row-span="1" col-span="3" vsize-policy="6" hsize-policy="1" anchor="0" fill="2" indent="0" use-parent-layout="false"/>
</constraints>
</vspacer>
<grid id="b341d" layout-manager="GridLayoutManager" row-count="2" column-count="2" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
<margin top="0" left="5" bottom="0" right="0"/>
<grid id="b341d" layout-manager="GridLayoutManager" row-count="2" column-count="2" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="1">
<margin top="0" left="0" bottom="0" right="0"/>
<constraints>
<grid row="0" column="0" row-span="1" col-span="3" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
</constraints>
@@ -31,23 +31,22 @@
</component>
<component id="263f1" class="javax.swing.JTextField" binding="myResourcePatternsField">
<constraints>
<grid row="0" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="9" fill="1" indent="0" use-parent-layout="false">
<grid row="0" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false">
<preferred-size width="150" height="-1"/>
</grid>
</constraints>
<properties>
<focusable value="true"/>
<margin top="0" left="2" bottom="0" right="0"/>
<text value="" noi18n="true"/>
</properties>
</component>
<component id="1337" class="javax.swing.JLabel" binding="myPatternLegendLabel">
<component id="78174" class="com.intellij.ui.components.JBLabel" binding="myPatternLegendLabel">
<constraints>
<grid row="1" column="1" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="8" fill="0" indent="1" use-parent-layout="false"/>
</constraints>
<properties>
<font size="11"/>
<foreground color="-13487566"/>
<componentStyle value="SMALL"/>
<fontColor value="BRIGHTER"/>
<text value="label"/>
</properties>
</component>
@@ -28,6 +28,7 @@ import com.intellij.openapi.options.ConfigurationException;
import com.intellij.openapi.options.SearchableConfigurable;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.util.io.FileUtil;
import com.intellij.ui.components.JBLabel;
import org.jetbrains.annotations.NotNull;
import javax.swing.*;
@@ -47,7 +48,7 @@ public class CompilerUIConfigurable implements SearchableConfigurable, Configura
private JTextField myResourcePatternsField;
private JCheckBox myCbClearOutputDirectory;
private JCheckBox myCbAssertNotNull;
private JLabel myPatternLegendLabel;
private JBLabel myPatternLegendLabel;
private JCheckBox myCbAutoShowFirstError;
private JCheckBox myCbUseExternalBuild;
private JCheckBox myCbEnableAutomake;
@@ -59,7 +59,7 @@ public class ConfigurationArgumentsHelpArea extends JPanel {
CopyPasteManager.getInstance().setContents(contents);
}
});
myToolbarPanel.add(copyButton, BorderLayout.CENTER);
myToolbarPanel.add(copyButton, BorderLayout.NORTH);
myToolbarPanel.setVisible(false);
}
@@ -267,7 +267,7 @@
<children>
<component id="95854" class="javax.swing.JCheckBox" binding="myInsertOverrideAnnotationCheckBox" default-binding="true">
<constraints>
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="1" use-parent-layout="false"/>
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<text resource-bundle="messages/ApplicationBundle" key="insert.override.annotation"/>
@@ -275,7 +275,7 @@
</component>
<component id="9c14a" class="javax.swing.JCheckBox" binding="myRepeatSynchronizedCheckBox" default-binding="true">
<constraints>
<grid row="1" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="1" use-parent-layout="false"/>
<grid row="1" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<text value="Repeat &amp;synchronized modifier"/>
@@ -59,7 +59,7 @@ public class ConfigurationSettingsEditorWrapper extends SettingsEditor<RunnerAnd
myEditor = new ConfigurationSettingsEditor(settings);
Disposer.register(this, myEditor);
myBeforeRunStepsPanel = new BeforeRunStepsPanel(this);
myDecorator = new HideableDecorator(myBeforeLaunchContainer, "", true) {
myDecorator = new HideableDecorator(myBeforeLaunchContainer, "", false) {
@Override
protected void on() {
super.on();
@@ -572,7 +572,10 @@ public class EditorTextField extends NonOpaquePanel implements DocumentListener,
}
});
}
else if (UIUtil.isUnderAlloyLookAndFeel()) {
else if (UIUtil.isUnderAlloyLookAndFeel() || UIUtil.isUnderJGoodiesLookAndFeel()) {
editor.setBorder(BorderFactory.createCompoundBorder(UIUtil.getTextFieldBorder(), BorderFactory.createEmptyBorder(1, 1, 1, 1)));
}
else {
editor.setBorder(BorderFactory.createCompoundBorder(UIUtil.getTextFieldBorder(), BorderFactory.createEmptyBorder(2, 2, 2, 2)));
}
}
@@ -101,8 +101,8 @@ public class HideableDecorator {
protected void on() {
myOn = true;
myTitledSeparator.getLabel().setIcon(AllIcons.General.ComboArrowDown);
myTitledSeparator.getLabel().setDisabledIcon(IconLoader.getTransparentIcon(AllIcons.General.ComboArrowDown, 0.5f));
myTitledSeparator.getLabel().setIcon(AllIcons.General.SplitDown);
myTitledSeparator.getLabel().setDisabledIcon(IconLoader.getTransparentIcon(AllIcons.General.SplitDown, 0.5f));
myTitledSeparator.getLabel().setIconTextGap(5);
if (myContent != null) {
myContent.setVisible(true);
@@ -114,10 +114,8 @@ public class HideableDecorator {
protected void off() {
myOn = false;
myTitledSeparator.getLabel().setIcon(AllIcons.General.ComboArrowRight);
myTitledSeparator.getLabel().setDisabledIcon(IconLoader.getTransparentIcon(AllIcons.General.ComboArrowRight, 0.5f));
myTitledSeparator.getLabel()
.setIconTextGap(5 + AllIcons.General.ComboArrowDown.getIconWidth() - AllIcons.General.ComboArrowRight.getIconWidth());
myTitledSeparator.getLabel().setIcon(AllIcons.General.SplitRight);
myTitledSeparator.getLabel().setDisabledIcon(IconLoader.getTransparentIcon(AllIcons.General.SplitRight, 0.5f));
if (myContent != null) {
myContent.setVisible(false);
myPreviousContentSize = myContent.getSize();
@@ -22,10 +22,7 @@ import com.intellij.openapi.diagnostic.Logger;
import com.intellij.openapi.util.*;
import com.intellij.openapi.util.registry.Registry;
import com.intellij.openapi.util.text.StringUtil;
import com.intellij.ui.ColorUtil;
import com.intellij.ui.Gray;
import com.intellij.ui.PanelWithAnchor;
import com.intellij.ui.SideBorder;
import com.intellij.ui.*;
import com.intellij.util.*;
import com.intellij.util.containers.ContainerUtil;
import org.intellij.lang.annotations.Language;
@@ -96,9 +93,12 @@ public class UIUtil {
if (isUnderAquaLookAndFeel()) {
c.putClientProperty("JComponent.sizeVariant",
componentStyle == ComponentStyle.REGULAR ? "regular" : componentStyle == ComponentStyle.SMALL ? "small" : "mini");
} else {
}
else {
c.setFont(getFont(
componentStyle == ComponentStyle.REGULAR ? FontSize.NORMAL : componentStyle == ComponentStyle.SMALL ? FontSize.SMALL : FontSize.MINI, c.getFont()));
componentStyle == ComponentStyle.REGULAR
? FontSize.NORMAL
: componentStyle == ComponentStyle.SMALL ? FontSize.SMALL : FontSize.MINI, c.getFont()));
}
Container p = c.getParent();
if (p != null) {
@@ -108,12 +108,13 @@ public class UIUtil {
public static Cursor getTextCursor(final Color backgroundColor) {
return SystemInfo.isMac && ColorUtil.isDark(backgroundColor) ?
MacUIUtil.getInvertedTextCursor(): Cursor.getPredefinedCursor(Cursor.TEXT_CURSOR);
MacUIUtil.getInvertedTextCursor() : Cursor.getPredefinedCursor(Cursor.TEXT_CURSOR);
}
/**
* Draws two horizontal lines, the first at {@code topY}, the second at {@code bottomY}.
* The purpose of this method (and the ground of the name) is to draw two lines framing a horizontal filled rectangle.
*
* @param g Graphics context to draw with.
* @param startX x-start point.
* @param endX x-end point.
@@ -128,12 +129,15 @@ public class UIUtil {
private static final GrayFilter DEFAULT_GRAY_FILTER = new GrayFilter(true, 65);
private static final GrayFilter DARCULA_GRAY_FILTER = new GrayFilter(true, 30);
public static GrayFilter getGrayFilter() {
return isUnderDarcula() ? DARCULA_GRAY_FILTER : DEFAULT_GRAY_FILTER;
}
public enum FontSize {NORMAL, SMALL, MINI}
public enum ComponentStyle {REGULAR, SMALL, MINI}
public enum FontColor {NORMAL, BRIGHTER}
public static final char MNEMONIC = BundleBase.MNEMONIC;
@@ -204,7 +208,8 @@ public class UIUtil {
private static final Ref<Boolean> ourRetina = Ref.create(SystemInfo.isMac ? null : false);
private UIUtil() { }
private UIUtil() {
}
public static boolean isRetina() {
synchronized (ourRetina) {
@@ -281,13 +286,15 @@ public class UIUtil {
public static void drawLinePickedOut(Graphics graphics, int x, int y, int x1, int y1) {
if (x == x1) {
int minY = Math.min(y, y1);
int maxY = Math.max(y, y1);
graphics.drawLine(x, minY+1, x1, maxY-1);
} else if (y == y1) {
int maxY = Math.max(y, y1);
graphics.drawLine(x, minY + 1, x1, maxY - 1);
}
else if (y == y1) {
int minX = Math.min(x, x1);
int maxX = Math.max(x, x1);
graphics.drawLine(minX+1, y, maxX-1, y1);
} else {
graphics.drawLine(minX + 1, y, maxX - 1, y1);
}
else {
drawLine(graphics, x, y, x1, y1);
}
}
@@ -327,7 +334,6 @@ public class UIUtil {
for (int i = 0; i < subComponentCount; i++) {
setEnabled(container.getComponent(i), enabled, recursively);
}
}
}
}
@@ -431,7 +437,8 @@ public class UIUtil {
public static Color getLabelFontColor(FontColor fontColor) {
Color defColor = getLabelForeground();
if (fontColor == FontColor.BRIGHTER) {
return new Color(Math.min(defColor.getRed() + 50, 255), Math.min(defColor.getGreen() + 50, 255), Math.min(defColor.getBlue() + 50, 255));
return new JBColor(new Color(Math.min(defColor.getRed() + 50, 255), Math.min(defColor.getGreen() + 50, 255), Math.min(
defColor.getBlue() + 50, 255)), defColor.darker());
}
return defColor;
}
@@ -592,8 +599,13 @@ public class UIUtil {
LookAndFeel.installBorder(contentPane, "PopupMenu.border");
}
/** @deprecated Motif is gone (to remove in IDEA 13) */
@SuppressWarnings("UnusedDeclaration") public static boolean isMotifLookAndFeel() { return false; }
/**
* @deprecated Motif is gone (to remove in IDEA 13)
*/
@SuppressWarnings("UnusedDeclaration")
public static boolean isMotifLookAndFeel() {
return false;
}
public static Color getTreeSelectionBorderColor() {
return UIManager.getColor("Tree.selectionBorderColor");
@@ -816,11 +828,11 @@ public class UIUtil {
}
public static Color getTableFocusCellForeground() {
return UIManager.getColor("Table.focusCellForeground");
return UIManager.getColor("Table.focusCellForeground");
}
/**
* @deprecated use com.intellij.util.ui.UIUtil#getPanelBackground() instead
* @deprecated use com.intellij.util.ui.UIUtil#getPanelBackground() instead
*/
public static Color getPanelBackgound() {
return getPanelBackground();
@@ -918,8 +930,13 @@ public class UIUtil {
return UIManager.getColor("OptionPane.background");
}
/** @deprecated Quaqua is gone (to remove in IDEA 13) */
@SuppressWarnings("UnusedDeclaration") public static boolean isUnderQuaquaLookAndFeel() { return false; }
/**
* @deprecated Quaqua is gone (to remove in IDEA 13)
*/
@SuppressWarnings("UnusedDeclaration")
public static boolean isUnderQuaquaLookAndFeel() {
return false;
}
@SuppressWarnings({"HardCodedStringLiteral"})
public static boolean isUnderAlloyLookAndFeel() {
@@ -941,8 +958,13 @@ public class UIUtil {
return UIManager.getLookAndFeel().getName().equals("Windows Classic");
}
/** @deprecated Metal is gone (to remove in IDEA 13) */
@SuppressWarnings("UnusedDeclaration") public static boolean isUnderMetalLookAndFeel() { return false; }
/**
* @deprecated Metal is gone (to remove in IDEA 13)
*/
@SuppressWarnings("UnusedDeclaration")
public static boolean isUnderMetalLookAndFeel() {
return false;
}
@SuppressWarnings({"HardCodedStringLiteral"})
public static boolean isUnderNimbusLookAndFeel() {
@@ -964,8 +986,13 @@ public class UIUtil {
return SystemInfo.isMac && (isUnderAquaLookAndFeel() || isUnderDarcula());
}
/** @deprecated Motif is gone (to remove in IDEA 13) */
@SuppressWarnings("UnusedDeclaration") public static boolean isUnderMotif() { return false; }
/**
* @deprecated Motif is gone (to remove in IDEA 13)
*/
@SuppressWarnings("UnusedDeclaration")
public static boolean isUnderMotif() {
return false;
}
@SuppressWarnings({"HardCodedStringLiteral"})
public static boolean isUnderDarcula() {
@@ -1056,8 +1083,12 @@ public class UIUtil {
return !isUnderNativeMacLookAndFeel();
}
/** @deprecated Quaqua is gone (to remove in IDEA 13) */
@SuppressWarnings("UnusedDeclaration") public static void removeQuaquaVisualMarginsIn(Component component) { }
/**
* @deprecated Quaqua is gone (to remove in IDEA 13)
*/
@SuppressWarnings("UnusedDeclaration")
public static void removeQuaquaVisualMarginsIn(Component component) {
}
public static boolean isControlKeyDown(MouseEvent mouseEvent) {
return SystemInfo.isMac ? mouseEvent.isMetaDown() : mouseEvent.isControlDown();
@@ -1182,9 +1213,9 @@ public class UIUtil {
}
public static void drawSearchMatch(final Graphics2D g,
final int startX,
final int endX,
final int height) {
final int startX,
final int endX,
final int height) {
Color c1 = new Color(255, 234, 162);
Color c2 = new Color(255, 208, 66);
drawSearchMatch(g, startX, endX, height, c1, c2);
@@ -1214,8 +1245,8 @@ public class UIUtil {
}
public static void drawRectPickedOut(Graphics2D g, int x, int y, int w, int h) {
g.drawLine(x+1, y, x+w-1, y);
g.drawLine(x+w, y+1, x+w, y+h-1);
g.drawLine(x + 1, y, x + w - 1, y);
g.drawLine(x + w, y + 1, x + w, y + h - 1);
g.drawLine(x + w - 1, y + h, x + 1, y + h);
g.drawLine(x, y + 1, x, y + h - 1);
}
@@ -1290,27 +1321,27 @@ public class UIUtil {
g.drawLine(x, drawTopLine ? 1 : 0, width, drawTopLine ? 1 : 0);
if (active) {
g.setColor(new Color(100, 150, 230, toolWindow? 50 : 30));
g.setColor(new Color(100, 150, 230, toolWindow ? 50 : 30));
g.fillRect(x, 0, width, height);
}
}
public static void drawDoubleSpaceDottedLine(final Graphics2D g,
final int start,
final int end,
final int xOrY,
final Color fgColor,
boolean horizontal) {
final int start,
final int end,
final int xOrY,
final Color fgColor,
boolean horizontal) {
g.setColor(fgColor);
for (int dot = start; dot < end; dot+=3) {
for (int dot = start; dot < end; dot += 3) {
if (horizontal) {
g.drawLine(dot, xOrY, dot, xOrY);
} else {
}
else {
g.drawLine(xOrY, dot, xOrY, dot);
}
}
}
private static void drawAppleDottedLine(final Graphics2D g,
@@ -1423,7 +1454,7 @@ public class UIUtil {
if (isRetina()) {
return RetinaImage.create(width, height, type);
}
//noinspection UndesirableClassUsage
//noinspection UndesirableClassUsage
return new BufferedImage(width, height, type);
}
@@ -1431,7 +1462,10 @@ public class UIUtil {
paintWithRetina(size, g, true, paintRoutine);
}
public static void paintWithRetina(@NotNull Dimension size, @NotNull Graphics g, boolean useRetinaCondition, Consumer<Graphics2D> paintRoutine) {
public static void paintWithRetina(@NotNull Dimension size,
@NotNull Graphics g,
boolean useRetinaCondition,
Consumer<Graphics2D> paintRoutine) {
if (!useRetinaCondition || !isRetina() || Registry.is("ide.mac.retina.disableDrawingFix", false)) {
paintRoutine.consume((Graphics2D)g);
}
@@ -1462,7 +1496,7 @@ public class UIUtil {
* The whole idea is that <a href="http://en.wikipedia.org/wiki/X_Rendering_Extension">XRender-based</a> pipeline doesn't support
* {@link AlphaComposite#SRC} and we should use {@link AlphaComposite#SRC_OVER} instead.
*
* @param g target graphics container
* @param g target graphics container
*/
public static void setupComposite(@NotNull Graphics2D g) {
g.setComposite(X_RENDER_ACTIVE.getValue() ? AlphaComposite.SrcOver : AlphaComposite.Src);
@@ -1611,7 +1645,7 @@ public class UIUtil {
@NonNls @Language("HTML")
String body = "body, div, td, p {" + fontFamilyAndSize + " " + (fgColor != null ? "color:" + ColorUtil.toHex(fgColor) : "") + "}";
if (resource != null) {
body += "ul {list-style-image: " + resource.toExternalForm() +"}";
body += "ul {list-style-image: " + resource.toExternalForm() + "}";
}
@NonNls String link = linkColor != null ? "a {" + fontFamilyAndSize + " color:" + ColorUtil.toHex(linkColor) + "}" : "";
return "<style> " + body + " " + link + "</style>";
@@ -1894,13 +1928,15 @@ public class UIUtil {
String each = html.substring(currentPos, currentPos + 1);
if ("<".equals(each)) {
braces++;
} else if (">".equals(each)) {
}
else if (">".equals(each)) {
braces--;
}
if (" ".equals(each) && braces == 0) {
result.append("&nbsp;");
} else {
}
else {
result.append(each);
}
currentPos++;
@@ -1955,12 +1991,13 @@ public class UIUtil {
/**
* Avoid blinking while changing background.
* @param component component.
* @param background new background.
*
* @param component component.
* @param background new background.
*/
public static void changeBackGround(final Component component, final Color background) {
final Color oldBackGround = component.getBackground();
if (background == null || !background.equals(oldBackGround)){
if (background == null || !background.equals(oldBackGround)) {
component.setBackground(background);
}
}
@@ -1974,7 +2011,8 @@ public class UIUtil {
ourSystemFontData = Pair.create(font.getName(), font.getSize());
}
}
catch (Exception ignored) { }
catch (Exception ignored) {
}
}
@Nullable
@@ -2024,7 +2062,7 @@ public class UIUtil {
else if (component != null) {
final String str = component.toString();
// skip default Component.toString and handle SimpleColoredComponent case
text = str == null || str.startsWith(component.getClass().getName()+"[")? null : str;
text = str == null || str.startsWith(component.getClass().getName() + "[") ? null : str;
}
else {
text = null;
@@ -2046,7 +2084,7 @@ public class UIUtil {
try {
final Field popup = BasicComboBoxUI.class.getDeclaredField("popup");
popup.setAccessible(true);
return (ComboPopup) popup.get(ui);
return (ComboPopup)popup.get(ui);
}
catch (NoSuchFieldException e) {
return null;
@@ -2107,11 +2145,12 @@ public class UIUtil {
@SuppressWarnings("deprecation")
public static void setComboBoxEditorBounds(int x, int y, int width, int height, JComponent editor) {
if(SystemInfo.isMac && isUnderAquaLookAndFeel()) {
if (SystemInfo.isMac && isUnderAquaLookAndFeel()) {
// fix for too wide combobox editor, see AquaComboBoxUI.layoutContainer:
// it adds +4 pixels to editor width. WTF?!
editor.reshape(x, y, width - 4, height - 1);
} else {
}
else {
editor.reshape(x, y, width, height);
}
}
@@ -2354,7 +2393,8 @@ public class UIUtil {
if (myDrawShadow) {
c = g.getColor();
g.setColor(myShadowColor);
g.drawLine(x - maxBulletWidth[0] - 10, yOffset[0] + fm.getDescent() + 1, x + maxWidth[0] + 10, yOffset[0] + fm.getDescent() + 1);
g.drawLine(x - maxBulletWidth[0] - 10, yOffset[0] + fm.getDescent() + 1, x + maxWidth[0] + 10,
yOffset[0] + fm.getDescent() + 1);
g.setColor(c);
}
}
@@ -2387,7 +2427,8 @@ public class UIUtil {
Component eachParent = c;
while (eachParent != null) {
if (eachParent instanceof JComponent) {
@SuppressWarnings({"unchecked"}) WeakReference<JRootPane> pane = (WeakReference<JRootPane>)((JComponent)eachParent).getClientProperty(ROOT_PANE);
@SuppressWarnings({"unchecked"}) WeakReference<JRootPane> pane =
(WeakReference<JRootPane>)((JComponent)eachParent).getClientProperty(ROOT_PANE);
if (pane != null) return pane.get();
}
eachParent = eachParent.getParent();
@@ -2407,7 +2448,7 @@ public class UIUtil {
}
public static Timer createNamedTimer(@NonNls @NotNull final String name, int delay, @NotNull ActionListener listener) {
return new Timer(delay, listener){
return new Timer(delay, listener) {
@Override
public String toString() {
return name;
@@ -2424,7 +2465,7 @@ public class UIUtil {
}
@Nullable
public static JComponent mergeComponentsWithAnchor(PanelWithAnchor...panels) {
public static JComponent mergeComponentsWithAnchor(PanelWithAnchor... panels) {
return mergeComponentsWithAnchor(Arrays.asList(panels));
}
@@ -2514,7 +2555,8 @@ public class UIUtil {
pixelGrabber.grabPixels();
return new Color(pixels[0]);
}
catch (InterruptedException ignored) { }
catch (InterruptedException ignored) {
}
}
return null;
@@ -2533,6 +2575,7 @@ public class UIUtil {
private static final Color DECORATED_ROW_BG_COLOR = new Color(242, 245, 249);
private static final Color DECORATED_ROW_BG_COLOR_DARK = Gray._75;
public static Color getDecoratedRowColor() {
return isUnderDarcula() ? DECORATED_ROW_BG_COLOR_DARK : DECORATED_ROW_BG_COLOR;
}
@@ -22,6 +22,7 @@ import com.intellij.openapi.actionSystem.ActionPlaces;
import com.intellij.openapi.actionSystem.CommonShortcuts;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.ui.Messages;
import com.intellij.openapi.ui.Splitter;
import com.intellij.openapi.vcs.ChangeListColumn;
import com.intellij.openapi.vcs.VcsBundle;
import com.intellij.openapi.vcs.VcsException;
@@ -159,17 +160,13 @@ public class CommittedChangesBrowser extends JPanel {
myLeftPanel.add(forwardButton, new GridBagConstraints(1, 1, 1, 1, 0, 0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(2,2,2,2), 0, 0));
}
JSplitPane leftSplitter = new JSplitPane(JSplitPane.VERTICAL_SPLIT);
leftSplitter.setTopComponent(myLeftPanel);
leftSplitter.setBottomComponent(commitPanel);
leftSplitter.setDividerLocation(0.8);
leftSplitter.setResizeWeight(0.8);
Splitter leftSplitter = new Splitter(true, 0.8f);
leftSplitter.setFirstComponent(myLeftPanel);
leftSplitter.setSecondComponent(commitPanel);
JSplitPane splitter = new JSplitPane();
splitter.setLeftComponent(leftSplitter);
splitter.setRightComponent(myChangesView);
splitter.setDividerLocation(0.5);
splitter.setResizeWeight(0.5);
Splitter splitter = new Splitter(false, 0.5f);
splitter.setFirstComponent(leftSplitter);
splitter.setSecondComponent(myChangesView);
add(splitter, BorderLayout.CENTER);
@@ -25,7 +25,6 @@ import java.awt.*;
* @author Evgeny Zakrevsky
*/
public class TaskCellRenderer extends DefaultListCellRenderer implements MatcherHolder {
private static final Color ISSUE_BG_COLOR = new Color(240, 240, 255);
private Matcher myMatcher;
private final Project myProject;
@@ -47,7 +46,7 @@ public class TaskCellRenderer extends DefaultListCellRenderer implements Matcher
final boolean isLocalTask = taskManager.findTask(task.getId()) != null;
final boolean isClosed = task.isClosed() || (task instanceof LocalTask && taskManager.isLocallyClosed((LocalTask)task));
final Color bg = sel ? UIUtil.getListSelectionBackground() : isLocalTask ? UIUtil.getListBackground() : ISSUE_BG_COLOR;
final Color bg = sel ? UIUtil.getListSelectionBackground() : isLocalTask ? UIUtil.getListBackground() : UIUtil.getDecoratedRowColor();
panel.setBackground(bg);
SimpleTextAttributes attr = getAttributes(sel, isClosed);
@@ -8,7 +8,7 @@
<properties/>
<border type="none"/>
<children>
<component id="9f69d" class="javax.swing.JFormattedTextField" binding="myHistoryLength">
<component id="5bcde" class="javax.swing.JTextField" binding="myHistoryLength">
<constraints>
<grid row="1" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="0" fill="1" indent="0" use-parent-layout="false">
<preferred-size width="50" height="-1"/>
@@ -23,7 +23,7 @@
<grid row="1" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<labelFor value="9f69d"/>
<labelFor value="5bcde"/>
<text value="Task history &amp;length:"/>
</properties>
</component>
@@ -71,10 +71,11 @@
<grid row="2" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<labelFor value="c5184"/>
<text value="Connection &amp;timeout:"/>
</properties>
</component>
<component id="f5566" class="javax.swing.JFormattedTextField" binding="myConnectionTimeout">
<component id="c5184" class="javax.swing.JTextField" binding="myConnectionTimeout">
<constraints>
<grid row="2" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="0" fill="1" indent="0" use-parent-layout="false">
<preferred-size width="50" height="-1"/>
@@ -125,11 +126,11 @@
</constraints>
<properties>
<horizontalAlignment value="4"/>
<labelFor value="4b4f6"/>
<labelFor value="b5108"/>
<text value="&amp;Update"/>
</properties>
</component>
<component id="4b4f6" class="javax.swing.JFormattedTextField" binding="myUpdateCount">
<component id="b5108" class="javax.swing.JTextField" binding="myUpdateCount">
<constraints>
<grid row="0" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="0" fill="1" indent="0" use-parent-layout="false">
<preferred-size width="50" height="-1"/>
@@ -145,11 +146,11 @@
</constraints>
<properties>
<horizontalAlignment value="4"/>
<labelFor value="fc85e"/>
<labelFor value="7e29b"/>
<text value="issues e&amp;very"/>
</properties>
</component>
<component id="fc85e" class="javax.swing.JFormattedTextField" binding="myUpdateInterval">
<component id="7e29b" class="javax.swing.JTextField" binding="myUpdateInterval">
<constraints>
<grid row="0" column="3" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="0" fill="1" indent="0" use-parent-layout="false">
<preferred-size width="50" height="-1"/>
@@ -74,4 +74,9 @@ public class AssemblaRepository extends GenericRepository {
public String getPresentableName() {
return StringUtil.isEmpty(getUsername()) ? "<undefined>" : getUsername() + "'s tickets";
}
@Override
public boolean isConfigured() {
return super.isConfigured() && StringUtil.isNotEmpty(getUsername()) && StringUtil.isNotEmpty(getPassword());
}
}