Java Code Examples for consulo.ui.Label#create()

The following examples show how to use consulo.ui.Label#create() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: IdeNotificationArea.java    From consulo with Apache License 2.0 5 votes vote down vote up
public IdeNotificationArea() {
  myLabel = Label.create();

  new ClickListener() {
    @Override
    public boolean onClick(@Nonnull MouseEvent e, int clickCount) {
      EventLog.toggleLog(getProject(), null);
      return true;
    }
  }.installOn(TargetAWT.to(myLabel));

  MessageBusConnection connection = Application.get().getMessageBus().connect(this);
  connection.subscribe(UISettingsListener.TOPIC, source -> updateStatus());
  connection.subscribe(LogModel.LOG_MODEL_CHANGED, () -> Application.get().invokeLater(IdeNotificationArea.this::updateStatus));
}
 
Example 2
Source File: WebToolWindowManagerImpl.java    From consulo with Apache License 2.0 5 votes vote down vote up
@Override
@Nonnull
@RequiredUIAccess
protected Component createInitializingLabel() {
  Label label = Label.create("Initializing...");
  DockLayout dock = DockLayout.create();
  dock.center(label);
  return label;
}
 
Example 3
Source File: SandServerType.java    From consulo with Apache License 2.0 5 votes vote down vote up
@Nonnull
@Override
public UnnamedConfigurable createConfigurable(@Nonnull SandServerConfiguration configuration) {
  return new UnnamedConfigurable() {
    @RequiredUIAccess
    @Override
    public boolean isModified() {
      return false;
    }

    @RequiredUIAccess
    @Nullable
    @Override
    public Component createUIComponent() {
      return Label.create("Sand stub UI");
    }

    @RequiredUIAccess
    @Override
    public void apply() throws ConfigurationException {

    }

    @RequiredUIAccess
    @Override
    public void reset() {

    }
  };
}
 
Example 4
Source File: SandFileEditor.java    From consulo with Apache License 2.0 4 votes vote down vote up
@Nonnull
@Override
public Component getUIComponent() {
  return Label.create("Hello World");
}