Class PreviewPubDisplay


  • public class PreviewPubDisplay
    extends java.lang.Object
    A class to preview the display of publications
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String getBestPubsLayout​(java.util.List<PubDisplayStyle> pubsDisplayStyle, boolean headlineMode)
      Previews the best layout for a list of publications
      static float previewHeightOfCard​(PubDisplayStyle pubDisplayStyle, long widthImagePub, int lengthLineTitle, int lengthLineAbstract, boolean isBigItem, float fixHeightImage, boolean testBigTitle)
      Previews the height of a card associated with a layout
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • LENGTHLINEABSTRACTFOURPUBSPERROWMODEL1

        public static final int LENGTHLINEABSTRACTFOURPUBSPERROWMODEL1
        See Also:
        Constant Field Values
    • Method Detail

      • getBestPubsLayout

        public static java.lang.String getBestPubsLayout​(java.util.List<PubDisplayStyle> pubsDisplayStyle,
                                                         boolean headlineMode)
        Previews the best layout for a list of publications
        Parameters:
        pubsDisplayStyle - publications settings for creation of card
        headlineMode - publication mode on the headlines
        Returns:
        the name of the best Css disposition for displaying publications
      • previewHeightOfCard

        public static float previewHeightOfCard​(PubDisplayStyle pubDisplayStyle,
                                                long widthImagePub,
                                                int lengthLineTitle,
                                                int lengthLineAbstract,
                                                boolean isBigItem,
                                                float fixHeightImage,
                                                boolean testBigTitle)
        Previews the height of a card associated with a layout
        Parameters:
        pubDisplayStyle - publications settings for creation of card
        widthImagePub - width of a publication image
        lengthLineTitle - number of characters of the title on one line
        lengthLineAbstract - number of characters of the abstract on one line
        isBigItem - boolean who indicates if card has a big width
        fixHeightImage - the fixed size of the image
        testBigTitle - boolean who indicates if we take into consideration the length of the title
        Returns:
        the height of the card