本文整理汇总了Java中com.google.gwt.dom.client.Style.WhiteSpace类的典型用法代码示例。如果您正苦于以下问题:Java WhiteSpace类的具体用法?Java WhiteSpace怎么用?Java WhiteSpace使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
WhiteSpace类属于com.google.gwt.dom.client.Style包,在下文中一共展示了WhiteSpace类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: TextBoxWithPopupEditorFw
import com.google.gwt.dom.client.Style.WhiteSpace; //导入依赖的package包/类
public TextBoxWithPopupEditorFw(FDesc fielddescriptor, WidgetRDesc wrDesc) {
super(fielddescriptor);
panel.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE);
textBox = new TextBox();
updateWidth(wrDesc);
panel.add(textBox);
panel.add(showPopupLabel);
initWidget(panel);
showPopupLabel.getElement().getStyle().setCursor(Cursor.POINTER);
showPopupLabel.getElement().getStyle().setTextDecoration(TextDecoration.UNDERLINE);
showPopupLabel.getElement().getStyle().setMarginLeft(6, Unit.PX);
showPopupLabel.getElement().getStyle().setWhiteSpace(WhiteSpace.NOWRAP);
showPopupLabel.addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
showPopup();
}
});
}
开发者ID:inepex,项目名称:ineform,代码行数:23,代码来源:TextBoxWithPopupEditorFw.java
示例2: updateTableRow
import com.google.gwt.dom.client.Style.WhiteSpace; //导入依赖的package包/类
private void updateTableRow(final PlayerErrorInfo item, int row) {
bodyFlexTable.setText(row, 0, item.getTimestamp());
bodyFlexTable.getFlexTable().getCellFormatter().getElement(row, 0).getStyle().setVerticalAlign(VerticalAlign.TOP);
bodyFlexTable.getFlexTable().getCellFormatter().getElement(row, 0).getStyle().setLineHeight(16, Unit.PX);
String errorString =
// Integer.toString(item.getStatusCode()) + " - " +
item.getErrorMessage();
if (item.getStatusCode() != 0 && (errorRow == -1 || (item.getStatusCode() == 1 && row == 0))) {
errorString += " Click <a href='" + item.getHelpLink() + "' target='_blank'>here</a> for details on this error.";
}
bodyFlexTable.setHTML(row, 1, errorString);
// if (errorRow == -1 || (item.getStatusCode() == 1 && row == 0)) {
// bodyFlexTable.getFlexTable().getCellFormatter().getElement(row, 1).getStyle().setColor("red");
// }
bodyFlexTable.getFlexTable().getCellFormatter().getElement(row, 1).getStyle().setWhiteSpace(WhiteSpace.NORMAL);
bodyFlexTable.getFlexTable().getCellFormatter().getElement(row, 1).getStyle().setLineHeight(16, Unit.PX);
}
开发者ID:Rise-Vision,项目名称:rva,代码行数:21,代码来源:PlayerErrorListWidget.java
示例3: populate
import com.google.gwt.dom.client.Style.WhiteSpace; //导入依赖的package包/类
private void populate(GwtRpcResponseList<ChangeLogInterface> logs) {
List<UniTimeTableHeader> header = new ArrayList<UniTimeTableHeader>();
header.add(new UniTimeTableHeader(MESSAGES.colDate(), clickHandler(0)));
header.add(new UniTimeTableHeader(MESSAGES.colAcademicSession(), clickHandler(1)));
header.add(new UniTimeTableHeader(MESSAGES.colManager(), clickHandler(2)));
header.add(new UniTimeTableHeader(MESSAGES.colNote(), clickHandler(3)));
iChanges.addRow(null, header);
for (ChangeLogInterface log: logs) {
List<Widget> line = new ArrayList<Widget>();
line.add(new Label(sDateFormat.format(log.getDate()), false));
line.add(new Label(log.getSession(), false));
line.add(new HTML(log.getManager() == null ? "<i>" + MESSAGES.notApplicable() + "</i>" : log.getManager(), false));
HTML note = new HTML(log.getObject() == null || log.getObject().isEmpty() || "-".equals(log.getObject()) ? "<i>" + MESSAGES.emptyNote() + "</i>" : log.getObject());
note.getElement().getStyle().setWhiteSpace(WhiteSpace.PRE_WRAP);
line.add(note);
iChanges.addRow(log, line);
iChanges.getRowFormatter().setVerticalAlign(iChanges.getRowCount() - 1, HasVerticalAlignment.ALIGN_TOP);
}
if (LastChangesCookie.getInstance().getSortColumn() >= 0) {
iChanges.sort((UniTimeTableHeader)null, comparator(LastChangesCookie.getInstance().getSortColumn(), LastChangesCookie.getInstance().getSortOrder()));
header.get(LastChangesCookie.getInstance().getSortColumn()).setOrder(LastChangesCookie.getInstance().getSortOrder());
}
iChanges.setColumnVisible(1, iMultiSessionToggle.getValue());
}
开发者ID:Jenner4S,项目名称:unitimes,代码行数:31,代码来源:RoomNoteChanges.java
示例4: Meeting
import com.google.gwt.dom.client.Style.WhiteSpace; //导入依赖的package包/类
private Meeting(TimetableGridCell cell, boolean showRoom, boolean showInstructor, boolean showTime, boolean showPreference, boolean showDate) {
super();
iCell = cell;
setStyleName("meeting");
if (cell.hasBackground())
getElement().getStyle().setBackgroundColor(cell.getBackground());
P header = new P("header", "label");
header.setHeight(sLineHeight * cell.getNrNames());
header.setHTML(cell.getName("<br>"));
header.getElement().getStyle().setWhiteSpace(WhiteSpace.NOWRAP);
if (cell.isItalics())
header.getElement().getStyle().setFontStyle(FontStyle.ITALIC);
add(header);
P footer = new P("footer");
String notes = "";
if (showTime && cell.hasTime()) notes += (notes.isEmpty() ? "" : "<br>") + cell.getTime();
if (showDate && cell.hasDate()) notes += (notes.isEmpty() ? "" : "<br>") + cell.getDate();
if (showRoom && cell.getNrRooms() > 0) notes += (notes.isEmpty() ? "" : "<br>") + cell.getRoom("<br>");
if (showInstructor && cell.getNrInstructors() > 0) notes += (notes.isEmpty() ? "" : "<br>") + cell.getInstructor("<br>");
if (showPreference && cell.hasPreference()) notes += (notes.isEmpty() ? "" : "<br>") + "<span style='color:rgb(200,200,200)'>" + cell.getPreference() + "</span>";
footer.setHTML(notes);
footer.getElement().getStyle().setWhiteSpace(WhiteSpace.NOWRAP);
add(footer);
sinkEvents(Event.ONCLICK);
sinkEvents(Event.ONMOUSEOVER);
sinkEvents(Event.ONMOUSEOUT);
getElement().getStyle().setPosition(Position.ABSOLUTE);
}
开发者ID:Jenner4S,项目名称:unitimes,代码行数:34,代码来源:TimetableGrid.java
示例5: MessageDialog
import com.google.gwt.dom.client.Style.WhiteSpace; //导入依赖的package包/类
/**
* Instantiates a new MessageDialog.
*/
public MessageDialog(Listener listener, AlertPanel.Type type, String title, String message) {
super(false, true);
setTitle(title);
this.listener = listener;
VerticalPanel dialogContents = new VerticalPanel();
dialogContents.setSpacing(4);
setWidget(dialogContents);
AlertPanel messageLabel = new AlertPanel(type);
messageLabel.getElement().getStyle().setWhiteSpace(WhiteSpace.PRE_WRAP);
messageLabel.getElement().getStyle().setProperty("maxHeight", "400px");
messageLabel.getElement().getStyle()
.setProperty("maxWidth", Window.getClientWidth() * 2 / 3 + "px");
messageLabel.getElement().getStyle().setOverflowY(Overflow.AUTO);
messageLabel.setMessage(message);
dialogContents.add(messageLabel);
okButton = new Button(Utils.constants.ok(), new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
hide();
}
});
addButton(okButton);
this.addCloseHandler(new CloseHandler<PopupPanel>() {
@Override
public void onClose(CloseEvent<PopupPanel> event) {
if (MessageDialog.this.listener != null) {
MessageDialog.this.listener.onOk();
}
}
});
}
开发者ID:kaaproject,项目名称:kaa,代码行数:40,代码来源:MessageDialog.java
示例6: getWordWrap
import com.google.gwt.dom.client.Style.WhiteSpace; //导入依赖的package包/类
@Override
public boolean getWordWrap() {
return !WhiteSpace.NOWRAP.getCssName().equals(getElement().getStyle().getWhiteSpace());
}
开发者ID:GwtMaterialDesign,项目名称:gwt-material,代码行数:5,代码来源:BaseCheckBox.java
示例7: setWordWrap
import com.google.gwt.dom.client.Style.WhiteSpace; //导入依赖的package包/类
@Override
public void setWordWrap(boolean wrap) {
getElement().getStyle().setWhiteSpace(wrap ? WhiteSpace.NORMAL : WhiteSpace.NOWRAP);
}
开发者ID:GwtMaterialDesign,项目名称:gwt-material,代码行数:5,代码来源:BaseCheckBox.java
注:本文中的com.google.gwt.dom.client.Style.WhiteSpace类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论