Class ListItemRenderer


  • public class ListItemRenderer
    extends AbstractGalleryItemRenderer

    Alternate item renderer for the Gallery widget using a list style. Supports multi-line text, image, drop shadows and decorators.

    Best with bigger width than height.

    Decorator images can be set with Widget.setData(String, Object) by using the following keys :

    • org.eclipse.nebula.widget.gallery.bottomLeftOverlay
    • org.eclipse.nebula.widget.gallery.bottomRightOverlay
    • org.eclipse.nebula.widget.gallery.topLeftOverlay
    • org.eclipse.nebula.widget.gallery.topRightOverlay

    Supported types are org.eclipse.swt.Image for one single decorator and org.eclipse.swt.Image[] for multiple decorators.

    NOTE: THIS WIDGET AND ITS API ARE STILL UNDER DEVELOPMENT.

    • Field Detail

      • dropShadowsColors

        protected java.util.ArrayList<org.eclipse.swt.graphics.Color> dropShadowsColors
      • dropShadows

        boolean dropShadows
      • dropShadowsSize

        int dropShadowsSize
      • dropShadowsAlphaStep

        int dropShadowsAlphaStep
      • selectionBackgroundColor

        org.eclipse.swt.graphics.Color selectionBackgroundColor
      • selectionForegroundColor

        org.eclipse.swt.graphics.Color selectionForegroundColor
      • foregroundColor

        org.eclipse.swt.graphics.Color foregroundColor
      • backgroundColor

        org.eclipse.swt.graphics.Color backgroundColor
      • descriptionColor

        org.eclipse.swt.graphics.Color descriptionColor
      • textFont

        org.eclipse.swt.graphics.Font textFont
      • descriptionFont

        org.eclipse.swt.graphics.Font descriptionFont
      • showLabels

        boolean showLabels
      • showRoundedSelectionCorners

        boolean showRoundedSelectionCorners
      • selectionRadius

        int selectionRadius
    • Constructor Detail

      • ListItemRenderer

        public ListItemRenderer()
    • Method Detail

      • isShowLabels

        public boolean isShowLabels()
      • setShowLabels

        public void setShowLabels​(boolean showLabels)
      • setDropShadowsSize

        public void setDropShadowsSize​(int dropShadowsSize)
      • createColors

        private void createColors()
      • freeDropShadowsColors

        private void freeDropShadowsColors()
      • isDropShadows

        public boolean isDropShadows()
      • setDropShadows

        public void setDropShadows​(boolean dropShadows)
      • getDropShadowsSize

        public int getDropShadowsSize()
      • getSelectionBackgroundColor

        public org.eclipse.swt.graphics.Color getSelectionBackgroundColor()
      • setSelectionBackgroundColor

        public void setSelectionBackgroundColor​(org.eclipse.swt.graphics.Color selectionColor)
      • getForegroundColor

        public org.eclipse.swt.graphics.Color getForegroundColor()
      • setForegroundColor

        public void setForegroundColor​(org.eclipse.swt.graphics.Color foregroundColor)
      • getBackgroundColor

        public org.eclipse.swt.graphics.Color getBackgroundColor()
      • setBackgroundColor

        public void setBackgroundColor​(org.eclipse.swt.graphics.Color backgroundColor)
      • getDescriptionColor

        public org.eclipse.swt.graphics.Color getDescriptionColor()
      • setDescriptionColor

        public void setDescriptionColor​(org.eclipse.swt.graphics.Color descriptionColor)
      • getSelectionForegroundColor

        public org.eclipse.swt.graphics.Color getSelectionForegroundColor()
      • setSelectionForegroundColor

        public void setSelectionForegroundColor​(org.eclipse.swt.graphics.Color selectionForegroundColor)
      • getTextFont

        public org.eclipse.swt.graphics.Font getTextFont()
        Deprecated.
        Use Canvas.setFont(Font) or GalleryItem.setFont(Font) instead.
        Returns the font used for drawing item label or null if system font is used.
        Returns:
        the font
      • setTextFont

        public void setTextFont​(org.eclipse.swt.graphics.Font textFont)
        Deprecated.
        Use Canvas.setFont(Font) or GalleryItem.setFont(Font) instead.
        Set the font for drawing item label or null to use system font.
        Parameters:
        font - the font to set
      • getDescriptionFont

        public org.eclipse.swt.graphics.Font getDescriptionFont()
        Returns the font used for drawing item description or null if system font is used.
        Returns:
        the font
      • setDescriptionFont

        public void setDescriptionFont​(org.eclipse.swt.graphics.Font descriptionFont)
        Set the font for drawing item description or null to use system font.
        Parameters:
        font - the font to set
      • isShowRoundedSelectionCorners

        public boolean isShowRoundedSelectionCorners()
      • setShowRoundedSelectionCorners

        public void setShowRoundedSelectionCorners​(boolean showRoundedSelectionCorners)