Examples of JComponent


Examples of javax.swing.JComponent

        this.setLayout(Layout.getGBL());
       
        for (Setting setting : settings.values()) {
            if (ignoreUISettings || setting.showToUser()) {
                JLabel label = ComponentFactory.getLabel(setting.getLabelText());
                JComponent c = setting.getUIComponent();
               
                boolean simplecomp = false;
                if (c instanceof JComboBox || c instanceof JTextField || c instanceof DcCheckBox) {
                    c.setMinimumSize(new Dimension(200, ComponentFactory.getPreferredFieldHeight()));
                    c.setPreferredSize(new Dimension(200, ComponentFactory.getPreferredFieldHeight()));
                    c.setMaximumSize(new Dimension(200, ComponentFactory.getPreferredFieldHeight()));
                    simplecomp = true;
                }
               
                if (c instanceof DcFontSelector) {
                    c.setBorder(ComponentFactory.getTitleBorder(setting.getLabelText()));
                }

                components.put(setting, c);
               
                if (setting.displayLabel()) {
View Full Code Here

Examples of javax.swing.JComponent

      int y = 1;
          for (String key : wizard.getDefinition().getImporter().getSettingKeys()) {
            Setting setting = DcSettings.getSetting(key) != null ? DcSettings.getSetting(key) :
              wizard.getModule().getSettings().getSetting(key);
           
            JComponent c = setting.getUIComponent();
            settings.put(key, (IComponent) c);
           
            JLabel label = ComponentFactory.getLabel(setting.getLabelText());
 
            add(label,
View Full Code Here

Examples of javax.swing.JComponent

   
    @Override
    public Component getTableCellRendererComponent(
            JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
       
        JComponent c = (JComponent) super.getTableCellRendererComponent(table, 
                                            value,
                                            isSelected,
                                            hasFocus,
                                            row,
                                            column);       
View Full Code Here

Examples of javax.swing.JComponent

            return null;
        }
    }

    private void setSearchField(DcField field) {
        JComponent c = ComponentFactory.getComponent(field.getModule(), field.getReferenceIdx(), field.getIndex(), field.getFieldType(), field.getLabel(), 255);
       
        if (c instanceof DcReferenceField)
            c = ((DcReferenceField) c).getComboBox();
       
        comboCriteria.removeAllItems();
View Full Code Here

Examples of javax.swing.JComponent

    public static class CustomCellRenderer implements ListCellRenderer {
        @Override
        public Component getListCellRendererComponent(
                JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) {
           
            JComponent component = (JComponent) value;
            Color selectionColor = DcSettings.getColor(DcRepository.Settings.stSelectionColor);
            component.setBackground(isSelected ? selectionColor : Color.WHITE);
            return component;
        }
View Full Code Here

Examples of javax.swing.JComponent

    @Override
    public Component getTableCellRendererComponent(
            JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
       
        JComponent c = (JComponent) super.getTableCellRendererComponent(table, 
                                            value,
                                            isSelected,
                                            hasFocus,
                                            row,
                                            column);       
View Full Code Here

Examples of javax.swing.JComponent

                try {
                 
                    for (DcFieldDefinition definition : module.getFieldDefinitions().getDefinitions()) {
                        int index = definition.getIndex();
                        DcField field = dco.getField(index);
                        JComponent component = fields.get(field);
                       
                        if (component == null)
                            break;
                       
                        if (    component.isShowing() &&
                            (component instanceof JTextField || component instanceof DcLongTextField) &&
                                field.isEnabled() && component.getParent() != null) {
                            component.requestFocusInWindow();
                            break;
                        }
                    }
                } catch (Exception e) {
                    logger.error(e, e);
View Full Code Here

Examples of javax.swing.JComponent

            int[] indices = object.getFieldIndices();
            for (int i = 0; i < indices.length; i++) {
                int index = indices[i];
               
                DcField field = dco.getField(index);
                JComponent component = fields.get(field);
                Object oldValue = ComponentFactory.getValue(component);
                Object newValue = object.getValue(index);
   
                if (newValue instanceof Picture)
                    ((Picture) newValue).loadImage(false);
View Full Code Here

Examples of javax.swing.JComponent

    @SuppressWarnings("unchecked")
    private boolean isChanged(int fieldIdx) {
        boolean changed = false;
       
        DcField field = dcoOrig.getField(fieldIdx);
        JComponent component = fields.get(field);
        Object o = ComponentFactory.getValue(component);

        if (field.getValueType() == DcRepository.ValueTypes._ICON) {
            byte[] newValue = o == null ? new byte[0] : ((DcImageIcon) o).getBytes();
           
View Full Code Here

Examples of javax.swing.JComponent

        if (update)
            dco.markAsUnchanged();
       
        for (DcField field : fields.keySet()) {
           
            JComponent component = fields.get(field);
            Object value = ComponentFactory.getValue(component);
            value = value == null ? "" : value;

            if (update && isChanged(field.getIndex())) {
                dco.setValue(field.getIndex(), value);
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.