Examples of FormOption


Examples of fr.adrienbrault.idea.symfony2plugin.form.dict.FormOption

            // methodReference.getSignature().equals("#M#C\\Symfony\\Component\\OptionsResolver\\OptionsResolverInterface.setDefaults")
            if(PhpElementsUtil.isEqualMethodReferenceName(methodReference, "setDefaults")) {
                PsiElement[] parameters = methodReference.getParameters();
                if(parameters.length > 0 && parameters[0] instanceof ArrayCreationExpression) {
                    for(String key: PhpElementsUtil.getArrayCreationKeys((ArrayCreationExpression) parameters[0])) {
                        options.put(key, new FormOption(key, formClass));
                    }
                }

            }
View Full Code Here

Examples of org.apache.harmony.x.swing.text.html.form.FormOption

                    radioGroupped.put(name, buttonModel);
                }
            }

            private void handleOption(final Tag tag, final AttributeSet attr) {
                FormOption option = null;
                FormOptionGroup currentGroup = (selectModel != null) ? selectModel
                        .getRootOptionGroup().getCurrentGroup() : null;
                       
                if (Tag.OPTION.equals(tag)) {
                    option = new FormOption(currentGroup, attr);
                    openedBlocks.add(Tag.OPTION);
                } else if (Tag.OPTGROUP.equals(tag)) {
                    currentGroup = new FormOptionGroup(currentGroup, attr);
                    option = currentGroup;
                }
View Full Code Here

Examples of org.apache.harmony.x.swing.text.html.form.FormOption

                    radioGroupped.put(name, buttonModel);
                }
            }

            private void handleOption(final Tag tag, final AttributeSet attr) {
                FormOption option = null;
                FormOptionGroup currentGroup = (selectModel != null) ? selectModel
                        .getRootOptionGroup().getCurrentGroup() : null;
                       
                if (Tag.OPTION.equals(tag)) {
                    option = new FormOption(currentGroup, attr);
                    openedBlocks.add(Tag.OPTION);
                } else if (Tag.OPTGROUP.equals(tag)) {
                    currentGroup = new FormOptionGroup(currentGroup, attr);
                    option = currentGroup;
                }
View Full Code Here

Examples of org.apache.harmony.x.swing.text.html.form.FormOption

        attr.addAttribute(HTML.Attribute.SELECTED, "true");
        attr.addAttribute(HTML.Attribute.LABEL, label);
        action.start(Tag.OPTGROUP, attr);
        assertEquals(1, model.getSize());
        assertNotNull(model.getElementAt(0));
        FormOption option = (FormOption)model.getElementAt(0);
        assertFalse(option.isSelected());
        assertEquals(label, option.getLabel());
        assertNull(option.getValue());
        reader.handleText(text.toCharArray(), 0);
        assertEquals(1, model.getSize());
        assertNotNull(model.getElementAt(0));
        option = (FormOption)model.getElementAt(0);
        assertFalse(option.isSelected());
        assertEquals(label, option.getLabel());
        assertNull(option.getValue());
        assertEquals(0, option.getDepth());

        attr.addAttribute(HTML.Attribute.SELECTED, "true");
        attr.addAttribute(HTML.Attribute.VALUE, value);
        attr.addAttribute(HTML.Attribute.LABEL, label);
        action.start(Tag.OPTGROUP, attr);
        assertEquals(2, model.getSize());
        assertNotNull(model.getElementAt(1));
        option = (FormOption)model.getElementAt(1);
        assertFalse(option.isSelected());
        assertEquals(label, option.getLabel());
        assertNull(option.getValue());
        reader.handleText(text.toCharArray(), 0);
        assertEquals(2, model.getSize());
        assertNotNull(model.getElementAt(1));
        option = (FormOption)model.getElementAt(1);
        assertFalse(option.isSelected());
        assertEquals(label, option.getLabel());
        assertNull(option.getValue());
        assertEquals(1, option.getDepth());
        action.end(Tag.OPTGROUP);
        action.end(Tag.OPTGROUP);
        action.end(Tag.SELECT);
        assertEquals(3, specAttr.getAttributeCount());
    }
View Full Code Here

