Back to project page RoboBinding-gallery.
The source code is released under:
Apache License
If you think the Android project RoboBinding-gallery listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package org.robobinding.gallery.presentationmodel; // w w w . j av a 2s . co m import org.robobinding.annotation.PresentationModel; import org.robobinding.presentationmodel.HasPresentationModelChangeSupport; import org.robobinding.presentationmodel.PresentationModelChangeSupport; /** * @author Cheng Wei * @version $Revision: 1.0 $ * @since 1.0 */ @PresentationModel public class CustomComponentPresentationModel implements HasPresentationModelChangeSupport { private final PresentationModelChangeSupport changeSupport; private String title; private String description; private String newTitle; private String newDescription; public CustomComponentPresentationModel() { changeSupport = new PresentationModelChangeSupport(this); this.title = "Default title"; this.description = "Default description"; } public String getTitle() { return title; } public String getDescription() { return description; } public String getNewTitle() { return newTitle; } public void setNewTitle(String newTitle) { this.newTitle = newTitle; } public String getNewDescription() { return newDescription; } public void setNewDescription(String newDescription) { this.newDescription = newDescription; } public void applyNewTitleDescription() { title = newTitle; description = newDescription; changeSupport.firePropertyChange("title"); changeSupport.firePropertyChange("description"); } @Override public PresentationModelChangeSupport getPresentationModelChangeSupport() { return changeSupport; } }