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

Method getStyle

CodenameOne/src/com/codename1/ui/Component.java:6788–6826  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

6786 ///
6787 /// the component Style object
6788 public Style getStyle() {
6789 if (unSelectedStyle == null) {
6790 initStyle();
6791 }
6792 isUnselectedStyle = false;
6793
6794 if (hasLead && !blockLead) {
6795 Component lead = getLeadComponent();
6796 if (lead != null) {
6797 if (!lead.isEnabled()) {
6798 return getDisabledStyle();
6799 }
6800
6801 if (lead.isPressedStyle()) {
6802 return getPressedStyle();
6803 }
6804
6805 if (lead.hasFocus() && Display.getInstance().shouldRenderSelection(this)) {
6806 return getSelectedStyle();
6807 }
6808 }
6809 isUnselectedStyle = true;
6810 return unSelectedStyle;
6811 }
6812
6813 if (!isEnabled()) {
6814 return getDisabledStyle();
6815 }
6816
6817 if (isPressedStyle()) {
6818 return getPressedStyle();
6819 }
6820
6821 if (hasFocus() && Display.getInstance().shouldRenderSelection(this)) {
6822 return getSelectedStyle();
6823 }
6824 isUnselectedStyle = true;
6825 return unSelectedStyle;
6826 }
6827
6828 boolean isPressedStyle() {
6829 return false;

Callers 15

getBaselineMethod · 0.95
showPopupDialogMethod · 0.95
calculateElementSizeMethod · 0.95
calcMenuHeightMethod · 0.95
showPackedImplMethod · 0.95
growOrShrinkImplMethod · 0.95
checkTabsCanBeSeenMethod · 0.95
layoutContainerMethod · 0.95
setFontIconMethod · 0.95
isObscuredByChildrenMethod · 0.95
updateStateMethod · 0.95
getOuterXMethod · 0.95

Calls 10

initStyleMethod · 0.95
getLeadComponentMethod · 0.95
isEnabledMethod · 0.95
getDisabledStyleMethod · 0.95
isPressedStyleMethod · 0.95
getPressedStyleMethod · 0.95
hasFocusMethod · 0.95
getInstanceMethod · 0.95
getSelectedStyleMethod · 0.95
shouldRenderSelectionMethod · 0.45

Tested by 3

testPaintMethod · 0.76
testCSSBorderMethod · 0.76
testBoxShadowMethod · 0.76