/** * Called when the UI is being removed from the * interface of a JTextComponent. This is used to * unregister any listeners that were attached. * * @param c The text component. If this is not an * <code>RTextArea</code>, an <code>Exception</code> * will be thrown. */ @Override public void deinstall(JTextComponent c) { if (!(c instanceof RTextArea)) { throw new IllegalArgumentException( "c must be instance of RTextArea"); } super.deinstall(c); c.setNavigationFilter(null); }
/** * Installs this caret on a text component. * * @param c The text component. If this is not an {@link RTextArea}, * an <code>Exception</code> will be thrown. */ @Override public void install(JTextComponent c) { if (!(c instanceof RTextArea)) { throw new IllegalArgumentException( "c must be instance of RTextArea"); } super.install(c); c.setNavigationFilter(new FoldAwareNavigationFilter()); }
/** * Called when the UI is being removed from the * interface of a JTextComponent. This is used to * unregister any listeners that were attached. * * @param c The text component. If this is not an * <code>RTextArea</code>, an <code>Exception</code> * will be thrown. */ @Override public void deinstall(JTextComponent c) { if (!(c instanceof RTextArea)) { throw new IllegalArgumentException( "c must be instance of RTextArea"); } super.deinstall(c); c.setNavigationFilter(null); }
/** * Installs this caret on a text component. * * @param c The text component. If this is not an {@link RTextArea}, * an <code>Exception</code> will be thrown. */ @Override public void install(JTextComponent c) { if (!(c instanceof RTextArea)) { throw new IllegalArgumentException( "c must be instance of RTextArea"); } super.install(c); c.setNavigationFilter(new FoldAwareNavigationFilter()); }
ProtectedDocument(JTextComponent component) { doc = (AbstractDocument) component.getDocument(); doc.setDocumentFilter(new ProtectedDocumentFilter()); component.setNavigationFilter(new ProtectedNavigationFilter(component)); }
public static void createNavigationFilter(ActionContext actionContext){ Thing self = (Thing) actionContext.get("self"); JTextComponent parent = (JTextComponent) actionContext.get("parent"); for(Thing child : self.getChilds()){ NavigationFilter l = (NavigationFilter) child.doAction("create", actionContext); if(l != null){ parent.setNavigationFilter(l); break; } } }
textField.setNavigationFilter(new NavigationFilterPrefixWithBackspace(textField.getDocument().getLength(), textField)); JFrame frame = new JFrame("Navigation Filter Example"); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
textField.setNavigationFilter( new NavigationFilterPrefixWithBackspace(7, textField) );
textField.setNavigationFilter(new NavigationFilterPrefixWithBackspace(7, textField)); JFrame frame = new JFrame("Navigation Filter Example"); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
textField.setNavigationFilter( new NavigationFilterPrefixWithBackspace(7, textField) );
terminal.getActionMap().put("enter", enterAction); terminal.setNavigationFilter(new NavigationFilterSuffix(terminal.getRows(), terminal.getDocument()));
textField.setNavigationFilter( new NavigationFilterPrefixWithBackspace(7, textField) );
textField.setNavigationFilter( new NavigationFilterPrefixWithBackspace(7, textField) );
textField.setNavigationFilter( new NavigationFilterPrefixWithBackspace(7, textField) );
textField.setNavigationFilter( new NavigationFilterPrefixWithBackspace(7, textField) );