Package datasoul.serviceitems

Examples of datasoul.serviceitems.ServiceItem


        sb.append("</h2>");
       
        sb.append("<table class='objtable'>");
       
        for (int i=0; i<slt.getRowCount(); i++){
            ServiceItem si = slt.getServiceItem(i);
            if (si instanceof TextServiceItem){
                sb.append("<tr class='objhdr' onclick='showHide(data"+i+");'><td>");
                sb.append(si.getTitle());
                sb.append("</td></tr>");
                sb.append("<tr id='data"+i+"' class='objcontent'><td>");
                sb.append( ((TextServiceItem)si).getText().replaceAll("===", "<br>").replaceAll("==", "").replaceAll("\n", "<br>") );
                sb.append("</td></tr>");
            }
View Full Code Here


    public Component getTableCellRendererComponent(JTable table, Object value,
                          boolean isSelected, boolean hasFocus, int row, int column) {

       
        ServiceItem serviceItem;
        if (table.getModel() instanceof ServiceListTable){
            serviceItem = ((ServiceListTable) table.getModel()).getServiceItem(row);
        }else{
            return super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column);
        }
       
       
        String text = "";
        if (value != null){
            text = value.toString();
        }
       
        setText(text);

        if (column == ServiceListTable.COLUMN_TITLE){
            setIcon(serviceItem.getIcon());
        }else{
            setIcon(null);
        }
       
        if(isSelected){
            setBackground(table.getSelectionBackground());
            setForeground(table.getSelectionForeground());
        }else{
            setForeground(table.getForeground());
            Color c = serviceItem.getBackgroundColor();
            if (c != null) {
                setBackground(c);
            }
        }
View Full Code Here

TOP

Related Classes of datasoul.serviceitems.ServiceItem

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.