本文整理汇总了Java中com.google.gwt.user.client.ui.InlineLabel.addClickHandler方法的典型用法代码示例。如果您正苦于以下问题:Java InlineLabel.addClickHandler方法的具体用法?Java InlineLabel.addClickHandler怎么用?Java InlineLabel.addClickHandler使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.google.gwt.user.client.ui.InlineLabel
的用法示例。
在下文中一共展示了InlineLabel.addClickHandler方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: DropDownImageListEditorView
import com.google.gwt.user.client.ui.InlineLabel; //导入方法依赖的package包/类
@UiConstructor
public DropDownImageListEditorView() {
initWidget(Binder.BINDER.createAndBindUi(this));
currentTypeImage = new Image();
caret = new InlineLabel();
caret.addStyleName( "caret" );
caret.setVisible( true);
dropDownAnchor.add( currentTypeImage );
dropDownAnchor.add( caret );
dropDownAnchor.setEnabled( true );
currentTypeImageTooltip = new Tooltip(dropDown);
currentTypeImageTooltip.setContainer("body");
currentTypeImageTooltip.setShowDelayMs(100);
currentTypeImage.addClickHandler(e -> currentTypeImageTooltip.hide());
caret.addClickHandler(e -> currentTypeImageTooltip.hide());
helpPanel.add(currentTypeImageTooltip);
}
示例2: setRef
import com.google.gwt.user.client.ui.InlineLabel; //导入方法依赖的package包/类
/**
* Denotes that this is an object whose definition is in another Schema, and
* that it should be filled in with the correct fields when expanded.
*/
void setRef(final String ref) {
final InlineLabel expando = new InlineLabel("+");
add(expando);
expando.addStyleName(Resources.INSTANCE.style().clickable());
expando.setTitle("Click to show more fields");
expando.addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
Schema sch = service.getSchemas().get(ref);
setProperties(sch.getProperties());
remove(expando);
}
});
}
示例3: 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$
}
示例4: formatGroup
import com.google.gwt.user.client.ui.InlineLabel; //导入方法依赖的package包/类
/**
* Iterate through an object or array adding the widgets generated for all children
*/
private static FlowPanel formatGroup(Iterable<Widget> objIterable,
String title,
int depth,
String openGroup,
String closeGroup,
boolean hasSeparator,
@Nullable Widget menuButtonForReuse) {
FlowPanel object = new FlowPanel();
FlowPanel titlePanel = new FlowPanel();
Label paddingSpaces = new InlineLabel(indentation(depth));
titlePanel.add(paddingSpaces);
Label titleLabel = new InlineLabel(title + openGroup);
titleLabel.addStyleName(style.jsonKey());
Collapser.decorateCollapserControl(titleLabel, true);
titlePanel.add(titleLabel);
object.add(titlePanel);
FlowPanel objectContents = new FlowPanel();
if (menuButtonForReuse != null) {
objectContents.addStyleName(style.reusableResource());
objectContents.add(menuButtonForReuse);
}
for (Widget child : objIterable) {
objectContents.add(child);
}
object.add(objectContents);
InlineLabel placeholder = new InlineLabel(indentation(depth + 1) + PLACEHOLDER_TEXT);
ClickHandler collapsingHandler = new Collapser(objectContents, placeholder, titleLabel);
placeholder.setVisible(false);
placeholder.addClickHandler(collapsingHandler);
object.add(placeholder);
titleLabel.addClickHandler(collapsingHandler);
StringBuilder closingLabelText = new StringBuilder(indentation(depth)).append(closeGroup);
if (hasSeparator) {
closingLabelText.append(SEPARATOR_TEXT);
}
object.add(new Label(closingLabelText.toString()));
return object;
}
示例5: 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);
}
示例6: 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$
}