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)
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
TipOfTheDay.TipStyle
Types of opal dialog -
Constructor Summary
Constructors Constructor Description TipOfTheDay()
Constructor -
Method Summary
Modifier and Type Method Description TipOfTheDay
addTip(java.lang.String tip)
Add a tiporg.eclipse.swt.graphics.Image
getImage()
int
getIndex()
org.eclipse.swt.widgets.Shell
getShell()
TipOfTheDay.TipStyle
getStyle()
java.util.List<java.lang.String>
getTips()
boolean
isDisplayShowOnStartup()
boolean
isShowOnStartup()
void
open(org.eclipse.swt.widgets.Shell parent)
Open the "tip of the day" boxvoid
setDisplayShowOnStartup(boolean displayShowOnStartup)
void
setImage(org.eclipse.swt.graphics.Image image)
void
setIndex(int index)
void
setShowOnStartup(boolean showOnStartup)
void
setStyle(TipOfTheDay.TipStyle style)
-
Constructor Details
-
TipOfTheDay
public TipOfTheDay()Constructor
-
-
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
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
- 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
- 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
-