|
| 1 | +/* |
| 2 | + * #%L |
| 3 | + * GwtMaterial |
| 4 | + * %% |
| 5 | + * Copyright (C) 2015 - 2016 GwtMaterialDesign |
| 6 | + * %% |
| 7 | + * Licensed under the Apache License, Version 2.0 (the "License"); |
| 8 | + * you may not use this file except in compliance with the License. |
| 9 | + * You may obtain a copy of the License at |
| 10 | + * |
| 11 | + * http://www.apache.org/licenses/LICENSE-2.0 |
| 12 | + * |
| 13 | + * Unless required by applicable law or agreed to in writing, software |
| 14 | + * distributed under the License is distributed on an "AS IS" BASIS, |
| 15 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 16 | + * See the License for the specific language governing permissions and |
| 17 | + * limitations under the License. |
| 18 | + * #L% |
| 19 | + */ |
| 20 | +package gwt.material.design.client; |
| 21 | + |
| 22 | +import com.google.gwt.core.client.GWT; |
| 23 | +import com.google.gwt.resources.client.TextResource; |
| 24 | +import gwt.material.design.client.resources.WithJQueryDebugResources; |
| 25 | +import gwt.material.design.client.resources.WithJQueryResources; |
| 26 | + |
| 27 | +public class JQueryProvider { |
| 28 | + |
| 29 | + public TextResource jQuery() { |
| 30 | + return null; |
| 31 | + } |
| 32 | + |
| 33 | + public static class JQueryDebug extends JQueryProvider { |
| 34 | + private WithJQueryDebugResources resources; |
| 35 | + |
| 36 | + @Override |
| 37 | + public TextResource jQuery() { |
| 38 | + if(resources == null) { |
| 39 | + resources = GWT.create(WithJQueryDebugResources.class); |
| 40 | + } |
| 41 | + return resources.jQueryDebug(); |
| 42 | + } |
| 43 | + } |
| 44 | + |
| 45 | + public static class JQueryCompressed extends JQueryProvider { |
| 46 | + private WithJQueryResources resources; |
| 47 | + |
| 48 | + @Override |
| 49 | + public TextResource jQuery() { |
| 50 | + if(resources == null) { |
| 51 | + resources = GWT.create(WithJQueryResources.class); |
| 52 | + } |
| 53 | + return resources.jQuery(); |
| 54 | + } |
| 55 | + } |
| 56 | +} |
0 commit comments