/** * Paints the background of this component. * * @param g The graphics context. * @param visibleRect The visible bounds of this component. */ protected void paintBackgroundImpl(Graphics g, Rectangle visibleRect) { Color bg = getBackground(); if (inheritsGutterBackground && getGutter()!=null) { bg = getGutter().getBackground(); } g.setColor(bg); g.fillRect(0,visibleRect.y, width,visibleRect.height); }
bg = getGutter().getBackground();
bg = getGutter().getBackground();
gutterBackgroundColor = gutter.getBackground(); gutterBorderColor = gutter.getBorderColor(); activeLineRangeColor = gutter.getActiveLineRangeColor();
/** * Paints the background of this component. * * @param g The graphics context. * @param visibleRect The visible bounds of this component. */ protected void paintBackgroundImpl(Graphics g, Rectangle visibleRect) { Color bg = getBackground(); if (inheritsGutterBackground && getGutter()!=null) { bg = getGutter().getBackground(); } g.setColor(bg); g.fillRect(0,visibleRect.y, width,visibleRect.height); }
bg = getGutter().getBackground();
bg = getGutter().getBackground();
Assert.assertEquals(Color.red, gutter.getBackground()); Assert.assertEquals(Color.red, gutter.getBorderColor()); Assert.assertEquals(Color.red, gutter.getActiveLineRangeColor());
Assert.assertEquals(textArea1.getHyperlinkForeground(), textArea2.getHyperlinkForeground()); Assert.assertEquals(gutter1.getBackground(), gutter2.getBackground()); Assert.assertEquals(gutter1.getBorderColor(), gutter2.getBorderColor()); Assert.assertEquals(gutter1.getActiveLineRangeColor(), gutter2.getActiveLineRangeColor());
textArea2.getSecondaryLanguageBackground(i+1)); Assert.assertNotEquals(gutter1.getBackground(), gutter2.getBackground()); Assert.assertNotEquals(gutter1.getBorderColor(), gutter2.getBorderColor()); Assert.assertNotEquals(gutter1.getActiveLineRangeColor(), gutter2.getActiveLineRangeColor());
bg = getGutter().getBackground();
gutterBackgroundColor = gutter.getBackground(); gutterBorderColor = gutter.getBorderColor(); activeLineRangeColor = gutter.getActiveLineRangeColor();