Package Control.Interfaces

Examples of Control.Interfaces.ListElement


    offset = positionInPanel;
    positionInPanel *= -1;

    Contact contact = null;
    Group group = null;
    ListElement listElement;
    g.setColor(Color.black);
    g.setFont(new Font("Tahoma", Font.PLAIN, 11));

    for(int i = 0; i <= lastElementIndex - firstElementIndex; i++){
      listElement = displayedElements.get(firstElementIndex + i);

      if(firstElementIndex + i == highlightedElementIndex){

        g.setColor(hightlightColor);
        g.fillRect(0, positionInPanel, getWidth(), ELEMENT_HEIGHT);
        g.setColor(Color.black);
      }

      if(firstElementIndex + i == markedElementIndex){

        g.setColor(markColor);
        g.fillRect(0, positionInPanel, getWidth(), ELEMENT_HEIGHT);
        g.setColor(Color.black);
      }

      if(listElement.isContactElement()){
        contact = (Contact) listElement;

        switch(contact.getStatus()){
        case Online: g.drawImage(symbols[0], 12, positionInPanel + 2, 15, 15, null); break;
        case Offline: g.drawImage(symbols[3], 12, positionInPanel + 2, 15, 15, null); break;
        case Invisible: g.drawImage(symbols[2], 12, positionInPanel + 2, 15, 15, null); break;
        case NotAvailable: g.drawImage(symbols[1], 12, positionInPanel + 2, 15, 15, null); break;
        }
      }else{
        group = (Group) listElement;
      }
      g.drawString(listElement.getDisplayedName(), 37, positionInPanel + 15);
      positionInPanel += 20;
    }
  }
View Full Code Here

TOP

Related Classes of Control.Interfaces.ListElement

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.