yu.ac.bg.etf.javaqx.qswing
Class JQTextField

java.lang.Object
  extended byyu.ac.bg.etf.javaqx.core.AbstractDisposable
      extended byyu.ac.bg.etf.javaqx.qswing.JQComponent
          extended byyu.ac.bg.etf.javaqx.qswing.JQTextField
All Implemented Interfaces:
Disposable, JQComponentProperties, JQTextFieldProperties, QSwingConstants

public class JQTextField
extends JQComponent
implements QSwingConstants, JQTextFieldProperties

Text Field Component.

NOTE: This class is not compatible with javax.swing.JTextPane class!

Version:
0.2.0
Author:
Slobodan Vrkacevic (slobodan.vrkacevic@gmail.com)

Field Summary
 
Fields inherited from class yu.ac.bg.etf.javaqx.qswing.JQComponent
listenerList
 
Fields inherited from interface yu.ac.bg.etf.javaqx.qswing.QSwingConstants
BOTTOM, CENTER, HORIZONTAL, LEADING, LEFT, RIGHT, TOP, TRAILING, VERTICAL
 
Fields inherited from interface yu.ac.bg.etf.javaqx.qswing.properties.JQTextFieldProperties
PROPERTY_ACTION_COMMAND, PROPERTY_HORIZONTAL_ALIGNMENT, PROPERTY_TEXT
 
Fields inherited from interface yu.ac.bg.etf.javaqx.qswing.properties.JQComponentProperties
PROPERTY_BACKGROUND, PROPERTY_COMPONENT_ORIENTATION, PROPERTY_CONTEXT_MENU, PROPERTY_ENABLED, PROPERTY_FIXED_SIZE, PROPERTY_FOCUSABLE, PROPERTY_FONT, PROPERTY_FOREGROUND, PROPERTY_INSETS, PROPERTY_LOCALE, PROPERTY_MAXIMUM_SIZE, PROPERTY_MINIMUM_SIZE, PROPERTY_NAME, PROPERTY_OPAQUE, PROPERTY_PREFERRED_SIZE, PROPERTY_RESOURCE_BUNDLE_NAME, PROPERTY_STATUS_TIP_TEXT, PROPERTY_STYLE_SHEET, PROPERTY_TOOL_TIP_TEXT, PROPERTY_VISIBLE, PROPERTY_WHATS_THIS_TEXT
 
Constructor Summary
JQTextField()
          Constructs new JQTextField object.
JQTextField(java.lang.String text)
          Constructs new JQTextField object.
 
Method Summary
 void addActionListener(ActionListener listener)
          Adds action listener.
protected  int checkHorizontalKey(int key, java.lang.String message)
          Checks horizontal alignment key.
protected  void fireActionPerformed(ActionEvent e)
          Fires action event.
 java.lang.String getActionCommand()
          Returns action command.
 ActionListener[] getActionListeners()
          Returns all action listeners.
 int getHorizontalAlignment()
          Returns horizontal alignment.
 java.lang.String getText()
          Returns text.
 void removeActionListener(ActionListener listener)
          Remove action listener.
 void setActionCommand(java.lang.String actionCommand)
          Sets action command for this button.
 void setHorizontalAlignment(int alignment)
          Sets horizontal alignment.
 void setText(java.lang.String text)
          Sets text.
 
Methods inherited from class yu.ac.bg.etf.javaqx.qswing.JQComponent
addComponentListener, addFocusListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, addPropertyChangeListener, addPropertyChangeListener, disableEvents, disposeComponent, disposeObject, enableEvents, eventEnabled, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getClientProperty, getComponentListeners, getComponentOrientation, getContextMenu, getCursor, getEventMask, getFocusListener, getFont, getFontMetrics, getForeground, getHeight, getInsets, getKeyListeners, getLocale, getLocation, getMaximumSize, getMinimumSize, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getOwnedComponents, getOwner, getParent, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getResourceBundleName, getSize, getStatusTipText, getStyleSheet, getToolTipText, getToolTipText, getWhatsThisText, getWidth, getX, getY, invalidate, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFontSet, isForegroundSet, isLeftToRight, isLocaleSet, isOpaque, isOwnerOf, isPainting, isResizable, isResourceBundleNameSet, isUpdatesEnabled, isValid, isVisible, localizeObject, localizeString, localizeString, localizeStrings, paintComponent, paramString, processComponentEvent, processContextMenuEvent, processFocusEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, processStyleChange, putClientProperty, removeComponentListener, removeFocusListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, removeStyleSheet, repaint, repaint, repaint, requestFocus, revalidate, setBackground, setBounds, setBounds, setComponentOrientation, setContextMenu, setCursor, setDefaultResourceBundleName, setDisplayable, setEnabled, setFixedSize, setFixedSize, setFocusable, setFont, setForeground, setInsets, setInsets, setLeftToRightComponentOrientation, setLocale, setLocation, setLocation, setMaximumSize, setMaximumSize, setMinimumSize, setMinimumSize, setName, setOpaque, setPreferredSize, setPreferredSize, setResizable, setResourceBundleName, setRightToLeftComponentOrientation, setSize, setSize, setStatusTipText, setStyleSheet, setStyleSheet, setToolTipText, setUpdatesEnabled, setVisible, setWhatsThisText, toString, unsetComponentOrientation, update, update, update, updateComponentOrientation, updateLocalization, validate
 
Methods inherited from class yu.ac.bg.etf.javaqx.core.AbstractDisposable
addDisposeListener, dispose, disposedCheck, disposedErrorString, finalize, isDisposed, removeDisposeListener
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JQTextField

public JQTextField()
Constructs new JQTextField object.


JQTextField

public JQTextField(java.lang.String text)
Constructs new JQTextField object.

Parameters:
text - the text
Method Detail

getText

public java.lang.String getText()
Returns text.

Returns:
text

setText

public void setText(java.lang.String text)
Sets text.

Parameters:
text - the text

getHorizontalAlignment

public int getHorizontalAlignment()
Returns horizontal alignment.

Returns:
horizontal alignment

setHorizontalAlignment

public void setHorizontalAlignment(int alignment)
Sets horizontal alignment.

Valid values are: LEFT, CENTER, RIGHT, LEADING and TRAILING.
Default value is: LEADING.

Parameters:
alignment - the horizontal alignment

getActionCommand

public java.lang.String getActionCommand()
Returns action command.

Returns:
action command

setActionCommand

public void setActionCommand(java.lang.String actionCommand)
Sets action command for this button.

Parameters:
actionCommand - the action command

addActionListener

public void addActionListener(ActionListener listener)
Adds action listener.

Parameters:
listener - the action listener

removeActionListener

public void removeActionListener(ActionListener listener)
Remove action listener.

Parameters:
listener - the action listener

getActionListeners

public ActionListener[] getActionListeners()
Returns all action listeners.

Returns:
the action listener array

checkHorizontalKey

protected final int checkHorizontalKey(int key,
                                       java.lang.String message)
Checks horizontal alignment key.

Parameters:
key - the key
message - the error message
Returns:
alignment key
Throws:
java.lang.IllegalArgumentException - if the key is invalid

fireActionPerformed

protected void fireActionPerformed(ActionEvent e)
Fires action event.

Parameters:
e - the action event


Copyright © 2007 ETF and contributors. All Rights Reserved.