public void closeOpenTab(int index) { RTextScrollPane co = (RTextScrollPane) house.getComponentAt(index); RSyntaxTextArea pane = (RSyntaxTextArea) co.getViewport().getView(); OpenFile open = null; for (OpenFile file : hmap) if (pane.equals(file.textArea)) open = file; if (open != null && hmap.contains(open)) hmap.remove(open); house.remove(co); if (open != null) open.close(); }
public RSyntaxTextArea getCurrentTextArea() { RSyntaxTextArea currentTextArea = null; try { int pos = house.getSelectedIndex(); System.out.println(pos); if (pos >= 0) { RTextScrollPane co = (RTextScrollPane) house.getComponentAt(pos); currentTextArea = (RSyntaxTextArea) co.getViewport().getView(); } } catch (Exception e1) { Luyten.showExceptionDialog("Exception!", e1); } if (currentTextArea == null) { getLabel().setText("No open tab"); } return currentTextArea; }
JViewport vp = scrollPane.getViewport(); if (vp == null) { return;
/** * Returns the text area being displayed. * * @return The text area. * @see #setViewportView(Component) */ public RTextArea getTextArea() { return (RTextArea)getViewport().getView(); }
/** * Returns the text area being displayed. * * @return The text area. * @see #setViewportView(Component) */ public RTextArea getTextArea() { return (RTextArea)getViewport().getView(); }
/** * Returns the text area being displayed. * * @return The text area. * @see #setViewportView(Component) */ public RTextArea getTextArea() { return (RTextArea)getViewport().getView(); }
/** * Returns the text area being displayed. * * @return The text area. * @see #setViewportView(Component) */ public RTextArea getTextArea() { return (RTextArea)getViewport().getView(); }
private void $completeSetup() { allComponentsCreated = true; if (log.isDebugEnabled()) { log.debug(this); } // inline complete setup of $JPanel0 add($RTextScrollPane0, BorderLayout.CENTER); add($JButton0, BorderLayout.SOUTH); // inline complete setup of $RTextScrollPane0 $RTextScrollPane0.getViewport().add(fieldSimulPreScript); // apply 2 property setters fieldSimulPreScript.setSyntaxEditingStyle(org.fife.ui.rsyntaxtextarea.SyntaxConstants.SYNTAX_STYLE_JAVA); }