Skip to content

Commit cda09a8

Browse files
committed
GMD Documentation other fixes.
1 parent e126e0a commit cda09a8

File tree

6 files changed

+22
-23
lines changed

6 files changed

+22
-23
lines changed

src/main/java/gwt/material/design/demo/client/application/components/navbar/NavBarView.ui.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
<m:MaterialRow addStyleNames="code">
2727
<m:MaterialTitle title="Links ,Icons, and Waves" description="Based on material links you can add icons, link with icons or link only and apply ripple effect by adding waves attribute."/>
2828
<m:MaterialNavBar width="100%">
29-
<m:MaterialNavBrand href="#Test" float="LEFT">Title</m:MaterialNavBrand>
29+
<m:MaterialNavBrand marginLeft="60" href="#Test" float="LEFT">Title</m:MaterialNavBrand>
3030
<m:MaterialNavSection float="RIGHT">
3131
<m:MaterialLink iconType="ACCOUNT_CIRCLE" iconPosition="LEFT" text="Account" textColor="WHITE" waves="LIGHT"/>
3232
<m:MaterialLink iconType="AUTORENEW" iconPosition="LEFT" text="Refresh" textColor="WHITE" waves="LIGHT"/>

src/main/java/gwt/material/design/demo/client/application/components/pickers/PickersView.ui.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656

5757
<m:MaterialRow addStyleNames="code">
5858
<m:MaterialTitle title="Mobile" description="Open this time picker on a mobile device to test." />
59-
<m:MaterialDatePicker detectOrientation="true" placeholder="Supports mobile orientations" />
59+
<m:MaterialDatePicker detectOrientation="true" grid="s12" placeholder="Supports mobile orientations" />
6060
<demo:PrettyPre addStyleNames="lang-xml">
6161
&emsp;&lt;m:MaterialDatePicker ui:field="dpMobile" grid="s12" detectOrientation="true" placeholder="Supports mobile orientations" />
6262
</demo:PrettyPre>

src/main/java/gwt/material/design/demo/client/application/components/pushpin/PushPinView.java

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
import com.gwtplatform.mvp.client.ViewImpl;
2828
import gwt.material.design.client.ui.MaterialPanel;
2929
import gwt.material.design.client.ui.MaterialPushpin;
30+
import gwt.material.design.demo.client.ThemeManager;
3031

3132
import javax.inject.Inject;
3233

@@ -36,17 +37,12 @@ interface Binder extends UiBinder<Widget, PushPinView> {
3637
}
3738

3839
@UiField
39-
MaterialPanel source, target;
40+
MaterialPanel source;
4041

4142
@Inject
4243
PushPinView(Binder uiBinder) {
4344
initWidget(uiBinder.createAndBindUi(this));
44-
45-
}
46-
47-
@Override
48-
protected void onAttach() {
49-
super.onAttach();
50-
MaterialPushpin.apply(target, source.getOffsetHeight() + 600);
45+
ThemeManager.register(source);
46+
MaterialPushpin.apply(source, 300.0, 64.0);
5147
}
5248
}

src/main/java/gwt/material/design/demo/client/application/components/pushpin/PushPinView.ui.xml

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -23,21 +23,15 @@
2323
xmlns:m="urn:import:gwt.material.design.client.ui"
2424
xmlns:demo="urn:import:gwt.material.design.demo.client.ui">
2525
<g:HTMLPanel>
26-
<m:MaterialRow addStyleNames="code">
26+
<m:MaterialRow addStyleNames="code" height="1000px">
2727
<m:MaterialTitle title="Usage" description="You just need to set the reference between your source and target offset element. To do this you will need to call MaterialPushPin.apply(Widget source, Widget target) inside onAttach method."/>
2828
<m:MaterialRow>
29-
<m:MaterialPanel ui:field="source" grid="s12 m12 l12" shadow="1" height="64px"/>
30-
<m:MaterialPanel ui:field="target" grid="s6 m6 l6" height="200px" marginBottom="20"/>
29+
<m:MaterialPanel ui:field="source" grid="s12 m12 l12" paddingTop="50" shadow="1" height="200px" width="200px">
30+
<m:MaterialLabel textColor="WHITE" text="Pinned Options top at 300, offset at 64 (navbar's height)" />
31+
</m:MaterialPanel>
3132
</m:MaterialRow>
3233
<demo:PrettyPre addStyleNames="language-java">
33-
&emsp;@UiField<br/>
34-
MaterialPanel source, target;<br/><br/>
35-
36-
@Override<br/>
37-
protected void onAttach() {<br/>
38-
&emsp;super.onAttach();<br/>
39-
&emsp;MaterialPushpin.apply(target, source.getOffsetHeight() + 600);<br/>
40-
}
34+
MaterialPushpin.apply(source, 300.0, 64.0);
4135
</demo:PrettyPre>
4236
</m:MaterialRow>
4337
</g:HTMLPanel>

src/main/java/gwt/material/design/demo/client/application/components/scrollspy/ScrollspyView.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,26 @@
2222

2323

2424
import com.google.gwt.uibinder.client.UiBinder;
25+
import com.google.gwt.uibinder.client.UiField;
2526
import com.google.gwt.user.client.ui.Widget;
2627
import com.gwtplatform.mvp.client.ViewImpl;
28+
import gwt.material.design.client.ui.MaterialPushpin;
29+
import gwt.material.design.client.ui.MaterialScrollspy;
2730

2831
import javax.inject.Inject;
2932

3033
public class ScrollspyView extends ViewImpl implements ScrollspyPresenter.MyView {
3134
interface Binder extends UiBinder<Widget, ScrollspyView> {
3235
}
3336

37+
@UiField
38+
MaterialScrollspy scrollspy;
39+
3440
@Inject
3541
ScrollspyView(Binder uiBinder) {
3642
initWidget(uiBinder.createAndBindUi(this));
43+
double top = 400;
44+
double offset = 0;
45+
MaterialPushpin.apply(scrollspy, top, offset);
3746
}
3847
}

src/main/java/gwt/material/design/demo/client/application/components/scrollspy/ScrollspyView.ui.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,8 @@
7676
</demo:PrettyPre>
7777
</m:MaterialPanel>
7878
</m:MaterialColumn>
79-
<m:MaterialColumn grid="l2" addStyleNames="hide-on-small-only">
80-
<m:MaterialScrollspy addStyleNames="pinned" textColor="GREEN">
79+
<m:MaterialColumn grid="l2" addStyleNames="test">
80+
<m:MaterialScrollspy ui:field="scrollspy" textColor="GREEN">
8181
<m:MaterialLink href="#topic1" text="Topic 1"/>
8282
<m:MaterialLink href="#topic2" text="Topic 2"/>
8383
<m:MaterialLink href="#topic3" text="Topic 3"/>

0 commit comments

Comments
 (0)