public class UITextField extends javax.swing.JTextField implements UIObserver, GlobalNameObserver
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
构造器和说明 |
---|
UITextField() |
UITextField(javax.swing.text.Document doc,
java.lang.String text,
int columns) |
UITextField(int columns) |
UITextField(java.lang.String text) |
UITextField(java.lang.String text,
int columns) |
限定符和类型 | 方法和说明 |
---|---|
protected void |
attributeChange() |
java.awt.Insets |
getInsets() |
java.lang.String |
getPlaceholder() |
java.awt.Dimension |
getPreferredSize() |
UITextFieldUI |
getUI() |
protected void |
initListener() |
boolean |
isSetting() |
static void |
main(java.lang.String... args)
主函数
|
protected void |
paintBorder(java.awt.Graphics g) |
protected void |
paintComponent(java.awt.Graphics pG) |
void |
registerChangeListener(UIObserverListener listener)
注册监听器
|
void |
registerNameListener(GlobalNameListener listener)
注册监听
|
void |
setBackgroundUIColor(java.awt.Color color)
设置变化的背景颜色
|
void |
setBorderPainted(boolean isBorderPainted) |
void |
setGlobalName(java.lang.String name)
设置全局名字
|
void |
setPlaceholder(java.lang.String placeholder) |
void |
setPreferredSize(java.awt.Dimension preferredSize) |
void |
setRectDirection(int rectDirection) |
void |
setRoundBorder(boolean isRoundBorder) |
void |
setSetting(boolean setting) |
boolean |
shouldResponseChangeListener()
是否需要回应监听器响应
|
boolean |
shouldResponseNameListener()
是否需要回应监听器响应
|
void |
updateUI()
更新UI
|
actionPropertyChanged, 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
addCaretListener, addInputMethodListener, addKeymap, copy, cut, fireCaretUpdate, getCaret, getCaretColor, getCaretListeners, getCaretPosition, getDisabledTextColor, getDocument, getDragEnabled, getDropLocation, getDropMode, getFocusAccelerator, getHighlighter, getInputMethodRequests, getKeymap, getKeymap, getMargin, getNavigationFilter, getPreferredScrollableViewportSize, getPrintable, getScrollableBlockIncrement, getScrollableTracksViewportHeight, getScrollableTracksViewportWidth, getScrollableUnitIncrement, getSelectedText, getSelectedTextColor, getSelectionColor, getSelectionEnd, getSelectionStart, getText, getText, getToolTipText, isEditable, loadKeymap, modelToView, moveCaretPosition, paste, print, print, print, processInputMethodEvent, read, removeCaretListener, removeKeymap, removeNotify, replaceSelection, restoreComposedText, saveComposedText, select, selectAll, setCaret, setCaretColor, setCaretPosition, setComponentOrientation, setDisabledTextColor, setDragEnabled, setDropMode, setEditable, setFocusAccelerator, setHighlighter, setKeymap, setMargin, setNavigationFilter, setSelectedTextColor, setSelectionColor, setSelectionEnd, setSelectionStart, setText, setUI, viewToModel, write
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, paint, paintChildren, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTree
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, 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, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
public UITextField()
public UITextField(int columns)
public UITextField(java.lang.String text, int columns)
public UITextField(java.lang.String text)
public UITextField(javax.swing.text.Document doc, java.lang.String text, int columns)
protected void initListener()
public java.lang.String getPlaceholder()
public void setPlaceholder(java.lang.String placeholder)
public boolean isSetting()
public void setSetting(boolean setting)
public void setPreferredSize(java.awt.Dimension preferredSize)
setPreferredSize
在类中 javax.swing.JComponent
public void setGlobalName(java.lang.String name)
GlobalNameObserver
setGlobalName
在接口中 GlobalNameObserver
protected void attributeChange()
public java.awt.Insets getInsets()
getInsets
在类中 javax.swing.JComponent
public java.awt.Dimension getPreferredSize()
getPreferredSize
在类中 javax.swing.JTextField
public UITextFieldUI getUI()
getUI
在类中 javax.swing.text.JTextComponent
public void setBackgroundUIColor(java.awt.Color color)
public void updateUI()
updateUI
在类中 javax.swing.text.JTextComponent
protected void paintComponent(java.awt.Graphics pG)
paintComponent
在类中 javax.swing.JComponent
protected void paintBorder(java.awt.Graphics g)
paintBorder
在类中 javax.swing.JComponent
public void setRoundBorder(boolean isRoundBorder)
isRoundBorder
- public void setRectDirection(int rectDirection)
rectDirection
- public void registerNameListener(GlobalNameListener listener)
registerNameListener
在接口中 GlobalNameObserver
listener
- 观察者监听事件public boolean shouldResponseNameListener()
shouldResponseNameListener
在接口中 GlobalNameObserver
public void registerChangeListener(UIObserverListener listener)
registerChangeListener
在接口中 UIObserver
listener
- 观察者监听事件public boolean shouldResponseChangeListener()
shouldResponseChangeListener
在接口中 UIObserver
public static void main(java.lang.String... args)
args
- 参数public void setBorderPainted(boolean isBorderPainted)