Examples of org.apache.harmony.x.swing.text.html.form.FormOption

        attr.addAttribute(HTML.Attribute.SELECTED, "true");
        attr.addAttribute(HTML.Attribute.LABEL, label);
        action.start(Tag.OPTGROUP, attr);
        assertEquals(1, model.getSize());
        assertNotNull(model.getElementAt(0));
        FormOption option = (FormOption)model.getElementAt(0);
        assertFalse(option.isSelected());
        assertEquals(label, option.getLabel());
        assertNull(option.getValue());
        reader.handleText(text.toCharArray(), 0);
        assertEquals(1, model.getSize());
        assertNotNull(model.getElementAt(0));
        option = (FormOption)model.getElementAt(0);
        assertFalse(option.isSelected());
        assertEquals(label, option.getLabel());
        assertNull(option.getValue());
        assertEquals(0, option.getDepth());

        attr.addAttribute(HTML.Attribute.SELECTED, "true");
        attr.addAttribute(HTML.Attribute.VALUE, value);
        attr.addAttribute(HTML.Attribute.LABEL, label);
        action.start(Tag.OPTGROUP, attr);
        assertEquals(2, model.getSize());
        assertNotNull(model.getElementAt(1));
        option = (FormOption)model.getElementAt(1);
        assertFalse(option.isSelected());
        assertEquals(label, option.getLabel());
        assertNull(option.getValue());
        reader.handleText(text.toCharArray(), 0);
        assertEquals(2, model.getSize());
        assertNotNull(model.getElementAt(1));
        option = (FormOption)model.getElementAt(1);
        assertFalse(option.isSelected());
        assertEquals(label, option.getLabel());
        assertNull(option.getValue());
        assertEquals(1, option.getDepth());
        action.end(Tag.OPTGROUP);
        action.end(Tag.OPTGROUP);
        action.end(Tag.SELECT);
        assertEquals(3, specAttr.getAttributeCount());
    }
View Full Code Here

Examples of org.apache.harmony.x.swing.text.html.form.FormOption

        return false;
    }

    public static void resetSimpleSelection(final ComboBoxModel model) {
        Object element;
        FormOption option;
        Stack options = new Stack();

        boolean notSelected = true;
        for (int i = model.getSize() - 1; i >= 0; i--) {
            element = model.getElementAt(i);
            if (element instanceof FormOption) {
                option = (FormOption) element;
                notSelected &= !selectElement(option, false, notSelected);
                if (option.isSelected()) {
                    model.setSelectedItem(element);
                }
                options.push(option);
            }
        }
        if (notSelected) {
            while (!options.isEmpty()) {
                option = (FormOption)options.pop();
                if (option.isEnabled()) {
                    model.setSelectedItem(option);
                    break;
                }
            }
        }
View Full Code Here

Examples of org.apache.harmony.x.swing.text.html.form.FormOption

        }
    }

    public static void resetMultipleSelection(final FormSelectListModel model) {
        Object item;
        FormOption option;

        ListSelectionModel selectionModel = model.getSelectionModel();
        selectionModel.clearSelection();

        for (int i = 0; i < model.getSize(); i++) {
            item = model.getElementAt(i);

            if (item instanceof FormOption) {
                option = (FormOption) item;
                selectElement(option, true, true);
                if (option.isSelected()) {
                    selectionModel.addSelectionInterval(i, i);
                }
            }
        }
    }
View Full Code Here

Examples of org.apache.harmony.x.swing.text.html.form.FormOption

                    radioGroupped.put(name, buttonModel);
                }
            }

            private void handleOption(final Tag tag, final AttributeSet attr) {
                FormOption option = null;
                FormOptionGroup currentGroup = (selectModel != null) ? selectModel
                        .getRootOptionGroup().getCurrentGroup() : null;
                       
                if (Tag.OPTION.equals(tag)) {
                    option = new FormOption(currentGroup, attr);
                    openedBlocks.add(Tag.OPTION);
                } else if (Tag.OPTGROUP.equals(tag)) {
                    currentGroup = new FormOptionGroup(currentGroup, attr);
                    option = currentGroup;
                }
View Full Code Here

Examples of org.apache.harmony.x.swing.text.html.form.FormOption

                    radioGroupped.put(name, buttonModel);
                }
            }

            private void handleOption(final Tag tag, final AttributeSet attr) {
                FormOption option = null;
                FormOptionGroup currentGroup = (selectModel != null) ? selectModel
                        .getRootOptionGroup().getCurrentGroup() : null;
                       
                if (Tag.OPTION.equals(tag)) {
                    option = new FormOption(currentGroup, attr);
                    openedBlocks.add(Tag.OPTION);
                } else if (Tag.OPTGROUP.equals(tag)) {
                    currentGroup = new FormOptionGroup(currentGroup, attr);
                    option = currentGroup;
                }
View Full Code Here

Examples of org.apache.harmony.x.swing.text.html.form.FormOption

                    radioGroupped.put(name, buttonModel);
                }
            }

            private void handleOption(final Tag tag, final AttributeSet attr) {
                FormOption option = null;
                FormOptionGroup currentGroup = (selectModel != null) ? selectModel
                        .getRootOptionGroup().getCurrentGroup() : null;
                       
                if (Tag.OPTION.equals(tag)) {
                    option = new FormOption(currentGroup, attr);
                    openedBlocks.add(Tag.OPTION);
                } else if (Tag.OPTGROUP.equals(tag)) {
                    currentGroup = new FormOptionGroup(currentGroup, attr);
                    option = currentGroup;
                }
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.