ElegantJ Data Entry Masks Java API Specification v1.1

com.elegantj.awt.spinner
Class AWTSpinner

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byjava.awt.Panel
              extended bycom.elegantj.awt.spinner.AWTSpinner
All Implemented Interfaces:
javax.accessibility.Accessible, java.awt.event.ActionListener, java.util.EventListener, java.io.Externalizable, java.awt.event.FocusListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.io.Serializable

public class AWTSpinner
extends java.awt.Panel
implements java.io.Externalizable, java.awt.event.ActionListener, java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.awt.event.FocusListener

AWTSpinner which provides the spin control in awt which provides the spinner mainly for the INTEGER, REAL and STRING type

See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class java.awt.Panel
java.awt.Panel.AccessibleAWTPanel
 
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
 com.elegantj.editors.C1 c1
           
static int INTEGER
          INTEGER - data type for the AWTSpinner
static int REAL
          REAL - data type for the AWTSpinner
static int STRING
          STRING - data type for the AWTSpinner
 
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
AWTSpinner()
          Default constructer for the AWTSpinner
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent evt)
          Implementation of the ActionListener
 void addPropertyChangeListener(java.beans.PropertyChangeListener l)
          Adds the property change listener
 void addValueChangedListener(ValueChangedListener l)
          Adds the ValueChangedListener
 void doLayout()
          Overriden doLayout
 void firePropertyChange(java.lang.String property, java.lang.Object oldValue, java.lang.Object newValue)
          Fires the property change
 void fireValueChanged(ValueChangedEvent e)
          Fires the ValueChangedEvent e The ValueChangedEvent
 void focusGained(java.awt.event.FocusEvent e)
          Implementation of the FocusListener
 void focusLost(java.awt.event.FocusEvent e)
          Implementation of the FocusListener
 java.awt.Color getArrowBackground()
          Method which returns the arrow background of the arrow buttons
 java.awt.Color getArrowForeground()
          Method which returns the arrow foreground of the arrow buttons
 double getCurrent()
          Method which returns the current value of the AWTSpinner
 int getDataType()
          Method which returns the data type for the AWTSpinner
 double getIncrement()
          Method which returns the increment for the AWTSpinner
 long getIncrementDelay()
          Method which returns the increment delay for the AWTSpinner
 java.lang.String getLicenseKey()
          Returns the license key of the bean
 java.util.Locale getLocale()
          Method which returns the locale of the AWTSpinner
 double getMaximum()
          Method which returns the maximum value of the AWTSpinner
 double getMinimum()
          Method which returns the minimum value of the AWTSpinner
 java.awt.Dimension getMinimumSize()
          Method which returns The minimum size of the AWTSpinner
 int getPrecision()
          Method which returns the precision of the AWTSpinner
 java.awt.Dimension getPreferredSize()
          Method which returns The preferred size of the AWTSpinner
 java.util.Vector getStringValues()
          Method which returns the string values of the AWTSpinner
 java.lang.String getText()
          Returns the string currently occupied by spinner
 java.awt.TextField getTextField()
          Returns the text field of the spinner
 boolean isCirculating()
          Method which returns the wheather AWTSpinner is circulating or not
 boolean isEditable()
          Method which returns the wheather AWTSpinner is editable or not
 void mouseClicked(java.awt.event.MouseEvent e)
          Implementation of the MouseListener
 void mouseDragged(java.awt.event.MouseEvent e)
          Implementation of the MouseMotionListener
 void mouseEntered(java.awt.event.MouseEvent e)
          Implementation of the MouseListener
 void mouseExited(java.awt.event.MouseEvent e)
          Implementation of the MouseListener
 void mouseMoved(java.awt.event.MouseEvent e)
          Implementation of the MouseMotionListener
 void mousePressed(java.awt.event.MouseEvent e)
          Implementation of the MouseListener
 void mouseReleased(java.awt.event.MouseEvent e)
          Implementation of the MouseListener
 void readExternal(java.io.ObjectInput in)
          Implementation of the Externalizable
 void removePropertyChangeListener(java.beans.PropertyChangeListener l)
          Removes the property change listener
 void removeValueChangedListener(ValueChangedListener l)
          Removes the ValueChangedListener
 void setArrowBackground(java.awt.Color arrowBackground)
          Method which sets the arrow background of the arrow buttons
 void setArrowForeground(java.awt.Color arrowForeground)
          Method which sets the arrow foreground of the arrow buttons
 void setBackground(java.awt.Color background)
          Method which sets the background color for the AWTSpinner
 void setBounds(int x, int y, int width, int height)
          Method which sets the bounds of the AWTSpinner
 void setCirculating(boolean bCirculating)
          Method which sets the wheather circulation is allowed for the AWTSpinner or not
 void setCurrent(double current)
          Method which sets the current value for the AWTSpinner
 void setCursor(java.awt.Cursor cursor)
          Method which sets the cursor for the AWTSpinner
 void setDataType(int dataType)
          Method which sets the data type for the AWTSpinner
 void setEditable(boolean bEditable)
          Method which sets the wheather AWTSpinner is allowed to edit or not
 void setEnabled(boolean bEnabled)
          Method which sets the enability of the AWTSpinner
 void setFont(java.awt.Font font)
          Method which sets the font for the AWTSpinner
 void setForeground(java.awt.Color foreground)
          Method which sets the foreground color for the AWTSpinner
 void setIncrement(double increment)
          Method which sets the increment for the AWTSpinner
 void setIncrementDelay(long incrementDelay)
          Method which sets the increment delay
 void setLicenseKey(java.lang.String licenseKey)
          Methods which sets the license key
 void setLocale(java.util.Locale locale)
          Method which sets the locale for the AWTSpinner
 void setMaximum(double maximum)
          Method which sets the maximum value for the AWTSpinner
 void setMinimum(double minimum)
          Method which sets the minimum value for the AWTSpinner
 void setPrecision(int precision)
          Method whichs sets the precision for the AWTSpinner
 void setStringValues(java.util.Vector stringValues)
          Method which sets the string values for the AWTSpinner
 void setVisible(boolean bVisible)
          Method which sets the visibility for the AWTSpinner
 void writeExternal(java.io.ObjectOutput out)
          Implementation of the Externalizable
 
