Vajad kellegagi rääkida?
Küsi julgelt abi LasteAbi
Logi sisse
Sulge

"javabean" - 2 õppematerjali

IT arhitektuur
44
doc

IT arhitektuur

12. Distributed Component 13. Java Architecture, JavaBeans Java Architecture JavaBeans JavaBeans are reusable software components for Java that can be manipulated visually in a builder tool. Practically, they are classes written in the Java programming language conforming to a particular convention. They are used to encapsulate many objects into a single object (the bean), so that they can be passed around as a single bean object instead of as multiple individual objects. A JavaBean is a Java Object that is serializable, has a no- argument constructor, and allows access to properties using getter and setter methods. ·Beans export functionality through PropertiesandMethods: ­Methodssuch as contains()can be accessed fromany other entity. ·They define the behavior of a bean. ­Propertiessuch as backgroundColordefine theappearance of a bean. ·They are getor setfrom otherentities for customization and programmatic use.

Informaatika → It arhitektuur
78 allalaadimist
Objektorienteeritud programmeerimise loengutekst
40
odt

Objektorienteeritud programmeerimise loengutekst

addEventFilter(KeyEvent.KEY_PRESSED, eventHandler) Lisame sündmusi ring1.setOnMouseExited(new EventHandler() { public void handle(MouseEvent event) { System.out.println(event.getTarget()); System.out.println(event.getSource()); System.out.println(event); System.out.println("Käsitleja"); if (ring1.getFill() == Color.YELLOW) ring1.setFill(Color.AQUAMARINE); else ring1.setFill(Color.RED); } }); Omadused 1. Idee - JavaBean 2. jälgida (observe) omaduste muutusi 3. int IntegerProperty 4. double DoubleProperty 5. String StringProperty 6. avalikud lõplikud get- ja set-meetodid iga välja (väärtuse) jaoks 7. avalik get-meetod omaduse jaoks Kuularid (listeners) ChangeListener ­ muutuste kuular InvalidationListener ­ kehtetuks muutumise kuular 10. Loeng Erindid, Vood Epiloog try { //põhiblokk } catch { //püünis } catch { //püünis } finally { //epiloog

Informaatika → Programmeerimine
84 allalaadimist


Sellel veebilehel kasutatakse küpsiseid. Kasutamist jätkates nõustute küpsiste ja veebilehe üldtingimustega Nõustun