KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > infoglue > cms > applications > common > ImageButton


1 /* ===============================================================================
2  *
3  * Part of the InfoGlue Content Management Platform (www.infoglue.org)
4  *
5  * ===============================================================================
6  *
7  * Copyright (C)
8  *
9  * This program is free software; you can redistribute it and/or modify it under
10  * the terms of the GNU General Public License version 2, as published by the
11  * Free Software Foundation. See the file LICENSE.html for more information.
12  *
13  * This program is distributed in the hope that it will be useful, but WITHOUT
14  * ANY WARRANTY, including the implied warranty of MERCHANTABILITY or FITNESS
15  * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License along with
18  * this program; if not, write to the Free Software Foundation, Inc. / 59 Temple
19  * Place, Suite 330 / Boston, MA 02111-1307 / USA.
20  *
21  * ===============================================================================
22  */

23
24 package org.infoglue.cms.applications.common;
25
26 import java.util.ArrayList JavaDoc;
27 import java.util.List JavaDoc;
28
29 /**
30  * This class represents a button in the CMSTools menu.
31  * Just a very simple javabean.
32  */

33
34 public class ImageButton
35 {
36     private boolean isSelfContained = false;
37     private String JavaDoc actionURL = "";
38     private String JavaDoc imageURL = "";
39     private Integer JavaDoc height = new Integer JavaDoc(22);
40     private Integer JavaDoc width = new Integer JavaDoc(76);
41     private String JavaDoc title = "";
42     private String JavaDoc tooltip = "";
43     private List JavaDoc subButtons = new ArrayList JavaDoc();
44
45     public ImageButton(String JavaDoc actionURL, String JavaDoc imageURL, String JavaDoc title)
46     {
47         this.actionURL = actionURL;
48         this.imageURL = imageURL;
49         this.title = title;
50     }
51
52     public ImageButton(String JavaDoc actionURL, String JavaDoc imageURL, String JavaDoc title, Integer JavaDoc height, Integer JavaDoc width)
53     {
54         this.actionURL = actionURL;
55         this.imageURL = imageURL;
56         this.title = title;
57         this.height = height;
58         this.width = width;
59     }
60
61     public ImageButton(boolean isSelfContained, String JavaDoc actionURL, String JavaDoc imageURL, String JavaDoc title)
62     {
63         this.isSelfContained = isSelfContained;
64         this.actionURL = actionURL;
65         this.imageURL = imageURL;
66         this.title = title;
67     }
68
69     public ImageButton(boolean isSelfContained, String JavaDoc actionURL, String JavaDoc imageURL, String JavaDoc title, String JavaDoc tooltip)
70     {
71         this.tooltip = tooltip;
72         this.isSelfContained = isSelfContained;
73         this.actionURL = actionURL;
74         this.imageURL = imageURL;
75         this.title = title;
76     }
77
78     public ImageButton(boolean isSelfContained, String JavaDoc actionURL, String JavaDoc imageURL, String JavaDoc title, String JavaDoc tooltip, Integer JavaDoc height, Integer JavaDoc width)
79     {
80         this.tooltip = tooltip;
81         this.isSelfContained = isSelfContained;
82         this.actionURL = actionURL;
83         this.imageURL = imageURL;
84         this.title = title;
85         this.height = height;
86         this.width = width;
87     }
88     
89     public boolean getIsSelfContained()
90     {
91         return this.isSelfContained;
92     }
93
94     public String JavaDoc getActionUrl()
95     {
96         return this.actionURL;
97     }
98     
99     public String JavaDoc getImageUrl()
100     {
101         return this.imageURL;
102     }
103     
104     public String JavaDoc getTitle()
105     {
106         return this.title;
107     }
108     
109     /**
110      * Returns the tooltip.
111      * @return String
112      */

113     public String JavaDoc getTooltip() {
114         return tooltip;
115     }
116
117
118     public Integer JavaDoc getHeight()
119     {
120         return height;
121     }
122     
123     public Integer JavaDoc getWidth()
124     {
125         return width;
126     }
127     
128     public List JavaDoc getSubButtons()
129     {
130         return subButtons;
131     }
132 }
Popular Tags