01: /*
02: * Copyright 2000,2005 wingS development team.
03: *
04: * This file is part of wingS (http://wingsframework.org).
05: *
06: * wingS is free software; you can redistribute it and/or modify
07: * it under the terms of the GNU Lesser General Public License
08: * as published by the Free Software Foundation; either version 2.1
09: * of the License, or (at your option) any later version.
10: *
11: * Please see COPYING for the complete licence.
12: */
13: package org.wings;
14:
15: /**
16: * Allows downloading of the passed Resource implementation.
17: *
18: * @author armin
19: * created at 24.02.2004 13:05:00
20: */
21: public class SDownloadButton extends SClickable {
22:
23: Resource resource;
24:
25: public SDownloadButton(Resource pResource) {
26: resource = pResource;
27: setShowAsFormComponent(false);
28: }
29:
30: public SDownloadButton(String text, Resource pResource) {
31: super (text);
32: resource = pResource;
33: setShowAsFormComponent(false);
34: }
35:
36: public SDownloadButton(SIcon icon, Resource pResource) {
37: super (icon);
38: resource = pResource;
39: setShowAsFormComponent(false);
40: }
41:
42: public boolean isEpochCheckEnabled() {
43: return false;
44: }
45:
46: public SimpleURL getURL() {
47: return resource.getURL();
48: }
49:
50: }
|