scrollPane = new RTextScrollPane(textArea, true); scrollPane.setIconRowHeaderEnabled(true); textArea.setText("");
@Override public void actionPerformed(ActionEvent e) { scrollPane.setIconRowHeaderEnabled( !scrollPane.isIconRowHeaderEnabled()); }
setText("CExample.txt", SYNTAX_STYLE_C); RTextScrollPane scrollPane = new RTextScrollPane(textArea, true); scrollPane.setIconRowHeaderEnabled(true); scrollPane.getGutter().setBookmarkingEnabled(true);
private void configurarTextArea() { scrollPane.setFoldIndicatorEnabled(true); scrollPane.setIconRowHeaderEnabled(true); scrollPane.setLineNumbersEnabled(true); textArea.setSyntaxEditingStyle("text/por"); textArea.setCodeFoldingEnabled(true); textArea.setUseFocusableTips(true); textArea.addKeyListener(Editor.this); errorStrip = new ErrorStrip(textArea); //errorStrip.setBackground(textArea.getBackground()); //errorStrip.setOpaque(true); errorStrip.setCaretMarkerColor(getBackground()); add(errorStrip, BorderLayout.EAST); Icon iconeBreakPoint = IconFactory.createIcon(IconFactory.CAMINHO_ICONES_PEQUENOS, "bug.png"); ((PSTextArea) textArea).setIconeDosBreakPoints(iconeBreakPoint); }
private void configuraAparenciaEditorExemplo() { scrollPane.setIconRowHeaderEnabled(false); remove(errorStrip); setEditavel("false"); scrollPane.setOpaque(true); setBackground(getTextArea().getBackground()); scrollPane.setBackground(getTextArea().getBackground()); this.setBackground(getTextArea().getBackground()); scrollPane.getHorizontalScrollBar().getParent().getParent().setBackground(getTextArea().getBackground()); getTextArea().addPropertyChangeListener("background", (PropertyChangeEvent evt) -> { setBackground(getTextArea().getBackground()); scrollPane.setBackground(getTextArea().getBackground()); scrollPane.getHorizontalScrollBar().getParent().setBackground(getTextArea().getBackground()); }); }