Skip to content

Commit 9a180ba

Browse files
authored
Merge pull request #38 from GwtMaterialDesign/mk_api_work
Polishing
2 parents c95f9e4 + 4e049b7 commit 9a180ba

File tree

138 files changed

+8061
-7190
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

138 files changed

+8061
-7190
lines changed

pom.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
44
<parent>
55
<artifactId>gwt-material-parent</artifactId>
66
<groupId>com.github.gwtmaterialdesign</groupId>
7-
<version>2.0-SNAPSHOT</version>
7+
<version>2.0-rc1</version>
88
</parent>
99

1010
<modelVersion>4.0.0</modelVersion>
1111

1212
<artifactId>gwt-material-demo</artifactId>
1313
<packaging>war</packaging>
14-
<version>2.0-SNAPSHOT</version>
14+
<version>2.0-rc1</version>
1515
<name>Gwt Material Demo</name>
1616
<description>Showcase for gwt-material</description>
1717

@@ -34,8 +34,8 @@
3434
<gwt.version>2.8.0</gwt.version>
3535
<gwtp.version>1.5.3</gwtp.version>
3636
<gin.version>2.1.2</gin.version>
37-
<gwt-material.version>2.0-SNAPSHOT</gwt-material.version>
38-
<gwt-material-table.version>1.0-SNAPSHOT</gwt-material-table.version>
37+
<gwt-material.version>2.0-rc1</gwt-material.version>
38+
<gwt-material-table.version>1.0-rc1</gwt-material-table.version>
3939

4040
<gwt.style>PRETTY</gwt.style>
4141

src/main/java/gwt/material/design/demo/client/application/ApplicationView.ui.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848

4949
<g:HTMLPanel ui:field="menu" />
5050
<m:MaterialContainer>
51-
<g:HTMLPanel ui:field="main" addStyleNames="{style.panel}" />
51+
<g:HTMLPanel ui:field="main" addStyleNames="{style.panel} panel" />
5252

5353
<m:MaterialPanel>
5454
<g:HTMLPanel>
@@ -87,7 +87,7 @@
8787
</m:MaterialRow>
8888

8989
<m:MaterialFooterCopyright ui:field="footerCopyRight" addStyleNames="footer-copyright">
90-
<m:MaterialLabel text="© 2015 Copyright GWT Material" />
90+
<m:MaterialLabel text="© 2016 Copyright GWT Material" />
9191
</m:MaterialFooterCopyright>
9292
</m:MaterialFooter>
9393
</g:HTMLPanel>

src/main/java/gwt/material/design/demo/client/application/about/AboutPresenter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,6 @@ public interface MyProxy extends ProxyPlace<AboutPresenter> {
5050
protected void onReveal() {
5151
super.onReveal();
5252

53-
SetPageTitleEvent.fire("GWT Material", "A Material Design look and feel for GWT Apps plus Phonegap.", this);
53+
SetPageTitleEvent.fire("GWT Material", "A Material Design look and feel for GWT Apps plus Phonegap.", "", this);
5454
}
5555
}

src/main/java/gwt/material/design/demo/client/application/addins/autocomplete/AutoCompletePresenter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ protected void onReveal() {
5555
super.onReveal();
5656

5757
SetPageTitleEvent.fire("Autocomplete", "Autocompletes are best way for selecting item easily and " +
58-
"grouped them into chips for later search based on item values.", this);
58+
"grouped them into chips for later search based on item values.", "addins/autocomplete/AutoCompleteView", this);
5959
}
6060

6161
}

src/main/java/gwt/material/design/demo/client/application/addins/autocomplete/AutoCompleteView.ui.xml

