Examples of preventWrapping()


Examples of org.apache.isis.core.metamodel.facets.multiline.MultiLineFacet.preventWrapping()

                readOnly[i] = false;
                optional[i] = !fld.isMandatory();
                if (fieldSpecifications[i].isParseable()) {
                    final MultiLineFacet multilineFacet = fld.getFacet(MultiLineFacet.class);
                    noLines[i] = multilineFacet.numberOfLines();
                    wraps[i] = !multilineFacet.preventWrapping();

                    final MaxLengthFacet maxLengthFacet = fld.getFacet(MaxLengthFacet.class);
                    maxLength[i] = maxLengthFacet.value();

                    final TypicalLengthFacet typicalLengthFacet = fld.getFacet(TypicalLengthFacet.class);
View Full Code Here

Examples of org.apache.isis.core.metamodel.facets.multiline.MultiLineFacet.preventWrapping()

                field.setWidth(typicalLengthFacet.value());
            }

            final MultiLineFacet multiLineFacet = param.getFacet(MultiLineFacet.class);
            field.setHeight(multiLineFacet.numberOfLines());
            field.setWrapped(!multiLineFacet.preventWrapping());

            final ObjectSpecification spec = param.getSpecification();
            if (spec.containsFacet(BooleanValueFacet.class)) {
                field.setType(InputField.CHECKBOX);
            } else if (spec.containsFacet(PasswordValueFacet.class)) {
View Full Code Here

Examples of org.apache.isis.core.metamodel.facets.multiline.MultiLineFacet.preventWrapping()

    }

    @Override
    public boolean canWrap() {
        final MultiLineFacet facet = getFacet(MultiLineFacet.class);
        return !facet.preventWrapping();
    }

    @Override
    public int getMaximumLength() {
        final MaxLengthFacet facet = getFacet(MaxLengthFacet.class);
View Full Code Here

Examples of org.apache.isis.core.metamodel.facets.object.multiline.annotation.MultiLineFacetOnTypeAnnotation.preventWrapping()

        final Facet facet = facetedMethod.getFacet(MultiLineFacet.class);
        assertNotNull(facet);
        assertTrue(facet instanceof MultiLineFacetOnTypeAnnotation);
        final MultiLineFacetOnTypeAnnotation multiLineFacetAnnotation = (MultiLineFacetOnTypeAnnotation) facet;
        assertEquals(3, multiLineFacetAnnotation.numberOfLines());
        assertEquals(false, multiLineFacetAnnotation.preventWrapping());
    }

    public void testMultiLineAnnotationPickedUpOnProperty() {
        final MultiLineFacetOnPropertyFactory facetFactory = new MultiLineFacetOnPropertyFactory();
View Full Code Here

Examples of org.apache.isis.core.metamodel.facets.object.multiline.annotation.MultiLineFacetOnTypeAnnotation.preventWrapping()

        facetFactory.process(new ProcessClassContext(Customer.class, methodRemover, facetedMethod));

        final Facet facet = facetedMethod.getFacet(MultiLineFacet.class);
        final MultiLineFacetOnTypeAnnotation multiLineFacetOnTypeAnnotation = (MultiLineFacetOnTypeAnnotation) facet;
        assertEquals(6, multiLineFacetOnTypeAnnotation.numberOfLines());
        assertEquals(true, multiLineFacetOnTypeAnnotation.preventWrapping());
    }

    public void testMultiLineAnnotationIgnoredForNonStringProperties() {
        final MultiLineFacetOnPropertyFactory facetFactory = new MultiLineFacetOnPropertyFactory();
View Full Code Here

Examples of org.apache.isis.core.metamodel.facets.param.multiline.annotation.MultiLineFacetOnParameterAnnotation.preventWrapping()

        final Facet facet = facetedMethodParameter.getFacet(MultiLineFacet.class);
        assertNotNull(facet);
        assertTrue(facet instanceof MultiLineFacetOnParameterAnnotation);
        final MultiLineFacetOnParameterAnnotation multiLineFacetAnnotation = (MultiLineFacetOnParameterAnnotation) facet;
        assertEquals(8, multiLineFacetAnnotation.numberOfLines());
        assertEquals(false, multiLineFacetAnnotation.preventWrapping());
    }

    public void testMultiLineAnnotationDefaults() {
        final MultiLineFacetOnTypeAnnotationFactory facetFactory = new MultiLineFacetOnTypeAnnotationFactory();
View Full Code Here

Examples of org.apache.isis.core.metamodel.facets.properties.multiline.annotation.MultiLineFacetOnPropertyAnnotation.preventWrapping()

        final Facet facet = facetedMethod.getFacet(MultiLineFacet.class);
        assertNotNull(facet);
        assertTrue(facet instanceof MultiLineFacetOnPropertyAnnotation);
        final MultiLineFacetOnPropertyAnnotation multiLineFacetAnnotation = (MultiLineFacetOnPropertyAnnotation) facet;
        assertEquals(12, multiLineFacetAnnotation.numberOfLines());
        assertEquals(true, multiLineFacetAnnotation.preventWrapping());
    }

    public void testMultiLineAnnotationPickedUpOnActionParameter() {
        final MultiLineFacetOnParameterAnnotationFactory facetFactory = new MultiLineFacetOnParameterAnnotationFactory();
View Full Code Here

Examples of org.apache.isis.core.metamodel.facets.propparam.multiline.MultiLineFacet.preventWrapping()

    }

    @Override
    public boolean canWrap() {
        final MultiLineFacet facet = getFacet(MultiLineFacet.class);
        return !facet.preventWrapping();
    }

    @Override
    public int getMaximumLength() {
        final MaxLengthFacet facet = getFacet(MaxLengthFacet.class);
View Full Code Here

Examples of org.apache.isis.core.metamodel.facets.propparam.multiline.MultiLineFacet.preventWrapping()

                field.setWidth(typicalLengthFacet.value());
            }

            final MultiLineFacet multiLineFacet = param.getFacet(MultiLineFacet.class);
            field.setHeight(multiLineFacet.numberOfLines());
            field.setWrapped(!multiLineFacet.preventWrapping());

            final ObjectSpecification spec = param.getSpecification();
            if (spec.containsFacet(BooleanValueFacet.class)) {
                field.setType(InputField.CHECKBOX);
            } else if (spec.containsFacet(PasswordValueFacet.class)) {
View Full Code Here

Examples of org.apache.isis.core.progmodel.facets.object.multiline.annotation.MultiLineFacetAnnotationOnType.preventWrapping()

        final Facet facet = facetedMethod.getFacet(MultiLineFacet.class);
        assertNotNull(facet);
        assertTrue(facet instanceof MultiLineFacetAnnotationOnType);
        final MultiLineFacetAnnotationOnType multiLineFacetAnnotation = (MultiLineFacetAnnotationOnType) facet;
        assertEquals(3, multiLineFacetAnnotation.numberOfLines());
        assertEquals(false, multiLineFacetAnnotation.preventWrapping());
    }

    public void testMultiLineAnnotationPickedUpOnProperty() {
        final MultiLineOnPropertyFacetFactory facetFactory = new MultiLineOnPropertyFacetFactory();
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.