Java Code Examples for java.awt.peer.TextComponentPeer#getText()
The following examples show how to use
java.awt.peer.TextComponentPeer#getText() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: TextComponent.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 6 votes |
/** * Writes default serializable fields to stream. Writes * a list of serializable TextListener(s) as optional data. * The non-serializable TextListener(s) are detected and * no attempt is made to serialize them. * * @serialData Null terminated sequence of zero or more pairs. * A pair consists of a String and Object. * The String indicates the type of object and * is one of the following : * textListenerK indicating and TextListener object. * * @see AWTEventMulticaster#save(ObjectOutputStream, String, EventListener) * @see java.awt.Component#textListenerK */ private void writeObject(java.io.ObjectOutputStream s) throws IOException { // Serialization support. Since the value of the fields // selectionStart, selectionEnd, and text aren't necessarily // up to date, we sync them up with the peer before serializing. TextComponentPeer peer = (TextComponentPeer)this.peer; if (peer != null) { text = peer.getText(); selectionStart = peer.getSelectionStart(); selectionEnd = peer.getSelectionEnd(); } s.defaultWriteObject(); AWTEventMulticaster.save(s, textListenerK, textListener); s.writeObject(null); }
Example 2
Source File: TextComponent.java From Java8CN with Apache License 2.0 | 6 votes |
/** * Writes default serializable fields to stream. Writes * a list of serializable TextListener(s) as optional data. * The non-serializable TextListener(s) are detected and * no attempt is made to serialize them. * * @serialData Null terminated sequence of zero or more pairs. * A pair consists of a String and Object. * The String indicates the type of object and * is one of the following : * textListenerK indicating and TextListener object. * * @see AWTEventMulticaster#save(ObjectOutputStream, String, EventListener) * @see java.awt.Component#textListenerK */ private void writeObject(java.io.ObjectOutputStream s) throws IOException { // Serialization support. Since the value of the fields // selectionStart, selectionEnd, and text aren't necessarily // up to date, we sync them up with the peer before serializing. TextComponentPeer peer = (TextComponentPeer)this.peer; if (peer != null) { text = peer.getText(); selectionStart = peer.getSelectionStart(); selectionEnd = peer.getSelectionEnd(); } s.defaultWriteObject(); AWTEventMulticaster.save(s, textListenerK, textListener); s.writeObject(null); }
Example 3
Source File: TextComponent.java From openjdk-8 with GNU General Public License v2.0 | 6 votes |
/** * Writes default serializable fields to stream. Writes * a list of serializable TextListener(s) as optional data. * The non-serializable TextListener(s) are detected and * no attempt is made to serialize them. * * @serialData Null terminated sequence of zero or more pairs. * A pair consists of a String and Object. * The String indicates the type of object and * is one of the following : * textListenerK indicating and TextListener object. * * @see AWTEventMulticaster#save(ObjectOutputStream, String, EventListener) * @see java.awt.Component#textListenerK */ private void writeObject(java.io.ObjectOutputStream s) throws IOException { // Serialization support. Since the value of the fields // selectionStart, selectionEnd, and text aren't necessarily // up to date, we sync them up with the peer before serializing. TextComponentPeer peer = (TextComponentPeer)this.peer; if (peer != null) { text = peer.getText(); selectionStart = peer.getSelectionStart(); selectionEnd = peer.getSelectionEnd(); } s.defaultWriteObject(); AWTEventMulticaster.save(s, textListenerK, textListener); s.writeObject(null); }
Example 4
Source File: TextComponent.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
/** * Writes default serializable fields to stream. Writes * a list of serializable TextListener(s) as optional data. * The non-serializable TextListener(s) are detected and * no attempt is made to serialize them. * * @serialData Null terminated sequence of zero or more pairs. * A pair consists of a String and Object. * The String indicates the type of object and * is one of the following : * textListenerK indicating and TextListener object. * * @see AWTEventMulticaster#save(ObjectOutputStream, String, EventListener) * @see java.awt.Component#textListenerK */ private void writeObject(java.io.ObjectOutputStream s) throws IOException { // Serialization support. Since the value of the fields // selectionStart, selectionEnd, and text aren't necessarily // up to date, we sync them up with the peer before serializing. TextComponentPeer peer = (TextComponentPeer)this.peer; if (peer != null) { text = peer.getText(); selectionStart = peer.getSelectionStart(); selectionEnd = peer.getSelectionEnd(); } s.defaultWriteObject(); AWTEventMulticaster.save(s, textListenerK, textListener); s.writeObject(null); }
Example 5
Source File: TextComponent.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 6 votes |
/** * Writes default serializable fields to stream. Writes * a list of serializable TextListener(s) as optional data. * The non-serializable TextListener(s) are detected and * no attempt is made to serialize them. * * @serialData Null terminated sequence of zero or more pairs. * A pair consists of a String and Object. * The String indicates the type of object and * is one of the following : * textListenerK indicating and TextListener object. * * @see AWTEventMulticaster#save(ObjectOutputStream, String, EventListener) * @see java.awt.Component#textListenerK */ private void writeObject(java.io.ObjectOutputStream s) throws IOException { // Serialization support. Since the value of the fields // selectionStart, selectionEnd, and text aren't necessarily // up to date, we sync them up with the peer before serializing. TextComponentPeer peer = (TextComponentPeer)this.peer; if (peer != null) { text = peer.getText(); selectionStart = peer.getSelectionStart(); selectionEnd = peer.getSelectionEnd(); } s.defaultWriteObject(); AWTEventMulticaster.save(s, textListenerK, textListener); s.writeObject(null); }
Example 6
Source File: TextComponent.java From jdk-1.7-annotated with Apache License 2.0 | 6 votes |
/** * Writes default serializable fields to stream. Writes * a list of serializable TextListener(s) as optional data. * The non-serializable TextListener(s) are detected and * no attempt is made to serialize them. * * @serialData Null terminated sequence of zero or more pairs. * A pair consists of a String and Object. * The String indicates the type of object and * is one of the following : * textListenerK indicating and TextListener object. * * @see AWTEventMulticaster#save(ObjectOutputStream, String, EventListener) * @see java.awt.Component#textListenerK */ private void writeObject(java.io.ObjectOutputStream s) throws IOException { // Serialization support. Since the value of the fields // selectionStart, selectionEnd, and text aren't necessarily // up to date, we sync them up with the peer before serializing. TextComponentPeer peer = (TextComponentPeer)this.peer; if (peer != null) { text = peer.getText(); selectionStart = peer.getSelectionStart(); selectionEnd = peer.getSelectionEnd(); } s.defaultWriteObject(); AWTEventMulticaster.save(s, textListenerK, textListener); s.writeObject(null); }
Example 7
Source File: TextComponent.java From jdk8u_jdk with GNU General Public License v2.0 | 6 votes |
/** * Writes default serializable fields to stream. Writes * a list of serializable TextListener(s) as optional data. * The non-serializable TextListener(s) are detected and * no attempt is made to serialize them. * * @serialData Null terminated sequence of zero or more pairs. * A pair consists of a String and Object. * The String indicates the type of object and * is one of the following : * textListenerK indicating and TextListener object. * * @see AWTEventMulticaster#save(ObjectOutputStream, String, EventListener) * @see java.awt.Component#textListenerK */ private void writeObject(java.io.ObjectOutputStream s) throws IOException { // Serialization support. Since the value of the fields // selectionStart, selectionEnd, and text aren't necessarily // up to date, we sync them up with the peer before serializing. TextComponentPeer peer = (TextComponentPeer)this.peer; if (peer != null) { text = peer.getText(); selectionStart = peer.getSelectionStart(); selectionEnd = peer.getSelectionEnd(); } s.defaultWriteObject(); AWTEventMulticaster.save(s, textListenerK, textListener); s.writeObject(null); }
Example 8
Source File: TextComponent.java From dragonwell8_jdk with GNU General Public License v2.0 | 6 votes |
/** * Writes default serializable fields to stream. Writes * a list of serializable TextListener(s) as optional data. * The non-serializable TextListener(s) are detected and * no attempt is made to serialize them. * * @serialData Null terminated sequence of zero or more pairs. * A pair consists of a String and Object. * The String indicates the type of object and * is one of the following : * textListenerK indicating and TextListener object. * * @see AWTEventMulticaster#save(ObjectOutputStream, String, EventListener) * @see java.awt.Component#textListenerK */ private void writeObject(java.io.ObjectOutputStream s) throws IOException { // Serialization support. Since the value of the fields // selectionStart, selectionEnd, and text aren't necessarily // up to date, we sync them up with the peer before serializing. TextComponentPeer peer = (TextComponentPeer)this.peer; if (peer != null) { text = peer.getText(); selectionStart = peer.getSelectionStart(); selectionEnd = peer.getSelectionEnd(); } s.defaultWriteObject(); AWTEventMulticaster.save(s, textListenerK, textListener); s.writeObject(null); }
Example 9
Source File: TextComponent.java From openjdk-8-source with GNU General Public License v2.0 | 6 votes |
/** * Writes default serializable fields to stream. Writes * a list of serializable TextListener(s) as optional data. * The non-serializable TextListener(s) are detected and * no attempt is made to serialize them. * * @serialData Null terminated sequence of zero or more pairs. * A pair consists of a String and Object. * The String indicates the type of object and * is one of the following : * textListenerK indicating and TextListener object. * * @see AWTEventMulticaster#save(ObjectOutputStream, String, EventListener) * @see java.awt.Component#textListenerK */ private void writeObject(java.io.ObjectOutputStream s) throws IOException { // Serialization support. Since the value of the fields // selectionStart, selectionEnd, and text aren't necessarily // up to date, we sync them up with the peer before serializing. TextComponentPeer peer = (TextComponentPeer)this.peer; if (peer != null) { text = peer.getText(); selectionStart = peer.getSelectionStart(); selectionEnd = peer.getSelectionEnd(); } s.defaultWriteObject(); AWTEventMulticaster.save(s, textListenerK, textListener); s.writeObject(null); }
Example 10
Source File: TextComponent.java From Java8CN with Apache License 2.0 | 5 votes |
/** * Removes the <code>TextComponent</code>'s peer. * The peer allows us to modify the appearance of the * <code>TextComponent</code> without changing its * functionality. */ public void removeNotify() { synchronized (getTreeLock()) { TextComponentPeer peer = (TextComponentPeer)this.peer; if (peer != null) { text = peer.getText(); selectionStart = peer.getSelectionStart(); selectionEnd = peer.getSelectionEnd(); } super.removeNotify(); } }
Example 11
Source File: TextComponent.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
/** * Removes the <code>TextComponent</code>'s peer. * The peer allows us to modify the appearance of the * <code>TextComponent</code> without changing its * functionality. */ public void removeNotify() { synchronized (getTreeLock()) { TextComponentPeer peer = (TextComponentPeer)this.peer; if (peer != null) { text = peer.getText(); selectionStart = peer.getSelectionStart(); selectionEnd = peer.getSelectionEnd(); } super.removeNotify(); } }
Example 12
Source File: TextComponent.java From dragonwell8_jdk with GNU General Public License v2.0 | 5 votes |
/** * Returns the text that is presented by this text component. * By default, this is an empty string. * * @return the value of this <code>TextComponent</code> * @see java.awt.TextComponent#setText */ public synchronized String getText() { TextComponentPeer peer = (TextComponentPeer)this.peer; if (peer != null) { text = peer.getText(); } return text; }
Example 13
Source File: TextComponent.java From hottub with GNU General Public License v2.0 | 5 votes |
/** * Returns the text that is presented by this text component. * By default, this is an empty string. * * @return the value of this <code>TextComponent</code> * @see java.awt.TextComponent#setText */ public synchronized String getText() { TextComponentPeer peer = (TextComponentPeer)this.peer; if (peer != null) { text = peer.getText(); } return text; }
Example 14
Source File: TextComponent.java From hottub with GNU General Public License v2.0 | 5 votes |
/** * Removes the <code>TextComponent</code>'s peer. * The peer allows us to modify the appearance of the * <code>TextComponent</code> without changing its * functionality. */ public void removeNotify() { synchronized (getTreeLock()) { TextComponentPeer peer = (TextComponentPeer)this.peer; if (peer != null) { text = peer.getText(); selectionStart = peer.getSelectionStart(); selectionEnd = peer.getSelectionEnd(); } super.removeNotify(); } }
Example 15
Source File: TextComponent.java From jdk8u_jdk with GNU General Public License v2.0 | 5 votes |
/** * Returns the text that is presented by this text component. * By default, this is an empty string. * * @return the value of this <code>TextComponent</code> * @see java.awt.TextComponent#setText */ public synchronized String getText() { TextComponentPeer peer = (TextComponentPeer)this.peer; if (peer != null) { text = peer.getText(); } return text; }
Example 16
Source File: TextComponent.java From jdk8u-jdk with GNU General Public License v2.0 | 5 votes |
/** * Returns the text that is presented by this text component. * By default, this is an empty string. * * @return the value of this <code>TextComponent</code> * @see java.awt.TextComponent#setText */ public synchronized String getText() { TextComponentPeer peer = (TextComponentPeer)this.peer; if (peer != null) { text = peer.getText(); } return text; }
Example 17
Source File: TextComponent.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
/** * Returns the text that is presented by this text component. * By default, this is an empty string. * * @return the value of this <code>TextComponent</code> * @see java.awt.TextComponent#setText */ public synchronized String getText() { TextComponentPeer peer = (TextComponentPeer)this.peer; if (peer != null) { text = peer.getText(); } return text; }
Example 18
Source File: TextComponent.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
/** * Returns the text that is presented by this text component. * By default, this is an empty string. * * @return the value of this {@code TextComponent} * @see java.awt.TextComponent#setText */ public synchronized String getText() { TextComponentPeer peer = (TextComponentPeer)this.peer; if (peer != null) { text = peer.getText(); } return text; }
Example 19
Source File: TextComponent.java From Bytecoder with Apache License 2.0 | 5 votes |
/** * Returns the text that is presented by this text component. * By default, this is an empty string. * * @return the value of this {@code TextComponent} * @see java.awt.TextComponent#setText */ public synchronized String getText() { TextComponentPeer peer = (TextComponentPeer)this.peer; if (peer != null) { text = peer.getText(); } return text; }
Example 20
Source File: TextComponent.java From Bytecoder with Apache License 2.0 | 5 votes |
/** * Removes the {@code TextComponent}'s peer. * The peer allows us to modify the appearance of the * {@code TextComponent} without changing its * functionality. */ public void removeNotify() { synchronized (getTreeLock()) { TextComponentPeer peer = (TextComponentPeer)this.peer; if (peer != null) { text = peer.getText(); selectionStart = peer.getSelectionStart(); selectionEnd = peer.getSelectionEnd(); } super.removeNotify(); } }