本文整理汇总了Java中com.google.gwt.user.client.ui.InlineLabel.setStyleName方法的典型用法代码示例。如果您正苦于以下问题:Java InlineLabel.setStyleName方法的具体用法?Java InlineLabel.setStyleName怎么用?Java InlineLabel.setStyleName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.google.gwt.user.client.ui.InlineLabel
的用法示例。
在下文中一共展示了InlineLabel.setStyleName方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: renderImage
import com.google.gwt.user.client.ui.InlineLabel; //导入方法依赖的package包/类
/** Redraw the icon. */
private void renderImage() {
panel.clear();
if (presentation.getImageElement() != null) {
ElementWidget image = new ElementWidget(presentation.getImageElement());
image.getElement().setAttribute("class", toolbarResources.toolbar().popupButtonIcon());
panel.add(image);
} else if (presentation.getHTMLResource() != null) {
FlowPanel icon = new FlowPanel();
icon.setStyleName(toolbarResources.toolbar().iconButtonIcon());
FlowPanel inner = new FlowPanel();
inner.setStyleName(toolbarResources.toolbar().popupButtonIconInner());
inner.getElement().setInnerHTML(presentation.getHTMLResource());
icon.add(inner);
panel.add(inner);
}
InlineLabel caret = new InlineLabel("");
caret.setStyleName(toolbarResources.toolbar().caret());
panel.add(caret);
}
示例2: setupWidgets
import com.google.gwt.user.client.ui.InlineLabel; //导入方法依赖的package包/类
private void setupWidgets() {
if (!urls.isEmpty()) {
urls.select(Gerrit.getUserPreferences().downloadScheme());
FlowPanel p = new FlowPanel();
p.setStyleName(Gerrit.RESOURCES.css().downloadLinkHeader());
p.add(commands);
final InlineLabel glue = new InlineLabel();
glue.setStyleName(Gerrit.RESOURCES.css().downloadLinkHeaderGap());
p.add(glue);
p.add(urls);
add(p);
add(copyLabel);
}
}
示例3: setValue
import com.google.gwt.user.client.ui.InlineLabel; //导入方法依赖的package包/类
/**
* @see com.google.gwt.user.client.ui.HasValue#setValue(java.lang.Object, boolean)
*
* <div class="sitwatch-event">
* <div class="icon icon-severity-critical"></div>
* <a class="title" href="#">Rate Limit Exceeded</a>
* <span class="timestamp">9:16 AM</span>
* <span class="subject">{urn:namespace}ImportantService|VeryImportantOperation</span>
* </div>
*/
@Override
public void setValue(SituationEventBean value, boolean fireEvents) {
clear();
FlowPanel icon = new FlowPanel();
icon.setStyleName("icon"); //$NON-NLS-1$
icon.addStyleName("icon-severity-" + value.getSeverity()); //$NON-NLS-1$
Anchor type = toDetailsPageLinkFactory.get("id", value.getSituationId()); //$NON-NLS-1$
type.setText(value.getType());
type.setStyleName("title"); //$NON-NLS-1$
InlineLabel timestamp = new InlineLabel(ClientMessages.getTimeFormat().format(value.getTimestamp()));
timestamp.setStyleName("timestamp"); //$NON-NLS-1$
InlineLabel subject = new InlineLabel(value.getSubject());
subject.setStyleName("subject"); //$NON-NLS-1$
add(icon);
add(type);
add(timestamp);
add(subject);
}
示例4: ResultCellTable
import com.google.gwt.user.client.ui.InlineLabel; //导入方法依赖的package包/类
@Inject
public ResultCellTable(final @Assisted int pageSize,
final @NotNull CellTableResourcesQueryResults cellTableResources,
final @NotNull SqlRequestLauncherConstants constants) {
super(pageSize, cellTableResources);
final InlineLabel emptyWidget = new InlineLabel(constants.emptyResult());
setEmptyTableWidget(emptyWidget);
emptyWidget.setStyleName(cellTableResources.cellTableStyle().emptyTableWidget());
addCellPreviewHandler(new CellPreviewEvent.Handler<List<String>>() {
@Override
public void onCellPreview(CellPreviewEvent<List<String>> event) {
if ("click".equals(event.getNativeEvent().getType())) {
TableCellElement cellElement = getRowElement(event.getIndex()).getCells().getItem(event.getColumn());
cellElement.setTitle(cellElement.getInnerText());
}
}
});
}
示例5: RpcStatus
import com.google.gwt.user.client.ui.InlineLabel; //导入方法依赖的package包/类
RpcStatus() {
loading = new InlineLabel();
loading.setText(Gerrit.C.rpcStatusWorking());
loading.setStyleName(Gerrit.RESOURCES.css().rpcStatus());
loading.setVisible(false);
RootPanel.get().add(loading);
}
示例6: insertPatch
import com.google.gwt.user.client.ui.InlineLabel; //导入方法依赖的package包/类
private void insertPatch() {
String id = revision.substring(0, 7);
Anchor patchBase64 = new Anchor(id + ".diff.base64");
patchBase64.setHref(
new RestApi("/changes/")
.id(psId.getParentKey().get())
.view("revisions")
.id(revision)
.view("patch")
.addParameterTrue("download")
.url());
Anchor patchZip = new Anchor(id + ".diff.zip");
patchZip.setHref(
new RestApi("/changes/")
.id(psId.getParentKey().get())
.view("revisions")
.id(revision)
.view("patch")
.addParameterTrue("zip")
.url());
HorizontalPanel p = new HorizontalPanel();
p.add(patchBase64);
InlineLabel spacer = new InlineLabel("|");
spacer.setStyleName(Gerrit.RESOURCES.css().downloadBoxSpacer());
p.add(spacer);
p.add(patchZip);
insertCommand("Patch-File", p);
}
示例7: insertArchive
import com.google.gwt.user.client.ui.InlineLabel; //导入方法依赖的package包/类
private void insertArchive() {
List<String> activated = Gerrit.info().download().archives();
if (activated.isEmpty()) {
return;
}
List<Anchor> anchors = new ArrayList<>(activated.size());
for (String f : activated) {
Anchor archive = new Anchor(f);
archive.setHref(
new RestApi("/changes/")
.id(psId.getParentKey().get())
.view("revisions")
.id(revision)
.view("archive")
.addParameter("format", f)
.url());
anchors.add(archive);
}
HorizontalPanel p = new HorizontalPanel();
Iterator<Anchor> it = anchors.iterator();
while (it.hasNext()) {
Anchor a = it.next();
p.add(a);
if (it.hasNext()) {
InlineLabel spacer = new InlineLabel("|");
spacer.setStyleName(Gerrit.RESOURCES.css().downloadBoxSpacer());
p.add(spacer);
}
}
insertCommand("Archive", p);
}
示例8: addRow
import com.google.gwt.user.client.ui.InlineLabel; //导入方法依赖的package包/类
/**
* Adds a single row to the table.
*
* @param processBean
* the process bean
*/
public void addRow(final ProcessBean processBean) {
int rowIdx = this.rowElements.size();
Anchor artifact_name = new Anchor();
artifact_name.setText(processBean.getArtifactName());
String url = srampUIBaseUrl;
if (!url.endsWith("/")) { //$NON-NLS-1$
url += "/"; //$NON-NLS-1$
}
url += "#details;uuid=" + processBean.getArtifactId(); //$NON-NLS-1$
artifact_name.setHref(url);
InlineLabel workflow = new InlineLabel(processBean.getWorkflow());
InlineLabel status = new InlineLabel(processBean.getStatus().name());
FlowPanel actions = new FlowPanel();
if (processBean.getStatus().equals(ProcessStatusEnum.RUNNING)) {
InlineLabel stopAction = new InlineLabel();
stopAction.setStyleName("process-icon", true); //$NON-NLS-1$
stopAction.setStyleName("process-abort-icon", true); //$NON-NLS-1$
stopAction.setTitle(_i18n.format("abort")); //$NON-NLS-1$
actions.add(stopAction);
stopAction.addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
StopProcessEvent.fire(ProcessesTable.this, processBean);
}
});
}
add(rowIdx, 0, artifact_name);
add(rowIdx, 1, workflow);
add(rowIdx, 2, status);
Element row = add(rowIdx, 3, actions);
setStyleName(row, "actions", true); //$NON-NLS-1$
}
示例9: createVariable
import com.google.gwt.user.client.ui.InlineLabel; //导入方法依赖的package包/类
/**
* Create label.
* @param value
* @return
*/
private InlineLabel createVariable(String value) {
final InlineLabel label = new InlineLabel(value);
label.setStyleName(VARIABLE_STYLE);
return label;
}
示例10: createVariable
import com.google.gwt.user.client.ui.InlineLabel; //导入方法依赖的package包/类
private InlineLabel createVariable(String value) {
final InlineLabel label = new InlineLabel(value);
label.setStyleName(VARIABLE_STYLE);
return label;
}
示例11: buildUi
import com.google.gwt.user.client.ui.InlineLabel; //导入方法依赖的package包/类
/**
* Initialize the UI
*/
private void buildUi() {
// Create textboxes and set default hostname and port
_hostname = new TextBox();
_hostname.setText(DEFAULT_HOST);
_hostname.getElement().setPropertyString("placeholder", "hostname");
_port = new TextBox();
_port.setText(String.valueOf(DEFAULT_PORT));
_port.getElement().setPropertyString("placeholder", "port");
// Create button to connect
_button = new Button("Connect");
// Create the info/status label, initially not visible
_info = new InlineLabel();
_info.setVisible(false);
// register the button action
_button.addClickHandler(new ClickHandler() {
public void onClick(final ClickEvent event) {
final String hostname = _hostname.getText();
final int port = Integer.valueOf(_port.getText());
new PortAsyncCallback(hostname, port).execute();
}
});
// Create panel for textbox, button and info label
final FlowPanel div = new FlowPanel();
div.setStylePrimaryName("emulator-controls");
_hostname.setStyleName("emulator-hostname");
_port.setStyleName("emulator-port");
_button.setStyleName("emulator-connect");
_info.setStyleName("emulator-info");
div.add(_hostname);
div.add(_port);
div.add(_button);
div.add(_info);
// Create a map centered on Cawker City, KS USA
final MapOptions opts = MapOptions.newInstance();
final LatLng cawkerCity = LatLng.newInstance(39.509, -98.434);
opts.setCenter(cawkerCity);
opts.setZoom(4);
_map = new MapWidget(opts);
// Register map click handler
_map.addClickHandler(this);
// add the controls before the map so that the div doesn't cover the map
RootLayoutPanel.get().add(div);
RootLayoutPanel.get().add(_map);
}
示例12: AbstractField
import com.google.gwt.user.client.ui.InlineLabel; //导入方法依赖的package包/类
public AbstractField(
IneDateGWT date,
Precision precision,
boolean showstepbuttons,
int stepcount,
boolean usetextbox,
DateTimeFieldParentInterface parent,
boolean enableselectmanager) {
this.PRECISION = precision;
this.inedate = date;
this.usetextbox = usetextbox;
this.parent = parent;
this.enabled = true;
this.showstepbuttons = showstepbuttons;
this.stepcount = stepcount;
initWidget(panel_main);
if (showstepbuttons) {
img_step_bck = new Image();
img_step_fwd = new Image();
img_step_bck.setResource(ResourceHelper.ineformRes().arrowLeft());
img_step_fwd.setResource(ResourceHelper.ineformRes().arrowRight());
img_step_bck.addStyleName(ResourceHelper.ineformRes().style().clickable());
img_step_fwd.addStyleName(ResourceHelper.ineformRes().style().clickable());
}
if (usetextbox) {
tb_datetime = new DateTimeTextBox(precision, enableselectmanager, this);
} else {
lbl_datetime = new InlineLabel();
lbl_datetime
.setStyleName(ResourceHelper.ineformRes().style().abstractField_dateLabel());
}
if (showstepbuttons)
panel_main.add(img_step_bck);
if (usetextbox)
panel_main.add(tb_datetime);
else
panel_main.add(lbl_datetime);
if (showstepbuttons)
panel_main.add(img_step_fwd);
setEnabled(true);
}
示例13: addRow
import com.google.gwt.user.client.ui.InlineLabel; //导入方法依赖的package包/类
/**
* Adds a single row to the table.
*
* @param workFlowQuerySummaryBean
* the work flow query summary bean
*/
public void addRow(final WorkflowQuerySummaryBean workFlowQuerySummaryBean) {
int rowIdx = this.rowElements.size();
//Anchor name = editQueryLinkFactory.get("uuid", deploymentSummaryBean.getUuid()); //$NON-NLS-1$
Anchor name_link = _editQueryLinkFactory.get("uuid", workFlowQuerySummaryBean.getUuid()); //$NON-NLS-1$
name_link.setText(workFlowQuerySummaryBean.getName());
InlineLabel query = new InlineLabel(workFlowQuerySummaryBean.getQuery());
InlineLabel workflow = new InlineLabel(workFlowQuerySummaryBean.getWorkflow());
FlowPanel actions = new FlowPanel();
Anchor editQuery = _editQueryLinkFactory.get("uuid", workFlowQuerySummaryBean.getUuid()); //$NON-NLS-1$
InlineLabel editAction = new InlineLabel();
editAction.setStyleName("workflow-icon", true); //$NON-NLS-1$
editAction.setStyleName("workflow-edit-icon", true); //$NON-NLS-1$
editAction.setStyleName("firstAction", true); //$NON-NLS-1$
editAction.setTitle(_i18n.format("edit")); //$NON-NLS-1$
editQuery.getElement().appendChild(editAction.getElement());
actions.add(editQuery);
InlineLabel deleteAction = new InlineLabel();
deleteAction.setStyleName("workflow-icon", true); //$NON-NLS-1$
deleteAction.setStyleName("workflow-delete-icon", true); //$NON-NLS-1$
deleteAction.setTitle(_i18n.format("delete")); //$NON-NLS-1$
actions.add(deleteAction);
deleteAction.addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
DeleteWorkflowQueryDialog dialog = _deleteWorkflowQueryDialog.get();
dialog.setWorkflowQuery(workFlowQuerySummaryBean);
dialog.show();
}
});
add(rowIdx, 0, name_link);
add(rowIdx, 1, workflow);
add(rowIdx, 2, query);
Element row = add(rowIdx, 3, actions);
setStyleName(row, "actions", true); //$NON-NLS-1$
// add(rowIdx, 2, initiatedOn);
}
示例14: addRow
import com.google.gwt.user.client.ui.InlineLabel; //导入方法依赖的package包/类
/**
* Adds a single row to the table.
*
* @param target
* the target
*/
public void addRow(final TargetSummaryBean target) {
int rowIdx = this.rowElements.size();
//Anchor name = editQueryLinkFactory.get("uuid", deploymentSummaryBean.getUuid()); //$NON-NLS-1$
Anchor name_link = _editTargetLinkFactory.get("uuid", target.getUuid()); //$NON-NLS-1$
name_link.setText(target.getName());
String type_text = ""; //$NON-NLS-1$
if (target.getType() != null) {
type_text = i18n.format(PREFIX_I18_TARGET_TYPE + target.getType().getValue());
}
InlineLabel type = new InlineLabel(type_text);
InlineLabel description = new InlineLabel(target.getDescription());
FlowPanel actions = new FlowPanel();
Anchor editTarget = _editTargetLinkFactory.get("uuid", target.getUuid()); //$NON-NLS-1$
InlineLabel editAction = new InlineLabel();
editAction.setStyleName("target-icon", true); //$NON-NLS-1$
editAction.setStyleName("target-edit-icon", true); //$NON-NLS-1$
editAction.setStyleName("firstAction", true); //$NON-NLS-1$
editAction.setTitle(i18n.format("edit")); //$NON-NLS-1$
editTarget.getElement().appendChild(editAction.getElement());
actions.add(editTarget);
InlineLabel deleteAction = new InlineLabel();
deleteAction.setStyleName("target-icon", true); //$NON-NLS-1$
deleteAction.setStyleName("target-delete-icon", true); //$NON-NLS-1$
deleteAction.setTitle(i18n.format("delete")); //$NON-NLS-1$
actions.add(deleteAction);
deleteAction.addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
DeleteItemEvent.fire(TargetsTable.this, target);
}
});
add(rowIdx, 0, name_link);
add(rowIdx, 1, type);
add(rowIdx, 2, description);
Element row = add(rowIdx, 3, actions);
setStyleName(row, "actions", true); //$NON-NLS-1$
}