|
||||||||||
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 | +--java.awt.Window | +--java.awt.Dialog | +--javax.swing.JDialog | +--com.instantbank.lettertemplate.editor.applet.TemplateEditor.CategoryNameTemplateDialog
Gui that allows to capture/display --fully or partially-- the main attributes of a template: its category, its name, the name of its components. It doesn't deal with the text itself nor its images and variables.
Inner classes inherited from class javax.swing.JDialog |
javax.swing.JDialog.AccessibleJDialog |
Inner classes inherited from class java.awt.Dialog |
java.awt.Dialog.AccessibleAWTDialog |
Inner classes inherited from class java.awt.Window |
java.awt.Window.AccessibleAWTWindow |
Inner classes inherited from class java.awt.Container |
java.awt.Container.AccessibleAWTContainer |
Inner classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent, java.awt.Component.AWTTreeLock |
Field Summary | |
private CodeDescription[] |
bodies
|
(package private) java.awt.BorderLayout |
brdLyCtrl
|
(package private) java.awt.BorderLayout |
brdLySup
|
(package private) javax.swing.JButton |
btnCancel
|
(package private) javax.swing.JButton |
btnOK
|
private CodeDescription[] |
categories
|
static int |
CATEGORY
|
private java.lang.String |
catName
|
(package private) javax.swing.JComboBox |
cbxCategory
|
private CodeDescription[] |
cdTempl
Code and description of the templates in the current category. |
private CodeDescription[] |
closings
|
(package private) ComponentNameDisplay |
cndBody
|
(package private) ComponentNameDisplay |
cndClosing
|
(package private) ComponentNameDisplay |
cndHeader
|
CodeDescription[] |
cntResult
|
(package private) java.awt.GridBagLayout |
grbgDialog
|
(package private) java.awt.GridLayout |
gridSupLeft
|
(package private) java.awt.GridLayout |
gridSupRight
|
private CodeDescription[] |
headers
|
(package private) javax.swing.JLabel |
lblCategory
|
(package private) javax.swing.JLabel |
lblName
|
(package private) javax.swing.JLabel |
lblPrintType
|
private CodeDescription[] |
localCodes
|
(package private) javax.swing.JList |
lstNames
|
private int |
mode
|
(package private) javax.swing.JPanel |
pnlComp
|
(package private) javax.swing.JPanel |
pnlCtrl
|
(package private) javax.swing.JPanel |
pnlInf
|
(package private) javax.swing.JPanel |
pnlOkCncel
|
(package private) javax.swing.JPanel |
pnlSup
|
(package private) javax.swing.JPanel |
pnlSupLeft
|
(package private) javax.swing.JPanel |
pnlSupRight
|
static int |
RESPONSE
|
(package private) javax.swing.JScrollPane |
scrNames
|
(package private) javax.swing.JTextField |
txtPrintType
|
(package private) javax.swing.JTextField |
txtTemplateName
|
(package private) java.lang.String[] |
voidNames
|
Fields inherited from class javax.swing.JDialog |
accessibleContext, defaultCloseOperation, rootPane, rootPaneCheckingEnabled |
Fields inherited from class java.awt.Dialog |
base, keepBlocking, modal, nameCounter, resizable, serialVersionUID, title |
Fields inherited from class java.awt.Window |
active, dbg, focusMgr, inputContext, inputContextLock, OPENED, ownedWindowList, showWithParent, state, warningString, weakThis, windowListener, windowSerializedDataVersion |
Fields inherited from class java.awt.Container |
component, containerListener, containerSerializedDataVersion, dispatcher, layoutMgr, listeningBoundsChildren, listeningChildren, maxSize, ncomponents, printing, printingThreads |
Fields inherited from class java.awt.Component |
actionListenerK, adjustmentListenerK, appContext, background, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, changeSupport, componentListener, componentListenerK, componentOrientation, componentSerializedDataVersion, containerListenerK, cursor, dropTarget, enabled, eventMask, focusListener, focusListenerK, font, foreground, graphicsConfig, hasFocus, height, hierarchyBoundsListener, hierarchyBoundsListenerK, hierarchyListener, hierarchyListenerK, incRate, inputMethodListener, inputMethodListenerK, isInc, isPacked, itemListenerK, keyListener, keyListenerK, LEFT_ALIGNMENT, locale, LOCK, metrics, minSize, mouseListener, mouseListenerK, mouseMotionListener, mouseMotionListenerK, name, nameExplicitlySet, newEventsOnly, ownedWindowK, parent, peer, peerFont, popups, prefSize, privateKey, RIGHT_ALIGNMENT, textListenerK, TOP_ALIGNMENT, valid, visible, width, windowClosingException, windowListenerK, x, y |
Fields inherited from interface javax.swing.WindowConstants |
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, HIDE_ON_CLOSE |
Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
TemplateEditor.CategoryNameTemplateDialog(long codeCategory,
CodeDescription[] result,
int mode)
CategoryNameTemplateDialog constructor. |
Method Summary | |
private boolean[] |
checkOverwrite()
Checks the template and/or components that can be overwritten by a save operation. |
private java.lang.String |
checkOverwritteWithNew()
Helper method that aids to produce a convenient message warning about the components that can be modified when saving a template in the LetterOp.SAVEWITHNEW mode. |
private java.lang.String |
checkValidNames(boolean includeTemplate)
Checks if the user has chosen valid names for the template and its components. |
private void |
cleanComponentsNamesCodes()
Cleans the names of the components in the user interface. |
private void |
copyResult(CodeDescription[] from,
CodeDescription[] to)
Copies values from a < code,description> array to another < code,description> array. |
private void |
guiInit(int mode)
Inits the CategoryNameTemplateDialog Gui after the 'interaction mode' |
private void |
putResult(CodeDescription[] to)
Copies the names of the template and components in the result. |
private void |
refreshComponentsNames(long code)
Searches code and names of a template and --if they are found-- displays the names in the user interface. |
private java.lang.String |
saveWarningMessage(boolean[] overwrite)
Calculates a warning message with names and types of the template and/or components that will be modified. |
Methods inherited from class javax.swing.JDialog |
addImpl, createRootPane, createRootPaneException, dialogInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getJMenuBar, getLayeredPane, getRootPane, isRootPaneCheckingEnabled, paramString, processKeyEvent, processWindowEvent, remove, setContentPane, setDefaultCloseOperation, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setLocationRelativeTo, setRootPane, setRootPaneCheckingEnabled, update |
Methods inherited from class java.awt.Dialog |
|
Methods inherited from class java.awt.Window |
addOwnedWindow, addWindowListener, adjustListeningChildren, applyResourceBundle, applyResourceBundle, connectOwnedWindow, dispatchEventImpl, eventEnabled, finalize, getFocusOwner, getGraphicsConfiguration, getInputContext, getListeners, getLocale, getOwnedWindows, getOwner, getToolkit, getWarningString, isActive, isShowing, nextFocus, ownedInit, pack, postEvent, postProcessKeyEvent, postWindowEvent, preProcessKeyEvent, processEvent, readObject, removeOwnedWindow, removeWindowListener, resetGC, setCursor, setFocusOwner, setWarningString, toBack, toFront, transferFocus, writeObject |
Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, applyOrientation, checkGD, countComponents, createChildHierarchyEvents, createHierarchyEvents, deliverEvent, dispatchEventToSelf, doLayout, findComponentAt, findComponentAt, findComponentAt, getAccessibleAt, getAccessibleChild, getAccessibleChildrenCount, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents_NoClientCode, getComponents, getInsets, getLayout, getMaximumSize, getMinimumSize, getMouseEventTarget, getPreferredSize, getWindow, insets, invalidate, invalidateTree, isAncestorOf, layout, lightweightPaint, lightweightPrint, list, list, locate, minimumSize, numListening, paint, paintComponents, paintHeavyweightComponents, postsOldMouseEvents, preferredSize, print, printComponents, printHeavyweightComponents, processContainerEvent, proxyEnableEvents, proxyRequestFocus, remove, removeAll, removeContainerListener, removeNotify, setFont, validate, validateTree |
Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, addPropertyChangeListener, areInputMethodsEnabled, bounds, checkImage, checkImage, checkWindowClosingException, coalesceEvents, contains, contains, createImage, createImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, getAccessibleIndexInParent, getAccessibleStateSet, getBackground, getBounds, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont_NoClientCode, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getInputMethodRequests, getLocation, getLocation, getLocationOnScreen_NoTreeLock, getLocationOnScreen, getName, getNativeContainer, getParent_NoClientCode, getParent, getPeer, getSize, getSize, getToolkitImpl, getTreeLock, getWidth, getWindowForObject, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isDisplayable, isDoubleBuffered, isEnabled, isEnabledImpl, isFocusTraversable, isLightweight, isOpaque, isRecursivelyVisible, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, processMouseMotionEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setDropTarget, setEnabled, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, size, toString, transferFocus |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait |
Field Detail |
public static final int CATEGORY
public static final int RESPONSE
java.awt.GridBagLayout grbgDialog
javax.swing.JPanel pnlSup
javax.swing.JPanel pnlSupLeft
javax.swing.JPanel pnlSupRight
javax.swing.JPanel pnlInf
javax.swing.JPanel pnlCtrl
javax.swing.JPanel pnlComp
javax.swing.JPanel pnlOkCncel
java.awt.GridLayout gridSupLeft
java.awt.GridLayout gridSupRight
java.awt.BorderLayout brdLySup
java.awt.BorderLayout brdLyCtrl
javax.swing.JLabel lblPrintType
javax.swing.JLabel lblCategory
javax.swing.JLabel lblName
javax.swing.JTextField txtPrintType
javax.swing.JComboBox cbxCategory
javax.swing.JTextField txtTemplateName
javax.swing.JList lstNames
javax.swing.JScrollPane scrNames
javax.swing.JButton btnOK
javax.swing.JButton btnCancel
ComponentNameDisplay cndHeader
ComponentNameDisplay cndBody
ComponentNameDisplay cndClosing
private CodeDescription[] categories
private CodeDescription[] headers
private CodeDescription[] bodies
private CodeDescription[] closings
java.lang.String[] voidNames
private java.lang.String catName
private CodeDescription[] cdTempl
private CodeDescription[] localCodes
public CodeDescription[] cntResult
private int mode
Constructor Detail |
public TemplateEditor.CategoryNameTemplateDialog(long codeCategory, CodeDescription[] result, int mode)
codeCategory
- Template's category code. It can be undefined and
the user will have to choose one.result
- An array of < code, description> that must be
provided by the caller. It will be filled with the results so it can
be used by the caller. The entries are arranged in the THBCCR order
. Moreover, the last entry follows the convention,
mode
- Establishes the way the Gui can be used. Conventions
are:
LetterOp.SAVEAS
=>
LetterOp.SAVEWITHNEW
=> It is an old template and the
user wants to change one of its components.
LetterOp.LOAD
=> An existing template will be opened.
This Gui is used to choose it and to display --not to change-- its
main attributes.
Method Detail |
private void guiInit(int mode) throws java.lang.Exception
mode
- The mode of interaction: SAVEAS, LOAD, SAVEWITHNEW.
See CategoryNameTemplateDialog main constructor
java.lang.Exception
- Description of the Exceptionprivate void refreshComponentsNames(long code) throws java.lang.Exception
code
- Template's code.java.lang.Exception
- Description of the Exceptionprivate void cleanComponentsNamesCodes()
private void copyResult(CodeDescription[] from, CodeDescription[] to)
RESPONSE
entry is not copied.from
- The array the values will be copied from.to
- The array the values will be copied to.private void putResult(CodeDescription[] to)
to
- Array where the results --in the gui interface-- are moved to.private boolean[] checkOverwrite()
For each entry in the returned array:
Moreover, if every entry is going to be false, the value actually produced is null instead of the array of booleans.
private java.lang.String checkOverwritteWithNew()
LetterOp.SAVEWITHNEW
mode.private java.lang.String checkValidNames(boolean includeTemplate)
includeTemplate
- When true, the template name is included in the
verification.private java.lang.String saveWarningMessage(boolean[] overwrite)
overwrite
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |