public class MaterialPushpin extends Object
// CAN BE CALLED AS A HELPER STATIC CONTEXT
MaterialPushpin.apply(target, source.getOffsetHeight() + 600);
// INSTANTIATE THE PUSHPIN COMPONENT
MaterialPushpin pushpin = new MaterialPushpin();
pushpin.setWidget(source);
pushpin.setTop(300.0);
pushpin.setOffset(64.0);
pushpin.setBottom(500.0);
pushpin.apply();
Constructor and Description |
---|
MaterialPushpin() |
Modifier and Type | Method and Description |
---|---|
void |
apply()
Apply the pushpin feature into the target widget
|
static void |
apply(com.google.gwt.user.client.ui.Widget widget,
Double offset)
A pushpinned element has 3 states.
|
static void |
apply(com.google.gwt.user.client.ui.Widget widget,
Double top,
Double offset)
A pushpinned element has 3 states.
|
static void |
apply(com.google.gwt.user.client.ui.Widget widget,
Double top,
Double bottom,
Double offset)
A pushpinned element has 3 states.
|
Double |
getBottom()
Get the distance in pixels from the top of the page where the elements stops being fixed.
|
Double |
getOffset()
Get the offset from the top the element will be fixd at.
|
Double |
getTop()
Get the distance in pixels from the top of the page where the element becomes fixed.
|
com.google.gwt.user.client.ui.Widget |
getWidget()
Get the target widget which the pushpin was applied
|
void |
setBottom(Double bottom)
Set the distance in pixels from the top of the page where the elements stops being fixed.
|
void |
setOffset(Double offset)
Set the offset from the top the element will be fixed at.
|
void |
setTop(Double top)
Set the distance in pixels from the top of the page where the element becomes fixed.
|
void |
setWidget(com.google.gwt.user.client.ui.Widget widget)
Set the target widget to apply the pushpin feature
|
public MaterialPushpin()
public void apply()
public static void apply(com.google.gwt.user.client.ui.Widget widget, Double offset)
widget
- - Target widget to apply the pushpin featureoffset
- - The offset from the top the element will be fixed at. (Default: 0)public static void apply(com.google.gwt.user.client.ui.Widget widget, Double top, Double offset)
widget
- - Target widget to apply the pushpin featuretop
- - The distance in pixels from the top of the page where the element becomes fixed. (Default: 0)offset
- - The offset from the top the element will be fixed at. (Default: 0)public static void apply(com.google.gwt.user.client.ui.Widget widget, Double top, Double bottom, Double offset)
widget
- - Target widget to apply the pushpin featuretop
- - The distance in pixels from the top of the page where the element becomes fixed. (Default: 0)bottom
- - The distance in pixels from the top of the page where the elements stops being fixed. (Default: Infinity)offset
- - The offset from the top the element will be fixed at. (Default: 0)public com.google.gwt.user.client.ui.Widget getWidget()
public void setWidget(com.google.gwt.user.client.ui.Widget widget)
public void setOffset(Double offset)
public Double getTop()
public void setTop(Double top)
public Double getBottom()
Copyright © 2018. All rights reserved.