Class TipOfTheDay

java.lang.Object
org.eclipse.nebula.widgets.opal.tipoftheday.TipOfTheDay

public class TipOfTheDay
extends java.lang.Object
Instances of this class are a "Tip of Day" box, which is composed of

A tip
2 buttons to navigate between types
A close button
A checkbox "show tip on startup"
(optional)
A checkbox "remember the password"
(optional)

  • Constructor Details

  • Method Details

    • open

      public void open​(org.eclipse.swt.widgets.Shell parent)
      Open the "tip of the day" box
      Parameters:
      parent - the parent shell
    • addTip

      public TipOfTheDay addTip​(java.lang.String tip)
      Add a tip
      Parameters:
      tip - tip to add
      Returns:
      the current object
    • getImage

      public org.eclipse.swt.graphics.Image getImage()
      Returns:
      the image
    • getIndex

      public int getIndex()
      Returns:
      the index of the current tip
    • getStyle

      public TipOfTheDay.TipStyle getStyle()
      Returns:
      the style of the window
    • getTips

      public java.util.List<java.lang.String> getTips()
      Returns:
      all the the tips
    • isDisplayShowOnStartup

      public boolean isDisplayShowOnStartup()
      Returns:
      if true, the "Show On Startup" checkbox is displayed
    • isShowOnStartup

      public boolean isShowOnStartup()
      Returns:
      the value of the checkbox "Show On Startup"
    • setDisplayShowOnStartup

      public void setDisplayShowOnStartup​(boolean displayShowOnStartup)
      Parameters:
      if - true, the checkbox "Show on startup" is displayed
    • setIndex

      public void setIndex​(int index)
      Parameters:
      index - the index of the selected tip. By default, the tip is chosen randomly
    • setImage

      public void setImage​(org.eclipse.swt.graphics.Image image)
      Parameters:
      image - the image to set
    • setShowOnStartup

      public void setShowOnStartup​(boolean showOnStartup)
      Parameters:
      the - value of the checkbox "Show on startup"
    • setStyle

      public void setStyle​(TipOfTheDay.TipStyle style)
      Parameters:
      style - the style of the window
    • getShell

      public org.eclipse.swt.widgets.Shell getShell()
      Returns:
      the shell that contains the "tip of the day" box