MCPcopy Create free account
hub / github.com/BaseXdb/basex / setTitle

Method setTitle

basex-core/src/main/java/org/basex/gui/GUI.java:275–290  ·  view source on GitHub ↗

Sets the window title.

()

Source from the content-addressed store, hash-verified

273 * Sets the window title.
274 */
275 public void setTitle() {
276 final TokenBuilder tb = new TokenBuilder();
277 final EditorArea ea = editor == null ? null : editor.getEditor();
278 if(ea != null) {
279 tb.add(ea.opened() ? ea.file().path() : ea.file().name());
280 if(ea.modified()) tb.add('*');
281 }
282 final Data data = context.data();
283 if(data != null) {
284 if(!tb.isEmpty()) tb.add(' ');
285 tb.add("[").add(data.meta.name).add("]");
286 }
287 if(!tb.isEmpty()) tb.add(" - ");
288 tb.add(TITLE);
289 setTitle(tb.toString());
290 }
291
292 /**
293 * Sets a cursor.

Callers 7

GUIMethod · 0.95
fullscreenMethod · 0.80
initMethod · 0.80
EditorViewMethod · 0.80
initMethod · 0.80
refreshControlsMethod · 0.80
actionPerformedMethod · 0.80

Calls 11

addMethod · 0.95
openedMethod · 0.95
fileMethod · 0.95
modifiedMethod · 0.95
isEmptyMethod · 0.95
toStringMethod · 0.95
getEditorMethod · 0.80
nameMethod · 0.65
addMethod · 0.65
pathMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected