2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / libjava / javax / swing / JToolBar.java
bloba92157efbf21131aec39845b76c3207d15752d9d
1 /* JToolBar.java --
2 Copyright (C) 2002 Free Software Foundation, Inc.
4 This file is part of GNU Classpath.
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.
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.
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.
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.
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. */
38 package javax.swing;
40 // Imports
41 import java.awt.*;
42 import java.beans.*;
43 import java.io.*;
44 import javax.accessibility.*;
45 import javax.swing.plaf.*;
47 /**
48 * JToolBar
49 * @author Andrew Selkirk
50 * @version 1.0
52 public class JToolBar extends JComponent
53 implements SwingConstants, Accessible
56 //-------------------------------------------------------------
57 // Classes ----------------------------------------------------
58 //-------------------------------------------------------------
60 /**
61 * AccessibleJToolBar
63 protected class AccessibleJToolBar extends AccessibleJComponent {
65 //-------------------------------------------------------------
66 // Initialization ---------------------------------------------
67 //-------------------------------------------------------------
69 /**
70 * Constructor AccessibleJToolBar
71 * @param component TODO
73 protected AccessibleJToolBar(JToolBar component) {
74 super(component);
75 // TODO
76 } // AccessibleJToolBar()
79 //-------------------------------------------------------------
80 // Methods ----------------------------------------------------
81 //-------------------------------------------------------------
83 /**
84 * getAccessibleStateSet
85 * @returns AccessibleStateSet
87 public AccessibleStateSet getAccessibleStateSet() {
88 return null; // TODO
89 } // getAccessibleStateSet()
91 /**
92 * getAccessibleRole
93 * @returns AccessibleRole
95 public AccessibleRole getAccessibleRole() {
96 return AccessibleRole.TOOL_BAR;
97 } // getAccessibleRole()
100 } // AccessibleJToolBar
103 * Separator
105 public static class Separator extends JSeparator {
107 //-------------------------------------------------------------
108 // Variables --------------------------------------------------
109 //-------------------------------------------------------------
112 * separatorSize
114 private Dimension size;
117 //-------------------------------------------------------------
118 // Initialization ---------------------------------------------
119 //-------------------------------------------------------------
122 * Constructor Separator
124 public Separator() {
125 // TODO
126 } // Separator()
129 * Constructor Separator
130 * @param size TODO
132 public Separator(Dimension size) {
133 // TODO
134 } // Separator()
137 //-------------------------------------------------------------
138 // Methods ----------------------------------------------------
139 //-------------------------------------------------------------
142 * getUIClassID
143 * @returns String
145 public String getUIClassID() {
146 return null; // TODO
147 } // getUIClassID()
150 * getPreferredSize
151 * @returns Dimension
153 public Dimension getPreferredSize() {
154 return null; // TODO
155 } // getPreferredSize()
158 * getMaximumSize
159 * @returns Dimension
161 public Dimension getMaximumSize() {
162 return null; // TODO
163 } // getMaximumSize()
166 * getMinimumSize
167 * @returns Dimension
169 public Dimension getMinimumSize() {
170 return null; // TODO
171 } // getMinimumSize()
174 * getSeparatorSize
175 * @returns Dimension
177 public Dimension getSeparatorSize() {
178 return null; // TODO
179 } // getSeparatorSize()
182 * setSeparatorSize
183 * @param size TODO
185 public void setSeparatorSize(Dimension size) {
186 // TODO
187 } // setSeparatorSize()
190 } // Separator
193 //-------------------------------------------------------------
194 // Variables --------------------------------------------------
195 //-------------------------------------------------------------
198 * uiClassID
200 private static final String uiClassID = "ToolBarUI";
203 * paintBorder
205 private boolean paintBorder;
208 * margin
210 private Insets margin;
213 * floatable
215 private boolean floatable;
218 * orientation
220 private int orientation;
223 //-------------------------------------------------------------
224 // Initialization ---------------------------------------------
225 //-------------------------------------------------------------
228 * Constructor JToolBar
230 public JToolBar() {
231 // TODO
232 } // JToolBar()
235 * Constructor JToolBar
236 * @param orientation TODO
238 public JToolBar(int orientation) {
239 // TODO
240 } // JToolBar()
243 * Constructor JToolBar
244 * @param name TODO
246 public JToolBar(String name) {
247 // TODO
248 } // JToolBar()
251 * Constructor JToolBar
252 * @param name TODO
253 * @param orientation TODO
255 public JToolBar(String name, int orientation) {
256 // TODO
257 } // JToolBar()
260 //-------------------------------------------------------------
261 // Methods ----------------------------------------------------
262 //-------------------------------------------------------------
265 * writeObject
266 * @param stream TODO
267 * @exception IOException TODO
269 private void writeObject(ObjectOutputStream stream) throws IOException {
270 // TODO
271 } // writeObject()
274 * add
275 * @param action TODO
276 * @returns JButton
278 public JButton add(Action action) {
279 return null; // TODO
280 } // add()
283 * paintBorder
284 * @param graphics TODO
286 protected void paintBorder(Graphics graphics) {
287 // TODO
288 } // paintBorder()
291 * getUI
292 * @returns ToolBarUI
294 public ToolBarUI getUI() {
295 return (ToolBarUI) ui;
296 } // getUI()
299 * setUI
300 * @param ui TODO
302 public void setUI(ToolBarUI ui) {
303 super.setUI(ui);
304 } // setUI()
307 * updateUI
309 public void updateUI() {
310 setUI((ToolBarUI) UIManager.get(this));
311 invalidate();
312 } // updateUI()
315 * getUIClassID
316 * @returns String
318 public String getUIClassID() {
319 return uiClassID;
320 } // getUIClassID()
323 * getComponentIndex
324 * @param component TODO
325 * @returns int
327 public int getComponentIndex(Component component) {
328 return 0; // TODO
329 } // getComponentIndex()
332 * getComponentAtIndex
333 * @param index TODO
334 * @returns Component
336 public Component getComponentAtIndex(int index) {
337 return null; // TODO
338 } // getComponentAtIndex()
341 * getMargin
342 * @returns Insets
344 public Insets getMargin() {
345 return null; // TODO
346 } // getMargin()
349 * setMargin
350 * @param margin TODO
352 public void setMargin(Insets margin) {
353 // TODO
354 } // setMargin()
357 * isBorderPainted
358 * @returns boolean
360 public boolean isBorderPainted() {
361 return false; // TODO
362 } // isBorderPainted()
365 * setBorderPainted
366 * @param painted TODO
368 public void setBorderPainted(boolean painted) {
369 // TODO
370 } // setBorderPainted()
373 * isFloatable
374 * @returns boolean
376 public boolean isFloatable() {
377 return false; // TODO
378 } // isFloatable()
381 * setFloatable
382 * @param floatable TODO
384 public void setFloatable(boolean floatable) {
385 // TODO
386 } // setFloatable()
389 * getOrientation
390 * @returns int
392 public int getOrientation() {
393 return 0; // TODO
394 } // getOrientation()
397 * setOrientation
398 * @param orientation TODO
400 public void setOrientation(int orientation) {
401 // TODO
402 } // setOrientation()
405 * addSeparator
407 public void addSeparator() {
408 // TODO
409 } // addSeparator()
412 * addSeparator
413 * @param size TODO
415 public void addSeparator(Dimension size) {
416 // TODO
417 } // addSeparator()
420 * createActionComponent
421 * @param action TODO
422 * @returns JButton
424 protected JButton createActionComponent(Action action) {
425 return null; // TODO
426 } // createActionComponent()
429 * createActionChangeListener
430 * @param button TODO
431 * @returns PropertyChangeListener
433 protected PropertyChangeListener createActionChangeListener(JButton button) {
434 return null; // TODO
435 } // createActionChangeListener()
438 * addImpl
439 * @param component TODO
440 * @param constraints TODO
441 * @param index TODO
443 protected void addImpl(Component component, Object constraints, int index) {
444 // TODO
445 } // addImpl()
448 * paramString
449 * @returns String
451 protected String paramString() {
452 return null; // TODO
453 } // paramString()
456 * getAccessibleContext
457 * @returns AccessibleContext
459 public AccessibleContext getAccessibleContext() {
460 if (accessibleContext == null) {
461 accessibleContext = new AccessibleJToolBar(this);
462 } // if
463 return accessibleContext;
464 } // getAccessibleContext()
467 } // JToolBar