// workaround for chrome bug // see: http://code.google.com/p/mgwt/issues/detail?id=164 public static void maybeUpdateScroller(ScrollPanel scrollPanel) { // no impact on production // this compiles out! if (!MGWT.getOsDetection().isDesktop()) return; if (isChrome) { scrollPanel.setUsePos(true); } }
public CalloutViewGwtImpl() { pullToRefresh = new PullPanel(); pullArrowHeader = new PullArrowHeader(); pullToRefresh.setHeader(pullArrowHeader); initWidget(uiBinder.createAndBindUi(this)); if (MGWT.getOsDetection().isAndroid()) { leftFlexSpacer.setVisible(false); } }
public ProjectListViewImpl() { initWidget(uiBinder.createAndBindUi(this)); this.back.setVisible(!MGWT.getOsDetection().isAndroid()); }
public FerriesRouteDeparturesViewGwtImpl() { pullToRefresh = new PullPanel(); pullArrowHeader = new PullArrowHeader(); pullToRefresh.setHeader(pullArrowHeader); daysOfWeek = new MListBox(); handleOnLoad(); cellList = new CellList<FerriesScheduleTimesItem>( new FerriesRouteDeparturesCell<FerriesScheduleTimesItem>() { @Override public String getDeparting(FerriesScheduleTimesItem model) { Date departingTime = new Date(Long.parseLong(model.getDepartingTime())); return dateFormat.format(departingTime, usPacific); } @Override public String getArriving(FerriesScheduleTimesItem model) { if (!model.getArrivingTime().equals("N/A")) { Date arrivingTime = new Date(Long.parseLong(model.getArrivingTime())); return dateFormat.format(arrivingTime, usPacific); } else { return ""; } } @Override public SafeHtml getAnnotation(FerriesScheduleTimesItem model) { if (model.getAnnotations() != null) { return SafeHtmlUtils.fromTrustedString(model.getAnnotations()); } else { return SafeHtmlUtils.fromString(""); } } @Override public boolean canBeSelected(FerriesScheduleTimesItem model) { return false; } @Override public String getDriveUpSpaces(FerriesScheduleTimesItem model) { return String.valueOf(model.getDriveUpSpaceCount()); } @Override public String getMaxSpaceCount(FerriesScheduleTimesItem model) { return String.valueOf(model.getMaxSpaceCount()); } @Override public String getLastUpdated(FerriesScheduleTimesItem model) { if (model.getLastUpdated() != null) { return ParserUtils.relativeTime( model.getLastUpdated(), "MMMM d, yyyy h:mm a", false); } else { return ""; } } }); cameraCellList = new CellList<CameraItem>( new CameraCell<CameraItem>() { @Override public String getUrl(CameraItem model) { return model.getImageUrl(); } @Override public boolean canBeSelected(CameraItem model) { return true; } }); initWidget(uiBinder.createAndBindUi(this)); accessibilityPrepare(); if (MGWT.getOsDetection().isAndroid()) { leftFlexSpacer.setVisible(false); cameraScrollPanel.setBounce(false); } }