Methods inherited from class java.awt.Panel
addNotify, getAccessibleContext
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners, getMaximumSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, paramString, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, removeNotify, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setLayout, transferFocusBackward, transferFocusDownCycle, update, 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, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBounds, setComponentOrientation, 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

INTEGER

public static int INTEGER
INTEGER - data type for the AWTSpinner


REAL

public static int REAL
REAL - data type for the AWTSpinner


STRING

public static int STRING
STRING - data type for the AWTSpinner


c1

public transient com.elegantj.editors.C1 c1
Constructor Detail

AWTSpinner

public AWTSpinner()
Default constructer for the AWTSpinner

Method Detail

doLayout

public void doLayout()
Overriden doLayout


setDataType

public void setDataType(int dataType)
Method which sets the data type for the AWTSpinner

Parameters:
dataType - The data type for the AWTSpinner if dataType is INTEGER the integer values are only allowed if dataType is REAL the real values are only allowed if dataType is STRING the string values are only allowed
See Also:
INTEGER, REAL, STRING

getDataType

public int getDataType()
Method which returns the data type for the AWTSpinner

Returns:
The data type for the AWTSpinner
See Also:
INTEGER, REAL, STRING

setStringValues

public void setStringValues(java.util.Vector stringValues)
Method which sets the string values for the AWTSpinner

Parameters:
stringValues - The string values for the AWTSpinner

getStringValues

public java.util.Vector getStringValues()
Method which returns the string values of the AWTSpinner

Returns:
the string values of the AWTSpinner

setEditable

public void setEditable(boolean bEditable)
Method which sets the wheather AWTSpinner is allowed to edit or not

Parameters:
bEditable - Wheather AWTSpinner is allowed to edit or not

isEditable

public boolean isEditable()
Method which returns the wheather AWTSpinner is editable or not

Returns:
the wheather AWTSpinner is editable or not

setMinimum

public void setMinimum(double minimum)
Method which sets the minimum value for the AWTSpinner

Parameters:
minimum - The minimum value for the AWTSpinner use this method only when the data type is the INTEGER or REAL

getMinimum

public double getMinimum()
Method which returns the minimum value of the AWTSpinner

