Java Code Examples for java.awt.peer.ListPeer#getSelectedIndexes()

The following examples show how to use java.awt.peer.ListPeer#getSelectedIndexes() . 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: List.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Removes the peer for this list.  The peer allows us to modify the
 * list's appearance without changing its functionality.
 */
public void removeNotify() {
    synchronized (getTreeLock()) {
        ListPeer peer = (ListPeer)this.peer;
        if (peer != null) {
            selected = peer.getSelectedIndexes();
        }
        super.removeNotify();
    }
}
 
Example 2
Source File: List.java    From dragonwell8_jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Removes the peer for this list.  The peer allows us to modify the
 * list's appearance without changing its functionality.
 */
public void removeNotify() {
    synchronized (getTreeLock()) {
        ListPeer peer = (ListPeer)this.peer;
        if (peer != null) {
            selected = peer.getSelectedIndexes();
        }
        super.removeNotify();
    }
}
 
Example 3
Source File: List.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Removes the peer for this list.  The peer allows us to modify the
 * list's appearance without changing its functionality.
 */
public void removeNotify() {
    synchronized (getTreeLock()) {
        ListPeer peer = (ListPeer)this.peer;
        if (peer != null) {
            selected = peer.getSelectedIndexes();
        }
        super.removeNotify();
    }
}
 
Example 4
Source File: List.java    From Bytecoder with Apache License 2.0 5 votes vote down vote up
/**
 * Removes the peer for this list.  The peer allows us to modify the
 * list's appearance without changing its functionality.
 */
public void removeNotify() {
    synchronized (getTreeLock()) {
        ListPeer peer = (ListPeer)this.peer;
        if (peer != null) {
            selected = peer.getSelectedIndexes();
        }
        super.removeNotify();
    }
}
 
Example 5
Source File: List.java    From Java8CN with Apache License 2.0 5 votes vote down vote up
/**
 * Removes the peer for this list.  The peer allows us to modify the
 * list's appearance without changing its functionality.
 */
public void removeNotify() {
    synchronized (getTreeLock()) {
        ListPeer peer = (ListPeer)this.peer;
        if (peer != null) {
            selected = peer.getSelectedIndexes();
        }
        super.removeNotify();
    }
}
 
Example 6
Source File: List.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Removes the peer for this list.  The peer allows us to modify the
 * list's appearance without changing its functionality.
 */
public void removeNotify() {
    synchronized (getTreeLock()) {
        ListPeer peer = (ListPeer)this.peer;
        if (peer != null) {
            selected = peer.getSelectedIndexes();
        }
        super.removeNotify();
    }
}
 
Example 7
Source File: List.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Removes the peer for this list.  The peer allows us to modify the
 * list's appearance without changing its functionality.
 */
public void removeNotify() {
    synchronized (getTreeLock()) {
        ListPeer peer = (ListPeer)this.peer;
        if (peer != null) {
            selected = peer.getSelectedIndexes();
        }
        super.removeNotify();
    }
}
 
Example 8
Source File: List.java    From jdk8u-dev-jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Removes the peer for this list.  The peer allows us to modify the
 * list's appearance without changing its functionality.
 */
public void removeNotify() {
    synchronized (getTreeLock()) {
        ListPeer peer = (ListPeer)this.peer;
        if (peer != null) {
            selected = peer.getSelectedIndexes();
        }
        super.removeNotify();
    }
}
 
Example 9
Source File: List.java    From jdk8u_jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Removes the peer for this list.  The peer allows us to modify the
 * list's appearance without changing its functionality.
 */
public void removeNotify() {
    synchronized (getTreeLock()) {
        ListPeer peer = (ListPeer)this.peer;
        if (peer != null) {
            selected = peer.getSelectedIndexes();
        }
        super.removeNotify();
    }
}
 
