Unterschiede
Hier werden die Unterschiede zwischen der gewählten und der aktuellen Version gezeigt.
| java:beans 2008/05/21 23:14 | java:beans 2020/01/22 20:59 aktuell | ||
|---|---|---|---|
| Zeile 1: | Zeile 1: | ||
| + | [[java|Java - Allgemein]]\\ | ||
| ====== Beans, gebunden, vetoable ====== | ====== Beans, gebunden, vetoable ====== | ||
| Ein einfaches Bean:\\ | Ein einfaches Bean:\\ | ||
| Zeile 11: | Zeile 12: | ||
| public void setMyProperty(int newValue) { | public void setMyProperty(int newValue) { | ||
| myProperty = newValue; | myProperty = newValue; | ||
| - | } | + | } |
| } | } | ||
| </code> | </code> | ||
| + | <html> | ||
| + | <script type="text/javascript"><!-- | ||
| + | google_ad_client="pub-9681858985507948"; | ||
| + | google_ad_width = 468; | ||
| + | google_ad_height = 60; | ||
| + | google_ad_format = "468x60_as"; | ||
| + | google_ad_type = "text"; | ||
| + | google_ad_channel = ""; | ||
| + | google_color_border = "cccccc"; | ||
| + | google_color_bg = "FFFFFF"; | ||
| + | google_color_link = "1d2d8c"; | ||
| + | google_color_text = "000000"; | ||
| + | google_color_url = "1d2d8c"; | ||
| + | //--> | ||
| + | </script> | ||
| + | <script type="text/javascript" | ||
| + | src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> | ||
| + | </script> | ||
| + | </html> | ||
| + | \\ | ||
| \\ | \\ | ||
| Ein Bean mit PropertyChangeSupport:\\ | Ein Bean mit PropertyChangeSupport:\\ | ||
| <code java> | <code java> | ||
| public class MyBean { | public class MyBean { | ||
| - | PropertyChangeSupport pcs = new PropertyChangeSupport(this); | + | PropertyChangeSupport pcs = new PropertyChangeSupport(this); |
| - | int myProperty; | + | int myProperty; |
| public int getMyProperty() { | public int getMyProperty() { | ||
| Zeile 41: | Zeile 62: | ||
| </code> | </code> | ||
| \\ | \\ | ||
| - | ... und mit VetoableChangeSupport: | + | ... und mit VetoableChangeSupport:\\ |
| <code java> | <code java> | ||
| public class MyBean { | public class MyBean { | ||
| - | VetoableChangeSupport vcs = new VetoableChangeSupport(this); | + | VetoableChangeSupport vcs = new VetoableChangeSupport(this); |
| - | int myProperty; | + | int myProperty; |
| public int getMyProperty() { | public int getMyProperty() { | ||
| Zeile 68: | Zeile 89: | ||
| } | } | ||
| } | } | ||
| - | </code> | + | </code>\\ |