ca.sqlpower.architect.swingui.olap
Class CubePane

java.lang.Object
  extended by ca.sqlpower.architect.swingui.PlayPenComponent
      extended by ca.sqlpower.architect.swingui.ContainerPane<T,C>
          extended by ca.sqlpower.architect.swingui.olap.OLAPPane<MondrianModel.Cube,OLAPObject>
              extended by ca.sqlpower.architect.swingui.olap.CubePane
All Implemented Interfaces:
LayoutNode, Selectable, java.awt.dnd.DragSourceListener, java.util.EventListener

public class CubePane
extends OLAPPane<MondrianModel.Cube,OLAPObject>


Field Summary
 
Fields inherited from class ca.sqlpower.architect.swingui.olap.OLAPPane
sections, selectedSections
 
Fields inherited from class ca.sqlpower.architect.swingui.ContainerPane
ITEM_INDEX_NONE, ITEM_INDEX_TITLE, margin, model, selectedItems
 
Fields inherited from class ca.sqlpower.architect.swingui.PlayPenComponent
backgroundColor, componentPreviouslySelected, foregroundColor, selected
 
Constructor Summary
CubePane(MondrianModel.Cube model, PlayPenContentPane parent)
           
 
Method Summary
 ca.sqlpower.swingui.DataEntryPanel createEditDialog(PlayPenCoordinate<MondrianModel.Cube,OLAPObject> coord)
          Creates a edit dialog for the OLAPObject that is at the location represented by the given coordinate.
protected  int dndRemoveAndAdd(PaneSection<OLAPObject> insertSection, int insertIndex, OLAPObject item)
          This will remove the item being dragged and dropped from its parent before adding it to the new insertSection.
protected  java.util.List<OLAPObject> filterDroppableItems(java.util.List<OLAPObject> items)
          Accepts a clump of items that have been dragged from elsewhere (normally the tree or another pane).
protected  java.util.List<OLAPObject> getItems()
          Returns a list of the items to be displayed with the model.
 java.lang.String toString()
           
 void updateUI()
           
 
Methods inherited from class ca.sqlpower.architect.swingui.olap.OLAPPane
bestImportFlavor, createTransferableForSelection, deselectSection, dragEnter, dragExit, dragOver, drop, dropActionChanged, getInboundEdges, getInsertionPoint, getItemsFromCoordinates, getName, getOutboundEdges, getPopup, getSections, getSelectedCoordinates, getSelectedSections, getUI, handleMouseEvent, isSectionSelected, pointToItemIndex, pointToPPCoordinate, selectNone, selectSection, setInsertionPoint, transferInvalidIndexItem
 
Methods inherited from class ca.sqlpower.architect.swingui.ContainerPane
addItemSelectionListener, deSelectEverythingElse, deselectItem, deselectItem, dragDropEnd, dragEnter, dragExit, dragOver, dropActionChanged, fireItemsDeselected, fireItemsSelected, getLocationOnScreen, getMargin, getModel, getNodeName, getSelectedItemIndex, getSelectedItems, isDashed, isItemSelected, isItemSelected, isRounded, removeItemSelectionListener, selectItem, selectItem, setDashed, setMargin, setRounded, setSelected
 
Methods inherited from class ca.sqlpower.architect.swingui.PlayPenComponent
addPropertyChangeListener, addPropertyChangeListener, addSelectionListener, contains, firePropertyChange, firePropertyChange, fireSelectionEvent, getBackgroundColor, getBounds, getBounds, getFont, getFontMetrics, getFontRenderContext, getForegroundColor, getHeight, getInsets, getLocation, getLocation, getParent, getPlayPen, getPreferredLocation, getPreferredSize, getSize, getToolTipText, getWidth, getX, getY, isOpaque, isSelected, paint, removePropertyChangeListener, removeSelectionListener, repaint, repaint, repaint, revalidate, setBackgroundColor, setBounds, setBoundsImpl, setForegroundColor, setInsets, setLocation, setLocation, setOpaque, setSize, setToolTipText, setUI, showPopup
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface ca.sqlpower.architect.layout.LayoutNode
getBounds, getBounds, getHeight, getLocation, getWidth, getX, getY, setBounds, setLocation, setLocation
 

Constructor Detail

CubePane

public CubePane(MondrianModel.Cube model,
                PlayPenContentPane parent)
Method Detail

getItems

protected java.util.List<OLAPObject> getItems()
Description copied from class: ContainerPane
Returns a list of the items to be displayed with the model.

Specified by:
getItems in class ContainerPane<MondrianModel.Cube,OLAPObject>

updateUI

public void updateUI()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

createEditDialog

public ca.sqlpower.swingui.DataEntryPanel createEditDialog(PlayPenCoordinate<MondrianModel.Cube,OLAPObject> coord)
                                                    throws ArchitectException
Description copied from class: OLAPPane
Creates a edit dialog for the OLAPObject that is at the location represented by the given coordinate.

Specified by:
createEditDialog in class OLAPPane<MondrianModel.Cube,OLAPObject>
Parameters:
coord - Containas information about the OLAPObject that the edit dialog should be created for.
Returns:
A DataEntryPanel for editting the OLAPObject, null if location is invalid.
Throws:
ArchitectException - If creating an edit dialog failed.

filterDroppableItems

protected java.util.List<OLAPObject> filterDroppableItems(java.util.List<OLAPObject> items)
Description copied from class: OLAPPane
Accepts a clump of items that have been dragged from elsewhere (normally the tree or another pane). Implementations of this method are free to pick and choose which items to import.

This method will always be called by the superclass in the context of a compound edit on the schema this pane's model belongs to.

Specified by:
filterDroppableItems in class OLAPPane<MondrianModel.Cube,OLAPObject>
Parameters:
items - The items that were dropped.
Returns:
The list of items that can be dropped on this pane. It will be some subset of the given list of items.

dndRemoveAndAdd

protected int dndRemoveAndAdd(PaneSection<OLAPObject> insertSection,
                              int insertIndex,
                              OLAPObject item)
Description copied from class: OLAPPane
This will remove the item being dragged and dropped from its parent before adding it to the new insertSection. Some panes need to do special actions before or during the remove and add.

Overrides:
dndRemoveAndAdd in class OLAPPane<MondrianModel.Cube,OLAPObject>


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