use of com.google.gwt.user.client.ui.Label in project goldenorb by jzachr.
the class OrbTrackerStatus method onModuleLoad.
@Override
public void onModuleLoad() {
RootPanel rootPanel = RootPanel.get();
mainPanel = new VerticalPanel();
rootPanel.add(mainPanel);
Image image = new Image("images/logo-full.jpg");
mainPanel.add(image);
// Label titleLabel = new Label("GoldenOrb");
// mainPanel.add(titleLabel);
lastUpdatedLabel = new Label("Last Updated : ");
mainPanel.add(lastUpdatedLabel);
Label lblOrbtrackermembers = new Label("OrbTrackerMembers");
mainPanel.add(lblOrbtrackermembers);
orbTrackerFlexTable = new FlexTable();
mainPanel.add(orbTrackerFlexTable);
orbTrackerFlexTable.setSize("761px", "116px");
orbTrackerFlexTable.setText(0, 0, "Node Name");
orbTrackerFlexTable.setText(0, 1, "Partition Capacity");
orbTrackerFlexTable.setText(0, 2, "Available Partitions");
orbTrackerFlexTable.setText(0, 3, "Reserved Partitions");
orbTrackerFlexTable.setText(0, 4, "In Use Partitions");
orbTrackerFlexTable.setText(0, 5, "Host Name");
orbTrackerFlexTable.setText(0, 6, "Leader");
orbTrackerFlexTable.setText(0, 7, "Port");
jobsGroupedPanel = new HorizontalPanel();
mainPanel.add(jobsGroupedPanel);
jobsGroupedPanel.setSize("258px", "100px");
jobsInProgressPanel = new FlexTable();
jobsInProgressPanel.setText(0, 0, "Jobs In Progress");
jobsGroupedPanel.add(jobsInProgressPanel);
jobsInQueuePanel = new FlexTable();
jobsInQueuePanel.setText(0, 0, "Jobs In Queue");
jobsGroupedPanel.add(jobsInQueuePanel);
jobsInProgressPanel.setTitle("Jobs In Progress");
jobsInQueuePanel.setTitle("Jobs in Queue");
errorLabelOTM = new Label("");
mainPanel.add(errorLabelOTM);
errorLabelJIP = new Label("");
mainPanel.add(errorLabelJIP);
errorLabelJQ = new Label("");
mainPanel.add(errorLabelJQ);
Timer refreshTimer = new Timer() {
public void run() {
refreshWatchDataList();
refreshJobsInProgress();
refreshJobsInQueue();
}
};
refreshTimer.scheduleRepeating(REFRESH_INTERVAL);
}
use of com.google.gwt.user.client.ui.Label in project rstudio by rstudio.
the class UnsavedChangesDialog method createMainWidget.
@Override
protected Widget createMainWidget() {
// create cell table
targetsCellTable_ = new CellTable<UnsavedChangesTarget>(15, UnsavedChangesCellTableResources.INSTANCE, KEY_PROVIDER);
selectionModel_ = new MultiSelectionModel<UnsavedChangesTarget>(KEY_PROVIDER);
targetsCellTable_.setSelectionModel(selectionModel_, DefaultSelectionEventManager.<UnsavedChangesTarget>createCheckboxManager());
targetsCellTable_.setWidth("100%", true);
// add columns
addSelectionColumn();
addIconColumn();
addNameAndPathColumn();
// hook-up data provider
dataProvider_ = new ListDataProvider<UnsavedChangesTarget>();
dataProvider_.setList(targets_);
dataProvider_.addDataDisplay(targetsCellTable_);
targetsCellTable_.setPageSize(targets_.size());
// select all by default
for (UnsavedChangesTarget editingTarget : dataProvider_.getList()) selectionModel_.setSelected(editingTarget, true);
// enclose cell table in scroll panel
ScrollPanel scrollPanel = new ScrollPanel();
scrollPanel.setStylePrimaryName(RESOURCES.styles().targetScrollPanel());
scrollPanel.setWidget(targetsCellTable_);
if (dataProvider_.getList().size() > 4)
scrollPanel.setHeight("280px");
// always save check box (may not be shown)
chkAlwaysSave_ = new CheckBox(alwaysSaveOption_);
// main widget
VerticalPanel panel = new VerticalPanel();
Label captionLabel = new Label("The following files have unsaved changes:");
captionLabel.setStylePrimaryName(RESOURCES.styles().captionLabel());
panel.add(captionLabel);
panel.add(scrollPanel);
if (!StringUtil.isNullOrEmpty(alwaysSaveOption_)) {
panel.add(chkAlwaysSave_);
panel.setCellHeight(chkAlwaysSave_, "30px");
panel.setCellVerticalAlignment(chkAlwaysSave_, HasVerticalAlignment.ALIGN_MIDDLE);
}
return panel;
}
use of com.google.gwt.user.client.ui.Label in project rstudio by rstudio.
the class PaneStatusMessage method createStatusLabel.
private static Label createStatusLabel(String message) {
Label label = new Label(message);
label.getElement().getStyle().setColor("#888");
return label;
}
use of com.google.gwt.user.client.ui.Label in project rstudio by rstudio.
the class DataPane method createMainWidget.
@Override
protected Widget createMainWidget() {
Label label = new Label("Under Construction");
label.getElement().getStyle().setColor("#888");
return new HorizontalCenterPanel(label, 100);
}
use of com.google.gwt.user.client.ui.Label in project rstudio by rstudio.
the class RPubsUploadDialog method createMainWidget.
@Override
protected Widget createMainWidget() {
Styles styles = RESOURCES.styles();
SimplePanel mainPanel = new SimplePanel();
mainPanel.addStyleName(styles.mainWidget());
VerticalPanel verticalPanel = new VerticalPanel();
HorizontalPanel headerPanel = new HorizontalPanel();
headerPanel.addStyleName(styles.headerPanel());
headerPanel.add(new Image(new ImageResource2x(RESOURCES.publishLarge2x())));
Label headerLabel = new Label("Publish to RPubs");
headerLabel.addStyleName(styles.headerLabel());
headerPanel.add(headerLabel);
headerPanel.setCellVerticalAlignment(headerLabel, HasVerticalAlignment.ALIGN_MIDDLE);
verticalPanel.add(headerPanel);
String msg;
if (!isPublished_ && uploadId_.isEmpty()) {
msg = "RPubs is a free service from RStudio for sharing " + "documents on the web. Click Publish to get " + "started.";
} else {
msg = "This document has already been published on RPubs. You can " + "choose to either update the existing RPubs document, or " + "create a new one.";
}
Label descLabel = new Label(msg);
descLabel.addStyleName(styles.descLabel());
verticalPanel.add(descLabel);
// if we have a generator then show title and comment UI
if (htmlGenerator_ != null) {
Label titleLabel = new Label("Title (optional):");
titleLabel.addStyleName(styles.fieldLabel());
verticalPanel.add(titleLabel);
titleTextBox_ = new TextBox();
titleTextBox_.addStyleName(styles.titleTextBox());
titleTextBox_.getElement().setAttribute("spellcheck", "false");
verticalPanel.add(titleTextBox_);
Label commentLabel = new Label("Comment (optional):");
commentLabel.addStyleName(styles.fieldLabel());
verticalPanel.add(commentLabel);
commentTextArea_ = new FixedTextArea(6);
commentTextArea_.addStyleName(styles.commentTextArea());
verticalPanel.add(commentTextArea_);
// not using either for now
titleLabel.setVisible(false);
titleTextBox_.setVisible(false);
commentLabel.setVisible(false);
commentTextArea_.setVisible(false);
previewButton_ = new ThemedButton("Preview");
previewButton_.addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
htmlGenerator_.generateStaticHtml(titleTextBox_.getText().trim(), commentTextArea_.getText().trim(), new CommandWithArg<String>() {
@Override
public void execute(String rpubsFile) {
globalDisplay_.showHtmlFile(rpubsFile);
}
});
}
});
addLeftButton(previewButton_);
}
HTML warningLabel = new HTML("<strong>IMPORTANT: All documents published to RPubs are " + "publicly visible.</strong> You should " + "only publish documents that you wish to share publicly.");
warningLabel.addStyleName(styles.warningLabel());
verticalPanel.add(warningLabel);
ThemedButton cancelButton = createCancelButton(new Operation() {
@Override
public void execute() {
// if an upload is in progress then terminate it
if (uploader_.isUploadInProgress()) {
uploader_.terminateUpload();
}
}
});
continueButton_ = new ThemedButton("Publish", new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
performUpload(false);
}
});
updateButton_ = new ThemedButton("Update Existing", new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
performUpload(true);
}
});
createButton_ = new ThemedButton("Create New", new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
performUpload(false);
}
});
if (!isPublished_ && uploadId_.isEmpty()) {
addOkButton(continueButton_);
addCancelButton(cancelButton);
} else {
addOkButton(updateButton_);
addButton(createButton_);
addCancelButton(cancelButton);
}
mainPanel.setWidget(verticalPanel);
return mainPanel;
}
Aggregations