Java Code Examples for gwt.material.design.client.ui.html.Div

The following examples show how to use gwt.material.design.client.ui.html.Div. These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: gwt-material   Source File: MaterialNavBarTest.java    License: Apache License 2.0 5 votes vote down vote up
public void testStructure() {
    // given
    MaterialNavBar navBar = getWidget();
    Div navWrapper = navBar.getNavWrapper();
    MaterialLink navMenu = navBar.getNavMenu();
    MaterialNavContent navContent = (MaterialNavContent) navWrapper.getWidget(1);

    // when / then
    assertNotNull(navBar.getWidget(0));
    assertTrue(navBar.getWidget(0) instanceof Div);
    assertEquals(navBar.getNavWrapper(), navBar.getWidget(0));
    assertTrue(navWrapper.getElement().hasClassName(CssName.NAV_WRAPPER));
    assertEquals(navWrapper.getWidget(0), navBar.getNavMenu());
    assertTrue(navMenu.getElement().hasClassName(CssName.BUTTON_COLLAPSE));
    assertTrue(navMenu.isCircle());
    assertEquals("2.7em", navMenu.getFontSize());
    assertEquals(64, navMenu.getWidth());
    assertEquals(WavesType.LIGHT, navMenu.getWaves());
    assertEquals(TextAlign.CENTER, navMenu.getTextAlign());
    assertNotNull(navWrapper.getWidget(0));
    assertTrue(navWrapper.getWidget(1) instanceof MaterialNavContent);
    assertTrue(navContent.getElement().hasClassName(CssName.NAV_CONTENT));
    MaterialLabel label = new MaterialLabel();
    navContent.add(label);
    assertEquals(label, navContent.getWidget(0));
    navBar.clear();
    assertEquals(0, navWrapper.getChildren().size());
}
 
Example 2
Source Project: gwt-material   Source File: MaterialParallaxTest.java    License: Apache License 2.0 5 votes vote down vote up
public void testStructure() {
    // given / when
    MaterialParallax parallax = getWidget();

    // then
    assertNotNull(parallax.getWidget(0));
    assertTrue(parallax.getWidget(0) instanceof Div);
    assertTrue(parallax.getWidget(0).getElement().hasClassName(CssName.PARALLAX));
}
 
Example 3
Source Project: gwt-material   Source File: MaterialParallaxTest.java    License: Apache License 2.0 5 votes vote down vote up
public void testMultipleParallax() {
    // given
    MaterialParallax parallax = getWidget();

    // when / then
    for (int i = 1; i <= 5; i++) {
        MaterialImage image = new MaterialImage();
        parallax.add(image);
        assertTrue(parallax.getWidget(0) instanceof Div);
        Div div = (Div) parallax.getWidget(0);
        assertNotNull(div.getWidget(i - 1));
        assertTrue(div.getWidget(i - 1) instanceof MaterialImage);
    }
}
 
Example 4
Source Project: gwt-material-addins   Source File: GroupToggleButtonTest.java    License: Apache License 2.0 5 votes vote down vote up
public void testStructure() {
    GroupToggleButton<Integer> groupToggleButton = getWidget();

    assertEquals(groupToggleButton.getLabel(), groupToggleButton.getWidget(0));
    assertEquals(groupToggleButton.getWrapper(), groupToggleButton.getWidget(1));
    assertEquals(groupToggleButton.getErrorLabel(), groupToggleButton.getWidget(2));

    Div wrapper = groupToggleButton.getWrapper();
    assertTrue(wrapper.getElement().hasClassName(IncubatorCssName.WRAPPER));
    assertEquals(NUMBER_ITEMS, wrapper.getChildren().size());

    assertTrue(wrapper.getWidget(0) instanceof ToggleButton);

    checkToggleButton((ToggleButton) wrapper.getWidget(0), groupToggleButton);
}
 