Returns:
The minimum value of the AWTSpinner

setMaximum

public void setMaximum(double maximum)
Method which sets the maximum value for the AWTSpinner


getMaximum

public double getMaximum()
Method which returns the maximum value of the AWTSpinner

Returns:
The maximum value of the AWTSpinner

setIncrement

public void setIncrement(double increment)
Method which sets the increment for the AWTSpinner

Parameters:
increment - the increment for the AWTSpinner use this method only when the data type is the INTEGER or REAL

getIncrement

public double getIncrement()
Method which returns the increment for the AWTSpinner

Returns:
The increment for the AWTSpinner

setCurrent

public void setCurrent(double current)
Method which sets the current value for the AWTSpinner

Parameters:
current - The current value for the AWTSpinner if the data type is INTEGER or REAL the specified value will be set as a current else if the data type is STRING the string value at the specified index will be set as a current

getCurrent

public double getCurrent()
Method which returns the current value of the AWTSpinner

Returns:
The current value of the AWTSpinner

getText

public java.lang.String getText()
Returns the string currently occupied by spinner

Returns:
The string currently occupied by spinner

setPrecision

public void setPrecision(int precision)
Method whichs sets the precision for the AWTSpinner

Parameters:
precision - The precision for the AWTSpinner use it only when the data type is REAL

getPrecision

public int getPrecision()
Method which returns the precision of the AWTSpinner

Returns:
the precision of the AWTSpinner

setArrowForeground

public void setArrowForeground(java.awt.Color arrowForeground)
Method which sets the arrow foreground of the arrow buttons


getArrowForeground

public java.awt.Color getArrowForeground()
Method which returns the arrow foreground of the arrow buttons

Returns:
the arrow foreground of the arrow buttons

setArrowBackground

public void setArrowBackground(java.awt.Color arrowBackground)
Method which sets the arrow background of the arrow buttons

Parameters:
arrowBackground - The arrow background of the arrow buttons

getArrowBackground

public java.awt.Color getArrowBackground()
Method which returns the arrow background of the arrow buttons

Returns:
the arrow background of the arrow buttons

setIncrementDelay

public void setIncrementDelay(long incrementDelay)
Method which sets the increment delay

Parameters:
incrementDelay - The delay for the increment of the AWTSpinner

getIncrementDelay

public long getIncrementDelay()
Method which returns the increment delay for the AWTSpinner

Returns:
The increment delay for the AWTSpinner

setCirculating

public void setCirculating(boolean bCirculating)
Method which sets the wheather circulation is allowed for the AWTSpinner or not


isCirculating

public boolean isCirculating()
Method which returns the wheather AWTSpinner is circulating or not

Returns:
the wheather AWTSpinner is circulating or not

setFont

public void setFont(java.awt.Font font)
Method which sets the font for the AWTSpinner

Parameters:
font - The font for the AWTSpinner

setBackground

public void setBackground(java.awt.Color background)
Method which sets the background color for the AWTSpinner

Parameters:
background - The background color for the AWTSpinner

setForeground

public void setForeground(java.awt.Color foreground)
Method which sets the foreground color for the AWTSpinner

Parameters:
foreground - The foreground color for the AWTSpinner

setVisible

public void setVisible(boolean bVisible)
Method which sets the visibility for the AWTSpinner

Parameters:
bVisible - the visibility for the AWTSpinner

setEnabled

public void setEnabled(boolean bEnabled)
Method which sets the enability of the AWTSpinner

Parameters:
bEnabled - the enability of the AWTSpinner

setLocale

public void setLocale(java.util.Locale locale)
Method which sets the locale for the AWTSpinner

Parameters:
locale - The locale for the AWTSpinner

getLocale

public java.util.Locale getLocale()
Method which returns the locale of the AWTSpinner

Returns:
The locale of the AWTSpinner

setCursor

public void setCursor(java.awt.Cursor cursor)
Method which sets the cursor for the AWTSpinner

Parameters:
cursor - The cursor for the AWTSpinner

setBounds

public void setBounds(int x,
                      int y,
                      int width,
                      int height)
Method which sets the bounds of the AWTSpinner