Example 10
Source File: List.java    From jdk-1.7-annotated with Apache License 2.0 4 votes vote down vote up
/**
 * Writes default serializable fields to stream.  Writes
 * a list of serializable <code>ItemListeners</code>
 * and <code>ActionListeners</code> as optional data.
 * The non-serializable listeners are detected and
 * no attempt is made to serialize them.
 *
 * @serialData <code>null</code> terminated sequence of 0
 *  or more pairs; the pair consists of a <code>String</code>
 *  and an <code>Object</code>; the <code>String</code>
 *  indicates the type of object and is one of the
 *  following:
 *  <code>itemListenerK</code> indicating an
 *    <code>ItemListener</code> object;
 *  <code>actionListenerK</code> indicating an
 *    <code>ActionListener</code> object
 *
 * @param s the <code>ObjectOutputStream</code> to write
 * @see AWTEventMulticaster#save(ObjectOutputStream, String, EventListener)
 * @see java.awt.Component#itemListenerK
 * @see java.awt.Component#actionListenerK
 * @see #readObject(ObjectInputStream)
 */
private void writeObject(ObjectOutputStream s)
  throws IOException
{
  synchronized (this) {
    ListPeer peer = (ListPeer)this.peer;
    if (peer != null) {
      selected = peer.getSelectedIndexes();
    }
  }
  s.defaultWriteObject();

  AWTEventMulticaster.save(s, itemListenerK, itemListener);
  AWTEventMulticaster.save(s, actionListenerK, actionListener);
  s.writeObject(null);
}
 
Example 11
Source File: List.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Writes default serializable fields to stream.  Writes
 * a list of serializable <code>ItemListeners</code>
 * and <code>ActionListeners</code> as optional data.
 * The non-serializable listeners are detected and
 * no attempt is made to serialize them.
 *
 * @serialData <code>null</code> terminated sequence of 0
 *  or more pairs; the pair consists of a <code>String</code>
 *  and an <code>Object</code>; the <code>String</code>
 *  indicates the type of object and is one of the
 *  following:
 *  <code>itemListenerK</code> indicating an
 *    <code>ItemListener</code> object;
 *  <code>actionListenerK</code> indicating an
 *    <code>ActionListener</code> object
 *
 * @param s the <code>ObjectOutputStream</code> to write
 * @see AWTEventMulticaster#save(ObjectOutputStream, String, EventListener)
 * @see java.awt.Component#itemListenerK
 * @see java.awt.Component#actionListenerK
 * @see #readObject(ObjectInputStream)
 */
private void writeObject(ObjectOutputStream s)
  throws IOException
{
  synchronized (this) {
    ListPeer peer = (ListPeer)this.peer;
    if (peer != null) {
      selected = peer.getSelectedIndexes();
    }
  }
  s.defaultWriteObject();

  AWTEventMulticaster.save(s, itemListenerK, itemListener);
  AWTEventMulticaster.save(s, actionListenerK, actionListener);
  s.writeObject(null);
}
 
Example 12
Source File: List.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Writes default serializable fields to stream.  Writes
 * a list of serializable <code>ItemListeners</code>
 * and <code>ActionListeners</code> as optional data.
 * The non-serializable listeners are detected and
 * no attempt is made to serialize them.
 *
 * @serialData <code>null</code> terminated sequence of 0
 *  or more pairs; the pair consists of a <code>String</code>
 *  and an <code>Object</code>; the <code>String</code>
 *  indicates the type of object and is one of the
 *  following:
 *  <code>itemListenerK</code> indicating an
 *    <code>ItemListener</code> object;
 *  <code>actionListenerK</code> indicating an
 *    <code>ActionListener</code> object
 *
 * @param s the <code>ObjectOutputStream</code> to write
 * @see AWTEventMulticaster#save(ObjectOutputStream, String, EventListener)
 * @see java.awt.Component#itemListenerK
 * @see java.awt.Component#actionListenerK
 * @see #readObject(ObjectInputStream)
 */
