Adult web hosting - Java Swing - O Reilly 22.1.2.2 Events A ChangeEvent
Wednesday, October 31st, 2007Java Swing - O Reilly 22.1.2.2 Events A ChangeEvent is fired to registered listeners whenever the caret’s position changes. The usual implementations of the following methods are provided: public void addChangeListener(ChangeListener l) public void removeChangeListener(ChangeListener l) protected void fireStateChanged() 22.1.2.3 Fields The following protected fields are available to subclasses of DefaultCaret, though neither should normally be needed: protected EventListenerList listenerList The list of listeners added to this component. protected transientChangeEvent changeEvent The ChangeEvent used whenever the caret position changes. Since the source is always this, there is no reason to create a new event each time. 22.1.2.4 Constructors public DefaultCaret() Creates a nonblinking DefaultCaret. 22.1.2.5 Caret Methods DefaultCaret provides the following implementations of the methods defined by the Caret interface: public void deinstall(JTextComponent c) Causes the caret to remove itself as a listener from the component and its model. If the blink rate has been set, the Timer responsible for the blinking is stopped (see Chapter 27). The Caret should no longer be used once this method has been called. public void install(JTextComponent c) Adds an instance of an inner class as a DocumentListener to the component’s model and as a PropertyListener of the component (so it will be notified if the Document is changed). In addition, the caret itself is added as a FocusListener, MouseListener, and MouseMotionListener of the component. public void moveDot(int dot) Moves the Caret to the specified position, using the component’s Highlighter to highlight the area over which the cursor has been dragged. - 734
We highly recommend you visit web and email hosting services if you need stable and cheap web hosting platform for your web applications.