|
|||||||||
| 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
dev.gui.field.PopupField
com.jp.comp.calculator.CalculatorField
CalculatorField represents a field to enter a number value, formatted with specified
Locale, and with popup CalculatorPanel
CalculatorPanel,
Serialized Form| Nested Class Summary | |
protected class |
CalculatorField.NumberFormatterExt
Extends NumberFormatter to allow processing null or empty value |
| Nested classes inherited from class javax.swing.JPanel |
javax.swing.JPanel.AccessibleJPanel |
| Nested classes inherited from class javax.swing.JComponent |
javax.swing.JComponent.AccessibleJComponent |
| Nested classes inherited from class java.awt.Container |
java.awt.Container.AccessibleAWTContainer |
| Nested classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
| Field Summary | |
static javax.swing.KeyStroke |
DEFAULT_POPUP_CALCULATOR_HOTKEY
Default hot key to popup the MonthCalendarPanel (Down Arrow) |
protected double |
fBufferedResult
|
protected CalculatorEvent |
fCalculatorEvent
|
protected boolean |
fCopyValueToPupupCalculator
|
protected boolean |
fFreezeDocListener
|
protected java.text.DecimalFormat |
fNumberFormatter
|
protected CalculatorPanel |
pnlCalculator
|
protected static java.lang.String |
POPUP_CALCULATOR_ACTION_NAME
|
static java.lang.String |
PROPERTY_COPY_VALUE_TO_POPUP_CALCULATOR
Property name for the copyValueToPupupCalculator property |
static java.lang.String |
PROPERTY_POPUP_HOTKEY
Property name for the popupHotKey property |
| Fields inherited from class dev.gui.field.PopupField |
btnPopup, DEFAULT_BUTTON_TEXT, fField, fSelectAllFocusAdapter, pnlPopup, popupMenu, PROPERTY_FIELD, PROPERTY_FIELD_ENABLED, PROPERTY_POPUP_BUTTON_ENABLED, PROPERTY_POPUP_BUTTON_ICON, PROPERTY_POPUP_BUTTON_TEXT, PROPERTY_POPUP_BUTTON_TOOLTIP_TEXT, PROPERTY_POPUP_PANEL, PROPERTY_TOOLTIP_TEXT |
| 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.Container |
|
| 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 | |
CalculatorField()
Constructs the CalculatorField with default Locale |
|
CalculatorField(java.util.Locale aLocale)
Constructs the CalculatorField with specified Locale |
|
| Method Summary | |
void |
actionPerformed(java.awt.event.ActionEvent anEvent)
Catches action events comming from CalculatorPanel and closes popup calculator
when equal button is pressed |
void |
addCalculatorListener(CalculatorListener aListener)
Adds Calculator's listener |
protected void |
beforeShowPopup()
|
void |
clearField()
Clear the field setting null to it |
void |
fractionDigitsChanged(CalculatorEvent anEvent)
Invoked when a change in the number of fraction digits occurs |
java.lang.String |
getAbout()
|
CalculatorPanel |
getCalculator()
Returns the CalculatorPanel instance |
java.awt.Color |
getDisplayBackground()
Gets display's background Color in the popup CalculatorPanel |
java.awt.Font |
getDisplayFont()
Gets display's font Color in the popup CalculatorPanel |
java.awt.Color |
getDisplayForeground()
Gets display's foreground Color in the popup CalculatorPanel |
int |
getFractionDigits()
Gets the number of fraction digits in the popup CalculatorPanel |
java.awt.Color |
getFractionDigitsBackground()
Gets display's background Color in the popup CalculatorPanel |
java.awt.Color |
getFractionDigitsForeground()
Gets display's foreground Color in the popup CalculatorPanel |
java.text.DecimalFormat |
getNumberFormatter()
Returns being used number formatter to format entering number |
javax.swing.KeyStroke |
getPopupCalendarHotKey()
Returns hot key for popup CalculatorPanel |
java.awt.Dimension |
getPreferredSize()
|
double |
getValue()
Returns field's value |
boolean |
isCopyValueToPupupCalculator()
Returns true if field's value sould be copied to popup calculator when it's being popped up |
boolean |
isFieldEmpty()
Returns true if the field is empty |
boolean |
isGroupingUsed()
Returns true if number grouping is used in the popup CalculatorPanel |
boolean |
isShowFractionTrailingZeros()
Returns true if fraction trailing zeros should by shown depending on the value
of the property number of fraction digits |
void |
propertyChange(java.beans.PropertyChangeEvent anEvent)
Forwards property change events comming from CalculatorPanel |
void |
removeCalculatorListener(CalculatorListener aListener)
Removes Calculator's listener |
void |
resultChanged(CalculatorEvent anEvent)
Catches event result changed comming from CalculatorPanel to show the result
on the display |
void |
setAbout(java.lang.String aAbout)
|
void |
setCopyValueToPupupCalculator(boolean aFlag)
Sets true if field's value sould be copied to popup calculator when it's being popped up |
void |
setDisplayBackground(java.awt.Color aColor)
Sets display's background Color in the popup CalculatorPanel |
void |
setDisplayFont(java.awt.Font aFont)
Sets display's font Color in the popup CalculatorPanel |
void |
setDisplayForeground(java.awt.Color aColor)
Sets display's foreground Color in the popup CalculatorPanel |
void |
setFractionDigits(int aValue)
Sets the specified number of fraction digits in the popup CalculatorPanel |
void |
setFractionDigitsBackground(java.awt.Color aColor)
Sets fraction digits's background Color in the popup CalculatorPanel |
void |
setFractionDigitsForeground(java.awt.Color aColor)
Sets fraction digits's foreground Color in the popup CalculatorPanel |
void |
setGroupingUsed(boolean aFlag)
Set to true if number grouping should be used in the popup CalculatorPanel |
void |
setLocale(java.util.Locale aLocale)
Sets a new Calculator's Locale. |
void |
setPopupCalendarHotKey(javax.swing.KeyStroke aKeyStroke)
Assigns a new hot key to pop up CalculatorPanel |
void |
setShowFractionTrailingZeros(boolean aFlag)
Sets true if fraction trailing zeros should by shown depending on the value
of the property number of fraction digits |
void |
setValue(double aValue)
Sets a new value to the field |
| Methods inherited from class dev.gui.field.PopupField |
btnPopup_actionPerformed, fieldFocusGained, getField, getPopupButton, getPopupButtonIcon, getPopupButtonText, getPopupButtonToolTipText, getPopupPanel, getToolTipText, initPopup, isEnabled, isFieldEnabled, isPopupButtonEnabled, requestFocus, setEnabled, setField, setFieldEnabled, setPopupButtonEnabled, setPopupButtonIcon, setPopupButtonText, setPopupButtonToolTipText, setPopupPanel, setToolTipText |
| Methods inherited from class javax.swing.JPanel |
getAccessibleContext, getUI, getUIClassID, paramString, setUI, 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, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update |
| Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, addImpl, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setLayout, 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, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, 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, processMouseEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final java.lang.String PROPERTY_POPUP_HOTKEY
public static final java.lang.String PROPERTY_COPY_VALUE_TO_POPUP_CALCULATOR
public static final javax.swing.KeyStroke DEFAULT_POPUP_CALCULATOR_HOTKEY
MonthCalendarPanel (Down Arrow)
protected static final java.lang.String POPUP_CALCULATOR_ACTION_NAME
protected java.text.DecimalFormat fNumberFormatter
protected CalculatorPanel pnlCalculator
protected CalculatorEvent fCalculatorEvent
protected boolean fCopyValueToPupupCalculator
protected double fBufferedResult
protected boolean fFreezeDocListener
| Constructor Detail |
public CalculatorField()
CalculatorField with default Locale
public CalculatorField(java.util.Locale aLocale)
CalculatorField with specified Locale
aLocale - the Locale| Method Detail |
protected void beforeShowPopup()
public void clearField()
public boolean isCopyValueToPupupCalculator()
true if field's value sould be copied to popup calculator when it's being popped up
true if field's value sould be copied to popup calculatorpublic void setCopyValueToPupupCalculator(boolean aFlag)
true if field's value sould be copied to popup calculator when it's being popped up
aFlag - true if field's value sould be copied to popup calculatorpublic boolean isShowFractionTrailingZeros()
true if fraction trailing zeros should by shown depending on the value
of the property number of fraction digits
true if fraction trailing zeros should by shownpublic void setShowFractionTrailingZeros(boolean aFlag)
true if fraction trailing zeros should by shown depending on the value
of the property number of fraction digits
aFlag - true if fraction trailing zeros should by shownpublic CalculatorPanel getCalculator()
CalculatorPanel instance
CalculatorPanel instancepublic javax.swing.KeyStroke getPopupCalendarHotKey()
CalculatorPanel
CalculatorPanelpublic void setPopupCalendarHotKey(javax.swing.KeyStroke aKeyStroke)
CalculatorPanel
aKeyStroke - a new hot keypublic void setLocale(java.util.Locale aLocale)
Locale. The change of the Calculator's Locale
will/may change the buttons text, messages text and the result and edit format.
By default Default Locale is used
aLocale - a new Calculator's Localepublic double getValue()
public void setValue(double aValue)
aValue - a new valuepublic boolean isFieldEmpty()
true if the field is empty
true if the field is emptypublic int getFractionDigits()
CalculatorPanel
public void setFractionDigits(int aValue)
CalculatorPanel
aValue - the specified number of fraction digitspublic java.awt.Color getDisplayForeground()
Color in the popup CalculatorPanel
Colorpublic void setDisplayForeground(java.awt.Color aColor)
Color in the popup CalculatorPanel
aColor - display's foreground Colorpublic java.awt.Color getDisplayBackground()
Color in the popup CalculatorPanel
Colorpublic void setDisplayBackground(java.awt.Color aColor)
Color in the popup CalculatorPanel
aColor - display's background Colorpublic java.awt.Font getDisplayFont()
Color in the popup CalculatorPanel
Colorpublic void setDisplayFont(java.awt.Font aFont)
Color in the popup CalculatorPanel
aFont - display's font Colorpublic java.awt.Color getFractionDigitsForeground()
Color in the popup CalculatorPanel
Colorpublic void setFractionDigitsForeground(java.awt.Color aColor)
Color in the popup CalculatorPanel
aColor - fraction digits's foreground Colorpublic java.awt.Color getFractionDigitsBackground()
Color in the popup CalculatorPanel
Colorpublic void setFractionDigitsBackground(java.awt.Color aColor)
Color in the popup CalculatorPanel
aColor - fraction digits's background Colorpublic boolean isGroupingUsed()
true if number grouping is used in the popup CalculatorPanel
true if number grouping is usedpublic void setGroupingUsed(boolean aFlag)
true if number grouping should be used in the popup CalculatorPanel
aFlag - true if number grouping should be usedpublic java.text.DecimalFormat getNumberFormatter()
public java.lang.String getAbout()
public void setAbout(java.lang.String aAbout)
public void fractionDigitsChanged(CalculatorEvent anEvent)
CalculatorListener
fractionDigitsChanged in interface CalculatorListeneranEvent - copy of the class eventpublic void resultChanged(CalculatorEvent anEvent)
CalculatorPanel to show the result
on the display
resultChanged in interface CalculatorListeneranEvent - CalculatorEventpublic void actionPerformed(java.awt.event.ActionEvent anEvent)
CalculatorPanel and closes popup calculator
when equal button is pressed
actionPerformed in interface java.awt.event.ActionListeneranEvent - ActionEventpublic void propertyChange(java.beans.PropertyChangeEvent anEvent)
CalculatorPanel
propertyChange in interface java.beans.PropertyChangeListeneranEvent - PropertyChangeEventpublic void addCalculatorListener(CalculatorListener aListener)
aListener - Calculator's listenerpublic void removeCalculatorListener(CalculatorListener aListener)
aListener - Calculator's listenerpublic java.awt.Dimension getPreferredSize()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||