Package net.datacrow.core.objects

Examples of net.datacrow.core.objects.DcSimpleValue


        List<DcSimpleValue> values = new ArrayList<DcSimpleValue>();
        try {
            ResultSet rs = DatabaseManager.executeSQL(sql);
            DcImageIcon icon;
            DcSimpleValue sv;
            String s;
            while (rs.next()) {
                sv = new DcSimpleValue(rs.getString(1), rs.getString(2));
                if (useIcons) {
                    s = rs.getString(3);
                    if (!Utilities.isEmpty(s)) {
                        icon = Utilities.base64ToImage(s);
                        sv.setIcon(icon);
                    }
                }
                values.add(sv);
            }
               
View Full Code Here


            return renderer;
       
        setHorizontalAlignment(JLabel.LEFT);
       
        if (value instanceof DcSimpleValue) {
            DcSimpleValue sv = (DcSimpleValue) value;
            setText(sv.getName());
            setToolTipText(sv.getName());
            setIcon(sv.getIcon());
        }
       
        return renderer;
    }
View Full Code Here

        Collection<DcObject> current = currentItems == null ? new ArrayList<DcObject>() : currentItems;
       
        setTitle(DcModules.get(mappingModule.getReferencedModIdx()).getObjectNamePlural());
        buildDialog();
       
        DcSimpleValue sv;
        DcObject reference;
        DcMapping mapping;
        Collection<DcSimpleValue> selected = new ArrayList<DcSimpleValue>();
        for (DcObject dco : current) {
            mapping = (DcMapping) dco;
            reference = mapping.getReferencedObject();
            if (reference != null) {
                sv = new DcSimpleValue(reference.getID(),
                         String.valueOf(reference.getValue(reference.getSystemDisplayFieldIdx())),
                         reference.getIcon());
               
                selected.add(sv);
                tblSelectedItems.addRow(new DcSimpleValue[] {sv});
View Full Code Here

        @Override
        public void mouseReleased(MouseEvent e) {
            if (e.getClickCount() == 2) {
                if (direction == _LEFT) {
                    int row = tblSelectedItems.getSelectedIndex();
                    DcSimpleValue sv = (DcSimpleValue) tblSelectedItems.getValueAt(row, 0);
                    tblSelectedItems.getDcModel().removeRow(row);
                    tblAvailableItems.addRow(new Object[] {sv});
                    availableItems.add(sv);
                    tblSelectedItems.clearSelection();
                } else {
                    int row = tblAvailableItems.getSelectedIndex();
                    DcSimpleValue sv = (DcSimpleValue) tblAvailableItems.getValueAt(row, 0);
                    tblAvailableItems.getDcModel().removeRow(row);
                    tblSelectedItems.addRow(new Object[] {sv});
                    availableItems.remove(sv);
                    tblAvailableItems.clearSelection();
                }
View Full Code Here

TOP

Related Classes of net.datacrow.core.objects.DcSimpleValue

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.