Parameters:
x - The x coordinate of the AWTSpinner
y - The y coordinate of the AWTSpinner
width - The width of the of the AWTSpinner
height - The height of the AWTSpinner

setLicenseKey

public void setLicenseKey(java.lang.String licenseKey)
Methods which sets the license key


getLicenseKey

public java.lang.String getLicenseKey()
Returns the license key of the bean

Returns:
The license key of the bean

getPreferredSize

public java.awt.Dimension getPreferredSize()
Method which returns The preferred size of the AWTSpinner


getMinimumSize

public java.awt.Dimension getMinimumSize()
Method which returns The minimum size of the AWTSpinner


mouseMoved

public void mouseMoved(java.awt.event.MouseEvent e)
Implementation of the MouseMotionListener

Specified by:
mouseMoved in interface java.awt.event.MouseMotionListener

mouseDragged

public void mouseDragged(java.awt.event.MouseEvent e)
Implementation of the MouseMotionListener

Specified by:
mouseDragged in interface java.awt.event.MouseMotionListener

mousePressed

public void mousePressed(java.awt.event.MouseEvent e)
Implementation of the MouseListener

Specified by:
mousePressed in interface java.awt.event.MouseListener

mouseClicked

public void mouseClicked(java.awt.event.MouseEvent e)
Implementation of the MouseListener

Specified by:
mouseClicked in interface java.awt.event.MouseListener

mouseReleased

public void mouseReleased(java.awt.event.MouseEvent e)
Implementation of the MouseListener

Specified by:
mouseReleased in interface java.awt.event.MouseListener

mouseEntered

public void mouseEntered(java.awt.event.MouseEvent e)
Implementation of the MouseListener

Specified by:
mouseEntered in interface java.awt.event.MouseListener

mouseExited

public void mouseExited(java.awt.event.MouseEvent e)
Implementation of the MouseListener

Specified by:
mouseExited in interface java.awt.event.MouseListener

focusGained

public void focusGained(java.awt.event.FocusEvent e)
Implementation of the FocusListener

Specified by:
focusGained in interface java.awt.event.FocusListener

focusLost

public void focusLost(java.awt.event.FocusEvent e)
Implementation of the FocusListener

Specified by:
focusLost in interface java.awt.event.FocusListener

getTextField

public java.awt.TextField getTextField()
Returns the text field of the spinner


actionPerformed

public void actionPerformed(java.awt.event.ActionEvent evt)
Implementation of the ActionListener

Specified by:
actionPerformed in interface java.awt.event.ActionListener

addValueChangedListener

public void addValueChangedListener(ValueChangedListener l)
Adds the ValueChangedListener

Parameters:
l - The ValueChangedListener

removeValueChangedListener

public void removeValueChangedListener(ValueChangedListener l)
Removes the ValueChangedListener

Parameters:
l - The ValueChangedListener

fireValueChanged

public void fireValueChanged(ValueChangedEvent e)
Fires the ValueChangedEvent e The ValueChangedEvent


addPropertyChangeListener

public void addPropertyChangeListener(java.beans.PropertyChangeListener l)
Adds the property change listener

Parameters:
l - The property change listener

removePropertyChangeListener

public void removePropertyChangeListener(java.beans.PropertyChangeListener l)
Removes the property change listener

Parameters:
l - The property change listener

firePropertyChange

public void firePropertyChange(java.lang.String property,
                               java.lang.Object oldValue,
                               java.lang.Object newValue)
Fires the property change

Parameters:
property - The name of the property
oldValue - The old value
newValue - The new value

writeExternal

public void writeExternal(java.io.ObjectOutput out)
                   throws java.io.IOException
Implementation of the Externalizable

Specified by:
writeExternal in interface java.io.Externalizable
Throws:
java.io.IOException

readExternal

public void readExternal(java.io.ObjectInput in)
                  throws java.io.IOException,
                         java.lang.ClassNotFoundException
Implementation of the Externalizable

Specified by:
readExternal in interface java.io.Externalizable
Throws:
java.io.IOException
java.lang.ClassNotFoundException

ElegantJ Data Entry Masks Java API Specification v1.1

Submit a bug or feature

Copyright(c)
Elegant Microweb Technologies Pvt. Ltd.
www.elegantmicroweb.com
www.elegantjbeans.com
All Rights Reserved.