Class PreviewPubDisplay

java.lang.Object
com.jalios.jcms.jnews.PreviewPubDisplay

public class PreviewPubDisplay extends Object
A class to preview the display of publications
  • Field Details

    • LENGTHLINEABSTRACTFOURPUBSPERROWMODEL1

      public static final int LENGTHLINEABSTRACTFOURPUBSPERROWMODEL1
      See Also:
    • LENGTHBIGTITLE

      public static final int LENGTHBIGTITLE
      See Also:
  • Method Details

    • getBestPubsLayout

      public static String getBestPubsLayout(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