private void writeObject(ObjectOutputStream s)
  throws IOException
{
  synchronized (this) {
    ListPeer peer = (ListPeer)this.peer;
    if (peer != null) {
      selected = peer.getSelectedIndexes();
    }
  }
  s.defaultWriteObject();

  AWTEventMulticaster.save(s, itemListenerK, itemListener);
  AWTEventMulticaster.save(s, actionListenerK, actionListener);
  s.writeObject(null);
}
 
Example 13
Source File: List.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Writes default serializable fields to stream.  Writes
 * a list of serializable <code>ItemListeners</code>
 * and <code>ActionListeners</code> as optional data.
 * The non-serializable listeners are detected and
 * no attempt is made to serialize them.
 *
 * @serialData <code>null</code> terminated sequence of 0
 *  or more pairs; the pair consists of a <code>String</code>
 *  and an <code>Object</code>; the <code>String</code>
 *  indicates the type of object and is one of the
 *  following:
 *  <code>itemListenerK</code> indicating an
 *    <code>ItemListener</code> object;
 *  <code>actionListenerK</code> indicating an
 *    <code>ActionListener</code> object
 *
 * @param s the <code>ObjectOutputStream</code> to write
 * @see AWTEventMulticaster#save(ObjectOutputStream, String, EventListener)
 * @see java.awt.Component#itemListenerK
 * @see java.awt.Component#actionListenerK
 * @see #readObject(ObjectInputStream)
 */
private void writeObject(ObjectOutputStream s)
  throws IOException
{
  synchronized (this) {
    ListPeer peer = (ListPeer)this.peer;
    if (peer != null) {
      selected = peer.getSelectedIndexes();
    }
  }
  s.defaultWriteObject();

  AWTEventMulticaster.save(s, itemListenerK, itemListener);
  AWTEventMulticaster.save(s, actionListenerK, actionListener);
  s.writeObject(null);
}
 
Example 14
Source File: List.java    From hottub with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Writes default serializable fields to stream.  Writes
 * a list of serializable <code>ItemListeners</code>
 * and <code>ActionListeners</code> as optional data.
 * The non-serializable listeners are detected and
 * no attempt is made to serialize them.
 *
 * @serialData <code>null</code> terminated sequence of 0
 *  or more pairs; the pair consists of a <code>String</code>
 *  and an <code>Object</code>; the <code>String</code>
 *  indicates the type of object and is one of the
 *  following:
 *  <code>itemListenerK</code> indicating an
 *    <code>ItemListener</code> object;
 *  <code>actionListenerK</code> indicating an
 *    <code>ActionListener</code> object
 *
 * @param s the <code>ObjectOutputStream</code> to write
 * @see AWTEventMulticaster#save(ObjectOutputStream, String, EventListener)
 * @see java.awt.Component#itemListenerK
 * @see java.awt.Component#actionListenerK
 * @see #readObject(ObjectInputStream)
 */
private void writeObject(ObjectOutputStream s)
  throws IOException
{
  synchronized (this) {
    ListPeer peer = (ListPeer)this.peer;
    if (peer != null) {
      selected = peer.getSelectedIndexes();
    }
  }
  s.defaultWriteObject();

  AWTEventMulticaster.save(s, itemListenerK, itemListener);
  AWTEventMulticaster.save(s, actionListenerK, actionListener);
  s.writeObject(null);
}
 
