JIDE 3.5.15

com.jidesoft.tipoftheday
Class TipOfTheDayDialogPane

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JPanel
                  extended by com.jidesoft.dialog.StandardDialogPane
                      extended by com.jidesoft.tipoftheday.TipOfTheDayDialogPane
All Implemented Interfaces:
ButtonNames, ImageObserver, MenuContainer, Serializable, Accessible

public class TipOfTheDayDialogPane
extends StandardDialogPane

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JPanel
JPanel.AccessibleJPanel
 
Nested classes/interfaces inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
 
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.StandardDialogPane
_bannerPanel, _buttonPanel, _contentPanel, PROPERTY_CANCEL_ACTION, PROPERTY_DEFAULT_ACTION
 
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
 
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 java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
TipOfTheDayDialogPane()
           
TipOfTheDayDialogPane(TipOfTheDaySource tipOfTheDaySource, Action showTipAction, URL optionalStyleSheet)
           
 
Method Summary
 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  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()
          Get the showTip check box.
 TipOfTheDaySource getTipOfTheDaySource()
          Gets the TipOfTheDaySource.
 boolean isShowTooltip()
          Get the flag indicating if tooltip is showing.
 void nextTip()
          Displays next tip.
 void previousTip()
          Displays previous tip.
 void setCurrentTipIndex(int currentTipIndex)
          Sets the current tip index.
 void setShowTooltip(boolean showTooltip)
          Set the flag indicating if tooltip is showing.
 
Methods inherited from class com.jidesoft.dialog.StandardDialogPane
getBannerPanel, getButtonPanel, getContentPanel, getDefaultAction, getDefaultCancelAction, getInitFocusedComponent, initComponents, layoutComponents, setDefaultAction, setDefaultCancelAction, setInitFocusedComponent
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TipOfTheDayDialogPane

public TipOfTheDayDialogPane()
                      throws HeadlessException
Throws:
HeadlessException

TipOfTheDayDialogPane

public TipOfTheDayDialogPane(TipOfTheDaySource tipOfTheDaySource,
                             Action showTipAction,
                             URL optionalStyleSheet)
Method Detail

createBannerPanel

public JComponent createBannerPanel()
Description copied from class: StandardDialogPane
Subclasses should implement this method to create the banner panel. By default banner panel will appear on top of the dialog unless you override initComponent() method. Banner panel is really used to balance the layout of dialog to make the dialog looking good. However it can be used to show some help text. It is highly recommended to use our BannerPanel

If subclass doesn't want to have a banner panel, just return null.

Specified by:
createBannerPanel in class StandardDialogPane
Returns:
the banner panel.

createContentPanel

public JComponent createContentPanel()
Description copied from class: StandardDialogPane
Subclasses should implement this method to create the content panel. This is the main panel of the dialog which will be added to the center of the dialog. Subclass should never return null.

Specified by:
createContentPanel in class StandardDialogPane
Returns:
the content panel.

createButtonPanel

public ButtonPanel createButtonPanel()
Description copied from class: StandardDialogPane
Subclasses should implement this method to create the button panel. 90% of dialogs have buttons. It is highly recommended to use our ButtonPanel.

Specified by:
createButtonPanel in class StandardDialogPane
Returns:
the button panel.
See Also:
ButtonPanel

createHtmlBrowser

protected Component createHtmlBrowser(URL optionalStyleSheet)
Creates the html browser component. By default, we will create a JEditorPane.

Parameters:
optionalStyleSheet - a stylesheet file
Returns:
a html browser component.

createScrollPaneForHtmlBrowser

protected JComponent createScrollPaneForHtmlBrowser(Component htmlBrowser)
Creates a scroll pane for the html browser. By default, we will create a JScrollPane. You may override it to create your own scroll pane or even just return the html browser itself if the browser already has its own scroll pane.

Parameters:
htmlBrowser - the html browser
Returns:
scroll pane.

displayHtmlBrowser

protected void displayHtmlBrowser(String content,
                                  String url)
Displays the content in the html browser.

Parameters:
content - the html content
url - 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.

getPreviousTipAction

protected Action getPreviousTipAction()
Gets the action used by prev tip button. Subclass can override it to return different action for prev tip button.

Returns:
the prev tip action.

getNextTipAction

protected Action getNextTipAction()
Gets the action used by next tip button. Subclass can override it to return different action for next tip button.

Returns:
the next tip action.

getCloseAction

protected Action getCloseAction()
Gets the action used by close button. Subclass can override it to return different action for close button.

Returns:
the close action.

previousTip

public void previousTip()
Displays previous tip.


nextTip

public void nextTip()
Displays next tip.


getCurrentTipIndex

public int getCurrentTipIndex()
Gets the current tip index. User can save this value to preference so that when the dialog comes up again, it can call setCurrentTipIndex(int) to set the index back.

Returns:
the current tip index.

setCurrentTipIndex

public void setCurrentTipIndex(int currentTipIndex)
Sets the current tip index.

Parameters:
currentTipIndex - the current tip index.

getTipOfTheDaySource

public TipOfTheDaySource getTipOfTheDaySource()
Gets the TipOfTheDaySource.

Returns:
the TipOfTheDaySource.

getShowTipCheckBox

public JCheckBox getShowTipCheckBox()
Get the showTip check box.

Returns:
the check box.

isShowTooltip

public boolean isShowTooltip()
Get the flag indicating if tooltip is showing.

The default value is false.

Returns:
the flag.

setShowTooltip

public void setShowTooltip(boolean showTooltip)
Set the flag indicating if tooltip is showing.

Parameters:
showTooltip - the flag

getResourceString

public String getResourceString(String key)
Gets the resource string used in JideTabbedPane. Subclass can override it to provide their own strings.

Parameters:
key - the resource key
Returns:
the localized string.

JIDE 3.5.15