| 1 | /* JToolBar.java --
|
|---|
| 2 | Copyright (C) 2002 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 | // Imports
|
|---|
| 41 | import java.awt.*;
|
|---|
| 42 | import java.beans.*;
|
|---|
| 43 | import java.io.*;
|
|---|
| 44 | import javax.accessibility.*;
|
|---|
| 45 | import javax.swing.plaf.*;
|
|---|
| 46 |
|
|---|
| 47 | /**
|
|---|
| 48 | * JToolBar
|
|---|
| 49 | * @author Andrew Selkirk
|
|---|
| 50 | * @version 1.0
|
|---|
| 51 | */
|
|---|
| 52 | public class JToolBar extends JComponent
|
|---|
| 53 | implements SwingConstants, Accessible {
|
|---|
| 54 |
|
|---|
| 55 | //-------------------------------------------------------------
|
|---|
| 56 | // Classes ----------------------------------------------------
|
|---|
| 57 | //-------------------------------------------------------------
|
|---|
| 58 |
|
|---|
| 59 | /**
|
|---|
| 60 | * AccessibleJToolBar
|
|---|
| 61 | */
|
|---|
| 62 | protected class AccessibleJToolBar extends AccessibleJComponent {
|
|---|
| 63 |
|
|---|
| 64 | //-------------------------------------------------------------
|
|---|
| 65 | // Initialization ---------------------------------------------
|
|---|
| 66 | //-------------------------------------------------------------
|
|---|
| 67 |
|
|---|
| 68 | /**
|
|---|
| 69 | * Constructor AccessibleJToolBar
|
|---|
| 70 | * @param component TODO
|
|---|
| 71 | */
|
|---|
| 72 | protected AccessibleJToolBar(JToolBar component) {
|
|---|
| 73 | super(component);
|
|---|
| 74 | // TODO
|
|---|
| 75 | } // AccessibleJToolBar()
|
|---|
| 76 |
|
|---|
| 77 |
|
|---|
| 78 | //-------------------------------------------------------------
|
|---|
| 79 | // Methods ----------------------------------------------------
|
|---|
| 80 | //-------------------------------------------------------------
|
|---|
| 81 |
|
|---|
| 82 | /**
|
|---|
| 83 | * getAccessibleStateSet
|
|---|
| 84 | * @returns AccessibleStateSet
|
|---|
| 85 | */
|
|---|
| 86 | public AccessibleStateSet getAccessibleStateSet() {
|
|---|
| 87 | return null; // TODO
|
|---|
| 88 | } // getAccessibleStateSet()
|
|---|
| 89 |
|
|---|
| 90 | /**
|
|---|
| 91 | * getAccessibleRole
|
|---|
| 92 | * @returns AccessibleRole
|
|---|
| 93 | */
|
|---|
| 94 | public AccessibleRole getAccessibleRole() {
|
|---|
| 95 | return AccessibleRole.TOOL_BAR;
|
|---|
| 96 | } // getAccessibleRole()
|
|---|
| 97 |
|
|---|
| 98 |
|
|---|
| 99 | } // AccessibleJToolBar
|
|---|
| 100 |
|
|---|
| 101 | /**
|
|---|
| 102 | * Separator
|
|---|
| 103 | */
|
|---|
| 104 | public static class Separator extends JSeparator {
|
|---|
| 105 |
|
|---|
| 106 | //-------------------------------------------------------------
|
|---|
| 107 | // Variables --------------------------------------------------
|
|---|
| 108 | //-------------------------------------------------------------
|
|---|
| 109 |
|
|---|
| 110 | /**
|
|---|
| 111 | * separatorSize
|
|---|
| 112 | */
|
|---|
| 113 | private Dimension size;
|
|---|
| 114 |
|
|---|
| 115 |
|
|---|
| 116 | //-------------------------------------------------------------
|
|---|
| 117 | // Initialization ---------------------------------------------
|
|---|
| 118 | //-------------------------------------------------------------
|
|---|
| 119 |
|
|---|
| 120 | /**
|
|---|
| 121 | * Constructor Separator
|
|---|
| 122 | */
|
|---|
| 123 | public Separator() {
|
|---|
| 124 | // TODO
|
|---|
| 125 | } // Separator()
|
|---|
| 126 |
|
|---|
| 127 | /**
|
|---|
| 128 | * Constructor Separator
|
|---|
| 129 | * @param size TODO
|
|---|
| 130 | */
|
|---|
| 131 | public Separator(Dimension size) {
|
|---|
| 132 | // TODO
|
|---|
| 133 | } // Separator()
|
|---|
| 134 |
|
|---|
| 135 |
|
|---|
| 136 | //-------------------------------------------------------------
|
|---|
| 137 | // Methods ----------------------------------------------------
|
|---|
| 138 | //-------------------------------------------------------------
|
|---|
| 139 |
|
|---|
| 140 | /**
|
|---|
| 141 | * getUIClassID
|
|---|
| 142 | * @returns String
|
|---|
| 143 | */
|
|---|
| 144 | public String getUIClassID() {
|
|---|
| 145 | return null; // TODO
|
|---|
| 146 | } // getUIClassID()
|
|---|
| 147 |
|
|---|
| 148 | /**
|
|---|
| 149 | * getPreferredSize
|
|---|
| 150 | * @returns Dimension
|
|---|
| 151 | */
|
|---|
| 152 | public Dimension getPreferredSize() {
|
|---|
| 153 | return null; // TODO
|
|---|
| 154 | } // getPreferredSize()
|
|---|
| 155 |
|
|---|
| 156 | /**
|
|---|
| 157 | * getMaximumSize
|
|---|
| 158 | * @returns Dimension
|
|---|
| 159 | */
|
|---|
| 160 | public Dimension getMaximumSize() {
|
|---|
| 161 | return null; // TODO
|
|---|
| 162 | } // getMaximumSize()
|
|---|
| 163 |
|
|---|
| 164 | /**
|
|---|
| 165 | * getMinimumSize
|
|---|
| 166 | * @returns Dimension
|
|---|
| 167 | */
|
|---|
| 168 | public Dimension getMinimumSize() {
|
|---|
| 169 | return null; // TODO
|
|---|
| 170 | } // getMinimumSize()
|
|---|
| 171 |
|
|---|
| 172 | /**
|
|---|
| 173 | * getSeparatorSize
|
|---|
| 174 | * @returns Dimension
|
|---|
| 175 | */
|
|---|
| 176 | public Dimension getSeparatorSize() {
|
|---|
| 177 | return null; // TODO
|
|---|
| 178 | } // getSeparatorSize()
|
|---|
| 179 |
|
|---|
| 180 | /**
|
|---|
| 181 | * setSeparatorSize
|
|---|
| 182 | * @param size TODO
|
|---|
| 183 | */
|
|---|
| 184 | public void setSeparatorSize(Dimension size) {
|
|---|
| 185 | // TODO
|
|---|
| 186 | } // setSeparatorSize()
|
|---|
| 187 |
|
|---|
| 188 |
|
|---|
| 189 | } // Separator
|
|---|
| 190 |
|
|---|
| 191 |
|
|---|
| 192 | //-------------------------------------------------------------
|
|---|
| 193 | // Variables --------------------------------------------------
|
|---|
| 194 | //-------------------------------------------------------------
|
|---|
| 195 |
|
|---|
| 196 | /**
|
|---|
| 197 | * uiClassID
|
|---|
| 198 | */
|
|---|
| 199 | private static final String uiClassID = "ToolBarUI";
|
|---|
| 200 |
|
|---|
| 201 | /**
|
|---|
| 202 | * paintBorder
|
|---|
| 203 | */
|
|---|
| 204 | private boolean paintBorder;
|
|---|
| 205 |
|
|---|
| 206 | /**
|
|---|
| 207 | * margin
|
|---|
| 208 | */
|
|---|
| 209 | private Insets margin;
|
|---|
| 210 |
|
|---|
| 211 | /**
|
|---|
| 212 | * floatable
|
|---|
| 213 | */
|
|---|
| 214 | private boolean floatable;
|
|---|
| 215 |
|
|---|
| 216 | /**
|
|---|
| 217 | * orientation
|
|---|
| 218 | */
|
|---|
| 219 | private int orientation;
|
|---|
| 220 |
|
|---|
| 221 |
|
|---|
| 222 | //-------------------------------------------------------------
|
|---|
| 223 | // Initialization ---------------------------------------------
|
|---|
| 224 | //-------------------------------------------------------------
|
|---|
| 225 |
|
|---|
| 226 | /**
|
|---|
| 227 | * Constructor JToolBar
|
|---|
| 228 | */
|
|---|
| 229 | public JToolBar() {
|
|---|
| 230 | // TODO
|
|---|
| 231 | } // JToolBar()
|
|---|
| 232 |
|
|---|
| 233 | /**
|
|---|
| 234 | * Constructor JToolBar
|
|---|
| 235 | * @param orientation TODO
|
|---|
| 236 | */
|
|---|
| 237 | public JToolBar(int orientation) {
|
|---|
| 238 | // TODO
|
|---|
| 239 | } // JToolBar()
|
|---|
| 240 |
|
|---|
| 241 | /**
|
|---|
| 242 | * Constructor JToolBar
|
|---|
| 243 | * @param name TODO
|
|---|
| 244 | */
|
|---|
| 245 | public JToolBar(String name) {
|
|---|
| 246 | // TODO
|
|---|
| 247 | } // JToolBar()
|
|---|
| 248 |
|
|---|
| 249 | /**
|
|---|
| 250 | * Constructor JToolBar
|
|---|
| 251 | * @param name TODO
|
|---|
| 252 | * @param orientation TODO
|
|---|
| 253 | */
|
|---|
| 254 | public JToolBar(String name, int orientation) {
|
|---|
| 255 | // TODO
|
|---|
| 256 | } // JToolBar()
|
|---|
| 257 |
|
|---|
| 258 |
|
|---|
| 259 | //-------------------------------------------------------------
|
|---|
| 260 | // Methods ----------------------------------------------------
|
|---|
| 261 | //-------------------------------------------------------------
|
|---|
| 262 |
|
|---|
| 263 | /**
|
|---|
| 264 | * writeObject
|
|---|
| 265 | * @param stream TODO
|
|---|
| 266 | * @exception IOException TODO
|
|---|
| 267 | */
|
|---|
| 268 | private void writeObject(ObjectOutputStream stream) throws IOException {
|
|---|
| 269 | // TODO
|
|---|
| 270 | } // writeObject()
|
|---|
| 271 |
|
|---|
| 272 | /**
|
|---|
| 273 | * add
|
|---|
| 274 | * @param action TODO
|
|---|
| 275 | * @returns JButton
|
|---|
| 276 | */
|
|---|
| 277 | public JButton add(Action action) {
|
|---|
| 278 | return null; // TODO
|
|---|
| 279 | } // add()
|
|---|
| 280 |
|
|---|
| 281 | /**
|
|---|
| 282 | * paintBorder
|
|---|
| 283 | * @param graphics TODO
|
|---|
| 284 | */
|
|---|
| 285 | protected void paintBorder(Graphics graphics) {
|
|---|
| 286 | // TODO
|
|---|
| 287 | } // paintBorder()
|
|---|
| 288 |
|
|---|
| 289 | /**
|
|---|
| 290 | * getUI
|
|---|
| 291 | * @returns ToolBarUI
|
|---|
| 292 | */
|
|---|
| 293 | public ToolBarUI getUI() {
|
|---|
| 294 | return (ToolBarUI) ui;
|
|---|
| 295 | } // getUI()
|
|---|
| 296 |
|
|---|
| 297 | /**
|
|---|
| 298 | * setUI
|
|---|
| 299 | * @param ui TODO
|
|---|
| 300 | */
|
|---|
| 301 | public void setUI(ToolBarUI ui) {
|
|---|
| 302 | super.setUI(ui);
|
|---|
| 303 | } // setUI()
|
|---|
| 304 |
|
|---|
| 305 | /**
|
|---|
| 306 | * updateUI
|
|---|
| 307 | */
|
|---|
| 308 | public void updateUI() {
|
|---|
| 309 | setUI((ToolBarUI) UIManager.get(this));
|
|---|
| 310 | invalidate();
|
|---|
| 311 | } // updateUI()
|
|---|
| 312 |
|
|---|
| 313 | /**
|
|---|
| 314 | * getUIClassID
|
|---|
| 315 | * @returns String
|
|---|
| 316 | */
|
|---|
| 317 | public String getUIClassID() {
|
|---|
| 318 | return uiClassID;
|
|---|
| 319 | } // getUIClassID()
|
|---|
| 320 |
|
|---|
| 321 | /**
|
|---|
| 322 | * getComponentIndex
|
|---|
| 323 | * @param component TODO
|
|---|
| 324 | * @returns int
|
|---|
| 325 | */
|
|---|
| 326 | public int getComponentIndex(Component component) {
|
|---|
| 327 | return 0; // TODO
|
|---|
| 328 | } // getComponentIndex()
|
|---|
| 329 |
|
|---|
| 330 | /**
|
|---|
| 331 | * getComponentAtIndex
|
|---|
| 332 | * @param index TODO
|
|---|
| 333 | * @returns Component
|
|---|
| 334 | */
|
|---|
| 335 | public Component getComponentAtIndex(int index) {
|
|---|
| 336 | return null; // TODO
|
|---|
| 337 | } // getComponentAtIndex()
|
|---|
| 338 |
|
|---|
| 339 | /**
|
|---|
| 340 | * getMargin
|
|---|
| 341 | * @returns Insets
|
|---|
| 342 | */
|
|---|
| 343 | public Insets getMargin() {
|
|---|
| 344 | return null; // TODO
|
|---|
| 345 | } // getMargin()
|
|---|
| 346 |
|
|---|
| 347 | /**
|
|---|
| 348 | * setMargin
|
|---|
| 349 | * @param margin TODO
|
|---|
| 350 | */
|
|---|
| 351 | public void setMargin(Insets margin) {
|
|---|
| 352 | // TODO
|
|---|
| 353 | } // setMargin()
|
|---|
| 354 |
|
|---|
| 355 | /**
|
|---|
| 356 | * isBorderPainted
|
|---|
| 357 | * @returns boolean
|
|---|
| 358 | */
|
|---|
| 359 | public boolean isBorderPainted() {
|
|---|
| 360 | return false; // TODO
|
|---|
| 361 | } // isBorderPainted()
|
|---|
| 362 |
|
|---|
| 363 | /**
|
|---|
| 364 | * setBorderPainted
|
|---|
| 365 | * @param painted TODO
|
|---|
| 366 | */
|
|---|
| 367 | public void setBorderPainted(boolean painted) {
|
|---|
| 368 | // TODO
|
|---|
| 369 | } // setBorderPainted()
|
|---|
| 370 |
|
|---|
| 371 | /**
|
|---|
| 372 | * isFloatable
|
|---|
| 373 | * @returns boolean
|
|---|
| 374 | */
|
|---|
| 375 | public boolean isFloatable() {
|
|---|
| 376 | return false; // TODO
|
|---|
| 377 | } // isFloatable()
|
|---|
| 378 |
|
|---|
| 379 | /**
|
|---|
| 380 | * setFloatable
|
|---|
| 381 | * @param floatable TODO
|
|---|
| 382 | */
|
|---|
| 383 | public void setFloatable(boolean floatable) {
|
|---|
| 384 | // TODO
|
|---|
| 385 | } // setFloatable()
|
|---|
| 386 |
|
|---|
| 387 | /**
|
|---|
| 388 | * getOrientation
|
|---|
| 389 | * @returns int
|
|---|
| 390 | */
|
|---|
| 391 | public int getOrientation() {
|
|---|
| 392 | return 0; // TODO
|
|---|
| 393 | } // getOrientation()
|
|---|
| 394 |
|
|---|
| 395 | /**
|
|---|
| 396 | * setOrientation
|
|---|
| 397 | * @param orientation TODO
|
|---|
| 398 | */
|
|---|
| 399 | public void setOrientation(int orientation) {
|
|---|
| 400 | // TODO
|
|---|
| 401 | } // setOrientation()
|
|---|
| 402 |
|
|---|
| 403 | /**
|
|---|
| 404 | * addSeparator
|
|---|
| 405 | */
|
|---|
| 406 | public void addSeparator() {
|
|---|
| 407 | // TODO
|
|---|
| 408 | } // addSeparator()
|
|---|
| 409 |
|
|---|
| 410 | /**
|
|---|
| 411 | * addSeparator
|
|---|
| 412 | * @param size TODO
|
|---|
| 413 | */
|
|---|
| 414 | public void addSeparator(Dimension size) {
|
|---|
| 415 | // TODO
|
|---|
| 416 | } // addSeparator()
|
|---|
| 417 |
|
|---|
| 418 | /**
|
|---|
| 419 | * createActionComponent
|
|---|
| 420 | * @param action TODO
|
|---|
| 421 | * @returns JButton
|
|---|
| 422 | */
|
|---|
| 423 | protected JButton createActionComponent(Action action) {
|
|---|
| 424 | return null; // TODO
|
|---|
| 425 | } // createActionComponent()
|
|---|
| 426 |
|
|---|
| 427 | /**
|
|---|
| 428 | * createActionChangeListener
|
|---|
| 429 | * @param button TODO
|
|---|
| 430 | * @returns PropertyChangeListener
|
|---|
| 431 | */
|
|---|
| 432 | protected PropertyChangeListener createActionChangeListener(JButton button) {
|
|---|
| 433 | return null; // TODO
|
|---|
| 434 | } // createActionChangeListener()
|
|---|
| 435 |
|
|---|
| 436 | /**
|
|---|
| 437 | * addImpl
|
|---|
| 438 | * @param component TODO
|
|---|
| 439 | * @param constraints TODO
|
|---|
| 440 | * @param index TODO
|
|---|
| 441 | */
|
|---|
| 442 | protected void addImpl(Component component, Object constraints, int index) {
|
|---|
| 443 | // TODO
|
|---|
| 444 | } // addImpl()
|
|---|
| 445 |
|
|---|
| 446 | /**
|
|---|
| 447 | * paramString
|
|---|
| 448 | * @returns String
|
|---|
| 449 | */
|
|---|
| 450 | protected String paramString() {
|
|---|
| 451 | return null; // TODO
|
|---|
| 452 | } // paramString()
|
|---|
| 453 |
|
|---|
| 454 | /**
|
|---|
| 455 | * getAccessibleContext
|
|---|
| 456 | * @returns AccessibleContext
|
|---|
| 457 | */
|
|---|
| 458 | public AccessibleContext getAccessibleContext() {
|
|---|
| 459 | if (accessibleContext == null) {
|
|---|
| 460 | accessibleContext = new AccessibleJToolBar(this);
|
|---|
| 461 | } // if
|
|---|
| 462 | return accessibleContext;
|
|---|
| 463 | } // getAccessibleContext()
|
|---|
| 464 |
|
|---|
| 465 |
|
|---|
| 466 | } // JToolBar
|
|---|