Lines changed: 134 additions & 116 deletions
Original file line numberDiff line numberDiff line change
@@ -25,125 +25,143 @@
2525
xmlns:demo="urn:import:gwt.material.design.demo.client.ui"
2626
xmlns:m.demo="urn:import:gwt.material.design.demo.client.ui">
2727
<g:HTMLPanel>
28-
29-
<m:MaterialTitle title="Usage" />
30-
<demo:PrettyPre addStyleNames="lang-xml z-depth-1">
31-
&emsp;&lt;!-- Addin Import --><br/>
32-
xmlns:ma="urn:import:gwt.material.design.addins.client"<br/><br/>
33-
&lt;!-- Addin Usage --><br/>
34-
&lt;ma:autocomplete.MaterialAutoComplete placeholder="Contacts"/>
35-
</demo:PrettyPre>
36-
37-
<m:MaterialTitle title="Autocomplete" description="Use GWT Autocomplete to search for matches from local or remote data sources. We used MultiWordSuggestOracle to populate the list to be added on the autocomplete values"/>
38-
<m:MaterialRow>
39-
<m:MaterialColumn grid="s12 m12 l6">
40-
<ma:autocomplete.MaterialAutoComplete ui:field="acList" placeholder="Contacts" />
41-
</m:MaterialColumn>
28+
29+
<m:MaterialRow addStyleNames="code">
30+
<m:MaterialTitle title="Usage" />
31+
<demo:PrettyPre addStyleNames="lang-xml">
32+
&emsp;&lt;!-- Addin Import --><br/>
33+
xmlns:ma="urn:import:gwt.material.design.addins.client"<br/><br/>
34+
&lt;!-- Addin Usage --><br/>
35+
&lt;ma:autocomplete.MaterialAutoComplete placeholder="Contacts"/>
36+
</demo:PrettyPre>
4237
</m:MaterialRow>
38+
39+
<g:HTMLPanel addStyleNames="code">
40+
<m:MaterialTitle title="Autocomplete" description="Use GWT Autocomplete to search for matches from local or remote data sources. We used MultiWordSuggestOracle to populate the list to be added on the autocomplete values"/>
41+
<m:MaterialRow>
42+
<m:MaterialColumn grid="s12 m12 l6">
43+
<ma:autocomplete.MaterialAutoComplete ui:field="acList" placeholder="Contacts" />
44+
</m:MaterialColumn>
45+
</m:MaterialRow>
4346

