@Override public void setDebugId(String debugId) { ensureDebugId(debugId); windowFrameTitleBar.ensureDebugId(debugId + "-windowFrameTitleBar"); windowFrameHeaderTitle.ensureDebugId(debugId + "-windowFrameTitle"); windowFrameCloseButton.ensureDebugId(debugId + "-windowFrameCloseButton"); windowFrameBody.ensureDebugId(debugId + "-windowFrameBody"); windowFrameButtonBar.ensureDebugId(debugId + "-windowFrameButtonBar"); }
@Override public void update(ActionEvent e) { panel.clear(); if (notifier.isNotified()) { Widget icon = new HTML(FontAwesome.EXCLAMATION_TRIANGLE); icon.getElement().getStyle().setMarginRight(5., Style.Unit.PX); panel.add(icon); Label headLabel = new Label(constant.lowDiskSpaceStatusBarMessage()); headLabel.ensureDebugId("statusBarProjectFreeDiskSpaceNotification"); Style headLabelStyle = headLabel.getElement().getStyle(); headLabelStyle.setMarginRight(5., Style.Unit.PX); panel.add(headLabel); } }
private Label createMachineNameLabel(Process process) { final Label label = new InlineHTML(sanitizeHtml(process.getMachineName()) + ": "); label.addStyleName(RESOURCES.commandToolbarCss().processWidgetText()); label.addStyleName(RESOURCES.commandToolbarCss().processWidgetMachineNameLabel()); label.ensureDebugId("dropdown-processes-machine-name"); Tooltip.create( (Element) label.getElement(), BOTTOM, MIDDLE, process.getCommandLine().split("\\n")); return label; }
private Label createCommandNameLabel(Process process) { final Label label = new InlineHTML(sanitizeHtml(process.getName())); label.addStyleName(RESOURCES.commandToolbarCss().processWidgetText()); label.addStyleName(RESOURCES.commandToolbarCss().processWidgetCommandNameLabel()); label.ensureDebugId("dropdown-processes-command-name"); Tooltip.create( (Element) label.getElement(), BOTTOM, MIDDLE, process.getCommandLine().split("\\n")); return label; }
@Override public void update(ActionEvent e) { panel.clear(); Project project = appContext.getRootProject(); if (project != null && project.getAttributes().containsKey(GIT_CURRENT_HEAD_NAME)) { Label projectNameLabel = new Label(project.getName()); projectNameLabel.ensureDebugId("statusBarProjectBranchRepositoryName"); projectNameLabel.getElement().getStyle().setMarginLeft(5., Unit.PX); panel.add(projectNameLabel); SVGImage branchIcon = new SVGImage(resources.checkoutReference()); branchIcon.getSvgElement().getStyle().setMarginLeft(5., Unit.PX); panel.add(branchIcon); Label headLabel = new Label(project.getAttribute(GIT_CURRENT_HEAD_NAME)); headLabel.ensureDebugId("statusBarProjectBranchName"); headLabel.setTitle(constant.branchesControlTitle()); Style headLabelStyle = headLabel.getElement().getStyle(); headLabelStyle.setCursor(Cursor.POINTER); headLabelStyle.setMarginLeft(5., Unit.PX); headLabel.addClickHandler(event -> branchPresenter.showBranches(project)); panel.add(headLabel); } } }
caption.ensureDebugId("runtimeInfoCellTableCaption"); caption.addStyleName(resources.cellTableStyle().cellTableCaption());
ProcessWidget( BaseListItem<Process> item, StopProcessHandler stopProcessHandler, RerunProcessHandler rerunProcessHandler) { super(); final Process process = item.getValue(); stopped = !process.isAlive(); durationLabel = new Label(); durationLabel.addStyleName(RESOURCES.commandToolbarCss().processWidgetText()); durationLabel.addStyleName(RESOURCES.commandToolbarCss().processWidgetPidLabel()); durationLabel.ensureDebugId("dropdown-processes-label-duration"); updateDurationTimer = new UpdateDurationTimer(); if (!stopped) { updateDurationTimer.scheduleRepeating(1000); } pidLabel = new Label('#' + Integer.toString(process.getPid())); pidLabel.addStyleName(RESOURCES.commandToolbarCss().processWidgetText()); pidLabel.addStyleName(RESOURCES.commandToolbarCss().processWidgetPidLabel()); pidLabel.ensureDebugId("dropdown-processes-label-pid"); Tooltip.create((Element) pidLabel.getElement(), BOTTOM, MIDDLE, "PID"); add(createMachineNameLabel(process)); add(createCommandNameLabel(process)); add(stopButton = createStopButton(process, stopProcessHandler)); add(reRunButton = createRerunButton(process, rerunProcessHandler)); add(durationLabel); add(pidLabel); checkStopped(); }