JHotDraw 7.0.6

org.jhotdraw.draw.action
Class ToolBarButtonFactory

java.lang.Object
  extended by org.jhotdraw.draw.action.ToolBarButtonFactory

public class ToolBarButtonFactory
extends java.lang.Object

ToolBarButtonFactory.


Field Summary
static java.util.Map<java.lang.String,java.awt.Color> DEFAULT_COLORS
           
 
Method Summary
static void addAlignmentButtonsTo(javax.swing.JToolBar bar, DrawingEditor editor)
          Creates toolbar buttons and adds them to the specified JToolBar
static void addAttributesButtonsTo(javax.swing.JToolBar bar, DrawingEditor editor)
          Creates toolbar buttons and adds them to the specified JToolBar
static void addColorButtonsTo(javax.swing.JToolBar bar, DrawingEditor editor)
           
static void addColorButtonTo(javax.swing.JToolBar bar, DrawingEditor editor, AttributeKey attributeKey, java.util.Map<java.lang.String,java.awt.Color> colorMap, int columnCount, java.lang.String labelKey, ResourceBundleUtil labels)
           
static void addFontButtonsTo(javax.swing.JToolBar bar, DrawingEditor editor)
           
static void addSelectionToolTo(javax.swing.JToolBar tb, DrawingEditor editor)
           
static void addSelectionToolTo(javax.swing.JToolBar tb, DrawingEditor editor, java.util.Collection<javax.swing.Action> drawingActions, java.util.Collection<javax.swing.Action> selectionActions)
           
static void addStrokeButtonsTo(javax.swing.JToolBar bar, DrawingEditor editor)
           
static void addStrokeDashesButtonTo(javax.swing.JToolBar bar, DrawingEditor editor)
           
static void addStrokeDecorationButtonTo(javax.swing.JToolBar bar, DrawingEditor editor)
           
static void addStrokePlacementButtonTo(javax.swing.JToolBar bar, DrawingEditor editor)
           
static void addStrokeTypeButtonTo(javax.swing.JToolBar bar, DrawingEditor editor)
           
static void addStrokeWidthButtonTo(javax.swing.JToolBar bar, DrawingEditor editor)
           
static void addToolTo(javax.swing.JToolBar tb, DrawingEditor editor, Tool tool, java.lang.String labelKey, ResourceBundleUtil labels)
          Method addSelectionToolTo must have been invoked prior to this on the JToolBar.
static void addZoomButtonsTo(javax.swing.JToolBar bar, DrawingEditor editor)
           
static java.util.Collection<javax.swing.Action> createDrawingActions(DrawingEditor editor)
           
static java.util.Collection<javax.swing.Action> createSelectionActions(DrawingEditor editor)
           
static javax.swing.AbstractButton createToggleGridButton(DrawingEditor editor)
          Creates toolbar buttons and adds them to the specified JToolBar
static javax.swing.AbstractButton createToggleGridButton(DrawingView view)
          Creates toolbar buttons and adds them to the specified JToolBar
static javax.swing.AbstractButton createZoomButton(DrawingEditor editor)
           
static javax.swing.AbstractButton createZoomButton(DrawingView view)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_COLORS

public static final java.util.Map<java.lang.String,java.awt.Color> DEFAULT_COLORS
Method Detail

createDrawingActions

public static java.util.Collection<javax.swing.Action> createDrawingActions(DrawingEditor editor)

createSelectionActions

public static java.util.Collection<javax.swing.Action> createSelectionActions(DrawingEditor editor)

addSelectionToolTo

public static void addSelectionToolTo(javax.swing.JToolBar tb,
                                      DrawingEditor editor)

addSelectionToolTo

public static void addSelectionToolTo(javax.swing.JToolBar tb,
                                      DrawingEditor editor,
                                      java.util.Collection<javax.swing.Action> drawingActions,
                                      java.util.Collection<javax.swing.Action> selectionActions)

addToolTo

public static void addToolTo(javax.swing.JToolBar tb,
                             DrawingEditor editor,
                             Tool tool,
                             java.lang.String labelKey,
                             ResourceBundleUtil labels)
Method addSelectionToolTo must have been invoked prior to this on the JToolBar.


addZoomButtonsTo

public static void addZoomButtonsTo(javax.swing.JToolBar bar,
                                    DrawingEditor editor)

createZoomButton

public static javax.swing.AbstractButton createZoomButton(DrawingEditor editor)

createZoomButton

public static javax.swing.AbstractButton createZoomButton(DrawingView view)

addAttributesButtonsTo

public static void addAttributesButtonsTo(javax.swing.JToolBar bar,
                                          DrawingEditor editor)
Creates toolbar buttons and adds them to the specified JToolBar


addColorButtonsTo

public static void addColorButtonsTo(javax.swing.JToolBar bar,
                                     DrawingEditor editor)

addColorButtonTo

public static void addColorButtonTo(javax.swing.JToolBar bar,
                                    DrawingEditor editor,
                                    AttributeKey attributeKey,
                                    java.util.Map<java.lang.String,java.awt.Color> colorMap,
                                    int columnCount,
                                    java.lang.String labelKey,
                                    ResourceBundleUtil labels)
Parameters:
colorMap - a Map with named colors. This is usually a LinkedHashMap so that the colors are in a specific order.

addStrokeButtonsTo

public static void addStrokeButtonsTo(javax.swing.JToolBar bar,
                                      DrawingEditor editor)

addStrokeWidthButtonTo

public static void addStrokeWidthButtonTo(javax.swing.JToolBar bar,
                                          DrawingEditor editor)

addStrokeDecorationButtonTo

public static void addStrokeDecorationButtonTo(javax.swing.JToolBar bar,
                                               DrawingEditor editor)

addStrokeDashesButtonTo

public static void addStrokeDashesButtonTo(javax.swing.JToolBar bar,
                                           DrawingEditor editor)

addStrokeTypeButtonTo

public static void addStrokeTypeButtonTo(javax.swing.JToolBar bar,
                                         DrawingEditor editor)

addStrokePlacementButtonTo

public static void addStrokePlacementButtonTo(javax.swing.JToolBar bar,
                                              DrawingEditor editor)

addFontButtonsTo

public static void addFontButtonsTo(javax.swing.JToolBar bar,
                                    DrawingEditor editor)

addAlignmentButtonsTo

public static void addAlignmentButtonsTo(javax.swing.JToolBar bar,
                                         DrawingEditor editor)
Creates toolbar buttons and adds them to the specified JToolBar


createToggleGridButton

public static javax.swing.AbstractButton createToggleGridButton(DrawingEditor editor)
Creates toolbar buttons and adds them to the specified JToolBar


createToggleGridButton

public static javax.swing.AbstractButton createToggleGridButton(DrawingView view)
Creates toolbar buttons and adds them to the specified JToolBar


Copyright 1996-2006 © JHotDraw.org