@Test public void testGetFoldIndicatorForeground() { RTextArea textArea = new RTextArea(PLAIN_TEXT); Gutter gutter = new Gutter(textArea); Color color = Color.red; gutter.setFoldIndicatorForeground(color); Assert.assertEquals(color, gutter.getFoldIndicatorForeground()); color = Color.green; gutter.setFoldIndicatorForeground(color); Assert.assertEquals(color, gutter.getFoldIndicatorForeground()); }
@Test public void testSetFoldIndicatorForeground() { RTextArea textArea = new RTextArea(PLAIN_TEXT); Gutter gutter = new Gutter(textArea); Color color = Color.red; gutter.setFoldIndicatorForeground(color); Assert.assertEquals(color, gutter.getFoldIndicatorForeground()); color = Color.green; gutter.setFoldIndicatorForeground(color); Assert.assertEquals(color, gutter.getFoldIndicatorForeground()); // Sets to default - not a public value, but also not Color.green. gutter.setFoldIndicatorForeground(null); Assert.assertNotNull(gutter.getFoldIndicatorForeground()); Assert.assertNotEquals(color, gutter.getFoldIndicatorForeground()); }
Font font = getFont(fontName, Font.PLAIN, fontSize); gutter.setLineNumberFont(font); gutter.setFoldIndicatorForeground(foldIndicatorFG); gutter.setFoldBackground(foldBG); gutter.setArmedFoldBackground(armedFoldBG);
gutter.setBorderColor( new Color(Integer.parseInt(temaEditor.getString("borda_barra_lateral"), 16))); gutter.setLineNumberColor( new Color(Integer.parseInt(temaEditor.getString("numeros_das_linhas"), 16))); gutter.setFoldIndicatorForeground( new Color(Integer.parseInt(temaEditor.getString("dobrador_de_codigo"), 16))); gutter.setFoldBackground( new Color(Integer.parseInt(temaEditor.getString("background_editor"), 16)));
gutter.setLineNumberColor(Color.orange); gutter.setLineNumberFont(font); gutter.setFoldIndicatorForeground(Color.orange); gutter.setFoldBackground(Color.orange); gutter.setArmedFoldBackground(Color.orange);
Font font = getFont(fontName, Font.PLAIN, fontSize); gutter.setLineNumberFont(font); gutter.setFoldIndicatorForeground(foldIndicatorFG); gutter.setFoldBackground(foldBG); gutter.setArmedFoldBackground(armedFoldBG);