org.favabeans.views
Class NewViewAction

java.lang.Object
  |
  +--javax.swing.AbstractAction
        |
        +--org.favabeans.views.NewViewAction
All Implemented Interfaces:
Action, ActionFeature, ActionListener, Cloneable, EventListener, Faceted, Feature, Serializable

public class NewViewAction
extends AbstractAction
implements ActionFeature, Faceted

A NewViewAction is an ActionFeature which, when performed, creates a new View of its target.

See Also:
Feature.getTarget(), ActionListener.actionPerformed(ActionEvent), Serialized Form

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
NewViewAction(Object target, View viewStationery)
          Create a new NewViewAction.
 
Method Summary
 void actionPerformed(ActionEvent e)
           
 Facet getFacet(Type type)
          Obtain a Facet of the requested Type for this object.
 Object getTarget()
          Obtain the target of this Feature.
 
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.swing.Action
addPropertyChangeListener, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
 

Constructor Detail

NewViewAction

public NewViewAction(Object target,
                     View viewStationery)
Create a new NewViewAction.
Parameters:
target - the object for which a View will be created when this NewViewAction is performed.
viewStationery - a View which will be cloned (via its Stationery Facet) to create the new view.
Method Detail

getFacet

public Facet getFacet(Type type)
Description copied from interface: Faceted
Obtain a Facet of the requested Type for this object.
Specified by:
getFacet in interface Faceted
Following copied from interface: org.favabeans.base.Faceted
Parameters:
type - the Type of Facet requested for this object.
Returns:
a Facet, or null if none can be created as requested.

getTarget

public Object getTarget()
Description copied from interface: Feature
Obtain the target of this Feature.
Specified by:
getTarget in interface Feature
Following copied from interface: org.favabeans.base.Feature
Returns:
the target.

actionPerformed

public void actionPerformed(ActionEvent e)
Specified by:
actionPerformed in interface ActionListener
Overrides:
actionPerformed in class AbstractAction


Copyright © 2000-2001, Regents of the University of Minnesota. All Rights Reserved.