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

Method refreshTheme

CodenameOne/src/com/codename1/ui/Form.java:2329–2363  ·  view source on GitHub ↗
(boolean merge)

Source from the content-addressed store, hash-verified

2327
2328 /// {@inheritDoc}
2329 @Override
2330 public void refreshTheme(boolean merge) {
2331 // when changing the theme when a title/menu bar is not visible the refresh
2332 // won't apply to them. We need to protect against this occurance.
2333 if (menuBar != null) {
2334 menuBar.refreshTheme(merge);
2335 }
2336 if (titleArea != null) {
2337 titleArea.refreshTheme(merge);
2338 }
2339 if (toolbar != null) {
2340 toolbar.refreshTheme(merge);
2341 }
2342
2343 super.refreshTheme(merge);
2344
2345 if (toolbar == null) {
2346 // when changing the theme the menu behavior might also change
2347 hideMenu();
2348 restoreMenu();
2349 Command[] cmds = new Command[getCommandCount()];
2350 for (int iter = 0; iter < cmds.length; iter++) {
2351 cmds[iter] = getCommand(iter);
2352 }
2353 removeAllCommands();
2354 for (Command cmd : cmds) {
2355 addCommand(cmd, getCommandCount());
2356 }
2357 if (getBackCommand() != null) {
2358 setBackCommand(getBackCommand());
2359 }
2360 }
2361
2362 revalidateWithAnimationSafety();
2363 }
2364
2365 /// Exposing the background painting for the benefit of animations
2366 ///

Callers 7

setUIManagerMethod · 0.95
startMIDletMethod · 0.95
runMethod · 0.95
runMethod · 0.95
runMethod · 0.95
refreshThemeInlineMethod · 0.95

Calls 9

hideMenuMethod · 0.95
restoreMenuMethod · 0.95
getCommandCountMethod · 0.95
getCommandMethod · 0.95
removeAllCommandsMethod · 0.95
addCommandMethod · 0.95
getBackCommandMethod · 0.95
setBackCommandMethod · 0.95