Examples of DcShortTextField


Examples of net.datacrow.console.components.DcShortTextField

                    || field.getIndex() == DcObject._SYS_LENDBY
                    || field.getIndex() == DcObject._SYS_LOANDURATION
                    || field.getIndex() == DcObject._SYS_CREATED
                    || field.getIndex() == DcObject._SYS_MODIFIED) {

                DcShortTextField text = ComponentFactory.getTextFieldDisabled();
                columnNew.setCellEditor(new DefaultCellEditor(text));
                DcTableCellRenderer renderer = DcTableCellRenderer.getInstance();
                renderer.setFont(ComponentFactory.getSystemFont());
                columnNew.setCellRenderer(renderer);
            } else if (field.getFieldType() == ComponentFactory._REFERENCESFIELD) {
                columnNew.setCellEditor(new DefaultCellEditor(ComponentFactory.getTextFieldDisabled()));
                columnNew.setCellRenderer(ReferencesTableCellRenderer.getInstance());
            } else if (field.getIndex() == DcObject._SYS_MODULE) {
                DcShortTextField text = ComponentFactory.getTextFieldDisabled();
                columnNew.setCellEditor(new DefaultCellEditor(text));
                columnNew.setCellRenderer(ModuleTableCellRenderer.getInstance());
            } else if (dco.getModule().getIndex() == DcModules._LOAN &&
                       field.getIndex() == Loan._C_CONTACTPERSONID) {
                DcShortTextField text = ComponentFactory.getTextFieldDisabled();
                columnNew.setCellEditor(new DefaultCellEditor(text));
                columnNew.setCellRenderer(ContactPersonTableCellRenderer.getInstance());
            } else {
                switch (field.getFieldType()) {
                case ComponentFactory._DATEFIELD:
                    columnNew.setCellEditor(new DefaultCellEditor(ComponentFactory.getTextFieldDisabled()));
                    columnNew.setCellRenderer(DateFieldCellRenderer.getInstance());
                    break;
                case ComponentFactory._AVAILABILITYCOMBO:
                    columnNew.setCellEditor(new DefaultCellEditor(ComponentFactory.getTextFieldDisabled()));
                    columnNew.setCellRenderer(AvailabilityCheckBoxTableCellRenderer.getInstance());
                    break;
                case ComponentFactory._CHECKBOX:
                    columnNew.setCellEditor(new DefaultCellEditor(ComponentFactory.getTextFieldDisabled()));
                    columnNew.setCellRenderer(CheckBoxTableCellRenderer.getInstance());
                    break;
                case ComponentFactory._FILESIZEFIELD:
                    columnNew.setCellEditor(new DefaultCellEditor((JTextField) getEditor(field)));
                    columnNew.setCellRenderer(FileSizeTableCellRenderer.getInstance());
                    break;
                case ComponentFactory._NUMBERFIELD:
                case ComponentFactory._DECIMALFIELD:
                    columnNew.setCellEditor(new DefaultCellEditor((JTextField) getEditor(field)));
                    columnNew.setCellRenderer(NumberTableCellRenderer.getInstance());
                    break;
                case ComponentFactory._LONGTEXTFIELD:
                case ComponentFactory._SHORTTEXTFIELD:
                    columnNew.setCellEditor(new DefaultCellEditor((JTextField) getEditor(field)));
                    break;
                case ComponentFactory._TIMEFIELD:
                    DcNumberField numberField = ComponentFactory.getNumberField();
                    columnNew.setCellEditor(new DefaultCellEditor(numberField));
                    columnNew.setCellRenderer(TimeFieldTableCellRenderer.getInstance());
                    break;
                case ComponentFactory._URLFIELD:
                    columnNew.setCellEditor(new DefaultCellEditor((JTextField) getEditor(field)));
                    DcTableCellRenderer renderer = DcTableCellRenderer.getInstance();
                    renderer.setForeground(new Color(0, 0, 255));
                    columnNew.setCellRenderer(renderer);
                    break;
                case ComponentFactory._PICTUREFIELD:
                    DcShortTextField text = ComponentFactory.getTextFieldDisabled();
                    text.setEditable(false);
                    text.setFont(ComponentFactory.getUnreadableFont());
                    columnNew.setCellEditor(new DefaultCellEditor(text));
                    columnNew.setCellRenderer(PictureTableCellRenderer.getInstance());
                    break;
                case ComponentFactory._REFERENCEFIELD:
                    columnNew.setCellRenderer(ComboBoxTableCellRenderer.getInstance());
View Full Code Here

Examples of net.datacrow.console.components.DcShortTextField

            JTextField textField = ComponentFactory.getTextFieldDisabled();
            c.setCellEditor(new DefaultCellEditor(textField));
            c.setHeaderValue(DcResources.getText("lblOriginalLabel"));

            c = table.getColumnModel().getColumn(_COL_CUSTOM_LABEL);
            DcShortTextField textName = ComponentFactory.getShortTextField(20);
            c.setCellEditor(new DefaultCellEditor(textName));
            c.setHeaderValue(DcResources.getText("lblCustomLabel"));

            c = table.getColumnModel().getColumn(_COL_ENABLED);
            JCheckBox checkEnabled = new JCheckBox();
View Full Code Here

Examples of net.datacrow.console.components.DcShortTextField

    @Override
    public void keyTyped(KeyEvent e) {}

    @Override
    public void keyReleased(KeyEvent e) {
        DcShortTextField txtFilter = (DcShortTextField) e.getSource();
        String filter = txtFilter.getText();
       
        if (filter.trim().length() == 0) {
            list.setListData(elements);
        } else {
            Vector<DcListElement> newElements = new Vector<DcListElement>();
View Full Code Here

Examples of net.datacrow.console.components.DcShortTextField

    @Override
    public void keyTyped(KeyEvent e) {}

    @Override
    public void keyReleased(KeyEvent e) {
        DcShortTextField txtFilter = (DcShortTextField) e.getSource();
        String filter = txtFilter.getText();
       
        if (filter.trim().length() == 0) {
            listLeft.setListData(elements);
        } else {
            Vector<DcListElement> newElements = new Vector<DcListElement>();
View Full Code Here

Examples of net.datacrow.console.components.DcShortTextField

        fptf.setMinimumSize(new Dimension(50, getPreferredFieldHeight()));
        return fptf;
    }

    public static final DcShortTextField getShortTextField(int maxTextLength) {
        DcShortTextField textField = new DcShortTextField(maxTextLength);
        textField.setFont(getStandardFont());
        textField.setPreferredSize(new Dimension(50, getPreferredFieldHeight()));
        textField.setMinimumSize(new Dimension(50, getPreferredFieldHeight()));
        return textField;
    }
View Full Code Here

Examples of net.datacrow.console.components.DcShortTextField

        textField.setMinimumSize(new Dimension(50, getPreferredFieldHeight()));
        return textField;
    }

    public static final DcShortTextField getISO9001ShortTextField(int maxTextLength) {
        DcShortTextField textField = new DcShortTextField(maxTextLength);
        textField.setFont(getStandardFont());
        textField.setPreferredSize(new Dimension(50, getPreferredFieldHeight()));
        textField.setMinimumSize(new Dimension(50, getPreferredFieldHeight()));
        return textField;
    }
View Full Code Here

Examples of net.datacrow.console.components.DcShortTextField

        textField.setMinimumSize(new Dimension(50, getPreferredFieldHeight()));
        return textField;
    }
   
    public static final DcShortTextField getTextFieldDisabled() {
        DcShortTextField textField = new DcShortTextField(4000);
        textField.setPreferredSize(new Dimension(50, getPreferredFieldHeight()));
        textField.setMinimumSize(new Dimension(50, getPreferredFieldHeight()));
        textField.setEnabled(false);
        textField.setEditable(false);
        textField.setFont(ComponentFactory.getStandardFont());
        textField.setForeground(ComponentFactory.getDisabledColor());

        return textField;
    }
View Full Code Here

Examples of net.datacrow.console.components.DcShortTextField

    public static final void setBorder(JComponent c) {
        c.setBorder(BorderFactory.createEtchedBorder(EtchedBorder.LOWERED));
    }
   
    public static final DcShortTextField getIdFieldDisabled() {
        DcShortTextField textField = new DcShortTextField(50);
        textField.setPreferredSize(new Dimension(50, getPreferredFieldHeight()));
        textField.setMinimumSize(new Dimension(50, getPreferredFieldHeight()));
        textField.setEnabled(false);
        textField.setEditable(false);
        textField.setFont(ComponentFactory.getStandardFont());
        textField.setForeground(ComponentFactory.getDisabledColor());
        return textField;
    }   
View Full Code Here

Examples of net.datacrow.console.components.DcShortTextField

    @Override
    public void keyTyped(KeyEvent e) {}

    @Override
    public void keyReleased(KeyEvent e) {
        DcShortTextField txtFilter = (DcShortTextField) e.getSource();
        String filter = txtFilter.getText();
       
        if (filter.trim().length() == 0) {
            tblAvailableItems.clear();
            tblAvailableItems.setRowCount(availableItems.size());
            int row = 0;
View Full Code Here
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.