public void setText(CharSequence newText) { label.setText(newText); }
@Override public void messageChanged (String message) { statusLabel.setText(message); }
public void setLabelText (String text) { name.setText(text); }
/** * Set shortcuts text displayed in this menu item. This DOES NOT set actual hot key for this menu item, * it only makes shortcut text visible in item. * @param text text that will be displayed * @return this object for the purpose of chaining methods */ public MenuItem setShortcut (String text) { shortcutLabel.setText(text); packContainerMenu(); return this; }
public void updateViewData() { lblName.setText(pack.getCanonicalName()); }
public void setLabelText(String text) { label.setText(toString()); }
/** * Creates platform dependant shortcut text. Converts int keycodes to String text. Eg. Keys.CONTROL_LEFT, * Keys.SHIFT_LEFT, Keys.F5 will be converted to Ctrl+Shift+F5 on Windows and Linux, and to ⌘⇧F5 on Mac. * <p> * CONTROL_LEFT and CONTROL_RIGHT are mapped to Ctrl. The same goes for Alt (ALT_LEFT, ALT_RIGHT) and Shift (SHIFT_LEFT, SHIFT_RIGHT). * <p> * This DOES NOT set actual hot key for this menu item, it only makes shortcut text visible in item. * @param keycodes keycodes from {@link Keys} that are used to create shortcut text * @return this object for the purpose of chaining methods */ public MenuItem setShortcut (int... keycodes) { shortcutLabel.setText(OsUtils.getShortcutFor(keycodes)); packContainerMenu(); return this; }
public void setSelectorName (String name) { labelCell.getActor().setText(name); if (name == null || name.length() == 0) { labelCell.padRight(0); } else { labelCell.padRight(6); } }
@LmlAfter() void initView() { if (data == null) { throw new IllegalStateException("DialogData wasn't set. You should display this dialog by calling ModalTaskDialogController#showDialog(DialogData)."); } cancelContainer.setVisible(data.cancelBehavior != CancelBehavior.NON_CANCELABLE); lblMessage.setText(data.message); data.taskQueue.setListener(listenerWrapper); data.taskQueue.execute(); }
@LmlAfter public void initialize() { lblVersionCurrent.setText(AppConstants.version.toString()); launchVersionCheck(); }
/** * Changes text tooltip to specified text. If tooltip content is not instance of VisLabel then previous tooltip content * will be replaced by VisLabel instance. * @param text next tooltip text */ public void setText (String text) { if (content instanceof VisLabel) { ((VisLabel) content).setText(text); } else { setContent(new VisLabel(text)); } pack(); }
private void updateFavoriteFolderButton () { VisLabel label = (VisLabel) favoriteFolderButtonTooltip.getContent(); if (favorites.contains(currentDirectory, false)) { favoriteFolderButton.getStyle().imageUp = style.iconStar; label.setText(CONTEXT_MENU_REMOVE_FROM_FAVORITES.get()); } else { favoriteFolderButton.getStyle().imageUp = style.iconStarOutline; label.setText(CONTEXT_MENU_ADD_TO_FAVORITES.get()); } favoriteFolderButtonTooltip.pack(); }
private void fillUpdateDetailsGroup(VersionData versionData) { lblVersionNew.setText(versionData.getVersion().toString()); FocusManager.switchFocus(btnVisitUpdatePage.getStage(), btnVisitUpdatePage); } }
private void updateValuesFromTinifyService() { edtApiKey.setText(tinifyService.getApiKey()); lblCompressionCount.setText(localeService.getI18nBundle().format("dCompCompressionCount", tinifyService.getCompressionCount())); } }
public void updateFromController() { scBtnInstall.setVisible(moduleController.getStatus() == ExtensionModuleController.Status.NOT_INSTALLED); scBtnUninstall.setVisible(moduleController.getStatus() != ExtensionModuleController.Status.NOT_INSTALLED); scBtnUpdate.setVisible(moduleController.getStatus() == ExtensionModuleController.Status.UPDATE_REQUIRED); lblName.setText(moduleController.getName()); lblDescription.setText(moduleController.getDescription()); Skin skin = interfaceService.getSkin(); switch (moduleController.getStatus()) { case NOT_INSTALLED: frameTable.background(skin.getDrawable("custom/em-item-frame")); lblStatus.setText(localeService.getI18nBundle().get("emRepoStatusNotInstalled")); lblStatus.setColor(skin.getColor("text-grey")); break; case INSTALLED: frameTable.background(skin.getDrawable("custom/em-item-frame-installed")); lblStatus.setText(localeService.getI18nBundle().get("emRepoStatusInstalled")); lblStatus.setColor(skin.getColor("text-green")); break; case UPDATE_REQUIRED: frameTable.background(skin.getDrawable("custom/em-item-frame-outofdate")); lblStatus.setText(localeService.getI18nBundle().get("emRepoStatusUpdateRequired")); lblStatus.setColor(skin.getColor("text-yellow")); break; } }
viewHolder.lblContent.setText(String.format(Locale.US, "%.1f", seconds)); viewHolder.imgIcon.setDrawable(VisUI.getSkin(), "custom/ic-small-time"); viewHolder.createTooltip("dPackingMetaTotalTime"); viewHolder.lblContent.setText(sizeMb); viewHolder.imgIcon.setDrawable(VisUI.getSkin(), "custom/ic-small-weight"); viewHolder.createTooltip("dPackingMetaTotalSize"); viewHolder.lblContent.setText(compressionPercents); viewHolder.imgIcon.setDrawable(VisUI.getSkin(), "custom/ic-small-compression"); viewHolder.createTooltip("dPackingMetaCompression");
private void processPathText() { if (pathProcessed) return; pathProcessed = true; boolean fileShortened = false; String origFilePath = inputFile.getFileHandle().path(); String filePath = origFilePath; filePath = Scene2dUtils.ellipsisFilePath(filePath, lblName.getStyle().font, lblName.getWidth()); fileShortened = !origFilePath.equals(filePath); filePath = Scene2dUtils.colorizeFilePath(filePath, inputFile.getFileHandle().isDirectory(), "light-grey", "white"); lblName.setText(filePath); // Show tooltip only if displayed file name was shortened tooltip.setTarget(fileShortened ? root : null); tooltip.setText(Scene2dUtils.colorizeFilePath(origFilePath, inputFile.getFileHandle().isDirectory(), "light-grey", "white")); tooltip.setTouchable(Touchable.disabled); } }
@LmlAction("saveAndCloseDialog") void saveAndCloseDialog() { Array<ScaleFactorModel> scaleFactors = new Array<>(); for (int i = 0; i < listAdapter.size(); i++) { ScaleListViewItem view = listAdapter.getView(listAdapter.get(i)); ScaleFactorModel model = new ScaleFactorModel(view.getSuffix(), view.getFactor(), view.getResampling()); scaleFactors.add(model); } String error = validate(scaleFactors); errorContainer.setVisible(error != null); if (error != null) { lblError.setText(error); return; } packModel.setScaleFactors(scaleFactors); closeDialog(); }
public ProcessingNodeListViewItem(LmlParser parser, PackProcessingNode node, int orderNum) { this.parser = parser; this.node = node; this.view = (VisTable) parser.parseTemplate(Gdx.files.internal("lml/dialogPackingListItem.lml")).first(); setActor(view); fill(); imgStateIndicator = view.findActor("imgStateIndicator"); lblPackName = view.findActor("lblPackName"); // lblMetadata = view.findActor("lblMetadata"); tableMetadata = view.findActor("tableMetadata"); btnLog = view.findActor("btnLog"); if (orderNum%2 == 0) { view.setBackground("packingItemBg"); } btnLog.addListener(new ChangeListener() { @Override public void changed(ChangeEvent event, Actor actor) { showLogWindow(); } }); lblPackName.setText(node.getPack().getCanonicalName() + "[light-grey]" + node.getPack().getScaleFactors().first().getSuffix()); }
lblLog.setAlignment(Align.topLeft); lblLog.setWrap(true); lblLog.setText(log); containerLog.setActor(lblLog);