|
||||||||||
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.MarginDialog
User dialog that allows to define margins for a template.
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 int[] |
answer
Place holder for values sent to the client. |
private int |
bottom
Bottom margin value (in twips) |
(package private) javax.swing.JButton |
btnCancel
|
(package private) javax.swing.JButton |
btnOK
|
private java.text.DecimalFormat |
df
Formatter for margin values. |
(package private) javax.swing.JLabel |
lblBottom
|
(package private) javax.swing.JLabel |
lblLeft
|
(package private) javax.swing.JLabel |
lblRight
|
(package private) javax.swing.JLabel |
lblTitle
|
(package private) javax.swing.JLabel |
lblTop
|
private int |
left
Left margin value (in twips) |
static int |
MAX_HOR
Maximum horizontal margin (left+right) in twips. |
private static int |
MAX_HOR_INCH
Maximum horizontal margin, in inches. |
static int |
MAX_VERT
Maximum vertical margin (top+bottom) in twips. |
private static int |
MAX_VERT_INCH
Maximum vertical margin, in inches. |
(package private) javax.swing.JPanel |
pnlCtrl
|
(package private) javax.swing.JPanel |
pnlInf
|
private int |
right
Right margin value (in twips) |
private int |
top
Top margin value (in twips) |
static int |
TWIPS_IN_INCH
Number of twips in one inch |
(package private) javax.swing.JTextField |
txtBottom
|
(package private) javax.swing.JTextField |
txtLeft
|
(package private) javax.swing.JTextField |
txtRight
|
(package private) javax.swing.JTextField |
txtTop
|
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.MarginDialog(int[] answer,
int left,
int right,
int top,
int bottom)
MarginDialog constructor. |
Method Summary | |
private void |
checkAdd(int first,
int snd,
int maxadd,
javax.swing.JTextField sndTxt)
Checks if the sum of two opposed margins does not exceed a limit. |
private int |
checkDouble(java.lang.String msg,
javax.swing.JTextField txt,
int max)
Checks if the value typed in a text box does not exceed a margin limit. |
private void |
guiInit()
User controls initialization |
void |
setMargin(int twips,
javax.swing.JTextField txt)
Displays a value (converted to inches) in a text field. |
void |
setTitle(java.lang.String s)
Setter for the title attribute. |
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 TWIPS_IN_INCH
private static final int MAX_HOR_INCH
private static final int MAX_VERT_INCH
public static final int MAX_HOR
public static final int MAX_VERT
javax.swing.JLabel lblTitle
javax.swing.JPanel pnlInf
javax.swing.JButton btnOK
javax.swing.JButton btnCancel
javax.swing.JPanel pnlCtrl
javax.swing.JLabel lblLeft
javax.swing.JLabel lblRight
javax.swing.JLabel lblTop
javax.swing.JLabel lblBottom
javax.swing.JTextField txtLeft
javax.swing.JTextField txtRight
javax.swing.JTextField txtTop
javax.swing.JTextField txtBottom
private int[] answer
private int left
private int right
private int top
private int bottom
private java.text.DecimalFormat df
Constructor Detail |
public TemplateEditor.MarginDialog(int[] answer, int left, int right, int top, int bottom)
answer
- Array where values captured by this dialog are stored.
Must be provided by the client.left
- Left margin value (in twips)right
- Right margin value (in twips)top
- Top margin value (in twips)bottom
- margin value (in twips)Method Detail |
private void guiInit()
private int checkDouble(java.lang.String msg, javax.swing.JTextField txt, int max) throws java.lang.NumberFormatException, java.lang.Exception
txt
- The text box where the value is typed.max
- The limit not to be exceeded.msg
- A short message identifying the type of margin.java.lang.NumberFormatException
- if the value is not numeric.java.lang.Exception
- If the limit is exceeded.private void checkAdd(int first, int snd, int maxadd, javax.swing.JTextField sndTxt) throws java.lang.Exception
first
- First margin (in twips)snd
- Second margin (in twips)sndTxt
- Text box that is zeroed if limit is exceeded.maxadd
- Description of the Parameterjava.lang.Exception
- If the limit is exceeded.public void setMargin(int twips, javax.swing.JTextField txt)
twips
- Value to be displayed (in twips)txt
- Field where the value is displayed.public void setTitle(java.lang.String s)
setTitle
in class java.awt.Dialog
s
- The new title value
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |