ca.sqlpower.architect.swingui.action
Class ZoomToFitAction

java.lang.Object
  extended by javax.swing.AbstractAction
      extended by ca.sqlpower.architect.swingui.action.AbstractArchitectAction
          extended by ca.sqlpower.architect.swingui.action.ZoomToFitAction
All Implemented Interfaces:
java.awt.event.ActionListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, javax.swing.Action

public class ZoomToFitAction
extends AbstractArchitectAction

An action that zooms the play pen's view in order to fit the current selection, or the entire data model if nothing is selected.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class ca.sqlpower.architect.swingui.action.AbstractArchitectAction
frame, playpen, session
 
Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
 
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SHORT_DESCRIPTION, SMALL_ICON
 
Constructor Summary
ZoomToFitAction(ArchitectSwingSession session, PlayPen pp)
          Creates a new zoom action tied to the gicen session's play pen.
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
           
static void zoomToFitSelected(PlayPen playpen)
          Performs a zoom-to-fit for the selected items in the given playpen.
 
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ZoomToFitAction

public ZoomToFitAction(ArchitectSwingSession session,
                       PlayPen pp)
Creates a new zoom action tied to the gicen session's play pen. By default, this action gives itself the accelerator key "z" with no modifiers.

Parameters:
pp -
Method Detail

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)

zoomToFitSelected

public static void zoomToFitSelected(PlayPen playpen)
Performs a zoom-to-fit for the selected items in the given playpen.

Parameters:
playpen - The play pen to operate on


Copyright © 2003-2007 SQL Power Group Inc. www.sqlpower.ca