Package chatroom.client.dataclass

Examples of chatroom.client.dataclass.SearchableListModel


    public void selectRoom(int ind) {
        roomList.setSelectedIndex(ind);
    }

    public void selectRoom(String name) {
        SearchableListModel model = ChatroomClient.getClient().getRoomListModel();
        if (name.length() > 0 && model.getSize() > 0) {
            int ind = model.longestMatch(name);
            if (ind > model.getSize()) {
                --ind;
            }
            roomList.setSelectedIndex(ind);
        }
    }
View Full Code Here


            @Override
            public void mouseClicked(MouseEvent e) {
                if (e.getClickCount() == 2) {
                    int index = roomList.locationToIndex(e.getPoint());
                    if (index != -1) {
                        SearchableListModel lModel = (SearchableListModel) roomList.getModel();
                        RoomPane r = (RoomPane) lModel.getElementAt(index);
                        ChatroomClient client = ChatroomClient.getClient();
                        if (r.isOpened()) {
                            client.getEntry().enterRoom(r);
                        } else {
                            r.clearAll();
View Full Code Here

TOP

Related Classes of chatroom.client.dataclass.SearchableListModel

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.