|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.Component | +--java.awt.TextComponent | +--java.awt.TextField | +--com.linxpda.dbaware.awt.DBNumericField
A data-aware implementation of java.awt.TextField that only allows input of numeric values (and a single decimal point if DECIMAL mode is selected.
Inner classes inherited from class java.awt.TextField |
java.awt.TextField.AccessibleAWTTextField |
Inner classes inherited from class java.awt.TextComponent |
java.awt.TextComponent.AccessibleAWTTextComponent |
Inner classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent |
Field Summary | |
static int |
DECIMAL
Denotes this NumericFields ability to allow decimals values |
protected int |
decimals
|
static int |
INTEGER
Denotes this NumericFields ability to allow only integer values |
protected int |
type
|
Fields inherited from class java.awt.TextComponent |
textListener |
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 | |
DBNumericField()
|
|
DBNumericField(int columns)
|
|
DBNumericField(java.lang.String text)
|
|
DBNumericField(java.lang.String text,
int columns)
|
Method Summary | |
java.lang.String |
getColumnLabel()
Returns the data column label associated with this component. |
int |
getDecimalsAllowed()
Returns the current number of decimals allowed in this DBNumericField. |
float |
getFloat()
Returns the value of this NumericField as a float |
int |
getInt()
Returns the value of this NumericField as an int |
int |
getType()
Returns the current mode for this DBNumericField. |
java.lang.Object |
getValue()
Returns a dbaware component's value as an Object formatted in a manner in which the component can display. |
void |
reset()
Resets the component upon a request to clear screen from a DBRootPanel . |
void |
setColumnLabel(java.lang.String label)
Sets the data column into which this component's value will be stored. |
void |
setDecimalsAllowed(int decimals)
Sets the number of digits allowed after a decimal. |
void |
setText(java.lang.String text)
Overrides setText from java.awt.TextField to make this text subject to the same rules as typed text. |
void |
setType(int type)
Sets the NumericFields type. |
void |
setValue(Entry e)
Passes an Entry object,
from which the dbaware component retrieves
it's value and displays it. |
Methods inherited from class java.awt.TextField |
addActionListener, addNotify, echoCharIsSet, getAccessibleContext, getColumns, getEchoChar, getListeners, getMinimumSize, getMinimumSize, getPreferredSize, getPreferredSize, minimumSize, minimumSize, paramString, preferredSize, preferredSize, processActionEvent, processEvent, removeActionListener, setColumns, setEchoChar, setEchoCharacter |
Methods inherited from class java.awt.TextComponent |
addTextListener, getBackground, getCaretPosition, getSelectedText, getSelectionEnd, getSelectionStart, getText, isEditable, processTextEvent, removeNotify, removeTextListener, select, selectAll, setBackground, setCaretPosition, setEditable, setSelectionEnd, setSelectionStart |
Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, addPropertyChangeListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, deliverEvent, disable, disableEvents, dispatchEvent, doLayout, enable, enable, enableEvents, enableInputMethods, firePropertyChange, getAlignmentX, getAlignmentY, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getName, getParent, getPeer, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isDisplayable, isDoubleBuffered, isEnabled, isFocusTraversable, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paint, paintAll, postEvent, prepareImage, prepareImage, print, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFont, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus, update, validate |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int DECIMAL
public static final int INTEGER
protected int type
protected int decimals
Constructor Detail |
public DBNumericField()
public DBNumericField(int columns)
public DBNumericField(java.lang.String text)
public DBNumericField(java.lang.String text, int columns)
Method Detail |
public void setText(java.lang.String text)
setText
in class java.awt.TextField
public void setType(int type)
DECIMAL
or INTEGER
.public int getType()
public void setDecimalsAllowed(int decimals)
public int getDecimalsAllowed()
public float getFloat()
public int getInt()
public java.lang.String getColumnLabel()
DBAware
getColumnLabel
in interface DBAware
public void setColumnLabel(java.lang.String label)
DBAware
setColumnLabel
in interface DBAware
com.linxpda.dbaware.DBAware
label
- The name of the column in which to
store this component's value.public java.lang.Object getValue()
DBAware
getValue
in interface DBAware
public void setValue(Entry e)
DBAware
Entry
object,
from which the dbaware component retrieves
it's value and displays it.setValue
in interface DBAware
public void reset()
DBAware
DBRootPanel
.reset
in interface DBAware
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |