当前位置: 首页>>代码示例>>Java>>正文


Java FlowPanel类代码示例

本文整理汇总了Java中com.google.gwt.user.client.ui.FlowPanel的典型用法代码示例。如果您正苦于以下问题:Java FlowPanel类的具体用法?Java FlowPanel怎么用?Java FlowPanel使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


FlowPanel类属于com.google.gwt.user.client.ui包,在下文中一共展示了FlowPanel类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: UniTimeDialogBox

import com.google.gwt.user.client.ui.FlowPanel; //导入依赖的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);
  }
 
开发者ID:Jenner4S,项目名称:unitimes,代码行数:25,代码来源:UniTimeDialogBox.java

示例2: setPageViewCarrier

import com.google.gwt.user.client.ui.FlowPanel; //导入依赖的package包/类
@Override
public void setPageViewCarrier(PageViewCarrier pageViewCarrier) {
    view.getTitlePanel().clear();
    view.getTitlePanel().add(pageViewCarrier.getPageTitle());
    if (pageViewCarrier.hasContent()) {
        Panel contentPanel = new FlowPanel();

        if (pageViewCarrier.pageType == PageType.ERROR) {
            contentPanel.setStyleName(styleNames.QP_PAGE_ERROR());
            Label errorLabel = new Label(pageViewCarrier.errorMessage);
            errorLabel.setStyleName(styleNames.QP_PAGE_ERROR_TEXT());
            contentPanel.add(errorLabel);
        }

        view.getItemsPanel().clear();
        view.getItemsPanel().add(contentPanel);
    }
}
 
开发者ID:YoungDigitalPlanet,项目名称:empiria.player,代码行数:19,代码来源:PageViewSocketImpl.java

示例3: SimpleNonVisibleComponentsPanel

import com.google.gwt.user.client.ui.FlowPanel; //导入依赖的package包/类
/**
 * Creates new component design panel for non-visible components.
 */
public SimpleNonVisibleComponentsPanel() {
  // Initialize UI
  VerticalPanel panel = new VerticalPanel();
  panel.setHorizontalAlignment(VerticalPanel.ALIGN_CENTER);

  heading = new Label("");
  heading.setStyleName("ya-NonVisibleComponentsHeader");
  panel.add(heading);

  componentsPanel = new FlowPanel();
  componentsPanel.setStyleName("ode-SimpleUiDesignerNonVisibleComponents");
  panel.add(componentsPanel);

  initWidget(panel);
}
 
开发者ID:mit-cml,项目名称:appinventor-extensions,代码行数:19,代码来源:SimpleNonVisibleComponentsPanel.java

示例4: appendEmbeddedImage

import com.google.gwt.user.client.ui.FlowPanel; //导入依赖的package包/类
public final ItemHandle appendEmbeddedImage(
     HAlignment imageAlignment,
     String embeddedImageText,
     String embeddedImageStyle,
     String description
) {
   FlowPanel outer = new FlowPanel(DivElement.TAG);
   String imageAlignment1 = "text-align:center;";
   if (imageAlignment == HAlignment.LEFT) {
      imageAlignment1 = "text-align:left;";
   } else if (imageAlignment == HAlignment.RIGHT) {
      imageAlignment1 = "text-align:right;";
   }
   outer.getElement().setAttribute("style", "display:block;" + imageAlignment1);
   FlowPanel inner = new FlowPanel(ImageElement.TAG);
   inner.getElement().setAttribute("alt",   description);
   inner.getElement().setAttribute("src",   embeddedImageText);
   inner.getElement().setAttribute("style", embeddedImageStyle);
   outer.add(inner);
   appendAndScrollOrFocusAsAppropriate(outer);
   return new ItemHandle(this, outer);
}
 
开发者ID:ainslec,项目名称:gwt-promptly,代码行数:23,代码来源:PromptlyPanel.java

示例5: getElement

import com.google.gwt.user.client.ui.FlowPanel; //导入依赖的package包/类
@Override
protected KeyValue<FlowPanel, FlowPanel> getElement(Integer index) {
    parent = panelFactory.getFlowPanel();
    FlowPanel childPanel = panelFactory.getFlowPanel();

    Style style = parent.getElement().getStyle();
    parent.getElement().setId(styleNames.QP_PAGE() + index.intValue());

    if (swipeType != SwipeType.DISABLED) {
        style.setPosition(Position.ABSOLUTE);
        style.setTop(0, Unit.PX);
        style.setLeft(WIDTH * index, Unit.PCT);
        style.setWidth(WIDTH, Unit.PCT);
    }

    childPanel.setHeight("100%");
    childPanel.setWidth("100%");
    parent.add(childPanel);
    return new KeyValue<FlowPanel, FlowPanel>(parent, childPanel);
}
 