Example 5
public void testStructure() {
    // UiBinder
    // given
    MaterialEmptyState emptyState = getWidget(true);

    // when / then
    final String TITLE = "title";
    final String DESCRIPTION = "description";
    final IconType ICON = IconType.POLL;

    // when
    emptyState.setTitle(TITLE);
    emptyState.setDescription(DESCRIPTION);
    emptyState.setIconType(ICON);

    // then
    assertTrue(emptyState.getElement().hasClassName(AddinsCssName.EMPTY_STATE));
    assertTrue(emptyState.getElement().hasClassName(CssName.VALIGN_WRAPPER));
    assertEquals(1, emptyState.getWidgetCount());
    assertEquals(emptyState.getContainer(), emptyState.getWidget(0));

    // given
    Div container = emptyState.getContainer();

    // when / then
    assertEquals(1, container.getWidgetCount());
    assertTrue(container.getElement().hasClassName(CssName.VALIGN));
    assertTrue(container.getElement().hasClassName(CssName.CENTER));
    assertTrue(container.getWidget(0) instanceof MaterialTitle);
    MaterialTitle title = (MaterialTitle) container.getWidget(0);
    assertEquals(TITLE, title.getHeader().getText());
    assertEquals(DESCRIPTION, title.getParagraph().getText());
    assertTrue(title.getWidget(0) instanceof MaterialIcon);
    MaterialIcon icon = (MaterialIcon) title.getWidget(0);
    assertEquals(ICON, icon.getIconType());
}
 
Example 6
Source Project: gwt-material-addins   Source File: MaterialStepperTest.java    License: Apache License 2.0 5 votes vote down vote up
public void testStructure() {
    // UiBinder
    // given
    MaterialWidget stepper = getWidget();

    // when / then
    steps.forEach(step -> {
        int i = steps.indexOf(step) + 1;

        assertEquals(i, step.getStep());
        assertEquals(step.getWidget(0), step.getHeader());
        Div conCircle = step.getHeader();

        assertEquals(step.getWidget(1), step.getDivLine());
        Div conBody = step.getConBody();

        assertEquals(step.getAxis(), Axis.HORIZONTAL);
        assertEquals(step.getDivCircle(), conCircle.getWidget(0));
        assertEquals(step.getDivTitle(), conCircle.getWidget(1));
        assertEquals(step.getDivDescription(), conCircle.getWidget(2));

        step.setAxis(Axis.VERTICAL);
        assertEquals(step.getDivTitle(), conBody.getWidget(0));
        assertEquals(step.getDivDescription(), conBody.getWidget(1));
        assertEquals(step.getDivCircle(), conCircle.getWidget(0));
        assertEquals(step.getDivLine(), conCircle.getWidget(1));
    });

    assertEquals(stepper.getWidgetCount(), 5);
}
 
Example 7
Source Project: lumongo   Source File: LumongoUI.java    License: Apache License 2.0 5 votes vote down vote up
@Override
public void onModuleLoad() {

	MainResources.INSTANCE.mainGSS().ensureInjected();
	HighlighterInjector.inject();
	HighChartsInjector highChartsInjector = new HighChartsInjector() {
		@Override
		public void onload() {

			Div div = new Div();

			header = new Header();
			Main main = createBaseView();
			footer = new Footer();

			div.add(header);
			div.add(main);
			div.add(footer);

			PlaceHandler placeHandler = new PlaceHandler(LumongoUI.this);
			placeHandler.init();

			RootPanel.get().add(div);
		}
	};
	highChartsInjector.inject();

}
 
Example 8
Source Project: gwt-material   Source File: MaterialFooterCopyright.java    License: Apache License 2.0 4 votes vote down vote up
public Div getContainer() {
    return container;
}
 
Example 9
Source Project: gwt-material   Source File: MaterialFooter.java    License: Apache License 2.0 4 votes vote down vote up
public Div getContainer() {
    return container;
}
 
Example 10
Source Project: gwt-material   Source File: MaterialSplashScreen.java    License: Apache License 2.0 4 votes vote down vote up
public Div getContainer() {
    return container;
}
 