44-
<blockquote >
45-
<p>You can click the chips to select it.</p>
46-
<p>Perform any keyboard actions like pressing KEY DELETE and KEY BACKSPACE to remove it from the autocomplete values</p>
47-
<p>By calling automcomplte.getItemValues() you will retrieve all the items that is currently on the Autocomplete Field</p>
48-
<p>If the value is already exist, we automatically remove it when adding</p>
49-
<p>You can add an unknown value by typing new one then PRESS ENTER</p>
50-
<p>To disable , add enabled="false" parameter on the autocomplete widget</p>
51-
</blockquote>
52-
53-
<m:MaterialButton ui:field="btnGetAll" text="Get All States" waves="LIGHT" backgroundColor="BLUE"/>
54-
<m:MaterialButton ui:field="btnClear" text="Clear" waves="DEFAULT" textColor="BLACK" backgroundColor="WHITE"/>
55-
56-
<m.demo:PrettyPre addStyleNames="lang-java z-depth-1">
57-
&emsp;@UiField MaterialAutoComplete acList; <br/><br/>
58-
59-
UserOracle oracle = new UserOracle();<br/>
60-
oracle.addContacts(getAllUsers());<br/>
61-
acList.setSuggestions(oracle);
62-
</m.demo:PrettyPre>
63-
64-
<m:MaterialTitle title="Gist Files" description="With the given example, we use UserOracle, User and UserSuggestion in order to build the Autocomplete more flexible." />
65-
<m:MaterialAnchorButton text="Link to Gist" textColor="WHITE" target="_blank" href="https://gist.github.com/kevzlou7979/dfb18c003513311345e53af7253b1e39" />
66-
67-
<m:MaterialTitle title="Get all Selected Items" />
68-
<demo:PrettyPre addStyleNames="lang-java z-depth-1">
69-
&emsp;public List&lt;User> getSelectedUsers() {<br/>
70-
&emsp;List&lt;? extends SuggestOracle.Suggestion> values = acList.getValue();<br/>
71-
&emsp;List&lt;User> users = new ArrayList&lt;>(values.size());<br/>
72-
&emsp;for(SuggestOracle.Suggestion value : values){<br/>
73-
&emsp;&emsp;if(value instanceof UserSuggestion){<br/>
74-
&emsp;&emsp;&emsp;UserSuggestion us = (UserSuggestion) value;<br/>
75-
&emsp;&emsp;&emsp;User user = us.getUser();<br/>
76-
&emsp;&emsp;&emsp;users.add(user);<br/>
77-
&emsp;&emsp;}<br/>
78-
&emsp;}<br/>
79-
&emsp;return users;<br/>
80-
}
81-
</demo:PrettyPre>
82-
83-
<m:MaterialTitle title="Events" description="You can easily add Value Change Event and Selection Event on autocomplete component."/>
84-
<demo:PrettyPre addStyleNames="lang-xml z-depth-1">
85-
&emsp;&lt;acList.addSelectionHandler(new SelectionHandler&lt;SuggestOracle.Suggestion>() {<br/>
86-
&emsp;@Override<br/>
87-
&emsp;public void onSelection(SelectionEvent&lt;SuggestOracle.Suggestion> event) {<br/>
88-
&emsp;&emsp;MaterialToast.fireToast(event.getSelectedItem().getDisplayString() + " Selected");<br/>
89-
&emsp;}<br/>
90-
});<br/><br/>
91-
acList.addValueChangeHandler(new ValueChangeHandler&lt;List&lt;? extends SuggestOracle.Suggestion>>() {<br/>
92-
&emsp;@Override<br/>
93-
&emsp;public void onValueChange(ValueChangeEvent&lt;List&lt;? extends SuggestOracle.Suggestion>> event) {<br/>
94-
&emsp;&emsp;for(SuggestOracle.Suggestion user : event.getValue()){<br/>
95-
&emsp;&emsp;&emsp;MaterialToast.fireToast(user.getDisplayString());<br/>
96-
&emsp;&emsp;}<br/>
97-
&emsp;}<br/>
98-
});
99-
</demo:PrettyPre>
100-
101-
<m:MaterialTitle title="Clearing Items on Autocomplete" description="You can easily clear the Autocomplete List Items by calling autocomlete.clear()"/>
102-
<demo:PrettyPre addStyleNames="lang-java z-depth-1">
103-
&emsp;acList.clear();
104-
</demo:PrettyPre>
105-
106-
<m:MaterialTitle title="Type TEXT" description="Type TEXT is just an alternative for combo box component."/>
107-
<m:MaterialRow>
108-
<m:MaterialColumn grid="s12 m12 l6">
109-
<ma:autocomplete.MaterialAutoComplete ui:field="acListType" type="TEXT" limit="1" placeholder="Contacts" />
110-
</m:MaterialColumn>
47+
<blockquote >
48+
<p>You can click the chips to select it.</p>
49+
<p>Perform any keyboard actions like pressing KEY DELETE and KEY BACKSPACE to remove it from the autocomplete values</p>
50+
<p>By calling automcomplte.getItemValues() you will retrieve all the items that is currently on the Autocomplete Field</p>
51+
<p>If the value is already exist, we automatically remove it when adding</p>
52+
<p>You can add an unknown value by typing new one then PRESS ENTER</p>
53+
<p>To disable , add enabled="false" parameter on the autocomplete widget</p>
54+
</blockquote>
55+
56+
<m:MaterialButton ui:field="btnGetAll" text="Get All States" waves="LIGHT" backgroundColor="BLUE"/>
57+
<m:MaterialButton ui:field="btnClear" text="Clear" waves="DEFAULT" textColor="BLACK" backgroundColor="WHITE"/>
58+
59+
<m.demo:PrettyPre addStyleNames="lang-java">
60+
&emsp;@UiField MaterialAutoComplete acList; <br/><br/>
61+
62+
UserOracle oracle = new UserOracle();<br/>
63+
oracle.addContacts(getAllUsers());<br/>
64+
acList.setSuggestions(oracle);
65+
</m.demo:PrettyPre>
66+
</g:HTMLPanel>
67+
68+
<m:MaterialRow addStyleNames="code">
69+
<m:MaterialTitle title="Gist Files" description="With the given example, we use UserOracle, User and UserSuggestion in order to build the Autocomplete more flexible." />
70+
<m:MaterialAnchorButton text="Link to Gist" textColor="WHITE" target="_blank" href="https://gist.github.com/kevzlou7979/dfb18c003513311345e53af7253b1e39" />
11171
</m:MaterialRow>
112-
<demo:PrettyPre addStyleNames="lang-xml z-depth-1">
113-
&emsp;&lt;ma:autocomplete.MaterialAutoComplete type="TEXT" limit="1" placeholder="States" />
114-
</demo:PrettyPre>
115-
116-
<m:MaterialTitle title="Limiting Items" description="You can limit the autocomplete items by adding limit='2' attribute."/>
117-
<m:MaterialRow>
118-
<m:MaterialColumn grid="s12 m12 l6">
119-
<ma:autocomplete.MaterialAutoComplete ui:field="acListLimit" limit="3" placeholder="Contacts" />
120-
</m:MaterialColumn>
72+
73+
<m:MaterialRow addStyleNames="code">
74+
<m:MaterialTitle title="Get all Selected Items" />
75+
<demo:PrettyPre addStyleNames="lang-java">
76+
&emsp;public List&lt;User> getSelectedUsers() {<br/>
77+
&emsp;List&lt;? extends SuggestOracle.Suggestion> values = acList.getValue();<br/>
78+
&emsp;List&lt;User> users = new ArrayList&lt;>(values.size());<br/>
79+
&emsp;for(SuggestOracle.Suggestion value : values){<br/>
80+
&emsp;&emsp;if(value instanceof UserSuggestion){<br/>
81+
&emsp;&emsp;&emsp;UserSuggestion us = (UserSuggestion) value;<br/>
82+
&emsp;&emsp;&emsp;User user = us.getUser();<br/>
83+
&emsp;&emsp;&emsp;users.add(user);<br/>
84+
&emsp;&emsp;}<br/>
85+
&emsp;}<br/>
86+
&emsp;return users;<br/>
87+
}
88+
</demo:PrettyPre>
89+
</m:MaterialRow>
90+
91+
<m:MaterialRow addStyleNames="code">
92+
<m:MaterialTitle title="Events" description="You can easily add Value Change Event and Selection Event on autocomplete component."/>
93+
<demo:PrettyPre addStyleNames="lang-xml">
94+
&emsp;&lt;acList.addSelectionHandler(new SelectionHandler&lt;SuggestOracle.Suggestion>() {<br/>
95+
&emsp;@Override<br/>
96+
&emsp;public void onSelection(SelectionEvent&lt;SuggestOracle.Suggestion> event) {<br/>
97+
&emsp;&emsp;MaterialToast.fireToast(event.getSelectedItem().getDisplayString() + " Selected");<br/>
98+
&emsp;}<br/>
99+
});<br/><br/>
100+
acList.addValueChangeHandler(new ValueChangeHandler&lt;List&lt;? extends SuggestOracle.Suggestion>>() {<br/>
101+
&emsp;@Override<br/>
102+
&emsp;public void onValueChange(ValueChangeEvent&lt;List&lt;? extends SuggestOracle.Suggestion>> event) {<br/>
103+
&emsp;&emsp;for(SuggestOracle.Suggestion user : event.getValue()){<br/>
104+
&emsp;&emsp;&emsp;MaterialToast.fireToast(user.getDisplayString());<br/>
105+
&emsp;&emsp;}<br/>
106+
&emsp;}<br/>
107+
});
108+
</demo:PrettyPre>
109+
</m:MaterialRow>
110+
111+
<m:MaterialRow addStyleNames="code">
112+
<m:MaterialTitle title="Clearing Items on Autocomplete" description="You can easily clear the Autocomplete List Items by calling autocomlete.clear()"/>
113+
<demo:PrettyPre addStyleNames="lang-java">
114+
&emsp;acList.clear();
115+
</demo:PrettyPre>
116+
</m:MaterialRow>
117+
118+
<m:MaterialRow addStyleNames="code">
119+
<m:MaterialTitle title="Type TEXT" description="Type TEXT is just an alternative for combo box component."/>
120+
<m:MaterialRow>
121+
<m:MaterialColumn grid="s12 m12 l6">
122+
<ma:autocomplete.MaterialAutoComplete ui:field="acListType" type="TEXT" limit="1" placeholder="Contacts" />
123+
</m:MaterialColumn>
124+
</m:MaterialRow>
125+
<demo:PrettyPre addStyleNames="lang-xml">
126+
&emsp;&lt;ma:autocomplete.MaterialAutoComplete type="TEXT" limit="1" placeholder="States" />
127+
</demo:PrettyPre>
128+
</m:MaterialRow>
129+
130+
<m:MaterialRow addStyleNames="code">
131+
<m:MaterialTitle title="Limiting Items" description="You can limit the autocomplete items by adding limit='2' attribute."/>
132+
<m:MaterialRow>
133+
<m:MaterialColumn grid="s12 m12 l6">
134+
<ma:autocomplete.MaterialAutoComplete ui:field="acListLimit" limit="3" placeholder="Contacts" />
135+
</m:MaterialColumn>
136+
</m:MaterialRow>
137+
<demo:PrettyPre addStyleNames="lang-xml">
138+
&emsp;&lt;ma:autocomplete.MaterialAutoComplete limit="3" placeholder="States" />
139+
</demo:PrettyPre>
140+
</m:MaterialRow>
141+
142+
<m:MaterialRow addStyleNames="code">
143+
<m:MaterialTitle title="Inside Modal" description="You can build your overlay inside the modal" />
144+
<m:MaterialButton ui:field="btnOpenModal" text="Open Modal" textColor="WHITE" waves="DEFAULT"/>
145+
<m:MaterialModal ui:field="modal">
146+
<m:MaterialModalContent>
147+
<m:MaterialTitle title="Select contacts" description="Some description here..."/>
148+
<ma:autocomplete.MaterialAutoComplete ui:field="acModal" placeholder="Contacts"/>
149+
</m:MaterialModalContent>
150+
<m:MaterialModalFooter textAlign="RIGHT">
151+
<m:MaterialButton ui:field="btnClose" text="Close" type="FLAT" textColor="BLACK" waves="DEFAULT"/>
152+
</m:MaterialModalFooter>
153+
</m:MaterialModal>
154+
<demo:PrettyPre addStyleNames="lang-xml">
155+
&emsp;&lt;m:MaterialModal ui:field="modal"><br/>
156+
&emsp;&lt;m:MaterialModalContent><br/>
157+
&emsp;&lt;m:MaterialTitle title="Select contacts" description="Some description here..."/><br/>
158+
&emsp;&lt;ma:autocomplete.MaterialAutoComplete ui:field="acModal" placeholder="Contacts"/><br/>
159+
&emsp;&lt;/m:MaterialModalContent><br/>
160+
&emsp;&lt;m:MaterialModalFooter textAlign="RIGHT"><br/>
161+
&emsp;&lt;m:MaterialButton ui:field="btnClose" text="Close" type="FLAT" textColor="BLACK" waves="DEFAULT"/><br/>
162+
&emsp;&lt;/m:MaterialModalFooter><br/>
163+
&lt;/m:MaterialModal><br/>
164+
</demo:PrettyPre>
121165
</m:MaterialRow>
122-
<demo:PrettyPre addStyleNames="lang-xml z-depth-1">
123-
&emsp;&lt;ma:autocomplete.MaterialAutoComplete limit="3" placeholder="States" />
124-
</demo:PrettyPre>
125-
126-
<m:MaterialTitle title="Inside Modal" description="You can build your overlay inside the modal" />
127-
<m:MaterialButton ui:field="btnOpenModal" text="Open Modal" textColor="WHITE" waves="DEFAULT"/>
128-
<m:MaterialModal ui:field="modal">
129-
<m:MaterialModalContent>
130-
<m:MaterialTitle title="Select contacts" description="Some description here..."/>
131-
<ma:autocomplete.MaterialAutoComplete ui:field="acModal" placeholder="Contacts"/>
132-
</m:MaterialModalContent>
133-
<m:MaterialModalFooter textAlign="RIGHT">
134-
<m:MaterialButton ui:field="btnClose" text="Close" type="FLAT" textColor="BLACK" waves="DEFAULT"/>
135-
</m:MaterialModalFooter>
136-
</m:MaterialModal>
137-
<demo:PrettyPre addStyleNames="lang-xml z-depth-1">
138-
&emsp;&lt;m:MaterialModal ui:field="modal"><br/>
139-
&emsp;&lt;m:MaterialModalContent><br/>
140-
&emsp;&lt;m:MaterialTitle title="Select contacts" description="Some description here..."/><br/>
141-
&emsp;&lt;ma:autocomplete.MaterialAutoComplete ui:field="acModal" placeholder="Contacts"/><br/>
142-
&emsp;&lt;/m:MaterialModalContent><br/>
143-
&emsp;&lt;m:MaterialModalFooter textAlign="RIGHT"><br/>
144-
&emsp;&lt;m:MaterialButton ui:field="btnClose" text="Close" type="FLAT" textColor="BLACK" waves="DEFAULT"/><br/>
145-
&emsp;&lt;/m:MaterialModalFooter><br/>
146-
&lt;/m:MaterialModal><br/>
147-
</demo:PrettyPre>
148166
</g:HTMLPanel>
149167
</ui:UiBinder>

src/main/java/gwt/material/design/demo/client/application/addins/avatar/AvatarPresenter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ interface MyProxy extends ProxyPlace<AvatarPresenter> {
5353
@Override
5454
protected void onReveal() {
5555
super.onReveal();
56-
SetPageTitleEvent.fire("Avatar", "Generated avatar based on JDenticon that provides a unique avatar based on unique name.", this);
56+
SetPageTitleEvent.fire("Avatar", "Generated avatar based on JDenticon that provides a unique avatar based on unique name.", "addins/avatar/AvatarView", this);
5757
}
5858

5959
}

0 commit comments

Comments
 (0)