|
|||||||||||
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.text.JTextComponent
javax.swing.JTextField
planetj.gui.CMTextFieldJ
Supports I18N and provides some focus handling events and other common functionality
Nested Class Summary |
Nested classes inherited from class javax.swing.text.JTextComponent |
javax.swing.text.JTextComponent.AccessibleJTextComponent, javax.swing.text.JTextComponent.KeyBinding |
Nested classes inherited from class javax.swing.JComponent |
javax.swing.JComponent.AccessibleJComponent |
Field Summary |
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 |
TOOL_TIP_TEXT_KEY, 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 | |
CMTextFieldJ()
Constructor |
|
CMTextFieldJ(javax.swing.text.Document doc,
java.lang.String text,
int columns)
CMTextFieldJ constructor comment. |
|
CMTextFieldJ(int columns)
CMTextFieldJ constructor comment. |
|
CMTextFieldJ(java.lang.String text)
CMTextFieldJ constructor comment. |
|
CMTextFieldJ(java.lang.String text,
int columns)
CMTextFieldJ constructor comment. |
Method Summary | |
void |
addPropertyChangeListener(java.beans.PropertyChangeListener listener)
The addPropertyChangeListener method was generated to support the propertyChange field. |
void |
clearText()
clears out the text field *NOTE* this will make DAX bomb becasue DAX cannot handle an "" empty string |
void |
firePropertyChange(java.lang.String propertyName,
java.lang.Object oldValue,
java.lang.Object newValue)
The firePropertyChange method was generated to support the propertyChange field. |
void |
focusGained(java.awt.event.FocusEvent e)
Method to handle events for the FocusListener interface. |
void |
focusLost(java.awt.event.FocusEvent e)
Method to handle events for the FocusListener interface. |
boolean |
getApplicable()
adds a bit more functionality than enabled alone |
boolean |
getEditable()
adds a bit more functionality than enabled alone |
boolean |
getEnabled()
adds a bit more functionality than enabled alone |
java.lang.String |
getText()
Overrides the getText method and trims the text if the automaticallyTrimContents property is true. |
java.lang.String |
getTranslation()
Gets the translated String. |
java.lang.String |
getTranslationId()
Gets the key of the translated String. |
void |
grabFocusGained()
grabFocusedGained method traps the focusGained event and takes a snapshot of the current text to be evaluated for equality upon focusLost. |
void |
grabFocusLost()
grabFocusedLost method traps the focusLost event and checks to see if the value for the object has changed. |
boolean |
isAutomaticallyTrimContents()
Tells whether or not to trim the contents and also make sure an empty string is changed to " ". |
boolean |
isBlank()
Returns true if this TextField is blank or contains no text. |
boolean |
isSelectAllTextOnFocusGained()
return true if you want the entire text field's text to be selected on focus gained. |
static void |
main(java.lang.String[] args)
main entrypoint - starts the part when it is run as an application |
void |
removePropertyChangeListener(java.beans.PropertyChangeListener listener)
The removePropertyChangeListener method was generated to support the propertyChange field. |
void |
setApplicable(boolean e)
adds a bit more functionality than enabled alone |
void |
setAutomaticallyTrimContents(boolean value)
sets whether or not to trim the text on get and set |
void |
setEditable(boolean e)
override the super method to do a bit more |
void |
setEnabled(boolean e)
override the super method to do a bit more |
void |
setSelectAllTextOnFocusGained(boolean value)
sets if you want all the text to be selected on focus gained. |
void |
setText(java.lang.String key)
Overrides the superclass to set the key for the translated String. |
void |
setToolTipText(java.lang.String toolTip)
Sets the toolTipText property (java.lang.String) value. |
void |
setTranslation(java.lang.String newTranslation)
Sets the String without translating it. |
Methods inherited from class javax.swing.JTextField |
addActionListener, getAccessibleContext, getAction, getActionListeners, getActions, getColumns, getHorizontalAlignment, getHorizontalVisibility, getPreferredSize, getScrollOffset, getUIClassID, isValidateRoot, postActionEvent, removeActionListener, scrollRectToVisible, setAction, setActionCommand, setColumns, setDocument, setFont, setHorizontalAlignment, setScrollOffset |
Methods inherited from class javax.swing.text.JTextComponent |
addCaretListener, addInputMethodListener, addKeymap, copy, cut, getCaret, getCaretColor, getCaretListeners, getCaretPosition, 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, read, removeCaretListener, removeKeymap, removeNotify, replaceSelection, select, selectAll, setCaret, setCaretColor, setCaretPosition, setComponentOrientation, setDisabledTextColor, setDragEnabled, setFocusAccelerator, setHighlighter, setKeymap, setMargin, setNavigationFilter, setSelectedTextColor, setSelectionColor, setSelectionEnd, setSelectionStart, setUI, updateUI, viewToModel, write |
Methods inherited from class javax.swing.JComponent |
addAncestorListener, addNotify, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, 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, paintImmediately, paintImmediately, print, printAll, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setTransferHandler, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update |
Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, 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, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setLayout, transferFocusBackward, transferFocusDownCycle, validate |
Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, createImage, createImage, createVolatileImage, createVolatileImage, dispatchEvent, enable, 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, 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, toString, transferFocus, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public CMTextFieldJ()
public CMTextFieldJ(int columns)
columns
- intpublic CMTextFieldJ(java.lang.String text)
text
- java.lang.Stringpublic CMTextFieldJ(java.lang.String text, int columns)
text
- java.lang.Stringcolumns
- intpublic CMTextFieldJ(javax.swing.text.Document doc, java.lang.String text, int columns)
doc
- javax.swing.text.Documenttext
- java.lang.Stringcolumns
- intMethod Detail |
public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
public void clearText()
public void firePropertyChange(java.lang.String propertyName, java.lang.Object oldValue, java.lang.Object newValue)
public void focusGained(java.awt.event.FocusEvent e)
focusGained
in interface java.awt.event.FocusListener
e
- java.awt.event.FocusEventpublic void focusLost(java.awt.event.FocusEvent e)
focusLost
in interface java.awt.event.FocusListener
e
- java.awt.event.FocusEventpublic boolean getApplicable()
public boolean getEditable()
public boolean getEnabled()
public java.lang.String getText()
public java.lang.String getTranslation()
public java.lang.String getTranslationId()
public void grabFocusGained()
public void grabFocusLost()
public boolean isAutomaticallyTrimContents()
public boolean isSelectAllTextOnFocusGained()
public static void main(java.lang.String[] args)
args
- java.lang.String[]public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
public void setApplicable(boolean e)
public void setAutomaticallyTrimContents(boolean value)
value
- booleanpublic void setEditable(boolean e)
public void setEnabled(boolean e)
public void setSelectAllTextOnFocusGained(boolean value)
public void setText(java.lang.String key)
public void setToolTipText(java.lang.String toolTip)
toolTip
- The new value for the property.JTextComponent.getToolTipText(java.awt.event.MouseEvent)
public void setTranslation(java.lang.String newTranslation)
public boolean isBlank()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |