public class MaterialWidget extends com.google.gwt.user.client.ui.ComplexPanel implements HasId, com.google.gwt.user.client.ui.HasEnabled, HasTextAlign, HasColors, HasGrid, HasShadow, com.google.gwt.user.client.ui.Focusable, HasInlineStyle, HasSeparator, HasScrollspy, HasHideOn, HasShowOn, HasCenterOn, HasCircle, HasWaves, HasDataAttributes, HasFloat, HasTooltip, HasFlexbox, HasHoverable, HasFontWeight, HasDepth, HasInitialClasses
| Modifier and Type | Class and Description |
|---|---|
static class |
MaterialWidget.Feature
Configurable features enum see
enableFeature(Feature, boolean). |
com.google.gwt.user.client.ui.UIObject.DebugIdImpl, com.google.gwt.user.client.ui.UIObject.DebugIdImplEnabled| Constructor and Description |
|---|
MaterialWidget() |
MaterialWidget(com.google.gwt.dom.client.Element element) |
MaterialWidget(com.google.gwt.dom.client.Element element,
String... initialClass) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(com.google.gwt.user.client.ui.Widget child) |
protected void |
add(com.google.gwt.user.client.ui.Widget child,
com.google.gwt.user.client.Element container) |
protected void |
clearActiveClass(com.google.gwt.user.client.ui.HasWidgets widget) |
void |
enableFeature(MaterialWidget.Feature feature,
boolean enabled)
Enable or disable a complex
MaterialWidget.Feature. |
String |
getBackgroundColor() |
CenterOn |
getCenterOn() |
protected CssNameMixin<MaterialWidget,CenterOn> |
getCenterOnMixin() |
protected ToggleStyleMixin<MaterialWidget> |
getCircleMixin() |
protected ColorsMixin<MaterialWidget> |
getColorsMixin() |
String |
getDataAttribute(String dataAttr)
Get a data attribute of the
Element. |
int |
getDepth()
Get the z-index value 0 - 999
|
protected EnabledMixin<MaterialWidget> |
getEnabledMixin() |
protected FlexboxMixin<MaterialWidget> |
getFlexboxMixin() |
com.google.gwt.dom.client.Style.Float |
getFloat()
Get the shadow depth.
|
protected CssNameMixin<MaterialWidget,com.google.gwt.dom.client.Style.Float> |
getFloatMixin() |
protected FocusableMixin<MaterialWidget> |
getFocusableMixin() |
String |
getFontSize() |
protected FontSizeMixin<MaterialWidget> |
getFontSizeMixin() |
String |
getFontWeight()
Get the font weight
|
protected CssNameMixin<MaterialWidget,com.google.gwt.dom.client.Style.FontWeight> |
getFontWeightMixin() |
protected GridMixin<MaterialWidget> |
getGridMixin() |
HideOn |
getHideOn() |
protected CssNameMixin<MaterialWidget,HideOn> |
getHideOnMixin() |
protected ToggleStyleMixin<MaterialWidget> |
getHoverableMixin() |
String |
getId() |
protected IdMixin<MaterialWidget> |
getIdMixin() |
String[] |
getInitialClasses()
Get the initial class of Material Components.
|
double |
getOpacity() |
String |
getScrollspy()
Get the scrollspy id, null if not scrollspy'd.
|
protected ScrollspyMixin<MaterialWidget> |
getScrollspyMixin() |
protected SeparatorMixin<MaterialWidget> |
getSeparatorMixin() |
int |
getShadow()
Get the shadow depth.
|
protected ShadowMixin<MaterialWidget> |
getShadowMixin() |
ShowOn |
getShowOn() |
protected CssNameMixin<MaterialWidget,ShowOn> |
getShowOnMixin() |
int |
getTabIndex() |
TextAlign |
getTextAlign()
Get the text alignment.
|
protected CssNameMixin<MaterialWidget,TextAlign> |
getTextAlignMixin() |
String |
getTextColor() |
String |
getTooltip() |
int |
getTooltipDelayMs() |
protected TooltipMixin<MaterialWidget> |
getTooltipMixin() |
Position |
getTooltipPosition() |
ToggleStyleMixin<MaterialWidget> |
getTruncateMixin() |
WavesType |
getWaves()
Get the waves type.
|
protected WavesMixin<MaterialWidget> |
getWavesMixin() |
int |
getWidth() |
protected int |
getWidth(com.google.gwt.dom.client.Element element) |
protected void |
insert(com.google.gwt.user.client.ui.Widget child,
com.google.gwt.user.client.Element container,
int beforeIndex,
boolean domInsert) |
void |
insert(com.google.gwt.user.client.ui.Widget child,
int beforeIndex)
Inserts a widget at a specific index
|
boolean |
isCircle() |
boolean |
isEnabled() |
boolean |
isFeatureEnabled(MaterialWidget.Feature feature)
Check if a
MaterialWidget.Feature is enabled. |
boolean |
isHoverable() |
boolean |
isSeparator()
Is separated using border.
|
protected void |
onLoad() |
void |
setAccessKey(char key) |
void |
setBackgroundColor(String bgColor)
Sets the background color of material components, for example:
|
void |
setBottom(double value) |
void |
setCenterOn(CenterOn centerOn) |
void |
setCircle(boolean circle) |
void |
setDataAttribute(String dataAttr,
String value)
Set data attribute of an
Element. |
void |
setDepth(int depth)
Equivalent to z-index to build a layer between material componens 0 - 999
|
void |
setDisplay(Display display) |
void |
setEnabled(boolean enabled) |
void |
setFlex(Flex flex) |
void |
setFlexAlignContent(FlexAlignContent flexAlignContent) |
void |
setFlexAlignItems(FlexAlignItems flexAlignItems) |
void |
setFlexAlignSelf(FlexAlignSelf flexAlignSelf) |
void |
setFlexBasis(String flexBasis) |
void |
setFlexDirection(FlexDirection flexDirection) |
void |
setFlexGrow(Integer flexGrow) |
void |
setFlexJustifyContent(FlexJustifyContent flexJustifyContent) |
void |
setFlexOrder(Integer flexOrder) |
void |
setFlexShrink(Integer flexShrink) |
void |
setFlexWrap(FlexWrap flexWrap) |
void |
setFloat(com.google.gwt.dom.client.Style.Float floatAlign)
Sets the shadow depth of a material panel.
|
void |
setFocus(boolean focused) |
void |
setFontSize(double fontSize,
com.google.gwt.dom.client.Style.Unit unit) |
void |
setFontSize(String fontSize) |
void |
setFontWeight(com.google.gwt.dom.client.Style.FontWeight fontWeight)
Sets the font weight
|
void |
setGrid(String grid)
Setting the grid for responsiveness don't forget to build rows first before setting
the grid on each material widgets.
|
void |
setGwtDisplay(com.google.gwt.dom.client.Style.Display display) |
void |
setHideOn(HideOn hideOn) |
void |
setHoverable(boolean hoverable) |
void |
setId(String id) |
void |
setInitialClasses(String... initialClasses)
Set the initial class into Material Components.
|
void |
setLayoutPosition(com.google.gwt.dom.client.Style.Position position) |
void |
setLeft(double value) |
void |
setMargin(double margin) |
void |
setMarginBottom(double margin) |
void |
setMarginLeft(double margin) |
void |
setMarginRight(double margin) |
void |
setMarginTop(double margin) |
void |
setOffset(String offset)
Setting the offset.
|
void |
setOpacity(double opacity) |
void |
setOverflow(com.google.gwt.dom.client.Style.Overflow overflow) |
void |
setPadding(double padding) |
void |
setPaddingBottom(double padding) |
void |
setPaddingLeft(double padding) |
void |
setPaddingRight(double padding) |
void |
setPaddingTop(double padding) |
void |
setRight(double value) |
void |
setScrollspy(String scrollspy)
Set the name of the scrollspy.
|
void |
setSeparator(boolean separator)
Border line separator of any material components.
|
void |
setShadow(int shadow)
Sets the shadow depth of a material panel.
|
void |
setShowOn(ShowOn showOn) |
void |
setTabIndex(int index) |
void |
setTextAlign(TextAlign align)
Set the text alignment.
|
void |
setTextColor(String textColor)
Set the text color of material components, for example:
|
void |
setTooltip(String tooltip)
Sets the tooltip text to be shown for the component.
|
void |
setTooltipDelayMs(int delayMs)
Sets the time in ms to show the tooltip text for the component
|
void |
setTooltipPosition(Position position)
Sets the
Position where the tooltip text should appear, relative
to the component. |
void |
setTop(double value) |
void |
setTruncate(boolean truncate)
If true the label inside this component will be truncated by ellipsis
|
void |
setVisibility(com.google.gwt.dom.client.Style.Visibility visibility) |
void |
setWaves(WavesType waves)
Sets the ripple effect of any material elements
|
void |
stopTouchStartEvent() |
protected void |
stopTouchStartEvent(com.google.gwt.dom.client.Element e) |
add, adjustIndex, checkIndexBoundsForAccess, checkIndexBoundsForInsertion, getChildren, getWidget, getWidgetCount, getWidgetIndex, getWidgetIndex, insert, iterator, remove, removeadd, adopt, clear, doAttachChildren, doDetachChildren, orphan, removeaddAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onAttach, onBrowserEvent, onDetach, onUnload, removeFromParent, setLayoutData, sinkEvents, unsinkEventsaddStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, resolvePotentialElement, setElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkBitlessEvent, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitsetVisibleforEach, spliteratorpublic MaterialWidget()
public MaterialWidget(com.google.gwt.dom.client.Element element)
public MaterialWidget(com.google.gwt.dom.client.Element element, String... initialClass)
protected void onLoad()
onLoad in class com.google.gwt.user.client.ui.Widgetpublic void add(com.google.gwt.user.client.ui.Widget child)
add in interface com.google.gwt.user.client.ui.HasWidgetsadd in class com.google.gwt.user.client.ui.Panelprotected void add(com.google.gwt.user.client.ui.Widget child, com.google.gwt.user.client.Element container)
add in class com.google.gwt.user.client.ui.ComplexPanelprotected void insert(com.google.gwt.user.client.ui.Widget child, com.google.gwt.user.client.Element container, int beforeIndex, boolean domInsert)
insert in class com.google.gwt.user.client.ui.ComplexPanelpublic void insert(com.google.gwt.user.client.ui.Widget child, int beforeIndex)
child - - widget to be insertedbeforeIndex - - index for the widgetprotected IdMixin<MaterialWidget> getIdMixin()
protected EnabledMixin<MaterialWidget> getEnabledMixin()
protected CssNameMixin<MaterialWidget,TextAlign> getTextAlignMixin()
protected ColorsMixin<MaterialWidget> getColorsMixin()
protected FocusableMixin<MaterialWidget> getFocusableMixin()
protected GridMixin<MaterialWidget> getGridMixin()
protected ShadowMixin<MaterialWidget> getShadowMixin()
protected SeparatorMixin<MaterialWidget> getSeparatorMixin()
protected ScrollspyMixin<MaterialWidget> getScrollspyMixin()
protected CssNameMixin<MaterialWidget,HideOn> getHideOnMixin()
protected CssNameMixin<MaterialWidget,ShowOn> getShowOnMixin()
protected CssNameMixin<MaterialWidget,CenterOn> getCenterOnMixin()
protected FontSizeMixin<MaterialWidget> getFontSizeMixin()
protected ToggleStyleMixin<MaterialWidget> getCircleMixin()
protected ToggleStyleMixin<MaterialWidget> getHoverableMixin()
protected WavesMixin<MaterialWidget> getWavesMixin()
protected CssNameMixin<MaterialWidget,com.google.gwt.dom.client.Style.Float> getFloatMixin()
protected TooltipMixin<MaterialWidget> getTooltipMixin()
protected FlexboxMixin<MaterialWidget> getFlexboxMixin()
protected CssNameMixin<MaterialWidget,com.google.gwt.dom.client.Style.FontWeight> getFontWeightMixin()
public ToggleStyleMixin<MaterialWidget> getTruncateMixin()
public boolean isEnabled()
isEnabled in interface com.google.gwt.user.client.ui.HasEnabledpublic void setEnabled(boolean enabled)
setEnabled in interface com.google.gwt.user.client.ui.HasEnabledpublic TextAlign getTextAlign()
HasTextAligngetTextAlign in interface HasTextAlignpublic void setTextAlign(TextAlign align)
HasTextAlignsetTextAlign in interface HasTextAlignpublic void setBackgroundColor(String bgColor)
HasColorspanel.setBackgroundColor("blue");setBackgroundColor in interface HasColorspublic String getBackgroundColor()
getBackgroundColor in interface HasColorspublic void setTextColor(String textColor)
HasColorspanel.setTextColor("blue darken-2");setTextColor in interface HasColorspublic String getTextColor()
getTextColor in interface HasColorspublic int getTabIndex()
getTabIndex in interface com.google.gwt.user.client.ui.Focusablepublic void setAccessKey(char key)
setAccessKey in interface com.google.gwt.user.client.ui.Focusablepublic void setFocus(boolean focused)
setFocus in interface com.google.gwt.user.client.ui.Focusablepublic void setTabIndex(int index)
setTabIndex in interface com.google.gwt.user.client.ui.Focusablepublic void setGrid(String grid)
HasGridpublic void setOffset(String offset)
HasGridpublic void setShadow(int shadow)
HasShadowpublic void setMargin(double margin)
setMargin in interface HasInlineStylepublic void setMarginTop(double margin)
setMarginTop in interface HasInlineStylepublic void setMarginLeft(double margin)
setMarginLeft in interface HasInlineStylepublic void setMarginRight(double margin)
setMarginRight in interface HasInlineStylepublic void setMarginBottom(double margin)
setMarginBottom in interface HasInlineStylepublic void setPadding(double padding)
setPadding in interface HasInlineStylepublic void setPaddingTop(double padding)
setPaddingTop in interface HasInlineStylepublic void setPaddingLeft(double padding)
setPaddingLeft in interface HasInlineStylepublic void setPaddingRight(double padding)
setPaddingRight in interface HasInlineStylepublic void setPaddingBottom(double padding)
setPaddingBottom in interface HasInlineStylepublic void setGwtDisplay(com.google.gwt.dom.client.Style.Display display)
setGwtDisplay in interface HasFlexboxpublic void setOpacity(double opacity)
setOpacity in interface HasOpacitypublic double getOpacity()
getOpacity in interface HasOpacitypublic void setSeparator(boolean separator)
HasSeparatorsetSeparator in interface HasSeparatorpublic boolean isSeparator()
HasSeparatorisSeparator in interface HasSeparatorpublic void setScrollspy(String scrollspy)
HasScrollspysetScrollspy in interface HasScrollspypublic String getScrollspy()
HasScrollspygetScrollspy in interface HasScrollspypublic void setCenterOn(CenterOn centerOn)
setCenterOn in interface HasCenterOnpublic CenterOn getCenterOn()
getCenterOn in interface HasCenterOnpublic void setFontSize(String fontSize)
setFontSize in interface HasFontSizepublic String getFontSize()
getFontSize in interface HasFontSizepublic void setFontSize(double fontSize, com.google.gwt.dom.client.Style.Unit unit)
setFontSize in interface HasFontSizepublic void setWaves(WavesType waves)
HasWavespublic WavesType getWaves()
HasWavespublic void setDataAttribute(String dataAttr, String value)
HasDataAttributesElement.
E.g. data-position="left".setDataAttribute in interface HasDataAttributespublic String getDataAttribute(String dataAttr)
HasDataAttributesElement.getDataAttribute in interface HasDataAttributespublic void setFloat(com.google.gwt.dom.client.Style.Float floatAlign)
HasFloatpublic com.google.gwt.dom.client.Style.Float getFloat()
HasFloatpublic String getTooltip()
getTooltip in interface HasTooltippublic void setTooltip(String tooltip)
HasTooltipsetTooltip in interface HasTooltippublic Position getTooltipPosition()
getTooltipPosition in interface HasTooltippublic void setTooltipPosition(Position position)
HasTooltipPosition where the tooltip text should appear, relative
to the component.setTooltipPosition in interface HasTooltippublic int getTooltipDelayMs()
getTooltipDelayMs in interface HasTooltippublic void setTooltipDelayMs(int delayMs)
HasTooltipsetTooltipDelayMs in interface HasTooltippublic void setVisibility(com.google.gwt.dom.client.Style.Visibility visibility)
public void setDisplay(Display display)
setDisplay in interface HasFlexboxsetDisplay in interface HasInlineStylepublic void setFlexDirection(FlexDirection flexDirection)
setFlexDirection in interface HasFlexboxpublic void setFlex(Flex flex)
setFlex in interface HasFlexboxpublic void setFlexGrow(Integer flexGrow)
setFlexGrow in interface HasFlexboxpublic void setFlexShrink(Integer flexShrink)
setFlexShrink in interface HasFlexboxpublic void setFlexBasis(String flexBasis)
setFlexBasis in interface HasFlexboxpublic void setFlexOrder(Integer flexOrder)
setFlexOrder in interface HasFlexboxpublic void setFlexWrap(FlexWrap flexWrap)
setFlexWrap in interface HasFlexboxpublic void setFlexAlignContent(FlexAlignContent flexAlignContent)
setFlexAlignContent in interface HasFlexboxpublic void setFlexAlignSelf(FlexAlignSelf flexAlignSelf)
setFlexAlignSelf in interface HasFlexboxpublic void setFlexAlignItems(FlexAlignItems flexAlignItems)
setFlexAlignItems in interface HasFlexboxpublic void setFlexJustifyContent(FlexJustifyContent flexJustifyContent)
setFlexJustifyContent in interface HasFlexboxpublic void setOverflow(com.google.gwt.dom.client.Style.Overflow overflow)
public void setLayoutPosition(com.google.gwt.dom.client.Style.Position position)
public void setLeft(double value)
public void setRight(double value)
public void setTop(double value)
public void setBottom(double value)
public void setHoverable(boolean hoverable)
setHoverable in interface HasHoverablepublic boolean isHoverable()
isHoverable in interface HasHoverablepublic void setFontWeight(com.google.gwt.dom.client.Style.FontWeight fontWeight)
HasFontWeightsetFontWeight in interface HasFontWeightpublic String getFontWeight()
HasFontWeightgetFontWeight in interface HasFontWeightpublic void setDepth(int depth)
HasDepthpublic int getDepth()
HasDepthpublic void setTruncate(boolean truncate)
public void stopTouchStartEvent()
protected void stopTouchStartEvent(com.google.gwt.dom.client.Element e)
public int getWidth()
protected int getWidth(com.google.gwt.dom.client.Element element)
protected void clearActiveClass(com.google.gwt.user.client.ui.HasWidgets widget)
public void setInitialClasses(String... initialClasses)
HasInitialClassessetInitialClasses in interface HasInitialClassespublic String[] getInitialClasses()
HasInitialClassesgetInitialClasses in interface HasInitialClassespublic void enableFeature(MaterialWidget.Feature feature, boolean enabled)
MaterialWidget.Feature.feature - the feature to enable.enabled - true to enable false to disable.public boolean isFeatureEnabled(MaterialWidget.Feature feature)
MaterialWidget.Feature is enabled.Copyright © 2016. All rights reserved.