|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.awt.Component java.awt.Container java.awt.Window java.awt.Dialog javax.swing.JDialog com.jidesoft.dialog.StandardDialog com.jidesoft.tipoftheday.TipOfTheDayDialog
public class TipOfTheDayDialog
Tip of the Day dialog. Here is a sample code of how to use it.
ResourceBundleTipOfTheDaySource tipOfTheDaySource = new ResourceBundleTipOfTheDaySource(ResourceBundle.getBundle("tips")); tipOfTheDaySource.setCurrentTipIndex(-1); java.net.URL styleSheet = TipOfTheDayDialog.class.getResource("/tips.css"); JDialog dialog = new TipOfTheDayDialog(frame, tipOfTheDaySource, new AbstractAction("Show Tip of the Day the Next Time"){ public void actionPerformed(ActionEvent e) { // change your user preference } }, styleSheet); dialog.pack(); dialog.show();
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.jidesoft.dialog.StandardDialog |
---|
StandardDialog.DefaultStandardDialogPane |
Nested classes/interfaces inherited from class javax.swing.JDialog |
---|
JDialog.AccessibleJDialog |
Nested classes/interfaces inherited from class java.awt.Dialog |
---|
Dialog.AccessibleAWTDialog, Dialog.ModalExclusionType, Dialog.ModalityType |
Nested classes/interfaces inherited from class java.awt.Window |
---|
Window.AccessibleAWTWindow |
Nested classes/interfaces inherited from class java.awt.Container |
---|
Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy |
Field Summary |
---|
Fields inherited from class com.jidesoft.dialog.StandardDialog |
---|
_propertyChangeListener, _standardDialogPane, RESULT_AFFIRMED, RESULT_CANCELLED |
Fields inherited from class javax.swing.JDialog |
---|
accessibleContext, rootPane, rootPaneCheckingEnabled |
Fields inherited from class java.awt.Dialog |
---|
DEFAULT_MODALITY_TYPE |
Fields inherited from class java.awt.Component |
---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface com.jidesoft.dialog.ButtonNames |
---|
APPLY, BACK, BROWSE, CANCEL, CLEAR, CLOSE, DETAILS, EDIT, EXIT, FIND, FIND_NEXT, FINISH, FORWARD, HELP, NEW, NEXT, NO, OK, OPEN, PRINT, REPLACE, RESET, RETRY, RUN, SAVE, SAVE_AS, STOP, YES |
Fields inherited from interface javax.swing.WindowConstants |
---|
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, EXIT_ON_CLOSE, HIDE_ON_CLOSE |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
TipOfTheDayDialog(Dialog owner,
TipOfTheDaySource tipOfTheDaySource,
Action showTipAction,
URL optionalStyleSheet)
|
|
TipOfTheDayDialog(Frame owner,
TipOfTheDaySource tipOfTheDaySource,
Action showTipAction,
URL optionalStyleSheet)
|
Method Summary | |
---|---|
protected void |
createActions()
Subclass can override to create actions for buttons. |
JComponent |
createBannerPanel()
Subclasses should implement this method to create the banner panel. |
ButtonPanel |
createButtonPanel()
Subclasses should implement this method to create the button panel. |
JComponent |
createContentPanel()
Subclasses should implement this method to create the content panel. |
protected Component |
createHtmlBrowser(URL optionalStyleSheet)
Creates the html browser component. |
protected JComponent |
createScrollPaneForHtmlBrowser(Component htmlBrowser)
Creates a scroll pane for the html browser. |
protected StandardDialogPane |
createStandardDialogPane()
|
protected void |
displayHtmlBrowser(String content,
String url)
Displays the content in the html browser. |
protected Action |
getCloseAction()
Gets the action used by close button. |
int |
getCurrentTipIndex()
Gets the current tip index. |
protected Action |
getNextTipAction()
Gets the action used by next tip button. |
protected Action |
getPreviousTipAction()
Gets the action used by prev tip button. |
String |
getResourceString(String key)
Gets the resource string used in JideTabbedPane. |
JCheckBox |
getShowTipCheckBox()
|
TipOfTheDaySource |
getTipOfTheDaySource()
Gets the TipOfTheDaySource. |
boolean |
isShowTooltip()
|
void |
nextTip()
Displays next tip. |
void |
pack()
|
void |
previousTip()
Displays previous tip. |
void |
setCurrentTipIndex(int currentTipIndex)
Sets the current tip index. |
void |
setShowTooltip(boolean showTooltip)
|
Methods inherited from class com.jidesoft.dialog.StandardDialog |
---|
createOKCancelButtonPanel, getBannerPanel, getButtonPanel, getContentPanel, getDefaultAction, getDefaultCancelAction, getDialogResult, getInitFocusedComponent, getStandardDialogPane, initComponents, initialize, setDefaultAction, setDefaultCancelAction, setDialogResult, setInitFocusedComponent, show |
Methods inherited from class java.awt.Dialog |
---|
addNotify, getModalityType, getTitle, hide, isModal, isResizable, isUndecorated, setModal, setModalityType, setResizable, setTitle, setUndecorated, setVisible, toBack |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public TipOfTheDayDialog(Frame owner, TipOfTheDaySource tipOfTheDaySource, Action showTipAction, URL optionalStyleSheet)
public TipOfTheDayDialog(Dialog owner, TipOfTheDaySource tipOfTheDaySource, Action showTipAction, URL optionalStyleSheet)
Method Detail |
---|
protected StandardDialogPane createStandardDialogPane()
createStandardDialogPane
in class StandardDialog
public void pack()
pack
in class StandardDialog
protected Component createHtmlBrowser(URL optionalStyleSheet)
optionalStyleSheet
- a stylesheet file
protected JComponent createScrollPaneForHtmlBrowser(Component htmlBrowser)
htmlBrowser
- the html browser
protected void displayHtmlBrowser(String content, String url)
content
- the html contenturl
- the url of the html content if any. By default, we didn't use this parameter as JEditorPane
doesn't need it. If you write your own component for html browser, you might need it.public ButtonPanel createButtonPanel()
StandardDialog
ButtonPanel
.
createButtonPanel
in class StandardDialog
ButtonPanel
protected void createActions()
protected Action getPreviousTipAction()
protected Action getNextTipAction()
protected Action getCloseAction()
public void previousTip()
public void nextTip()
public int getCurrentTipIndex()
setCurrentTipIndex(int)
to set the index back.
public void setCurrentTipIndex(int currentTipIndex)
currentTipIndex
- the current tip index.getCurrentTipIndex()
public TipOfTheDaySource getTipOfTheDaySource()
public JCheckBox getShowTipCheckBox()
public JComponent createBannerPanel()
StandardDialog
BannerPanel
If subclass doesn't want to have a banner panel, just return null.
createBannerPanel
in class StandardDialog
public JComponent createContentPanel()
StandardDialog
createContentPanel
in class StandardDialog
public boolean isShowTooltip()
public void setShowTooltip(boolean showTooltip)
public String getResourceString(String key)
key
- the resource key
|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |