Examples of numberOfLines()


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

    public int getNumberOfLines(final ScalarModel scalarModel) {
        final MultiLineFacet multiLineFacet = scalarModel.getFacet(MultiLineFacet.class);
        int numberOfLines = 1;
       
        if (multiLineFacet != null) {
            numberOfLines = multiLineFacet.numberOfLines();
        }
       
        return numberOfLines;
    }
}
View Full Code Here

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

    }

    @Override
    public int getNoLines() {
        final MultiLineFacet facet = getFacet(MultiLineFacet.class);
        return facet.numberOfLines();
    }

    @Override
    public boolean canWrap() {
        final MultiLineFacet facet = getFacet(MultiLineFacet.class);
View Full Code Here

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

        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.numberOfLines()

        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.numberOfLines()

        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.numberOfLines()

        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.numberOfLines()

            memberRepr.hidden = hiddenFacetRepr;
        }
        MultiLineFacet multiLineFacet = assoc.getFacet(MultiLineFacet.class);
        if(multiLineFacet != null && !multiLineFacet.isNoop()) {
            MultiLineFacetRepr multiLineFacetRepr = new MultiLineFacetRepr();
            multiLineFacetRepr.numberOfLines = multiLineFacet.numberOfLines();
            memberRepr.multiLine = multiLineFacetRepr;
        }
        PagedFacet pagedFacet = assoc.getFacet(PagedFacet.class);
        if(pagedFacet != null && !pagedFacet.isNoop()) {
            PagedFacetRepr pagedFacetRepr = new PagedFacetRepr();
View Full Code Here

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

    }

    @Override
    public int value() {
        final MultiLineFacet facet = getFacetHolder().getFacet(MultiLineFacet.class);
        return facet.numberOfLines() * typicalLengthFacet.value();
    }

}
View Full Code Here

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

    }

    @Override
    public int value() {
        final MultiLineFacet facet = getFacetHolder().getFacet(MultiLineFacet.class);
        return facet.numberOfLines() * typicalLengthFacet.value();
    }

}
View Full Code Here

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

    }

    @Override
    public int getNoLines() {
        final MultiLineFacet facet = getFacet(MultiLineFacet.class);
        return facet.numberOfLines();
    }

    @Override
    public boolean canWrap() {
        final MultiLineFacet facet = getFacet(MultiLineFacet.class);
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.