|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.Component | +--java.awt.Container | +--javax.swing.JComponent | +--javax.swing.JPanel | +--com.borland.primetime.wizard.BasicWizardPage
BasicWizardPage is a simple implementation of the WizardPage interface. BasicWizardPage provides the two 'classic' styles of Wizard page layout, the first (STYLE_REGULAR) gives room for a moderate number of components, while the second (STYLE_COMPLEX) makes room for more components for more complicated WizardPages.
STYLE_REGULAR includes a large icon (roughly 150x300) along the left side of the page (set using the 'largeIcon' property), a one-line bold page title along the top of the page (set using the 'pageTitle' property), and a multi-line instructions panel (set using the 'instructions' property) below it. Components added to a subclass of this page will appear in the bottom-right remaining portion of the page.
STYLE_COMPLEX includes a smaller icon in the top-left corner of the page (set using the 'smallIcon' property), a one-line bold page title along the top of the page (set using the 'pageTitle' property), and a multi-line instructions panel (set using the 'instructions' property) below it. Components added to a subclass of this page will appear in remaining real estate along the bottom of the page.
Make subclasses of this and use the UI Designer to quickly assemble a Wizard.
Wizard
,
BasicWizard
,
WizardPage
, Serialized FormInner classes inherited from class javax.swing.JPanel |
javax.swing.JPanel.AccessibleJPanel |
Inner classes inherited from class javax.swing.JComponent |
javax.swing.JComponent.AccessibleJComponent |
Inner classes inherited from class java.awt.Container |
java.awt.Container.AccessibleAWTContainer |
Inner classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent |
Field Summary | |
protected javax.swing.Icon |
largeIcon
Storage for the large icon. |
protected javax.swing.Icon |
smallIcon
Storage for the small icon. |
protected int |
style
Storage for the page style |
static int |
STYLE_COMPLEX
For use with the 'pageStyle' property. |
static int |
STYLE_REGULAR
For use with the 'pageStyle' property. |
protected WizardHost |
wizardHost
Storage for the WizardHost |
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 java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
BasicWizardPage()
Constructor |
Method Summary | |
void |
activated(WizardHost host)
Called when this WizardPage is activated as the 'current' page in the Wizard. |
protected void |
addImpl(java.awt.Component comp,
java.lang.Object constraints,
int index)
Override so added to the inner panel instead. |
void |
checkPage()
If hosted in a BasicWizard instance, this method is called when this WizardPage is finished, as in the user has clicked next or finish. |
void |
deactivated()
Called when this WizardPage is deactivated, and is no longer the 'current' page in the Wizard. |
java.lang.String |
getInstructions()
Returns this WizardPage instructions text. |
javax.swing.Icon |
getLargeIcon()
Returns this WizardPage large icon. |
java.awt.LayoutManager |
getLayout()
Override so that layout passed up from inner panel |
javax.swing.JComponent |
getPageComponent(WizardHost host)
WizardPage interface method |
int |
getPageStyle()
Returns the current page style for this WizardPage. |
java.lang.String |
getPageTitle()
Returns this WizardPage page title. |
javax.swing.Icon |
getSmallIcon()
Returns this WizardPage small icon. |
WizardHost |
getWizardHost()
Returns this WizardPage WizardHost instance. |
void |
setInstructions(java.lang.String text)
Sets the instructions text for this WizardPage. |
void |
setLargeIcon(javax.swing.Icon icon)
Sets the large icon for this WizardPage. |
void |
setLayout(java.awt.LayoutManager layout)
Override so that layout applied to inner panel |
void |
setPageStyle(int style)
Sets the style for this WizardPage. |
void |
setPageTitle(java.lang.String text)
Sets the title for this WizardPage. |
void |
setSmallIcon(javax.swing.Icon icon)
Sets the small icon for this WizardPage. |
Methods inherited from class javax.swing.JPanel |
getAccessibleContext, getUIClassID, paramString, updateUI |
Methods inherited from class javax.swing.JComponent |
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getVerifyInputWhenFocusTarget, getVisibleRect, getWidth, getX, getY, grabFocus, hasFocus, hide, isDoubleBuffered, isFocusCycleRoot, isFocusTraversable, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processFocusEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update |
Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, validate, validateTree |
Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, imageUpdate, inside, isDisplayable, isEnabled, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int STYLE_REGULAR
public static final int STYLE_COMPLEX
protected int style
protected WizardHost wizardHost
protected javax.swing.Icon largeIcon
protected javax.swing.Icon smallIcon
Constructor Detail |
public BasicWizardPage()
Method Detail |
public void setPageStyle(int style)
style
- The style to use for this WizardPage: valid values are:
STYLE_REGULAR (default), and STYLE_COMPLEXpublic int getPageStyle()
public void setLargeIcon(javax.swing.Icon icon)
icon
- The large icon to use for this WizardPage when displayed
using the STYLE_REGULAR (default) style.public javax.swing.Icon getLargeIcon()
public void setSmallIcon(javax.swing.Icon icon)
icon
- The small icon to use for this WizardPage when displayed
using the STYLE_COMPLEX style.public javax.swing.Icon getSmallIcon()
public void setPageTitle(java.lang.String text)
text
- The text to use as the title for this WizardPagepublic java.lang.String getPageTitle()
public void setInstructions(java.lang.String text)
text
- The instructions text for this WizardPagepublic java.lang.String getInstructions()
public WizardHost getWizardHost()
public javax.swing.JComponent getPageComponent(WizardHost host)
WizardPage interface method
Returns 'this' as the JComponent to act as the UI for this WizardPage.
getPageComponent
in interface WizardPage
host
- The WizardHost hosting this Wizard.public void activated(WizardHost host)
Called when this WizardPage is activated as the 'current' page in the Wizard.
activated
in interface WizardPage
host
- The WizardHost hosting this Wizard. NOTE: For pages that have
required fields - the WizardHost interface can be used to enable/
disable the 'Next' and 'Finish' buttons.public void deactivated()
Called when this WizardPage is deactivated, and is no longer the 'current' page in the Wizard. (Note that this will never be called on a Wizard with a single WizardPage nor is it called when the Finish button is selected. See also checkPage().)
deactivated
in interface WizardPage
public void checkPage() throws VetoException
If hosted in a BasicWizard instance, this method is called when this WizardPage is finished, as in the user has clicked next or finish. If any validation errors exist on the page, a VetoException should be thrown at this time. (Note that this method is not called when the Back button is used. See also deactivated().)
VetoException
- If there are any validation errors on the page.public void setLayout(java.awt.LayoutManager layout)
setLayout
in class java.awt.Container
layout
- LayoutManager for panel.public java.awt.LayoutManager getLayout()
getLayout
in class java.awt.Container
protected void addImpl(java.awt.Component comp, java.lang.Object constraints, int index)
addImpl
in class java.awt.Container
comp
- Component to be added.constraints
- Object expressing layout contraints
for this component.index
- Position in the container's list at which to
insert the component, where -1 means insert at the end.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |