Package com.jalios.jcms.jnews
Class PreviewPubDisplay
java.lang.Object
com.jalios.jcms.jnews.PreviewPubDisplay
A class to preview the display of publications
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final int -
Method Summary
Modifier and TypeMethodDescriptionstatic StringgetBestPubsLayout(List<PubDisplayStyle> pubsDisplayStyle, boolean headlineMode) Previews the best layout for a list of publicationsstatic floatpreviewHeightOfCard(PubDisplayStyle pubDisplayStyle, long widthImagePub, int lengthLineTitle, int lengthLineAbstract, boolean isBigItem, float fixHeightImage, boolean testBigTitle) Previews the height of a card associated with a layout
-
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 cardheadlineMode- 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 cardwidthImagePub- width of a publication imagelengthLineTitle- number of characters of the title on one linelengthLineAbstract- number of characters of the abstract on one lineisBigItem- boolean who indicates if card has a big widthfixHeightImage- the fixed size of the imagetestBigTitle- boolean who indicates if we take into consideration the length of the title- Returns:
- the height of the card
-