use of com.google.gwt.user.client.ui.Widget in project gerrit by GerritCodeReview.
the class History method autoOpen.
private void autoOpen(Timestamp lastReply) {
if (lastReply == null) {
for (Widget child : getChildren()) {
((Message) child).autoOpen();
}
} else {
for (int i = getChildren().size() - 1; i >= 0; i--) {
Message ui = (Message) getChildren().get(i);
MessageInfo msg = ui.getMessageInfo();
if (lastReply.compareTo(msg.date()) < 0) {
ui.autoOpen();
} else {
break;
}
}
}
}
use of com.google.gwt.user.client.ui.Widget in project GwtMobile by dennisjzh.
the class CheckBoxGroup method onDragStart.
@Override
public void onDragStart(DragEvent e) {
_pressed = Utils.getTargetItemIndex(getElement(), e.getNativeEvent().getEventTarget());
if (_pressed >= 0) {
Widget item = getWidget(_pressed);
item.addStyleName("Pressed");
}
}
use of com.google.gwt.user.client.ui.Widget in project GwtMobile by dennisjzh.
the class ListItem method setShowArrow.
public void setShowArrow(boolean show) {
_showArrow = show ? ShowArrow.True : ShowArrow.False;
int last = getWidgetCount() - 1;
if (last >= 0) {
Widget widget = getWidget(last);
if (widget.getClass().toString().endsWith(".Chevron")) {
if (!show) {
remove(last);
}
} else {
if (show) {
add(new ListPanel.Chevron());
}
}
}
}
use of com.google.gwt.user.client.ui.Widget in project che by eclipse.
the class PerspectiveViewImpl method onResize.
/** {@inheritDoc} */
@Override
public void onResize() {
editorPanel.onResize();
super.onResize();
Widget widget = infoPanel.getWidget();
if (widget instanceof RequiresResize) {
((RequiresResize) widget).onResize();
}
int width = getOffsetWidth();
int height = getOffsetHeight();
if (delegate != null) {
delegate.onResize(width, height);
}
}
use of com.google.gwt.user.client.ui.Widget in project che by eclipse.
the class NotificationPopup method update.
/**
* Update notification's widget values.
* <p/>
* Widget consumes:
* <ul>
* <li>{@link Notification#title}</li>
* <li>{@link Notification#content}</li>
* <li>Icon and background color based on {@link Status}</li>
* </ul>
*/
private void update() {
Widget titleWidget = titlePanel.getWidget();
if (titleWidget != null && titleWidget instanceof Label) {
((Label) titleWidget).setText(notification.getTitle());
titleWidget.setTitle(notification.getTitle());
}
Widget messageWidget = messagePanel.getWidget();
if (messageWidget != null && messageWidget instanceof Label) {
((Label) messageWidget).setText(notification.getContent());
}
iconPanel.setWidget(getIconBaseOnStatus());
removeStyleName(resources.notificationCss().notificationStatusProgress());
removeStyleName(resources.notificationCss().notificationStatusSuccess());
removeStyleName(resources.notificationCss().notificationStatusFail());
removeStyleName(resources.notificationCss().notificationStatusWarning());
DisplayMode displayMode = notification.getDisplayMode();
Status status = notification.getStatus();
switch(status) {
case PROGRESS:
setStyleName(resources.notificationCss().notificationStatusProgress(), true);
break;
case SUCCESS:
setStyleName(resources.notificationCss().notificationStatusSuccess(), true);
break;
case FAIL:
setStyleName(resources.notificationCss().notificationStatusFail(), true);
break;
case WARNING:
setStyleName(resources.notificationCss().notificationStatusWarning(), true);
break;
}
if (FLOAT_MODE == displayMode && PROGRESS == status) {
hideTimer.cancel();
return;
}
hideTimer.schedule(DEFAULT_TIME);
}
Aggregations