diff options
author | Tore Engvig <tore@apache.org> | 2001-07-30 20:29:35 +0000 |
---|---|---|
committer | Tore Engvig <tore@apache.org> | 2001-07-30 20:29:35 +0000 |
commit | e0edd215721150e6c04ac49706622d6189cb0b42 (patch) | |
tree | 6b59b872d9c0e93f99316ea2f421209b71a97755 /src/org/apache/fop/viewer/IconToolBar.java | |
parent | eb57915dec9bcd907e495595efac60dbf3579ad8 (diff) | |
download | xmlgraphics-fop-e0edd215721150e6c04ac49706622d6189cb0b42.tar.gz xmlgraphics-fop-e0edd215721150e6c04ac49706622d6189cb0b42.zip |
Formatted code according to code standards.
Changed license to use short license.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@194380 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/org/apache/fop/viewer/IconToolBar.java')
-rw-r--r-- | src/org/apache/fop/viewer/IconToolBar.java | 50 |
1 files changed, 29 insertions, 21 deletions
diff --git a/src/org/apache/fop/viewer/IconToolBar.java b/src/org/apache/fop/viewer/IconToolBar.java index 8704aec91..c67d13eb4 100644 --- a/src/org/apache/fop/viewer/IconToolBar.java +++ b/src/org/apache/fop/viewer/IconToolBar.java @@ -1,10 +1,17 @@ +/* + * $Id$ + * Copyright (C) 2001 The Apache Software Foundation. All rights reserved. + * For details on use and redistribution please refer to the + * LICENSE file included with these sources. + */ + package org.apache.fop.viewer; /* - originally contributed by - Juergen Verwohlt: Juergen.Verwohlt@jCatalog.com, - Rainer Steinkuhle: Rainer.Steinkuhle@jCatalog.com, - Stanislav Gorkhover: Stanislav.Gorkhover@jCatalog.com + * originally contributed by + * Juergen Verwohlt: Juergen.Verwohlt@jCatalog.com, + * Rainer Steinkuhle: Rainer.Steinkuhle@jCatalog.com, + * Stanislav Gorkhover: Stanislav.Gorkhover@jCatalog.com */ @@ -13,23 +20,24 @@ import java.beans.PropertyChangeListener; public class IconToolBar extends JToolBar { - public JButton add(Action a) { - String name = (String) a.getValue(Action.NAME); - Icon icon = (Icon) a.getValue(Action.SMALL_ICON); - return add(a, name, icon); - } - - public JButton add(Action a, String name, Icon icon) { - JButton b = new JButton(icon); - b.setToolTipText(name); - b.setEnabled(a.isEnabled()); - b.addActionListener(a); - add(b); - PropertyChangeListener actionPropertyChangeListener = - createActionChangeListener(b); - a.addPropertyChangeListener(actionPropertyChangeListener); - return b; - } + public JButton add(Action a) { + String name = (String)a.getValue(Action.NAME); + Icon icon = (Icon)a.getValue(Action.SMALL_ICON); + return add(a, name, icon); + } + + public JButton add(Action a, String name, Icon icon) { + JButton b = new JButton(icon); + b.setToolTipText(name); + b.setEnabled(a.isEnabled()); + b.addActionListener(a); + add(b); + PropertyChangeListener actionPropertyChangeListener = + createActionChangeListener(b); + a.addPropertyChangeListener(actionPropertyChangeListener); + return b; + } + } |