// ... @FXML private Label lblData; // ... public void updatePage(String data){ lblData.setText(data); } // ...
/** * Set body label. */ public void setBodyLabelText(String text) { if (hasLabel()) { bodyLabel.setText(text); } }
void initialize() {} void initData(Customer customer) { customerName.setText(customer.getName());
@Override public void setTitle(String title) { getTitileLabelWidget().setText(title); }
@Override public void onClick(ClickEvent event) { if (clickCount == 1) { navContent.add(emptyPanel); navContent.setAnimationDuration(100); navContent.showWidget(clickCount, new CustomAnimationCallback(true)); back.setText(CLOSE); } else if (clickCount % 2 == 0) { navContent.showWidget(0, new CustomAnimationCallback(false)); back.setText(OPEN); } else { navContent.showWidget(1, new CustomAnimationCallback(true)); back.setText(CLOSE); } incr(); } });
/** * Instantiates a new HeaderViewImpl. */ public HeaderViewImpl() { settingsLabel = new ActionsLabel(Utils.constants.settings()); kaaAdminStyle = Utils.kaaAdminStyle; settingsLabel.setStyleName(kaaAdminStyle.bAppHeaderMenu()); initWidget(uiBinder.createAndBindUi(this)); signoutLabel.setText(Utils.constants.signOut()); title.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { presenter.goToHome(); } }); }
/** * Creates a label with the specified text. * * @param text the new label's text */ public Label(String text) { this(); setText(text); }
/** * Creates a label with the specified text and direction. * * @param text the new label's text * @param dir the text's direction. Note that {@code DEFAULT} means direction * should be inherited from the widget's parent element. */ public Label(String text, Direction dir) { this(); setText(text, dir); }
/** * Instantiates a new BaseListViewImpl. */ public BaseListViewImpl(boolean editable) { this.editable = editable; initAddButton(); errorPanel = new AlertPanel(Type.ERROR); kaaAdminStyle = Utils.kaaAdminStyle; avroUiStyle = Utils.avroUiStyle; initWidget(createAndBindUi()); grid = createGrid(); dockPanel.add(grid); titleLabel.setText(titleString()); addButton.setVisible(editable); clearError(); }
detailsView.getScope().setText(Utils.getCtlScopeTitleString(entity.getMetaInfo().getScope())); detailsView.getCreatedUsername().setValue(entity.getCreatedUsername());
constructTopPanel(); getTitileLabelWidget().setText(Utils.constants.title()); getSaveButtonWidget().setText(Utils.constants.save()); getCancelButtonWidget().setText(Utils.constants.cancel()); getTitileLabelWidget().setText(getCreateTitle()); getCancelButtonWidget().setVisible(true); } else { getTitileLabelWidget().setText(getViewTitle()); getBackButtonPanelWidget().setVisible(true); subTitleLabel.setText(getSubTitle());
private void bind(final HeaderView headerView, final EventBus eventBus) { headerView.getUsernameLabel().setText( KaaAdmin.getAuthInfo().getDisplayName()); registrations.add(headerView.getUsernameLabel().addClickHandler(new ClickHandler() {
/** * Creates a label with the specified text and a default direction estimator. * * @param text the new label's text * @param directionEstimator A DirectionEstimator object used for automatic * direction adjustment. For convenience, * {@link #DEFAULT_DIRECTION_ESTIMATOR} can be used. */ public Label(String text, DirectionEstimator directionEstimator) { this(); setDirectionEstimator(directionEstimator); setText(text); }
private static void doUpdate(final Display display, final Label target, final String value) { display.asyncExec(new Runnable() { @Override public void run() { if (!target.isDisposed()) { target.setText(value); target.getParent().layout(); } } }); }
Display display = new Display(); Shell shell = new Shell(display); shell.setLayout(new GridLayout()); Label label = new Label(shell, SWT.NONE); label.setText("I am italic"); FontData fontData = label.getFont().getFontData()[0]; Font font = new Font(display, new FontData(fontData.getName(), fontData .getHeight(), SWT.ITALIC)); label.setFont(font); shell.open(); while (!shell.isDisposed()) { if (!display.readAndDispatch()) display.sleep(); } font.dispose(); display.dispose();
import javafx.fxml.FXML; import javafx.scene.control.Label; public class SampleController { private int count = 0 ; @FXML private Label countLabel ; @FXML private void increment() { count++; countLabel.setText("Count: "+count); } }
label.setText("Hello, World!");
ScrolledComposite sc = new ScrolledComposite(parent, SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER); Composite composite = new Composite(sc, SWT.NONE); sc.setContent(composite); Label lblRelation = new Label(composite, SWT.NONE); lblRelation.setBounds(10, 13, 74, 15); lblRelation.setText("Label name:"); composite.setSize(composite.computeSize(SWT.DEFAULT, SWT.DEFAULT));