Created
October 7, 2016 18:36
-
-
Save anonymous/5d2a3e28f50d8dea3ff82b8b6638a286 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Component* PageListBoxModel::refreshComponentForRow(int row, bool selected, Component* existingComponent){ | |
if (controller != nullptr){ | |
String s(controller->getPageNames()[row]); | |
if (existingComponent == nullptr){ | |
PageListBoxRowComponent* p = new PageListBoxRowComponent(s, selected, this, row); | |
p->addListener(this); | |
rowComponents.add(p); | |
return p; | |
}else{ | |
PageListBoxRowComponent* p = (PageListBoxRowComponent*)existingComponent; | |
p->setRow(row); | |
p->setName(s); | |
return existingComponent; | |
} | |
}else{ | |
return nullptr; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment