Package java.awt.peer

Examples of java.awt.peer.ListPeer


     * @param       index    the position of the item
     * @see         #getVisibleIndex
     */
    public synchronized void makeVisible(int index) {
        visibleIndex = index;
        ListPeer peer = (ListPeer)this.peer;
        if (peer != null) {
            peer.makeVisible(index);
        }
    }
View Full Code Here


     * replaced by <code>getPreferredSize(int)</code>.
     */
    @Deprecated
    public Dimension preferredSize(int rows) {
        synchronized (getTreeLock()) {
            ListPeer peer = (ListPeer)this.peer;
            return (peer != null) ?
                       peer.getPreferredSize(rows) :
                       super.preferredSize();
        }
    }
View Full Code Here

     * replaced by <code>getMinimumSize(int)</code>.
     */
    @Deprecated
    public Dimension minimumSize(int rows) {
        synchronized (getTreeLock()) {
            ListPeer peer = (ListPeer)this.peer;
            return (peer != null) ?
                       peer.getMinimumSize(rows) :
                       super.minimumSize();
        }
    }
View Full Code Here

    @Deprecated
    public synchronized void delItems(int start, int end) {
        for (int i = end; i >= start; i--) {
            items.removeElementAt(i);
        }
        ListPeer peer = (ListPeer)this.peer;
        if (peer != null) {
            peer.delItems(start, end);
        }
    }
View Full Code Here

     */
    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);
View Full Code Here

   */
  public synchronized int getSelectedIndex()
  {
    if (peer != null)
      {
        ListPeer l = (ListPeer) peer;
        selected = l.getSelectedIndexes ();
      }

    if (selected == null || selected.length != 1)
      return -1;
 
View Full Code Here

   */
  public synchronized int[] getSelectedIndexes()
  {
    if (peer != null)
      {
        ListPeer l = (ListPeer) peer;
        selected = l.getSelectedIndexes();
      }  
  
    return selected;
  }
View Full Code Here

    throws IllegalArgumentException
  {
    visibleIndex = index;
    if (peer != null)
      {
        ListPeer l = (ListPeer) peer;
        l.makeVisible (index);
      }
  }
View Full Code Here

   *
   * @param index The index of the item to select.
   */
  public synchronized void select(int index)
  {
    ListPeer lp = (ListPeer) getPeer();
    if (lp != null)
      lp.select(index);
   
   if (selected != null)
     {
       boolean found = false;
       for (int i = 0; i < selected.length; i++)
View Full Code Here

   */
  public synchronized void deselect(int index)
  {
    if (isSelected(index))
      {
        ListPeer lp = (ListPeer)getPeer();
        if (lp != null)
          lp.deselect(index);

        int[] temp = new int[selected.length - 1];
        for (int i = 0; i < temp.length; i++)
          {
            if (selected[i] != index)
View Full Code Here

TOP

Related Classes of java.awt.peer.ListPeer

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.