|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Objectjava.awt.Component
java.awt.Container
java.awt.Window
java.awt.Dialog
javax.swing.JDialog
com.sygem.swing.jtipoftheday.JTipOfTheDay
The JTipOfTheDay component provides an easy way to get startup tips into your application.
A simple dialog is presented to the user, which is highly configurable. It offers the ability to skip to the previous or next tip, and set whether or not the tips should be displayed on startup. A counter showing which tip is currently showing, and the total number of tips is also displayed.
Title: JTipOfTheDay
Description: A Swing component for displaying a Tip on startup
Copyright: Copyright (c) 2004
Company: SyGem Software
| Field Summary | |
static int |
ICON_MIDDLE
Specifies that any icon should be located in the middle of the icon panel |
static int |
ICON_THIRD
Specifies that any icon should be located a third of the way down from the top of the icon panel |
static int |
ICON_TOP
Specifies that any icon should be located at the top of the icon panel |
| Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| 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 | |
JTipOfTheDay(javax.swing.JFrame parent)
Basic constructor, assumes the tips file will be called "tips.txt", and located in the current working directory. |
|
JTipOfTheDay(javax.swing.JFrame parent,
java.lang.String file)
The version of the JTipOfTheDay constructor allows you to specify the location of the tips file. |
|
| Method Summary | |
void |
addIconImage(java.awt.Image i)
Adds a new image to be displayed on the icon panel. |
void |
addTipChangeListener(TipChangeListener tcl)
Adds a TipChangeListener. |
void |
addTipShowListener(TipShowListener tsl)
Adds a TipShowListener. |
void |
displayNextIconImage()
Changes the display on the icon panel to the next available icon. |
java.awt.Font |
getHeaderFont()
Returns the font used to render the header text |
java.lang.String |
getHeaderTitle()
Returns the current header text value. |
BackgroundRenderer |
getIconPanelRenderer()
Returns the current renderer assigned to the Icon Panel. |
int |
getIconPanelWidth()
Returns the width of the icon panel. |
int |
getIconPosition()
Gets the icon position. |
java.awt.Font |
getTipTextFont()
Returns the font used for displaying the tips |
int |
getWindowHeight()
Returns the height of the tip window. |
java.lang.String |
getWindowTitle()
Returns the title of the tip window |
int |
getWindowWidth()
Returns the width of the tip window. |
boolean |
isAntiAliased()
Returns whether or not the tips dialog is drawn using anti-aliasing. |
boolean |
isPreviousButtonEnabled()
Returns whether or not the "Previous Tip" button has been enabled. |
boolean |
isScrollPaneVisible()
Returns TRUE if the tips panel is set to display a scrollbar for long tips. |
boolean |
isShowOnStartup()
Returns whether or not the tips dialog should be shown on startup. |
void |
setAntiAliased(boolean antiAliased)
Sets the tips dialog to be drawn using anti-aliasing, for smoother text and graphics. |
void |
setHeaderFont(java.awt.Font headerFont)
Sets the font used to render the header text |
void |
setHeaderTitle(java.lang.String headerTitle)
Sets the value of the header text |
void |
setIconPanelRenderer(BackgroundRenderer r)
Sets the renderer for the Icon Panel (left panel). |
void |
setIconPanelWidth(int w)
Sets the width of the icon panel. |
void |
setIconPosition(int iconPosition)
Sets the position of images in the icon panel. |
void |
setInitialTipIndex(int i)
Sets the index of the tip to show when the dialog is displayed. |
void |
setPreviousButtonEnabled(boolean previousButtonEnabled)
Sets the "Previous Tip" button to be enabled/disabled. |
void |
setScrollPaneVisible(boolean scrollPaneVisible)
Sets the tips panel to display scrollbars for long tips. |
void |
setShowOnStartup(boolean showOnStartup)
Sets the value used by the "Show Tips on Startup" checkbox. |
void |
setTipTextFont(java.awt.Font f)
Sets the font used for displaying the tips. |
void |
setWindowHeight(int windowHeight)
Sets the height of the tip window. |
void |
setWindowTitle(java.lang.String windowTitle)
Sets the title of the tip window |
void |
setWindowWidth(int windowWidth)
Sets the width of the tip window. |
void |
showTips()
Displays the Tip Of The Day dialog. |
| Methods inherited from class javax.swing.JDialog |
getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getJMenuBar, getLayeredPane, getRootPane, isDefaultLookAndFeelDecorated, remove, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setJMenuBar, setLayeredPane, setLayout, update |
| Methods inherited from class java.awt.Dialog |
addNotify, dispose, getTitle, hide, isModal, isResizable, isUndecorated, setModal, setResizable, setTitle, setUndecorated, show |
| Methods inherited from class java.awt.Window |
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getGraphicsConfiguration, getInputContext, getListeners, getLocale, getMostRecentFocusOwner, getOwnedWindows, getOwner, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindowStateListeners, isActive, isFocusableWindow, isFocusCycleRoot, isFocused, isShowing, pack, postEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, setCursor, setFocusableWindowState, setFocusCycleRoot, setLocationRelativeTo, toBack, toFront |
| Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, remove, removeAll, removeContainerListener, removeNotify, setFocusTraversalKeys, setFocusTraversalPolicy, setFont, transferFocusBackward, transferFocusDownCycle, validate |
| Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, dispatchEvent, enable, enable, enableInputMethods, getBackground, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isOpaque, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, size, toString, transferFocus, transferFocusUpCycle |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final int ICON_MIDDLE
public static final int ICON_THIRD
public static final int ICON_TOP
| Constructor Detail |
public JTipOfTheDay(javax.swing.JFrame parent)
parent - The parent frame
public JTipOfTheDay(javax.swing.JFrame parent,
java.lang.String file)
parent - The parent framefile - The location of the tips file| Method Detail |
public void addIconImage(java.awt.Image i)
i - An ImagedisplayNextIconImage()public void addTipChangeListener(TipChangeListener tcl)
tcl - A TipChangeListener objectpublic void addTipShowListener(TipShowListener tsl)
tsl - A TipShowListener objectpublic void displayNextIconImage()
public java.awt.Font getHeaderFont()
public java.lang.String getHeaderTitle()
public BackgroundRenderer getIconPanelRenderer()
public int getIconPanelWidth()
public int getIconPosition()
public java.awt.Font getTipTextFont()
public int getWindowHeight()
public java.lang.String getWindowTitle()
public int getWindowWidth()
public boolean isAntiAliased()
public boolean isPreviousButtonEnabled()
public boolean isScrollPaneVisible()
public boolean isShowOnStartup()
public void setAntiAliased(boolean antiAliased)
antiAliased - booleanpublic void setHeaderFont(java.awt.Font headerFont)
headerFont - A Fontpublic void setHeaderTitle(java.lang.String headerTitle)
headerTitle - Stringpublic void setIconPanelRenderer(BackgroundRenderer r)
r - A BackgroundRenderer objectpublic void setIconPanelWidth(int w)
w - The new width for the icon panelpublic void setIconPosition(int iconPosition)
iconPosition - The position for images in the icon panelpublic void setInitialTipIndex(int i)
i - The tip to showpublic void setPreviousButtonEnabled(boolean previousButtonEnabled)
previousButtonEnabled - booleanpublic void setScrollPaneVisible(boolean scrollPaneVisible)
scrollPaneVisible - booleanpublic void setShowOnStartup(boolean showOnStartup)
showOnStartup - booleanpublic void setTipTextFont(java.awt.Font f)
f - A fontpublic void setWindowHeight(int windowHeight)
windowHeight - The new height of the tip windowpublic void setWindowTitle(java.lang.String windowTitle)
windowTitle - The new title of the tip windowpublic void setWindowWidth(int windowWidth)
windowWidth - The new width of the tip windowpublic void showTips()
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||