/** * * @param scriptField syntax text are to wrap * @param foldIndicatorEnabled flag, whether fold indicator should be enabled * @deprecated use {@link #getInstance(JSyntaxTextArea, boolean)} instead */ @Deprecated public JTextScrollPane(JSyntaxTextArea scriptField, boolean foldIndicatorEnabled) { super(scriptField); super.setFoldIndicatorEnabled(foldIndicatorEnabled); }
/** * * @param scriptField syntax text are to wrap * @param foldIndicatorEnabled flag, whether fold indicator should be enabled * @deprecated use {@link #getInstance(JSyntaxTextArea, boolean)} instead */ @Deprecated public JTextScrollPane(JSyntaxTextArea scriptField, boolean foldIndicatorEnabled) { super(scriptField); super.setFoldIndicatorEnabled(foldIndicatorEnabled); }
rTextScrollPane1.setFoldIndicatorEnabled(true); rTextScrollPane1.setLineNumbersEnabled(true);
@Override public void actionPerformed(ActionEvent e) { JTextComponent textComponent = getTextComponent(e); if (textComponent instanceof HttpPanelSyntaxHighlightTextArea) { HttpPanelSyntaxHighlightTextArea httpPanelTextArea = (HttpPanelSyntaxHighlightTextArea) textComponent; Component c = httpPanelTextArea.getParent(); if (c instanceof JViewport) { c = c.getParent(); if (c instanceof RTextScrollPane) { final RTextScrollPane scrollPane = (RTextScrollPane) c; scrollPane.setFoldIndicatorEnabled(!httpPanelTextArea.isCodeFoldingEnabled()); httpPanelTextArea.setCodeFoldingEnabled(!httpPanelTextArea.isCodeFoldingEnabled()); } } } } }
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); }
scrollPane.setFoldIndicatorEnabled(this.isCodeFoldingEnabled());