|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--java.awt.Component
|
+--java.awt.Container
|
+--javax.swing.JComponent
|
+--javax.swing.text.JTextComponent
|
+--javax.swing.JTextField
|
+--uk.co.prosperosoftware.pspnum.PSPNumS
PSPNumS is a 'Swing' version of the PSPNum class. It extends javax.swing.JTextField whereas PSPNum extends java.awt.TextField. Apart from this, code and behaviour of PSPNum and PSPNumS is identical. Please see PSPNum documentation for description of functionality common to both classes.
| Field Summary | |
static int |
CARET_POSITION_DECIMAL
The caret is positioned to the digit nearest the decimal place. |
static int |
CARET_POSITION_DEFAULT
The caret is positioned by default (per the parent TextField object which PSPNum extends). |
static int |
CARET_POSITION_FIRSTDIGIT
The caret is positioned to the first digit in the displayed Text. |
static int |
MAX_DIGITS_AFTER
Maximum number (50) of digits after decimal place for PSPNum. |
static int |
MAX_DIGITS_BEFORE
Maximum number (50) of digits before decimal place for PSPNum. |
static int |
OVERFLOW_BUMP_BEFOREDP
When overflow occurs, PSPNum automatically increments DigitsBeforeDP to accommodate the new value. |
static int |
OVERFLOW_EXCEPTION
When overflow occurs, PSPNum throws an PSPException error for which the getErrNum() function returns PSPException.NumOverflow. |
static int |
OVERFLOW_IGNORE
When overflow occurs, PSPNum silently ignores the new value. |
static int |
OVERFLOW_IGNORE_BEEP
When overflow occurs, PSPNum ignores the new value and beeps. |
static int |
OVERFLOW_TRUNCATE
When overflow occurs, PSPNum silently truncates excess high-order digits. |
static int |
OVERFLOW_TRUNCATE_BEEP
When overflow occurs, PSPNum truncates excess high-order digits and beeps. |
static int |
TEXT_ALIGN_CENTER
Text displayed in Text box is centrally aligned (positioned in middle of Text box). |
static int |
TEXT_ALIGN_LEFT
Text displayed in Text box is left aligned (this is the default for each new PSPNum). |
static int |
TEXT_ALIGN_RIGHT
Text displayed in Text box is right aligned. |
| Fields inherited from class javax.swing.JTextField |
notifyAction |
| Fields inherited from class javax.swing.text.JTextComponent |
DEFAULT_KEYMAP, FOCUS_ACCELERATOR_KEY |
| 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 javax.swing.SwingConstants |
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST |
| Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
PSPNumS()
Default constructor - no parameters. |
|
PSPNumS(int cols)
Simplest constructor - size of edit box only. |
|
PSPNumS(int cols,
int DigitsBeforeDP,
int DigitsAfterDP)
Constructor with size of edit box and size of number. |
|
PSPNumS(int cols,
int DigitsBeforeDP,
int DigitsAfterDP,
java.lang.String Value)
Constructor with sizes of edit box, number; also initial numeric value. |
|
| Method Summary | |
void |
add(PSPNumS addNum)
Add decimal value of parameter PSPNum to this PSPNum with treatment of overflow and rounding determined by OverflowCode and Round properties respectively. |
void |
add(java.lang.String addValue)
Add parameter decimal value to this PSPNum with treatment of overflow and rounding determined by OverflowCode and Round properties respectively. |
void |
divide(PSPNumS divNum)
Divide decimal value of parameter PSPNum into this PSPNum with treatment of overflow and rounding determined by OverflowCode and Round properties respectively. |
void |
divide(java.lang.String divValue)
Divide parameter decimal value into this PSPNum with treatment of overflow and rounding determined by OverflowCode and Round properties respectively. |
void |
dump()
Utility function to dump PSPNum persistent property values to 'stdout' via 'System.out.println' call. |
void |
focusGained(java.awt.event.FocusEvent evt)
Method invoked when PSPNum gains input focus. |
void |
focusLost(java.awt.event.FocusEvent evt)
Method invoked when PSPNum loses input focus. |
java.awt.Color |
getActiveBackColor()
Returns active background color. |
int |
getCaretPosition()
Gets the position of the text insertion caret for this PSPNum. |
int |
getDigitsAfterDP()
Returns number of digits after decimal place. |
int |
getDigitsBeforeDP()
Returns number of digits before decimal place. |
java.lang.String |
getMask()
Returns all components of edit mask. |
java.lang.String |
getMaskUsed()
Returns used components of edit mask. |
int |
getOverflowCode()
Returns current OverflowCode flag setting for overflow following program operations. |
int |
getOverflowKey()
Returns current OverflowKey flag setting for overflow following user keying. |
java.awt.Dimension |
getPreferredSize()
Gets the preferred size of this PSPNum. |
boolean |
getRound()
Returns setting (true/false) for arithmetic rounding. |
java.lang.String |
getText()
Returns the Text for this PSPNum (trimmed to remove leading/trailing whitespace). |
int |
getTextAlign()
Returns current TextAlign flag setting. |
boolean |
getTextRefresh()
Get current state of TextRefresh boolean variable. |
java.lang.String |
getValue()
Returns unformatted decimal numeric value. |
boolean |
isEQ(PSPNumS compareNum)
Checks if this PSPNum is EQ another PSPNum. |
boolean |
isEQ(java.lang.String compareValue)
Checks if this PSPNum is EQ a particular numeric value. |
boolean |
isGE(PSPNumS compareNum)
Checks if this PSPNum is GE another PSPNum. |
boolean |
isGE(java.lang.String compareValue)
Checks if this PSPNum is GE a particular numeric value. |
boolean |
isGT(PSPNumS compareNum)
Checks if this PSPNum is GT another PSPNum. |
boolean |
isGT(java.lang.String compareValue)
Checks if this PSPNum is GT a particular numeric value. |
boolean |
isLE(PSPNumS compareNum)
Checks if this PSPNum is LE another PSPNum. |
boolean |
isLE(java.lang.String compareValue)
Checks if this PSPNum is LE a particular numeric value. |
boolean |
isLT(PSPNumS compareNum)
Checks if this PSPNum is LT another PSPNum. |
boolean |
isLT(java.lang.String compareValue)
Checks if this PSPNum is LT a particular numeric value. |
boolean |
isNE(PSPNumS compareNum)
Checks if this PSPNum is NE another PSPNum. |
boolean |
isNE(java.lang.String compareValue)
Checks if this PSPNum is NE a particular numeric value. |
boolean |
isNegative()
Check if the number is negative. |
boolean |
isPositive()
Check if the number is positive. |
boolean |
isZero()
Check if the number is zero. |
void |
lostOwnership(java.awt.datatransfer.Clipboard cb,
java.awt.datatransfer.Transferable data)
method required to be present only for system Clipboard Interface support - does nothing for PSPNum. |
void |
multiply(PSPNumS multNum)
Multiply this PSPNum by decimal value of parameter PSPNum with treatment of overflow and rounding determined by OverflowCode and Round properties respectively |
void |
multiply(java.lang.String multValue)
Multiply this PSPNum by parameter decimal value with treatment of overflow and rounding determined by OverflowCode and Round properties respectively. |
protected void |
processKeyEvent(java.awt.event.KeyEvent evt)
Keystroke processing - filters out keys inapplicable to decimal numbers. |
void |
setActiveBackColor(java.awt.Color newBackColor)
Set background color for PSPNum when it has the input focus (is the active control). |
void |
setCaretRelativePosition(int newRelativePosition)
Set caret position for this PSPNum (not for entire class) to relative position given by either CARET_POSITION_FIRSTDIGIT or CARET_POSITION_DECIMAL. |
void |
setDigitsAfterDP(int newDigitsAfterDP)
Resets number of digits after decimal place (revise number of digits set initially when PSPNum constructed). |
void |
setDigitsBeforeDP(int newDigitsBeforeDP)
Reset number of digits before decimal place (revise number of digits set initially when PSPNum constructed). |
void |
setFocusCaretRelativePosition(int newRelativePosition)
Set desired relative positioning of caret for this PSPNum (not for entire class) when it gains the input focus. |
void |
setMask(java.lang.String newMask)
Resets edit mask controlling display of formatted value in text box and the keystrokes recognised for input. |
void |
setOverflowCode(int newCode)
Set flag for this PSPNum (not for entire class) to control response to numeric overflow when new value set by program operations. |
void |
setOverflowDefault(byte overflowDefault)
Set flag for PSPNum class (default applied to new PSPNum's) to control response to numeric overflow when new value set by program operations or user keying. |
void |
setOverflowKey(int newKey)
Set flag for this PSPNum (not for entire class) to control response to numeric overflow when user keys new value. |
void |
setRound(boolean newRound)
Set default true/false value for arithmetic rounding of new numeric values assigned in code (does not apply to keystrokes). |
void |
setText(java.lang.String newText)
Dummy function to reset Text for PSPNum; deliberately does nothing - PSPNum value must be reset using setValue(). |
void |
setTextAlign(int newAlign)
Set alignment for Text displayed in Text box for this PSPNum (not for entire class). |
void |
setTextRefresh(boolean refresh)
Controls whether Text is refreshed whenever the underlying Value - per getValue() function - changes. |
void |
setValue(PSPNumS assnNum)
Assigns decimal value of parameter PSPNum to this PSPNum with treatment of overflow and rounding determined by OverflowCode and Round properties respectively |
void |
setValue(PSPNumS assnNum,
int Overflow,
boolean Round)
Assigns decimal value of parameter PSPNum to this PSPNum with treatment of overflow and rounding determined by last two parameters (temporary override values set by preceding setOverflowCode() and setRound() methods). |
void |
setValue(java.lang.String assnValue)
Assign parameter decimal value to this PSPNum with treatment of overflow and rounding determined by OverflowCode and Round properties respectively. |
void |
setValue(java.lang.String assnValue,
int Overflow,
boolean Round)
Assign parameter decimal value to this PSPNum with treatment of overflow and rounding determined by last two parameters. |
int |
signum()
Returns the signum function of this number |
void |
subtract(PSPNumS subNum)
Subtract decimal value of parameter PSPNum from this PSPNum with treatment of overflow and rounding determined by OverflowCode and Round properties respectively. |
void |
subtract(java.lang.String subValue)
Subtract parameter decimal value from this PSPNum with treatment of overflow and rounding determined by OverflowCode and Round properties respectively. |
java.lang.String |
toString()
Returns a String object representing this PSPNum's value - which is the decimal value also returned by the getValue() method. |
| Methods inherited from class javax.swing.JTextField |
addActionListener, configurePropertiesFromAction, createActionPropertyChangeListener, createDefaultModel, fireActionPerformed, getAccessibleContext, getAction, getActionListeners, getActions, getColumns, getColumnWidth, getHorizontalAlignment, getHorizontalVisibility, getScrollOffset, getUIClassID, isValidateRoot, paramString, postActionEvent, removeActionListener, scrollRectToVisible, setAction, setActionCommand, setColumns, setDocument, setFont, setHorizontalAlignment, setScrollOffset |
| Methods inherited from class javax.swing.text.JTextComponent |
addCaretListener, addInputMethodListener, addKeymap, copy, cut, fireCaretUpdate, getCaret, getCaretColor, getCaretListeners, getDisabledTextColor, getDocument, getDragEnabled, getFocusAccelerator, getHighlighter, getInputMethodRequests, getKeymap, getKeymap, getMargin, getNavigationFilter, getPreferredScrollableViewportSize, getScrollableBlockIncrement, getScrollableTracksViewportHeight, getScrollableTracksViewportWidth, getScrollableUnitIncrement, getSelectedText, getSelectedTextColor, getSelectionColor, getSelectionEnd, getSelectionStart, getText, getToolTipText, getUI, isEditable, loadKeymap, modelToView, moveCaretPosition, paste, processInputMethodEvent, read, removeCaretListener, removeKeymap, removeNotify, replaceSelection, select, selectAll, setCaret, setCaretColor, setCaretPosition, setComponentOrientation, setDisabledTextColor, setDragEnabled, setEditable, setFocusAccelerator, setHighlighter, setKeymap, setMargin, setNavigationFilter, setSelectedTextColor, setSelectionColor, setSelectionEnd, setSelectionStart, setUI, updateUI, viewToModel, write |
| 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, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, 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, 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, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, 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, processMouseEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, transferFocus, transferFocusUpCycle |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final int MAX_DIGITS_BEFORE
public static final int MAX_DIGITS_AFTER
public static final int OVERFLOW_BUMP_BEFOREDP
public static final int OVERFLOW_EXCEPTION
public static final int OVERFLOW_IGNORE
public static final int OVERFLOW_IGNORE_BEEP
public static final int OVERFLOW_TRUNCATE
public static final int OVERFLOW_TRUNCATE_BEEP
public static final int TEXT_ALIGN_RIGHT
public static final int TEXT_ALIGN_CENTER
public static final int TEXT_ALIGN_LEFT
public static final int CARET_POSITION_DEFAULT
public static final int CARET_POSITION_FIRSTDIGIT
public static final int CARET_POSITION_DECIMAL
| Constructor Detail |
public PSPNumS()
public PSPNumS(int cols)
cols - The size (number of columns) of the edit box.
public PSPNumS(int cols,
int DigitsBeforeDP,
int DigitsAfterDP)
cols - The size (number of columns) of the edit box.DigitsBeforeDP - Number of digits before decimal place.DigitsAfterDP - Number of digits after decimal place.
public PSPNumS(int cols,
int DigitsBeforeDP,
int DigitsAfterDP,
java.lang.String Value)
cols - The size (number of columns) of the edit box.DigitsBeforeDP - Number of digits before decimal place.DigitsAfterDP - Number of digits after decimal place.Value - Initial decimal numeric value for PSPNum.| Method Detail |
public final int getDigitsBeforeDP()
public final void setDigitsBeforeDP(int newDigitsBeforeDP)
newDigitsBeforeDP - New digits before decimal place.public final int getDigitsAfterDP()
public final void setDigitsAfterDP(int newDigitsAfterDP)
newDigitsAfterDP - New digits after decimal place.public final int getTextAlign()
public final void setTextAlign(int newAlign)
throws java.lang.IllegalArgumentException
newAlign - Flag controlling Text alignment.
java.lang.IllegalArgumentException - if parameter newAlign is not one of valid TEXT_ALIGN_xxx values.public final void setText(java.lang.String newText)
setText in class javax.swing.text.JTextComponentnewText - New text (ignored).public final java.lang.String getText()
getText in class javax.swing.text.JTextComponentpublic final void setTextRefresh(boolean refresh)
refresh - true/false if Text to be refreshed
when underlying decimal numeric value changes.public final boolean getTextRefresh()
public final java.lang.String getMaskUsed()
public final java.lang.String getMask()
public final void setMask(java.lang.String newMask)
newMask - New mask values (changed components)public final java.awt.Color getActiveBackColor()
public final void setActiveBackColor(java.awt.Color newBackColor)
newBackColor - New active background color.public java.awt.Dimension getPreferredSize()
getPreferredSize in class javax.swing.JTextFieldpublic void focusGained(java.awt.event.FocusEvent evt)
focusGained in interface java.awt.event.FocusListenerevt - FocusEvent generated for receipt of input focus.public void focusLost(java.awt.event.FocusEvent evt)
focusLost in interface java.awt.event.FocusListenerevt - FocusEvent generated for loss of input focus.public final int getCaretPosition()
getCaretPosition in class javax.swing.text.JTextComponent
public final void setCaretRelativePosition(int newRelativePosition)
throws java.lang.IllegalArgumentException
newRelativePosition - Flag controlling relative position caret
to be set to now.
java.lang.IllegalArgumentException - if parameter newRelativePosition is not one of the valid CARET_POSITION_xxx values.
public final void setFocusCaretRelativePosition(int newRelativePosition)
throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException - if parameter newCaretPosition is not one of the valid CARET_POSITION_xxx values.public final boolean getRound()
public final void setRound(boolean newRound)
public final int getOverflowCode()
public final void setOverflowCode(int newCode)
throws java.lang.IllegalArgumentException
newCode - Flag controlling overflow response.
java.lang.IllegalArgumentException - if parameter newCode is not one of the valid OVERFLOW_xxx values.public final int getOverflowKey()
public final void setOverflowKey(int newKey)
throws java.lang.IllegalArgumentException
newKey - Flag controlling overflow response.
java.lang.IllegalArgumentException - if parameter newKey is not one of the valid OVERFLOW_xxx values.public void setOverflowDefault(byte overflowDefault)
overflowDefault - Flag controlling default overflow response.protected void processKeyEvent(java.awt.event.KeyEvent evt)
processKeyEvent in class javax.swing.JComponentevt - Event generated for keying.
public final void lostOwnership(java.awt.datatransfer.Clipboard cb,
java.awt.datatransfer.Transferable data)
lostOwnership in interface java.awt.datatransfer.ClipboardOwnercb - Object representing the system clipboard.data - Contents of the clipboard.public final java.lang.String toString()
toString in class java.awt.Componentpublic final java.lang.String getValue()
public final void setValue(java.lang.String assnValue)
throws PSPException
assnValue - New decimal numeric value.
PSPException - if parameter assnValue (after trimming) has extraneous character.
PSPException - if overflow occurs and OverflowCode property set to OVERFLOW_EXCEPTION.
public final void setValue(java.lang.String assnValue,
int Overflow,
boolean Round)
throws java.lang.IllegalArgumentException,
PSPException
assnValue - New decimal numeric value.Overflow - One of OVERFLOW_xxx field values for treatment of overflow.Round - true/false for arithmetic rounding.
java.lang.IllegalArgumentException - if Overflow parameter is not one of the valid OVERFLOW_xxx values.
PSPException - if parameter assnValue (after trimming) has extraneous character.
PSPException - if overflow occurs and Overflow parameter set to OVERFLOW_EXCEPTION.
public final void setValue(PSPNumS assnNum)
throws PSPException
assnNum - Number whose value to be assigned.
PSPException - if overflow occurs and OverflowCode property set to OVERFLOW_EXCEPTION.
public final void setValue(PSPNumS assnNum,
int Overflow,
boolean Round)
throws java.lang.IllegalArgumentException,
PSPException
assnNum - Number whose value to be assigned.Overflow - One of OVERFLOW_xxx field values for treatment of overflow.Round - true/false for arithmetic rounding.
java.lang.IllegalArgumentException - if Overflow parameter is not one of the valid OVERFLOW_xxx values.
PSPException - if overflow occurs and Overflow parameter set to OVERFLOW_EXCEPTION.
public final void add(PSPNumS addNum)
throws PSPException
addNum - Number whose value to be added.
PSPException - if overflow occurs and OverflowCode property set to OVERFLOW_EXCEPTION.
public final void add(java.lang.String addValue)
throws PSPException
addValue - Value to be added.
PSPException - if parameter addValue (after trimming) has extraneous character.
PSPException - if overflow occurs and OverflowCode property set to OVERFLOW_EXCEPTION.
public final void subtract(PSPNumS subNum)
throws PSPException
subNum - Number whose value to be subtracted.
PSPException - if overflow occurs and OverflowCode property set to OVERFLOW_EXCEPTION.
public final void subtract(java.lang.String subValue)
throws PSPException
subValue - Value to be subtracted.
PSPException - if parameter subValue (after trimming) has extraneous character.
PSPException - if overflow occurs and OverflowCode property set to OVERFLOW_EXCEPTION.
public final void multiply(PSPNumS multNum)
throws PSPException
multNum - Number whose value to be multiplied by.
PSPException - if overflow occurs and OverflowCode property set to OVERFLOW_EXCEPTION.
public final void multiply(java.lang.String multValue)
throws PSPException
multValue - Value to be multiplied by.
PSPException - if parameter multValue (after trimming) has extraneous character.
PSPException - if overflow occurs and OverflowCode property set to OVERFLOW_EXCEPTION.
public final void divide(PSPNumS divNum)
throws java.lang.ArithmeticException,
PSPException
divNum - Number whose value to be divided by.
java.lang.ArithmeticException - if parameter divNum has zero value.
PSPException - if overflow occurs and OverflowCode property set to OVERFLOW_EXCEPTION.
public final void divide(java.lang.String divValue)
throws java.lang.ArithmeticException,
PSPException
divValue - Value to be divided by.
PSPException - if parameter divValue (after trimming) has extraneous character.
java.lang.ArithmeticException - if parameter divValue has zero value.
PSPException - if overflow occurs and OverflowCode property set to OVERFLOW_EXCEPTION.public final int signum()
public final boolean isPositive()
public final boolean isNegative()
public final boolean isZero()
public final boolean isEQ(PSPNumS compareNum)
public final boolean isEQ(java.lang.String compareValue)
throws PSPException
PSPException - if parameter compareValue (after trimming) has extraneous character.public final boolean isNE(PSPNumS compareNum)
public final boolean isNE(java.lang.String compareValue)
throws PSPException
PSPException - if parameter compareValue (after trimming) has extraneous character.public final boolean isGT(PSPNumS compareNum)
public final boolean isGT(java.lang.String compareValue)
throws PSPException
PSPException - if parameter compareValue (after trimming) has extraneous character.public final boolean isLT(PSPNumS compareNum)
public final boolean isLT(java.lang.String compareValue)
throws PSPException
PSPException - if parameter compareValue (after trimming) has extraneous character.public final boolean isGE(PSPNumS compareNum)
public final boolean isGE(java.lang.String compareValue)
throws PSPException
PSPException - if parameter compareValue (after trimming) has extraneous character.public final boolean isLE(PSPNumS compareNum)
public final boolean isLE(java.lang.String compareValue)
throws PSPException
PSPException - if parameter compareValue (after trimming) has extraneous character.public void dump()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||