From e0edd215721150e6c04ac49706622d6189cb0b42 Mon Sep 17 00:00:00 2001 From: Tore Engvig Date: Mon, 30 Jul 2001 20:29:35 +0000 Subject: 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 --- src/org/apache/fop/viewer/IconToolBar.java | 50 +++++++++++++++++------------- 1 file changed, 29 insertions(+), 21 deletions(-) (limited to 'src/org/apache/fop/viewer/IconToolBar.java') 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; + } + } -- cgit v1.2.3