开发者ID:YoungDigitalPlanet,项目名称:empiria.player,代码行数:21,代码来源:PanelCache.java

示例6: shouldInitPresenter_andGenerateGaps

import com.google.gwt.user.client.ui.FlowPanel; //导入依赖的package包/类
@Test
public void shouldInitPresenter_andGenerateGaps() {
    // given;
    String script = "script";

    NodeList gaps = mock(NodeList.class);
    when(gaps.getLength()).thenReturn(1);

    Node gap = mock(Node.class);
    when(gaps.item(0)).thenReturn(gap);

    when(element.getElementsByTagName("gap")).thenReturn(gaps);
    when(element.getChildNodes().toString()).thenReturn(script);

    // when
    testObj.initModule(element, moduleSocket, bodyGenerator, eventsBus);

    // then
    verify(rootPanel).add(isA(FlowPanel.class));
    verify(bodyGenerator).processNode(eq(gap), isA(FlowPanel.class));
    verify(presenter).setMmlScript(script);
}
 
开发者ID:YoungDigitalPlanet,项目名称:empiria.player,代码行数:23,代码来源:InteractionMathJaxModuleTest.java

示例7: shouldClearPagesStyles

import com.google.gwt.user.client.ui.FlowPanel; //导入依赖的package包/类
@Test
public void shouldClearPagesStyles() {
    // given
    Collection<FlowPanel> keyPanels = Lists.newArrayList(keyPanel1, keyPanel2);

    // when
    testObj.clearPagesStyles(keyPanels);

    // then
    verify(keyPanel1).removeStyleName(UNSELECTED_STYLE);
    verify(keyPanel1).removeStyleName(PAGE_SELECTED_STYLE);
    verify(keyPanel1).removeStyleName(PREVIOUS_PAGE_STYLE);
    verify(keyPanel1).removeStyleName(NEXT_PAGE_STYLE);

    verify(keyPanel2).removeStyleName(UNSELECTED_STYLE);
    verify(keyPanel2).removeStyleName(PAGE_SELECTED_STYLE);
    verify(keyPanel2).removeStyleName(PREVIOUS_PAGE_STYLE);
    verify(keyPanel2).removeStyleName(NEXT_PAGE_STYLE);
}
 
开发者ID:YoungDigitalPlanet,项目名称:empiria.player,代码行数:20,代码来源:MultiPageControllerStyleManagerTest.java

示例8: testPageViewWithSwipeAndWithout

import com.google.gwt.user.client.ui.FlowPanel; //导入依赖的package包/类
public void testPageViewWithSwipeAndWithout() {
    PanelCache cache = PlayerGinjectorFactory.getNewPlayerGinjectorForGWTTestCase().getPanelCache();
    assertTrue(cache.isEmpty());
    KeyValue<FlowPanel, FlowPanel> value = cache.getOrCreateAndPut(0);
    Style style = value.getKey().getElement().getStyle();
    assertTrue(style.getPosition().equals(Position.ABSOLUTE.getCssName()));
    assertTrue(style.getTop().equals("0px"));
    assertEquals("0.0%", style.getLeft());
    assertEquals("100.0%", style.getWidth());
    value = cache.getOrCreateAndPut(2);
    style = value.getKey().getElement().getStyle();
    assertEquals(Position.ABSOLUTE.getCssName(), style.getPosition());
    assertEquals("0px", style.getTop());
    assertEquals("200.0%", style.getLeft());
    assertEquals("100.0%", style.getWidth());
    cache.setSwipeType(SwipeType.DISABLED);
    value = cache.getOrCreateAndPut(3);
    assertNotSame(Position.ABSOLUTE.getCssName(), style.getPosition());
    assertNotSame("0px", style.getTop());
    assertNotSame("200.0%", style.getLeft());
    assertNotSame("100.0%", style.getWidth());

}
 
开发者ID:YoungDigitalPlanet,项目名称:empiria.player,代码行数:24,代码来源:PanelCacheGWTTestCase.java

示例9: addGallerySearchTab

import com.google.gwt.user.client.ui.FlowPanel; //导入依赖的package包/类
/**
 * Creates the GUI components for search tab.
 *
 * @param searchApp: the FlowPanel that search tab will reside.
 */
private void addGallerySearchTab(FlowPanel searchApp) {
  // Add search GUI
  FlowPanel searchPanel = new FlowPanel();
  final TextBox searchText = new TextBox();
  searchText.addStyleName("gallery-search-textarea");
  Button sb = new Button(MESSAGES.gallerySearchForAppsButton());
  searchPanel.add(searchText);
  searchPanel.add(sb);
  searchPanel.addStyleName("gallery-search-panel");
  searchApp.add(searchPanel);
  appSearchContent.addStyleName("gallery-search-results");
  searchApp.add(appSearchContent);
  searchApp.addStyleName("gallery-search");

  sb.addClickHandler(new ClickHandler() {
    //  @Override
    public void onClick(ClickEvent event) {
      gallery.FindApps(searchText.getText(), 0, NUMAPPSTOSHOW, 0, true);
    }
  });
}
 
