當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。