|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
org.formaria.swing.layer.LayerManager
org.formaria.swing.Page
org.formaria.swing.Dialog
org.formaria.swing.pojo.PojoDialog
public class PojoDialog
A dialog wrapper than encapsulates a PojoPanel and provides common operations.
A custom class can be used to back this dialog by overloading the
getImplementingClass method.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class javax.swing.JPanel |
|---|
javax.swing.JPanel.AccessibleJPanel |
| Nested classes/interfaces inherited from class javax.swing.JComponent |
|---|
javax.swing.JComponent.AccessibleJComponent |
| Nested classes/interfaces inherited from class java.awt.Container |
|---|
java.awt.Container.AccessibleAWTContainer |
| Nested classes/interfaces inherited from class java.awt.Component |
|---|
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
| Nested classes/interfaces inherited from interface org.formaria.aria.PageSupport |
|---|
PageSupport.IDialog |
| Field Summary | |
|---|---|
static int |
CREATE_ACTION
|
protected java.lang.Object[] |
data
|
static int |
DELETE_ACTION
|
protected DialogValidationSupport |
dvs
|
static int |
FIND_ACTION
|
protected Image |
logoImage
|
protected int |
mode
|
protected static java.lang.String |
nextClassName
|
protected PojoPanel |
pojoPanel
|
static int |
READ_ACTION
|
protected Label |
titleText
|
static int |
UPDATE_ACTION
|
| Fields inherited from class org.formaria.swing.Dialog |
|---|
bIsModal, BUTTON_SIZE, CANCEL_CLICKED, CLOSE_CLICKED, closeButtonID, contentPanel, DEFAULT_PADDING, focusComponent, lastReturnValue, NO_CLICKED, NOTHING_CLICKED_YET, OK_CLICKED, padding, returnObject, returnValue, saveOnClose, trueField |
| Fields inherited from class org.formaria.swing.Page |
|---|
adapter, componentFactory, pageHelper, pageMgr, project, rootModel |
| Fields inherited from class org.formaria.swing.layer.LayerManager |
|---|
BACKGROUND |
| 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 org.formaria.aria.PageSupport |
|---|
ACTIVATED, ANNOTATEDIMAGE, ARIA_AWT_PACKAGE, ARIA_HTML_PACKAGE, ARIA_SWING_PACKAGE, ARIA_SWT_PACKAGE, BORDER_LAYOUT, BOX_LAYOUT, BUTTON, CARD_LAYOUT, CHECK, COLUMN_LAYOUT, COMBO, CREATED, DEACTIVATED, DISCARDED, DISPLAYED, EDIT, FLOW_LAYOUT, GRID_LAYOUT, GRIDBAG_LAYOUT, GROUP, GUIDE_LAYOUT, HOTSPOTIMAGE, IMAGE, IMAGEMAP, LABEL, LAYER_LAYOUT, LIST, LOADED, MENU, MENUBAR, MENUITEM, METACONTENT, NULL_LAYOUT, PANEL, PASSWORD, RADIO, SCALE_LAYOUT, SCROLLABLEMETACONTENT, SCROLLPANE, SPLITPANE, SPRING_LAYOUT, TABLE, TABPANEL, TEXTAREA, UNKNOWN, UNKNOWN_PAGE_STATE, WMF |
| Fields inherited from interface java.awt.image.ImageObserver |
|---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
|---|---|
PojoDialog()
|
|
| Method Summary | |
|---|---|
void |
closeDlg()
Close the dialog and restore focus |
static PojoDialog |
createDialog(java.lang.Class implementingClass,
int action,
java.lang.String path,
java.lang.String title)
Create a PojoDialog using the PojoDialogTemplate |
static PojoDialog |
createDialog(int action,
java.lang.String path,
java.lang.String title)
Create a PojoDialog using the PojoDialogTemplate |
protected void |
doCloseAction()
Overload this method to take some action when the dialog is closed. |
static java.lang.String |
getImplementingClassName()
Get the full class name of this dialog. |
void |
pack()
Size the dialog to hold the largest components (i.e. |
void |
pageActivated()
A method called once the page has been created and initialized but just prior to display. |
void |
pageCreated()
Overload the Page XCreated event and set the caption of the dialog from the title attribute. |
protected void |
saveData()
|
void |
setColWidth(int colWidth)
Set the column width. |
void |
setData(java.lang.Object[] d)
Set the object data displayed by this dialog |
void |
setDataPath(java.lang.String path)
Set the path to the POJO instance |
void |
setEnabledByDefault(boolean enabledByDefault)
Set the default enabled status |
void |
setExclude(java.lang.String attribValue)
Set a comma separated list of excluded fields |
void |
setFieldOrder(java.lang.String fieldOrder)
Set the order of the input fields. |
void |
setFieldValidationRule(java.lang.String fieldValidationRule)
Set the name of the field validation rule |
static void |
setImplementingClassName(java.lang.String className)
Set the name of the backing class for the next instance of the PojoDialog |
void |
setIncludeByDefault(boolean includeByDefault)
Flag that all fields are to be included by default |
void |
setInputEnabled(boolean inputEnabled)
|
void |
setLabelWidth(int labelWidth)
Set the label or prompt width in pixels. |
void |
setLogo(java.lang.String imagePath)
Set the logo image |
void |
setMode(int mode,
java.lang.String caption)
Set the dialog mode |
void |
setNumCols(int numCols)
Set the number of columns over which to display the inputs |
void |
setRowHeight(int rowHeight)
Set the row height in pixels. |
void |
setSpacing(int spacing)
Set the input field spacing |
void |
setTitle(java.lang.String title)
Set the title text |
void |
setUseColumnOrder(boolean useColumnOrder)
Set the column vs row input field traversal mode |
void |
setViewFile(java.lang.String fileName)
Set the view file. |
void |
setViewPath(java.lang.String path)
Read the view from a node in the data model |
int |
showDialog(java.lang.Object owner)
Shows the dialog. |
int |
showDialog(java.lang.Object cbParent,
java.lang.String cb)
Shows the dialog. |
int |
showDialog(java.lang.Object owner,
java.lang.String title,
java.awt.Point location)
Shows the dialog. |
protected void |
updateData()
|
| Methods inherited from class org.formaria.swing.Dialog |
|---|
add, cancelDlg, getContentPane, getFocusComponent, getLastReturnValue, getMinimumSize, getPreferredSize, getReturnObject, setBackground, setCaption, setFont, setForeground, setHideFrame, setLayout, setLocation, setLocation, setModal, setResizable, setSaveOnClose, setSize, setUseNativeHeaders, showModalWindow, wasMouseClicked |
| Methods inherited from class org.formaria.swing.layer.LayerManager |
|---|
add, add, add, add, addLayer, deleteLayer, getActiveLayer, getActiveLayerIndex, getComponent, getInputContext, getLayer, getLayer, getLayerNames, isEnabled, isFocusable, isLayerEnabled, isLayerEnabled, isLayerVisible, moveLayerDown, moveLayerUp, paintChildren, setActiveLayer, setBounds, setLayerEnabled, setLayerName, setLayerVisible, updateLayerSizes |
| Methods inherited from class javax.swing.JPanel |
|---|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
| Methods inherited from class javax.swing.JComponent |
|---|
addAncestorListener, 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, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getNextFocusableComponent, getPopupLocation, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paintBorder, 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, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction |
| Methods inherited from class java.awt.Container |
|---|
addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, 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, 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, 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, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setName, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.formaria.aria.PersistentState |
|---|
restoreState, saveState |
| Field Detail |
|---|
public static final int CREATE_ACTION
public static final int READ_ACTION
public static final int UPDATE_ACTION
public static final int DELETE_ACTION
public static final int FIND_ACTION
protected java.lang.Object[] data
protected DialogValidationSupport dvs
protected int mode
@Find protected PojoPanel pojoPanel
@Find protected Label titleText
@Find protected Image logoImage
protected static java.lang.String nextClassName
| Constructor Detail |
|---|
public PojoDialog()
| Method Detail |
|---|
public static PojoDialog createDialog(int action,
java.lang.String path,
java.lang.String title)
action - the (CRUD) action to be taken by this dialog on closepath - the path to the POJO in the data modeltitle - the dialog title
public static PojoDialog createDialog(java.lang.Class implementingClass,
int action,
java.lang.String path,
java.lang.String title)
implementingClass - the class that implements the next PojoDialog instanceaction - the (CRUD) action to be taken by this dialog on closepath - the path to the POJO in the data modeltitle - the dialog title
public static java.lang.String getImplementingClassName()
public static void setImplementingClassName(java.lang.String className)
className -
public int showDialog(java.lang.Object owner,
java.lang.String title,
java.awt.Point location)
showDialog in class Dialogowner - The container to which the dialog is added.title - The dialog title/captionlocation - The location on screen to show the dialog
public int showDialog(java.lang.Object cbParent,
java.lang.String cb)
showDialog in class DialogcbParent - The parent/owner for purposes of a callback.cb - The name of a callback method in the parent (or null) to be invoked when the dialog is dismissed.public int showDialog(java.lang.Object owner)
showDialog in interface DialogSupportshowDialog in class Dialogowner - The container to which the dialog is added.
public void pack()
pack in interface DialogSupportpack in class Dialogpublic void pageCreated()
Dialog
pageCreated in interface PageSupportpageCreated in class Dialogpublic void pageActivated()
Page
pageActivated in interface PageSupportpageActivated in class Pagepublic void closeDlg()
closeDlg in class Dialogprotected void doCloseAction()
protected void updateData()
protected void saveData()
public void setMode(int mode,
java.lang.String caption)
mode - the mode or CRUD actioncaption - the caption/caption keypublic void setData(java.lang.Object[] d)
d - public void setTitle(java.lang.String title)
title - the new titlepublic void setLogo(java.lang.String imagePath)
imagePath - the image name/pathpublic void setNumCols(int numCols)
numCols - the number of columnspublic void setFieldOrder(java.lang.String fieldOrder)
fieldOrder - public void setRowHeight(int rowHeight)
rowHeight - the row heightpublic void setLabelWidth(int labelWidth)
labelWidth - the width in pixelspublic void setColWidth(int colWidth)
colWidth - the width in pixelspublic void setSpacing(int spacing)
spacing - the spacing in pixelspublic void setDataPath(java.lang.String path)
public void setEnabledByDefault(boolean enabledByDefault)
enabledByDefault - public void setInputEnabled(boolean inputEnabled)
public void setUseColumnOrder(boolean useColumnOrder)
useColumnOrder - if true traverse the input fields column by columnpublic void setIncludeByDefault(boolean includeByDefault)
includeByDefault - true to include all fieldspublic void setFieldValidationRule(java.lang.String fieldValidationRule)
fieldValidationRule - public void setExclude(java.lang.String attribValue)
attribValue - the list of fieldspublic void setViewFile(java.lang.String fileName)
attribValue - the list of fieldspublic void setViewPath(java.lang.String path)
path - the name of the model path containing the view
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||