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

Method setTitle

CodenameOne/src/com/codename1/ui/Toolbar.java:374–388  ·  view source on GitHub ↗
(String title)

Source from the content-addressed store, hash-verified

372 ///
373 /// - `title`: the Toolbar title
374 public void setTitle(String title) {
375 checkIfInitialized();
376 Component center = ((BorderLayout) getLayout()).getCenter();
377 if (center instanceof Label) {
378 ((Label) center).setText(title);
379 } else {
380 titleComponent = new Label(title);
381 titleComponent.setUIID("Title");
382 if (center != null) {
383 replace(center, titleComponent, null);
384 } else {
385 addComponent(BorderLayout.CENTER, titleComponent);
386 }
387 }
388 }
389
390 /// Returns true if the title is centered via the layout
391 ///

Callers 4

startMethod · 0.95
startMethod · 0.95
populateMethod · 0.95

Calls 7

checkIfInitializedMethod · 0.95
getCenterMethod · 0.65
getLayoutMethod · 0.65
setTextMethod · 0.65
replaceMethod · 0.65
addComponentMethod · 0.65
setUIIDMethod · 0.45

Tested by 3

startMethod · 0.76
populateMethod · 0.76