Package com.dci.intellij.dbn.debugger.execution.ui

Source Code of com.dci.intellij.dbn.debugger.execution.ui.ObjectListCellRenderer

package com.dci.intellij.dbn.debugger.execution.ui;

import com.dci.intellij.dbn.object.common.DBObject;

import javax.swing.DefaultListCellRenderer;
import javax.swing.JLabel;
import javax.swing.JList;
import java.awt.Component;

public class ObjectListCellRenderer extends DefaultListCellRenderer {
    public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) {
        DBObject object = (DBObject) value;
        JLabel label = (JLabel) super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus );
        label.setIcon(object.getIcon(0));
        label.setText(object.getQualifiedName());
        return label;
    }
}
TOP

Related Classes of com.dci.intellij.dbn.debugger.execution.ui.ObjectListCellRenderer

TOP
Copyright © 2018 www.massapi.com. 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.