ca.sqlpower.architect.swingui.olap.action
Class CreateOLAPChildAction<P extends OLAPPane<?,?>,C extends OLAPObject>
java.lang.Object
javax.swing.AbstractAction
ca.sqlpower.architect.swingui.action.AbstractArchitectAction
ca.sqlpower.architect.swingui.olap.action.CreateOLAPChildAction<P,C>
- Type Parameters:
C - The type of item being added
- All Implemented Interfaces:
- java.awt.event.ActionListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, javax.swing.Action
- Direct Known Subclasses:
- CreateHierarchyAction, CreateLevelAction, CreateMeasureAction
public abstract class CreateOLAPChildAction<P extends OLAPPane<?,?>,C extends OLAPObject>
- extends AbstractArchitectAction
A generic abstract action that provides the bulk of the code required
in order to add an item to the selected pane in the play pen. To use
it, create a subclass with a constructor that provides all the appropriate
settings in the super() call, and implement the small handful of abstract
methods declared here.
- See Also:
- 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 |
CreateOLAPChildAction(ArchitectSwingSession session,
PlayPen olapPlayPen,
java.lang.String friendlyChildName,
java.lang.Class<P> paneClass,
java.lang.String friendlyParentName,
char accelKey,
javax.swing.Icon icon)
Creates a new generic adding action. |
|
Method Summary |
void |
actionPerformed(java.awt.event.ActionEvent e)
|
protected abstract C |
addNewChild(P selectedPane)
Creates a new child of type C, sets good default values for its
properties, and adds it to the model as appropriate. |
protected abstract ca.sqlpower.swingui.DataEntryPanel |
createDataEntryPanel(C model)
Creates a DataEntryPanel for editing the given child item. |
| 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 |
CreateOLAPChildAction
public CreateOLAPChildAction(ArchitectSwingSession session,
PlayPen olapPlayPen,
java.lang.String friendlyChildName,
java.lang.Class<P> paneClass,
java.lang.String friendlyParentName,
char accelKey,
javax.swing.Icon icon)
- Creates a new generic adding action.
- Parameters:
session - The session the play pen belongs to.olapPlayPen - The play pen the item will be added to.friendlyChildName - The "friendly" name for the type of item being added.paneClass - The type of pane that must be selected in order to add an
item. This action will disable itself unless there's one item
selected, and it's of this type.friendlyParentName - The "friendly" name for the type the child is being added to.accelKey - The key character that should be used to invoke this action
from the keyboard.icon - The icon for this action.
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent e)
addNewChild
protected abstract C addNewChild(P selectedPane)
- Creates a new child of type C, sets good default values for its
properties, and adds it to the model as appropriate.
- Returns:
- A new child instance with reasonable default property values,
which has been added into the business model tree in the
appropriate place.
createDataEntryPanel
protected abstract ca.sqlpower.swingui.DataEntryPanel createDataEntryPanel(C model)
- Creates a DataEntryPanel for editing the given child item.
- Parameters:
model - the item that should be edited in the data entry panel
Copyright © 2003-2007 SQL Power Group Inc. www.sqlpower.ca