本文整理匯總了Java中com.google.gwt.user.client.ui.Anchor.setTitle方法的典型用法代碼示例。如果您正苦於以下問題:Java Anchor.setTitle方法的具體用法?Java Anchor.setTitle怎麽用?Java Anchor.setTitle使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類com.google.gwt.user.client.ui.Anchor
的用法示例。
在下文中一共展示了Anchor.setTitle方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: UniTimeDialogBox
import com.google.gwt.user.client.ui.Anchor; //導入方法依賴的package包/類
public UniTimeDialogBox(boolean autoHide, boolean modal) {
super(autoHide, modal);
setAnimationEnabled(true);
setGlassEnabled(true);
iContainer = new FlowPanel();
iContainer.addStyleName("dialogContainer");
iClose = new Anchor();
iClose.setTitle(MESSAGES.hintCloseDialog());
iClose.setStyleName("close");
iClose.addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
onCloseClick(event);
}
});
iClose.setVisible(autoHide);
iControls = new FlowPanel();
iControls.setStyleName("dialogControls");
iControls.add(iClose);
}
示例2: build
import com.google.gwt.user.client.ui.Anchor; //導入方法依賴的package包/類
/**
* Build the Anchor with target="_blank"
*
* @return Anchor
*/
public Anchor build() {
final Anchor anchor = new Anchor();
if (image != null) {
anchor.getElement().appendChild(image.getElement());
}
if (text != null) {
anchor.setText(text);
}
if (title != null) {
anchor.setTitle(title);
}
if (bottomBorderOnMouseOver) {
anchor.addMouseOverHandler(getMouseOverhandler(anchor));
anchor.addMouseOutHandler(getMouseOutHandler(anchor));
}
anchor.setHref(href);
anchor.setTarget("_blank");
return anchor;
}
示例3: buildClick
import com.google.gwt.user.client.ui.Anchor; //導入方法依賴的package包/類
public Anchor buildClick() {
Anchor anchor = new Anchor();
if (image != null) {
anchor.getElement().appendChild(image.getElement());
}
if (text != null) {
anchor.setText(text);
}
if (title != null) {
anchor.setTitle(title);
}
if (clickHandler != null) {
anchor.addClickHandler(clickHandler);
}
return anchor;
}
示例4: InstructorCell
import com.google.gwt.user.client.ui.Anchor; //導入方法依賴的package包/類
public InstructorCell(ArrayList<String> names, ArrayList<String> emails, String separator) {
super(null, separator);
if (names != null && !names.isEmpty()) {
separator = separator.replace(" ", " ");
for (int i = 0; i < names.size(); i++) {
String text = names.get(i) + (i + 1 < names.size() ? separator : "");
String email = (emails != null && i < emails.size() ? emails.get(i) : null);
if (email != null && !email.isEmpty()) {
iText += text;
HorizontalPanel p = new HorizontalPanel();
p.setStyleName("instructor");
Anchor a = new Anchor();
a.setHref("mailto:" + email);
a.setHTML(new Image(RESOURCES.email()).getElement().getString());
a.setTitle(MESSAGES.sendEmail(names.get(i)));
a.setStyleName("unitime-SimpleLink");
a.addClickHandler(new ClickHandler() {
public void onClick(ClickEvent event) {
event.stopPropagation();
}
});
p.add(a);
p.setCellVerticalAlignment(a, HasVerticalAlignment.ALIGN_MIDDLE);
HTML h = new HTML(text, false);
h.getElement().getStyle().setMarginLeft(2, Unit.PX);
p.add(h);
iPanel.add(p);
iContent.add(h);
} else
add(text);
}
} else {
add(" ");
}
}
示例5: refreshProposedQueryRow
import com.google.gwt.user.client.ui.Anchor; //導入方法依賴的package包/類
/**
* Refresh proposed query row
*
* @param propose
*/
private void refreshProposedQueryRow(final GWTProposedQueryReceived propose, int row) {
boolean seen = (propose.getSeenDate() == null);
// Sets folder object
data.put(new Integer(dataTable.getHTML(row, 5)), propose);
if (propose.isAccepted()) {
dataTable.setWidget(row, 0, new Image(OKMBundleResources.INSTANCE.yes()));
} else {
dataTable.setHTML(row, 0, "");
}
dataTable.setHTML(row, 1, UtilComunicator.getTextAsBoldHTML(propose.getFrom(), seen));
String queryType = "";
if (!propose.getParams().isDashboard()) {
queryType = GeneralComunicator.i18nExtension("messaging.message.type.propose.query");
} else {
queryType = GeneralComunicator.i18nExtension("messaging.message.type.propose.user.query");
}
dataTable.setHTML(row, 2, UtilComunicator.getTextAsBoldHTML(queryType, seen));
DateTimeFormat dtf = DateTimeFormat.getFormat(GeneralComunicator.i18nExtension("general.date.pattern"));
dataTable.setHTML(row, 3, UtilComunicator.getTextAsBoldHTML(dtf.format(propose.getSentDate()), seen));
Anchor anchor = new Anchor();
String queryName = propose.getParams().getQueryName();
anchor.setHTML(UtilComunicator.getTextAsBoldHTML(queryName, seen));
anchor.setTitle(queryName);
anchor.addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent arg0) {
WorkspaceComunicator.changeSelectedTab(UIDockPanelConstants.SEARCH);
SearchComunicator.setSavedSearch(propose.getParams());
}
});
anchor.setStyleName("okm-KeyMap-ImageHover");
dataTable.setWidget(row, 4, anchor);
}
示例6: createLinkForOpenGoogleAccount
import com.google.gwt.user.client.ui.Anchor; //導入方法依賴的package包/類
/**
* Creates and returns a link with the text being the specified google account and which when clicked
* opens the complete file stats of the specified account.
* @param googleAccount google account to create a link for
* @return the created new link
*/
public static Anchor createLinkForOpenGoogleAccount( final String googleAccount ) {
final Anchor googleAccountAnchor = new Anchor( googleAccount );
googleAccountAnchor.setTitle( OPEN_GOOGLE_ACCOUNT_CLICK_HANDLER.toString() );
googleAccountAnchor.addClickHandler( OPEN_GOOGLE_ACCOUNT_CLICK_HANDLER );
return googleAccountAnchor;
}
示例7: createLinkForOpenGoogleAccount
import com.google.gwt.user.client.ui.Anchor; //導入方法依賴的package包/類
/**
* Creates and returns a link with the text being the specified google account and which when clicked
* opens the complete API call stats of the specified account.
* @param googleAccount google account to create a link for
* @return the created new link
*/
public static Anchor createLinkForOpenGoogleAccount( final String googleAccount ) {
final Anchor googleAccountAnchor = new Anchor( googleAccount );
googleAccountAnchor.setTitle( OPEN_GOOGLE_ACCOUNT_CLICK_HANDLER.toString() );
googleAccountAnchor.addClickHandler( OPEN_GOOGLE_ACCOUNT_CLICK_HANDLER );
return googleAccountAnchor;
}
示例8: EntityLabel
import com.google.gwt.user.client.ui.Anchor; //導入方法依賴的package包/類
public EntityLabel( String str ) {
p.setWidth( "1%" );
Label label = new Label( str );
Anchor a = new Anchor( "-" );
a.setTitle( "Remove " + str );
p.add( label );
p.add( a );
}
示例9: populate
import com.google.gwt.user.client.ui.Anchor; //導入方法依賴的package包/類
void populate(int row, GroupInfo i) {
final FlexCellFormatter fmt = table.getFlexCellFormatter();
AccountGroup.UUID uuid = i.getGroupUUID();
CheckBox checkBox = new CheckBox();
table.setWidget(row, 1, checkBox);
checkBox.setEnabled(enabled);
if (AccountGroup.isInternalGroup(uuid)) {
table.setWidget(row, 2, new Hyperlink(i.name(), Dispatcher.toGroup(uuid)));
fmt.getElement(row, 2).setTitle(null);
table.setText(row, 3, i.description());
} else if (i.url() != null) {
Anchor a = new Anchor();
a.setText(i.name());
a.setHref(i.url());
a.setTitle("UUID " + uuid.get());
table.setWidget(row, 2, a);
fmt.getElement(row, 2).setTitle(null);
} else {
table.setText(row, 2, i.name());
fmt.getElement(row, 2).setTitle("UUID " + uuid.get());
}
fmt.addStyleName(row, 1, Gerrit.RESOURCES.css().iconCell());
fmt.addStyleName(row, 2, Gerrit.RESOURCES.css().dataCell());
fmt.addStyleName(row, 3, Gerrit.RESOURCES.css().dataCell());
setRowItem(row, i);
}
示例10: createEditIcon
import com.google.gwt.user.client.ui.Anchor; //導入方法依賴的package包/類
private Widget createEditIcon() {
PatchSet.Id id =
idActive.isBaseOrAutoMerge() ? other.idActive.asPatchSetId() : idActive.asPatchSetId();
Anchor anchor =
new Anchor(
new ImageResourceRenderer().render(Gerrit.RESOURCES.edit()),
"#" + Dispatcher.toEditScreen(project, id, path));
anchor.setTitle(PatchUtil.C.edit());
return anchor;
}
示例11: createDownloadLink
import com.google.gwt.user.client.ui.Anchor; //導入方法依賴的package包/類
private Anchor createDownloadLink() {
DiffObject diffObject = idActive.isBaseOrAutoMerge() ? other.idActive : idActive;
String sideURL = idActive.isBaseOrAutoMerge() ? "1" : "0";
String base = GWT.getHostPageBaseURL() + "cat/";
Anchor anchor =
new Anchor(
new ImageResourceRenderer().render(Gerrit.RESOURCES.downloadIcon()),
base + KeyUtil.encode(diffObject.asPatchSetId() + "," + path) + "^" + sideURL);
anchor.setTitle(PatchUtil.C.download());
return anchor;
}
示例12: createDownloadImage
import com.google.gwt.user.client.ui.Anchor; //導入方法依賴的package包/類
private void createDownloadImage() {
if(selection==null){
return;
}
downloadArea.clear();
String type=exportImageType.getValue().toLowerCase();
String mime="image/"+type;
String extension=type.equals("jpeg")?"jpg":type;
blob=Blob.createBase64Blob(canvas.toDataUrl(mime),mime);//for IE keep blob
Anchor a=null;
if(GWTUtils.isIE()){
a=HTML5Download.get().generateDownloadLink(blob, mime,"gridPaint."+extension, textConstants.RightClickAndSaveAs(),false);
a.setTitle("to download right mouse button to show contextmenu and select save as by yourself");
}else{
//TODO support ios
a=HTML5Download.get().generateDownloadLink(blob, "image/"+mime,"gridPaint."+extension, textConstants.Download_Image(),true);
}
a.setStylePrimaryName("bt");
downloadArea.add(a);
gifUrl="";//clear
}
示例13: addProposedSubscriptionReceivedRow
import com.google.gwt.user.client.ui.Anchor; //導入方法依賴的package包/類
/**
* Adding proposed subscription received row
*
* @param propose
*/
private void addProposedSubscriptionReceivedRow(final GWTProposedSubscriptionReceived propose) {
int rows = dataTable.getRowCount();
boolean seen = (propose.getSeenDate() == null);
dataTable.insertRow(rows);
// Sets folder object
data.put(new Integer(dataIndexValue), propose);
if (propose.isAccepted()) {
dataTable.setWidget(rows, 0, new Image(OKMBundleResources.INSTANCE.yes()));
} else {
dataTable.setHTML(rows, 0, "");
}
dataTable.setHTML(rows, 1, UtilComunicator.getTextAsBoldHTML(propose.getFrom(), seen));
String docType = "";
if (propose.getType().equals(GWTFolder.TYPE)) {
docType = GeneralComunicator.i18nExtension("messaging.message.type.propose.folder");
} else {
docType = GeneralComunicator.i18nExtension("messaging.message.type.propose.document");
}
dataTable.setHTML(rows, 2, UtilComunicator.getTextAsBoldHTML(docType, seen));
DateTimeFormat dtf = DateTimeFormat.getFormat(GeneralComunicator.i18nExtension("general.date.pattern"));
dataTable.setHTML(rows, 3, UtilComunicator.getTextAsBoldHTML(dtf.format(propose.getSentDate()), seen));
Anchor anchor = new Anchor();
String path = propose.getPath().substring(propose.getPath().lastIndexOf("/") + 1);
anchor.setHTML(UtilComunicator.getTextAsBoldHTML(path, seen));
anchor.setTitle(propose.getPath());
anchor.addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent arg0) {
if (propose.getType().equals(GWTFolder.TYPE)) {
GeneralComunicator.openPath(propose.getPath(), null);
} else if (propose.getType().equals(GWTDocument.TYPE)) {
String fldPath = propose.getPath().substring(0, propose.getPath().lastIndexOf("/"));
GeneralComunicator.openPath(fldPath, propose.getPath());
}
}
});
anchor.setStyleName("okm-KeyMap-ImageHover");
dataTable.setWidget(rows, 4, anchor);
dataTable.setHTML(rows, 5, "" + (dataIndexValue++));
// Format
dataTable.getCellFormatter().setHorizontalAlignment(rows, 0, HasHorizontalAlignment.ALIGN_CENTER);
dataTable.getCellFormatter().setHorizontalAlignment(rows, 1, HasHorizontalAlignment.ALIGN_LEFT);
dataTable.getCellFormatter().setHorizontalAlignment(rows, 2, HasHorizontalAlignment.ALIGN_LEFT);
dataTable.getCellFormatter().setHorizontalAlignment(rows, 3, HasHorizontalAlignment.ALIGN_CENTER);
dataTable.getCellFormatter().setHorizontalAlignment(rows, 4, HasHorizontalAlignment.ALIGN_LEFT);
dataTable.getCellFormatter().setVisible(rows, 5, false);
for (int i = 0; i < 5; i++) {
dataTable.getCellFormatter().addStyleName(rows, i, "okm-DisableSelect");
}
}
示例14: addProposedSubscriptionSentRow
import com.google.gwt.user.client.ui.Anchor; //導入方法依賴的package包/類
/**
* Adding proposed subscription sent row
*
* @param propose
*/
private void addProposedSubscriptionSentRow(final GWTProposedSubscriptionSent propose) {
int rows = dataTable.getRowCount();
dataTable.insertRow(rows);
// Sets folder object
data.put(new Integer(dataIndexValue), propose);
dataTable.setHTML(rows, 0, "");
dataTable.setHTML(rows, 1, propose.getFrom());
String docType = "";
if (propose.getType().equals(GWTFolder.TYPE)) {
docType = GeneralComunicator.i18nExtension("messaging.message.type.propose.folder");
} else {
docType = GeneralComunicator.i18nExtension("messaging.message.type.propose.document");
}
dataTable.setHTML(rows, 2, docType);
DateTimeFormat dtf = DateTimeFormat.getFormat(GeneralComunicator.i18nExtension("general.date.pattern"));
dataTable.setHTML(rows, 3, dtf.format(propose.getSentDate()));
Anchor anchor = new Anchor();
String path = propose.getPath().substring(propose.getPath().lastIndexOf("/") + 1);
anchor.setHTML(path);
anchor.setTitle(propose.getPath());
anchor.addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent arg0) {
if (propose.getType().equals(GWTFolder.TYPE)) {
GeneralComunicator.openPath(propose.getPath(), null);
} else if (propose.getType().equals(GWTDocument.TYPE)) {
String fldPath = propose.getPath().substring(0, propose.getPath().lastIndexOf("/"));
GeneralComunicator.openPath(fldPath, propose.getPath());
}
}
});
anchor.setStyleName("okm-KeyMap-ImageHover");
dataTable.setWidget(rows, 4, anchor);
dataTable.setHTML(rows, 5, "" + (dataIndexValue++));
// Format
dataTable.getCellFormatter().setHorizontalAlignment(rows, 0, HasHorizontalAlignment.ALIGN_CENTER);
dataTable.getCellFormatter().setHorizontalAlignment(rows, 1, HasHorizontalAlignment.ALIGN_LEFT);
dataTable.getCellFormatter().setHorizontalAlignment(rows, 2, HasHorizontalAlignment.ALIGN_LEFT);
dataTable.getCellFormatter().setHorizontalAlignment(rows, 3, HasHorizontalAlignment.ALIGN_CENTER);
dataTable.getCellFormatter().setHorizontalAlignment(rows, 4, HasHorizontalAlignment.ALIGN_LEFT);
dataTable.getCellFormatter().setVisible(rows, 5, false);
for (int i = 0; i < 5; i++) {
dataTable.getCellFormatter().addStyleName(rows, i, "okm-DisableSelect");
}
}
示例15: refreshProposedSubscriptionRow
import com.google.gwt.user.client.ui.Anchor; //導入方法依賴的package包/類
/**
* Refresh proposed subscription row
*
* @param propose
*/
private void refreshProposedSubscriptionRow(final GWTProposedSubscriptionReceived propose, int row) {
boolean seen = (propose.getSeenDate() == null);
// Sets folder object
data.put(new Integer(dataTable.getHTML(row, 5)), propose);
if (propose.isAccepted()) {
dataTable.setWidget(row, 0, new Image(OKMBundleResources.INSTANCE.yes()));
} else {
dataTable.setHTML(row, 0, "");
}
dataTable.setHTML(row, 1, UtilComunicator.getTextAsBoldHTML(propose.getFrom(), seen));
String docType = "";
if (propose.getType().equals(GWTFolder.TYPE)) {
docType = GeneralComunicator.i18nExtension("messaging.message.type.propose.folder");
} else {
docType = GeneralComunicator.i18nExtension("messaging.message.type.propose.document");
}
dataTable.setHTML(row, 2, UtilComunicator.getTextAsBoldHTML(docType, seen));
DateTimeFormat dtf = DateTimeFormat.getFormat(GeneralComunicator.i18nExtension("general.date.pattern"));
dataTable.setHTML(row, 3, UtilComunicator.getTextAsBoldHTML(dtf.format(propose.getSentDate()), seen));
Anchor anchor = new Anchor();
String path = propose.getPath().substring(propose.getPath().lastIndexOf("/") + 1);
anchor.setHTML(UtilComunicator.getTextAsBoldHTML(path, seen));
anchor.setTitle(propose.getPath());
anchor.addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent arg0) {
if (propose.getType().equals(GWTFolder.TYPE)) {
GeneralComunicator.openPath(propose.getPath(), null);
} else if (propose.getType().equals(GWTDocument.TYPE)) {
String fldPath = propose.getPath().substring(0, propose.getPath().lastIndexOf("/"));
GeneralComunicator.openPath(fldPath, propose.getPath());
}
}
});
anchor.setStyleName("okm-KeyMap-ImageHover");
dataTable.setWidget(row, 4, anchor);
}