MCPcopy Create free account
hub / github.com/codenameone/CodenameOne / setPropertyValue

Method setPropertyValue

CodenameOne/src/com/codename1/ui/Tabs.java:1800–1830  ·  view source on GitHub ↗
(String name, Object value)

Source from the content-addressed store, hash-verified

1798
1799 /// {@inheritDoc}
1800 @Override
1801 public String setPropertyValue(String name, Object value) {
1802 if ("titles".equals(name)) {
1803 String[] t = (String[]) value;
1804 for (int iter = 0; iter < Math.min(getTabCount(), t.length); iter++) {
1805 setTabTitle(t[iter], getTabIcon(iter), iter);
1806 }
1807 return null;
1808 }
1809 if ("icons".equals(name)) {
1810 Image[] t = (Image[]) value;
1811 if (t == null) {
1812 for (int iter = 0; iter < getTabCount(); iter++) {
1813 setTabTitle(getTabTitle(iter), null, iter);
1814 }
1815 } else {
1816 for (int iter = 0; iter < Math.min(getTabCount(), t.length); iter++) {
1817 setTabTitle(getTabTitle(iter), t[iter], iter);
1818 }
1819 }
1820 return null;
1821 }
1822 if ("selectedIcons".equals(name)) {
1823 Image[] t = (Image[]) value;
1824 for (int iter = 0; iter < Math.min(getTabCount(), t.length); iter++) {
1825 setTabSelectedIcon(iter, t[iter]);
1826 }
1827 return null;
1828 }
1829 return super.setPropertyValue(name, value);
1830 }
1831
1832 class TabsLayout extends Layout {
1833

Callers

nothing calls this directly

Calls 7

minMethod · 0.95
getTabCountMethod · 0.95
setTabTitleMethod · 0.95
getTabIconMethod · 0.95
getTabTitleMethod · 0.95
setTabSelectedIconMethod · 0.95
equalsMethod · 0.65

Tested by

no test coverage detected