开发者ID:mit-cml,项目名称:appinventor-extensions,代码行数:27,代码来源:GalleryList.java

示例10: GalleryAppBox

import com.google.gwt.user.client.ui.FlowPanel; //导入依赖的package包/类
/**
 * Creates new Gallery app box.
 */
private GalleryAppBox() {
  gContainer = new FlowPanel();
  final HorizontalPanel container = new HorizontalPanel();
  container.setWidth("100%");
  container.setSpacing(0);
  container.setHorizontalAlignment(HorizontalPanel.ALIGN_CENTER);
  HorizontalPanel panel = new HorizontalPanel();
  Image image = new Image();
  image.setResource(Ode.getImageBundle().waitingIcon());
  panel.add(image);
  Label label = new Label();
  label.setText(Ode.getMessages().defaultRpcMessage());
  panel.add(label);
  gContainer.add(panel);
  this.add(gContainer);
}
 
开发者ID:mit-cml,项目名称:appinventor-extensions,代码行数:20,代码来源:GalleryAppBox.java

示例11: ItemViewCarrier

import com.google.gwt.user.client.ui.FlowPanel; //导入依赖的package包/类
public ItemViewCarrier(String err) {
    errorView = new FlowPanel();
    errorView.setStyleName("qp-item-error");

    Label errorLabel = new Label(err);
    errorLabel.setStyleName("qp-item-error-text");
    errorView.add(errorLabel);
}
 
开发者ID:YoungDigitalPlanet,项目名称:empiria.player,代码行数:9,代码来源:ItemViewCarrier.java

示例12: setItemContent

import com.google.gwt.user.client.ui.FlowPanel; //导入依赖的package包/类
@Override
public void setItemContent(SourcelistItemValue item, InlineBodyGeneratorSocket inlineBodyGeneratorSocket) {
    removeContent();
    fullFillItemWrapperWithContent(item, inlineBodyGeneratorSocket);
    DraggableObject<FlowPanel> draggableObject = createDragableObjectOnItemWrapper();
    addDragHandlersToItem(draggableObject);
    mathJaxNative.renderMath();
}
 
开发者ID:YoungDigitalPlanet,项目名称:empiria.player,代码行数:9,代码来源:DragGapViewImpl.java

示例13: createDragableObjectOnItemWrapper

import com.google.gwt.user.client.ui.FlowPanel; //导入依赖的package包/类
private DraggableObject<FlowPanel> createDragableObjectOnItemWrapper() {
    DraggableObject<FlowPanel> draggableObject = dragDropHelper.enableDragForWidget(itemWrapper);
    Widget draggableWidget = draggableObject.getDraggableWidget();

    container.add(draggableWidget);
    optionalDraggable = Optional.of(draggableObject);
    return draggableObject;
}
 
开发者ID:YoungDigitalPlanet,项目名称:empiria.player,代码行数:9,代码来源:DragGapViewImpl.java

示例14: addDragEndHandlerToItem

import com.google.gwt.user.client.ui.FlowPanel; //导入依赖的package包/类
private void addDragEndHandlerToItem(DraggableObject<FlowPanel> draggableObject) {
    draggableObject.addDragEndHandler(new DragEndHandler() {

        @Override
        public void onDragEnd(DragEndEvent event) {
            removeDraggableStyleFromItem();
            dragEndHandler.onDragEnd(event);
        }
    });
}
 
开发者ID:YoungDigitalPlanet,项目名称:empiria.player,代码行数:11,代码来源:DragGapViewImpl.java

示例15: addDragStartHandlerToItem

import com.google.gwt.user.client.ui.FlowPanel; //导入依赖的package包/类
private void addDragStartHandlerToItem(DraggableObject<FlowPanel> draggableObject) {
    draggableObject.addDragStartHandler(new DragStartHandler() {
        @Override
        public void onDragStart(DragStartEvent event) {
            touchController.setTouchReservation(true);
            event.getDataTransfer().setDragImage(itemWrapper.getElement(), 0, 0);
            dragStartHandlerOptional.get().onDragStart(event);
        }
    });
}
 
开发者ID:YoungDigitalPlanet,项目名称:empiria.player,代码行数:11,代码来源:DragGapViewImpl.java


注:本文中的com.google.gwt.user.client.ui.FlowPanel类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。