Java: Swing: Text components and Document: User changes vs. programmatical changes
Are these JTextComponent methods considered user actions or programmatical?
Method | JTextComponents | JPasswordField | Remarks |
|---|---|---|---|
cut | JTextComponent1.3: !isEditable, !isEnabled -> beep JTextComponent1.4: if isEditable, isEnabled -> TransferHandler | 1.3: beep 1.4: error feedback 1.5: beep or error feedbavk | Used by DefaultEditorKit.CutAction (without tests) |
copy | JTextComponent1.3: no tests JTextComponent1.4: -> TransferHandler action | 1.3: beep 1.4: error feedback | Used by DefaultEditorKit.CopyAction (without tests) |
paste | JTextComponent1.3: calls replaceSelection (that meant no tests for JTextField, JTextArea) JTextComponent1.4: if isEditable, isEnabled -> TransferHandler | not overridden | Used by DefaultEditorKit.PasteAction (without tests) |
replaceSelection | JTextComponent1.3-1.5: no tests JEditorPane1.3: !isEditable -> beep JEditorPane1.4,1.5: !isEditable -> error feedback JTextPane1.3: !isEditable -> beep JTextPane1.4,1.5: !isEditable -> error feedback | not overridden | Used by DefaultEditorKit actions for inserting everything (these test isEditable (and some isEnabled)) Used by JTextPane's insert(Component|Icon) Used by JTextComponent's minimal DefaultTransferHandler Used by BasicTextUI's TextTransferHandler Is supposed not to test (#4173018) JEditorPane allows |
Swing 1.1.1 (for JDK1.1.7): no differences to 1.3 in this respect.
(C) 2001-2009 Christian Kaufhold (swing@chka.de)