scala / scala-swing

Scala wrappers for Java's Swing API for desktop GUIs
Apache License 2.0
127 stars 46 forks source link

Swing TextAction #133

Open scabug opened 14 years ago

scabug commented 14 years ago

There is a swing.Action with peer javax.swing.Action, but there is no TextAction with peer javax.swing.text.TextAction.

From the API of javax.swing.text.TextAction

 * An Action implementation useful for key bindings that are shared across
 * a number of different text components.

A TextAction has no explicit reference to a TextCompont, but it acts on the last focused TextComponent. So you can have a MenuItem with a TextAction which can act on each TextComponent of the swing application.

Attached there is an implementation and an example app with TextAction changing the fontsize.

Frank

scabug commented 14 years ago

Imported From: https://issues.scala-lang.org/browse/SI-3557?orig=1 Reporter: Frank Teubler (dft) Attachments: