OSDN Git Service

ebc469212c8223e0ab21c05f050b4cc5f64c28bf
[pf3gnuchains/gcc-fork.git] / libjava / javax / swing / JToolBar.java
1 /* JToolBar.java --
2    Copyright (C) 2002, 2004 Free Software Foundation, Inc.
3
4 This file is part of GNU Classpath.
5
6 GNU Classpath is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2, or (at your option)
9 any later version.
10
11 GNU Classpath is distributed in the hope that it will be useful, but
12 WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14 General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with GNU Classpath; see the file COPYING.  If not, write to the
18 Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
19 02111-1307 USA.
20
21 Linking this library statically or dynamically with other modules is
22 making a combined work based on this library.  Thus, the terms and
23 conditions of the GNU General Public License cover the whole
24 combination.
25
26 As a special exception, the copyright holders of this library give you
27 permission to link this library with independent modules to produce an
28 executable, regardless of the license terms of these independent
29 modules, and to copy and distribute the resulting executable under
30 terms of your choice, provided that you also meet, for each linked
31 independent module, the terms and conditions of the license of that
32 module.  An independent module is a module which is not derived from
33 or based on this library.  If you modify this library, you may extend
34 this exception to your version of the library, but you are not
35 obligated to do so.  If you do not wish to do so, delete this
36 exception statement from your version. */
37
38 package javax.swing;
39
40 import java.awt.Component;
41 import java.awt.Dimension;
42 import java.awt.Graphics;
43 import java.awt.Insets;
44 import java.beans.PropertyChangeListener;
45 import java.io.IOException;
46 import java.io.ObjectOutputStream;
47
48 import javax.accessibility.Accessible;
49 import javax.accessibility.AccessibleContext;
50 import javax.accessibility.AccessibleRole;
51 import javax.accessibility.AccessibleStateSet;
52 import javax.swing.plaf.ToolBarUI;
53
54 /**
55  * JToolBar
56  * @author      Andrew Selkirk
57  * @version     1.0
58  */
59 public class JToolBar extends JComponent 
60   implements SwingConstants, Accessible
61 {
62
63         //-------------------------------------------------------------
64         // Classes ----------------------------------------------------
65         //-------------------------------------------------------------
66
67         /**
68          * AccessibleJToolBar
69          */
70         protected class AccessibleJToolBar extends AccessibleJComponent {
71
72                 //-------------------------------------------------------------
73                 // Initialization ---------------------------------------------
74                 //-------------------------------------------------------------
75
76                 /**
77                  * Constructor AccessibleJToolBar
78                  * @param component TODO
79                  */
80                 protected AccessibleJToolBar(JToolBar component) {
81                         super(component);
82                         // TODO
83                 } // AccessibleJToolBar()
84
85
86                 //-------------------------------------------------------------
87                 // Methods ----------------------------------------------------
88                 //-------------------------------------------------------------
89
90                 /**
91                  * getAccessibleStateSet
92                  * @returns AccessibleStateSet
93                  */
94                 public AccessibleStateSet getAccessibleStateSet() {
95                         return null; // TODO
96                 } // getAccessibleStateSet()
97
98                 /**
99                  * getAccessibleRole
100                  * @returns AccessibleRole
101                  */
102                 public AccessibleRole getAccessibleRole() {
103                         return AccessibleRole.TOOL_BAR;
104                 } // getAccessibleRole()
105
106
107         } // AccessibleJToolBar
108
109         /**
110          * Separator
111          */
112         public static class Separator extends JSeparator {
113
114                 //-------------------------------------------------------------
115                 // Variables --------------------------------------------------
116                 //-------------------------------------------------------------
117
118                 /**
119                  * separatorSize
120                  */
121                 private Dimension size;
122
123
124                 //-------------------------------------------------------------
125                 // Initialization ---------------------------------------------
126                 //-------------------------------------------------------------
127
128                 /**
129                  * Constructor Separator
130                  */
131                 public Separator() {
132                         // TODO
133                 } // Separator()
134
135                 /**
136                  * Constructor Separator
137                  * @param size TODO
138                  */
139                 public Separator(Dimension size) {
140                         // TODO
141                 } // Separator()
142
143
144                 //-------------------------------------------------------------
145                 // Methods ----------------------------------------------------
146                 //-------------------------------------------------------------
147
148                 /**
149                  * getUIClassID
150                  * @returns String
151                  */
152                 public String getUIClassID() {
153                         return null; // TODO
154                 } // getUIClassID()
155
156                 /**
157                  * getPreferredSize
158                  * @returns Dimension
159                  */
160                 public Dimension getPreferredSize() {
161                         return null; // TODO
162                 } // getPreferredSize()
163
164                 /**
165                  * getMaximumSize
166                  * @returns Dimension
167                  */
168                 public Dimension getMaximumSize() {
169                         return null; // TODO
170                 } // getMaximumSize()
171
172                 /**
173                  * getMinimumSize
174                  * @returns Dimension
175                  */
176                 public Dimension getMinimumSize() {
177                         return null; // TODO
178                 } // getMinimumSize()
179
180                 /**
181                  * getSeparatorSize
182                  * @returns Dimension
183                  */
184                 public Dimension getSeparatorSize() {
185                         return null; // TODO
186                 } // getSeparatorSize()
187
188                 /**
189                  * setSeparatorSize
190                  * @param size TODO
191                  */
192                 public void setSeparatorSize(Dimension size) {
193                         // TODO
194                 } // setSeparatorSize()
195
196
197         } // Separator
198
199
200         //-------------------------------------------------------------
201         // Variables --------------------------------------------------
202         //-------------------------------------------------------------
203
204         /**
205          * uiClassID
206          */
207         private static final String uiClassID = "ToolBarUI";
208
209         /**
210          * paintBorder
211          */
212         private boolean paintBorder;
213
214         /**
215          * margin
216          */
217         private Insets margin;
218
219         /**
220          * floatable
221          */
222         private boolean floatable;
223
224         /**
225          * orientation
226          */
227         private int orientation;
228
229
230         //-------------------------------------------------------------
231         // Initialization ---------------------------------------------
232         //-------------------------------------------------------------
233
234         /**
235          * Constructor JToolBar
236          */
237         public JToolBar() {
238                 // TODO
239         } // JToolBar()
240
241         /**
242          * Constructor JToolBar
243          * @param orientation TODO
244          */
245         public JToolBar(int orientation) {
246                 // TODO
247         } // JToolBar()
248
249         /**
250          * Constructor JToolBar
251          * @param name TODO
252          */
253         public JToolBar(String name) {
254                 // TODO
255         } // JToolBar()
256
257         /**
258          * Constructor JToolBar
259          * @param name TODO
260          * @param orientation TODO
261          */
262         public JToolBar(String name, int orientation) {
263                 // TODO
264         } // JToolBar()
265
266
267         //-------------------------------------------------------------
268         // Methods ----------------------------------------------------
269         //-------------------------------------------------------------
270
271         /**
272          * writeObject
273          * @param stream TODO
274          * @exception IOException TODO
275          */
276         private void writeObject(ObjectOutputStream stream) throws IOException {
277                 // TODO
278         } // writeObject()
279
280         /**
281          * add
282          * @param action TODO
283          * @returns JButton
284          */
285         public JButton add(Action action) {
286                 return null; // TODO
287         } // add()
288
289         /**
290          * paintBorder
291          * @param graphics TODO
292          */
293         protected void paintBorder(Graphics graphics) {
294                 // TODO
295         } // paintBorder()
296
297         /**
298          * getUI
299          * @returns ToolBarUI
300          */
301         public ToolBarUI getUI() {
302                 return (ToolBarUI) ui;
303         } // getUI()
304
305         /**
306          * setUI
307          * @param ui TODO
308          */
309         public void setUI(ToolBarUI ui) {
310                 super.setUI(ui);
311         } // setUI()
312
313         /**
314          * updateUI
315          */
316         public void updateUI() {
317                 setUI((ToolBarUI) UIManager.get(this));
318                 invalidate();
319         } // updateUI()
320
321         /**
322          * getUIClassID
323          * @returns String
324          */
325         public String getUIClassID() {
326                 return uiClassID;
327         } // getUIClassID()
328
329         /**
330          * getComponentIndex
331          * @param component TODO
332          * @returns int
333          */
334         public int getComponentIndex(Component component) {
335                 return 0; // TODO
336         } // getComponentIndex()
337
338         /**
339          * getComponentAtIndex
340          * @param index TODO
341          * @returns Component
342          */
343         public Component getComponentAtIndex(int index) {
344                 return null; // TODO
345         } // getComponentAtIndex()
346
347         /**
348          * getMargin
349          * @returns Insets
350          */
351         public Insets getMargin() {
352                 return null; // TODO
353         } // getMargin()
354
355         /**
356          * setMargin
357          * @param margin TODO
358          */
359         public void setMargin(Insets margin) {
360                 // TODO
361         } // setMargin()
362
363         /**
364          * isBorderPainted
365          * @returns boolean
366          */
367         public boolean isBorderPainted() {
368                 return false; // TODO
369         } // isBorderPainted()
370
371         /**
372          * setBorderPainted
373          * @param painted TODO
374          */
375         public void setBorderPainted(boolean painted) {
376                 // TODO
377         } // setBorderPainted()
378
379         /**
380          * isFloatable
381          * @returns boolean
382          */
383         public boolean isFloatable() {
384                 return false; // TODO
385         } // isFloatable()
386
387         /**
388          * setFloatable
389          * @param floatable TODO
390          */
391         public void setFloatable(boolean floatable) {
392                 // TODO
393         } // setFloatable()
394
395         /**
396          * getOrientation
397          * @returns int
398          */
399         public int getOrientation() {
400                 return 0; // TODO
401         } // getOrientation()
402
403         /**
404          * setOrientation
405          * @param orientation TODO
406          */
407         public void setOrientation(int orientation) {
408                 // TODO
409         } // setOrientation()
410
411         /**
412          * addSeparator
413          */
414         public void addSeparator() {
415                 // TODO
416         } // addSeparator()
417
418         /**
419          * addSeparator
420          * @param size TODO
421          */
422         public void addSeparator(Dimension size) {
423                 // TODO
424         } // addSeparator()
425
426         /**
427          * createActionComponent
428          * @param action TODO
429          * @returns JButton
430          */
431         protected JButton createActionComponent(Action action) {
432                 return null; // TODO
433         } // createActionComponent()
434
435         /**
436          * createActionChangeListener
437          * @param button TODO
438          * @returns PropertyChangeListener
439          */
440         protected PropertyChangeListener createActionChangeListener(JButton button) {
441                 return null; // TODO
442         } // createActionChangeListener()
443
444         /**
445          * addImpl
446          * @param component TODO
447          * @param constraints TODO
448          * @param index TODO
449          */
450         protected void addImpl(Component component, Object constraints, int index) {
451                 // TODO
452         } // addImpl()
453
454         /**
455          * paramString
456          * @returns String
457          */
458         protected String paramString() {
459                 return null; // TODO
460         } // paramString()
461
462         /**
463          * getAccessibleContext
464          * @returns AccessibleContext
465          */
466         public AccessibleContext getAccessibleContext() {
467                 if (accessibleContext == null) {
468                         accessibleContext = new AccessibleJToolBar(this);
469                 } // if
470                 return accessibleContext;
471         } // getAccessibleContext()
472
473
474 } // JToolBar