Example 11
Source Project: gwt-material   Source File: MaterialNavBar.java    License: Apache License 2.0 4 votes vote down vote up
public Div getNavWrapper() {
    return navWrapper;
}
 
Example 12
Source Project: gwt-material   Source File: MaterialParallax.java    License: Apache License 2.0 4 votes vote down vote up
public Div getContainer() {
    return container;
}
 
Example 13
Source Project: gwt-material   Source File: MaterialNavBrand.java    License: Apache License 2.0 4 votes vote down vote up
public Div getContainer() {
    return container;
}
 
Example 14
Source Project: gwt-material   Source File: MaterialProgress.java    License: Apache License 2.0 4 votes vote down vote up
public Div getFillContainer() {
    return fillContainer;
}
 
Example 15
Source Project: gwt-material   Source File: MaterialProgress.java    License: Apache License 2.0 4 votes vote down vote up
protected ColorsMixin<Div> getFillColorMixin() {
    if (fillColorMixin == null) {
        fillColorMixin = new ColorsMixin<>(fillContainer);
    }
    return fillColorMixin;
}
 
Example 16
Source Project: gwt-material   Source File: MaterialSpinner.java    License: Apache License 2.0 4 votes vote down vote up
public Div getCircleClipperLeft() {
    return circleClipperLeft;
}
 
Example 17
Source Project: gwt-material   Source File: MaterialSpinner.java    License: Apache License 2.0 4 votes vote down vote up
public Div getCircleClipperRight() {
    return circleClipperRight;
}
 
Example 18
Source Project: gwt-material   Source File: MaterialSpinner.java    License: Apache License 2.0 4 votes vote down vote up
public Div getCircle1() {
    return circle1;
}
 
Example 19
Source Project: gwt-material   Source File: MaterialSpinner.java    License: Apache License 2.0 4 votes vote down vote up
public Div getCircle2() {
    return circle2;
}
 
Example 20
Source Project: gwt-material   Source File: MaterialSpinner.java    License: Apache License 2.0 4 votes vote down vote up
public Div getCircle3() {
    return circle3;
}
 
Example 21
Source Project: gwt-material   Source File: MaterialSpinner.java    License: Apache License 2.0 4 votes vote down vote up
public Div getGapPatch() {
    return gapPatch;
}
 
Example 22
Source Project: gwt-material-addins   Source File: GroupToggleButton.java    License: Apache License 2.0 4 votes vote down vote up
public Div getWrapper() {
    return wrapper;
}
 
Example 23
Source Project: gwt-material-addins   Source File: MaterialEmptyState.java    License: Apache License 2.0 4 votes vote down vote up
public Div getContainer() {
    return container;
}
 
Example 24
Source Project: gwt-material-addins   Source File: MaterialStep.java    License: Apache License 2.0 4 votes vote down vote up
public Div getHeader() {
    return header;
}
 
Example 25
Source Project: gwt-material-addins   Source File: MaterialStep.java    License: Apache License 2.0 4 votes vote down vote up
public Div getConBody() {
    return conBody;
}
 
Example 26
Source Project: gwt-material-addins   Source File: MaterialStep.java    License: Apache License 2.0 4 votes vote down vote up
public Div getDivCircle() {
    return divCircle;
}
 
Example 27
Source Project: gwt-material-addins   Source File: MaterialStep.java    License: Apache License 2.0 4 votes vote down vote up
public Div getDivLine() {
    return divLine;
}
 
Example 28
Source Project: gwt-material-addins   Source File: MaterialStep.java    License: Apache License 2.0 4 votes vote down vote up
public Div getDivTitle() {
    return divTitle;
}
 
Example 29
Source Project: gwt-material-addins   Source File: MaterialStep.java    License: Apache License 2.0 4 votes vote down vote up
public Div getDivDescription() {
    return divDescription;
}
 
Example 30
Source Project: gwt-material-addins   Source File: MaterialStep.java    License: Apache License 2.0 4 votes vote down vote up
public Div getDivBody() {
    return divBody;
}