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

Method createTabImpl

CodenameOne/src/com/codename1/ui/Tabs.java:635–658  ·  view source on GitHub ↗
(RadioButton b)

Source from the content-addressed store, hash-verified

633 }
634
635 private Component createTabImpl(RadioButton b) {
636 radioGroup.add(b);
637 b.setToggle(true);
638 b.setTextPosition(BOTTOM);
639 if (radioGroup.getButtonCount() == 1) {
640 b.setSelected(true);
641 }
642 if (textPosition != -1) {
643 b.setTextPosition(textPosition);
644 }
645
646 if (b.getIcon() == null && !getUIManager().isThemeConstant("TabEnableAutoImageBool", true)) {
647 Image d = getUIManager().getThemeImageConstant("TabUnselectedImage");
648 if (d != null) {
649 b.setIcon(d);
650 d = getUIManager().getThemeImageConstant("TabSelectedImage");
651 if (d != null) {
652 b.setRolloverIcon(d);
653 b.setPressedIcon(d);
654 }
655 }
656 }
657 return b;
658 }
659
660 /// Creates a tab component by default this is a RadioButton but subclasses can use this to return anything
661 ///

Callers 1

createTabMethod · 0.95

Calls 12

isThemeConstantMethod · 0.80
getThemeImageConstantMethod · 0.80
addMethod · 0.65
setTextPositionMethod · 0.65
setSelectedMethod · 0.65
getIconMethod · 0.65
setIconMethod · 0.65
setRolloverIconMethod · 0.65
setPressedIconMethod · 0.65
setToggleMethod · 0.45
getButtonCountMethod · 0.45
getUIManagerMethod · 0.45

Tested by

no test coverage detected