Example 15
Source File: List.java    From JDKSourceCode1.8 with MIT License 4 votes vote down vote up
/**
 * Writes default serializable fields to stream.  Writes
 * a list of serializable <code>ItemListeners</code>
 * and <code>ActionListeners</code> as optional data.
 * The non-serializable listeners are detected and
 * no attempt is made to serialize them.
 *
 * @serialData <code>null</code> terminated sequence of 0
 *  or more pairs; the pair consists of a <code>String</code>
 *  and an <code>Object</code>; the <code>String</code>
 *  indicates the type of object and is one of the
 *  following:
 *  <code>itemListenerK</code> indicating an
 *    <code>ItemListener</code> object;
 *  <code>actionListenerK</code> indicating an
 *    <code>ActionListener</code> object
 *
 * @param s the <code>ObjectOutputStream</code> to write
 * @see AWTEventMulticaster#save(ObjectOutputStream, String, EventListener)
 * @see java.awt.Component#itemListenerK
 * @see java.awt.Component#actionListenerK
 * @see #readObject(ObjectInputStream)
 */
private void writeObject(ObjectOutputStream s)
  throws IOException
{
  synchronized (this) {
    ListPeer peer = (ListPeer)this.peer;
    if (peer != null) {
      selected = peer.getSelectedIndexes();
    }
  }
  s.defaultWriteObject();

  AWTEventMulticaster.save(s, itemListenerK, itemListener);
  AWTEventMulticaster.save(s, actionListenerK, actionListener);
  s.writeObject(null);
}
 
Example 16
Source File: List.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 3 votes vote down vote up
/**
 * Gets the selected indexes on the list.
 *
 * @return        an array of the selected indexes on this scrolling list;
 *                if no item is selected, a zero-length array is returned.
 * @see           #select
 * @see           #deselect
 * @see           #isIndexSelected
 */
public synchronized int[] getSelectedIndexes() {
    ListPeer peer = (ListPeer)this.peer;
    if (peer != null) {
        selected = peer.getSelectedIndexes();
    }
    return selected.clone();
}
 
Example 17
Source File: List.java    From jdk8u-dev-jdk with GNU General Public License v2.0 3 votes vote down vote up
/**
 * Gets the selected indexes on the list.
 *
 * @return        an array of the selected indexes on this scrolling list;
 *                if no item is selected, a zero-length array is returned.
 * @see           #select
 * @see           #deselect
 * @see           #isIndexSelected
 */
public synchronized int[] getSelectedIndexes() {
    ListPeer peer = (ListPeer)this.peer;
    if (peer != null) {
        selected = peer.getSelectedIndexes();
    }
    return selected.clone();
}
 
Example 18
Source File: List.java    From jdk8u60 with GNU General Public License v2.0 3 votes vote down vote up
/**
 * Gets the selected indexes on the list.
 *
 * @return        an array of the selected indexes on this scrolling list;
 *                if no item is selected, a zero-length array is returned.
 * @see           #select
 * @see           #deselect
 * @see           #isIndexSelected
 */
public synchronized int[] getSelectedIndexes() {
    ListPeer peer = (ListPeer)this.peer;
    if (peer != null) {
        selected = peer.getSelectedIndexes();
    }
    return selected.clone();
}
 
Example 19
Source File: List.java    From jdk8u_jdk with GNU General Public License v2.0 3 votes vote down vote up
/**
 * Gets the selected indexes on the list.
 *
 * @return        an array of the selected indexes on this scrolling list;
 *                if no item is selected, a zero-length array is returned.
 * @see           #select
 * @see           #deselect
 * @see           #isIndexSelected
 */
public synchronized int[] getSelectedIndexes() {
    ListPeer peer = (ListPeer)this.peer;
    if (peer != null) {
        selected = peer.getSelectedIndexes();
    }
    return selected.clone();
}
 
Example 20
Source File: List.java    From dragonwell8_jdk with GNU General Public License v2.0 3 votes vote down vote up
/**
 * Gets the selected indexes on the list.
 *
 * @return        an array of the selected indexes on this scrolling list;
 *                if no item is selected, a zero-length array is returned.
 * @see           #select
 * @see           #deselect
 * @see           #isIndexSelected
 */
public synchronized int[] getSelectedIndexes() {
    ListPeer peer = (ListPeer)this.peer;
    if (peer != null) {
        selected = peer.getSelectedIndexes();
    }
    return selected.clone();
}