|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectca.sqlpower.architect.swingui.PlayPenComponent
ca.sqlpower.architect.swingui.ContainerPane<T,C>
ca.sqlpower.architect.swingui.olap.OLAPPane<T,C>
T - The model's typeC - The item type. If there are mixed item types, this will be OLAPObject.public abstract class OLAPPane<T extends OLAPObject,C extends OLAPObject>
A class that provides all the generic behaviour applicable to OLAP playpen components that have titles and sections of selectable items.
| Field Summary | |
|---|---|
protected java.util.List<PaneSection<? extends C>> |
sections
The sections of this OLAP Pane. |
protected java.util.Set<PaneSection<? extends C>> |
selectedSections
Tracks which scetions in this container are currently selected. |
| 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 | |
|---|---|
protected |
OLAPPane(PlayPenContentPane parent)
|
| Method Summary | |
|---|---|
java.awt.datatransfer.DataFlavor |
bestImportFlavor(javax.swing.JComponent c,
java.awt.datatransfer.DataFlavor[] flavors)
Chooses the best import flavour from the flavors array for importing into c. |
abstract ca.sqlpower.swingui.DataEntryPanel |
createEditDialog(PlayPenCoordinate<T,C> coord)
Creates a edit dialog for the OLAPObject that is at the location represented by the given coordinate. |
java.awt.datatransfer.Transferable |
createTransferableForSelection()
Creates a Transferable representation of the currently-selected items. |
void |
deselectSection(PaneSection<? extends C> sect)
Deselects the given section. |
protected int |
dndRemoveAndAdd(PaneSection<OLAPObject> insertSection,
int insertIndex,
C item)
This will remove the item being dragged and dropped from its parent before adding it to the new insertSection. |
void |
dragEnter(java.awt.dnd.DropTargetDragEvent dtde)
Called while a drag operation is ongoing, when the mouse pointer enters the operable part of the drop site for the DropTarget registered with this listener. |
void |
dragExit(java.awt.dnd.DropTargetEvent dte)
Called while a drag operation is ongoing, when the mouse pointer has exited the operable part of the drop site for the DropTarget registered with this listener. |
void |
dragOver(java.awt.dnd.DropTargetDragEvent dtde)
Called when a drag operation is ongoing, while the mouse pointer is still over the operable part of the drop site for the DropTarget registered with this listener. |
void |
drop(java.awt.dnd.DropTargetDropEvent dtde)
Called when the drag operation has terminated with a drop on the operable part of the drop site for the DropTarget registered with this listener. |
void |
dropActionChanged(java.awt.dnd.DropTargetDragEvent dtde)
Called if the user has modified the current drop gesture. |
protected abstract java.util.List<C> |
filterDroppableItems(java.util.List<OLAPObject> items)
Accepts a clump of items that have been dragged from elsewhere (normally the tree or another pane). |
java.util.List<LayoutEdge> |
getInboundEdges()
Returns all the UsageComponents in the play pen that this pane is the "pane2" for. |
PlayPenCoordinate<T,C> |
getInsertionPoint()
Returns the current insertion point. |
protected java.util.List<OLAPObject> |
getItemsFromCoordinates(java.util.List<PlayPenCoordinate<? extends OLAPObject,? extends OLAPObject>> coords)
Returns a list of OLAPObjects that correspond to the given PlayPenCoordinates. |
java.lang.String |
getName()
Returns the user-visible name for this component--often the same as getModel().getName(), but this depends entirely on the subclass's idea of what in the model constitutes its name. |
java.util.List<LayoutEdge> |
getOutboundEdges()
Returns all the UsageComponents in the play pen that this pane is the "pane1" for. |
javax.swing.JPopupMenu |
getPopup()
Returns a component specific popup menu. |
java.util.List<PaneSection<? extends C>> |
getSections()
Returns this pane's list of sections. |
java.util.List<PlayPenCoordinate<T,C>> |
getSelectedCoordinates()
Returns a list of the sections that are currently in the selection that also currently exist in the model. |
java.util.List<PaneSection<? extends C>> |
getSelectedSections()
Returns a list of the sections that are currently in the selection that also currently exist in the model. |
OLAPPaneUI<T,C> |
getUI()
|
void |
handleMouseEvent(java.awt.event.MouseEvent evt)
Performs the component specific actions for the given MouseEvent. |
boolean |
isSectionSelected(PaneSection<? extends C> sect)
Returns true if the given section was selected in this olap pane. |
int |
pointToItemIndex(java.awt.Point p)
Deprecated. |
PlayPenCoordinate<T,C> |
pointToPPCoordinate(java.awt.Point p)
Translates the given point into a PlayPenCoordinate. |
void |
selectNone()
Deselects all items in this ContainerPane. |
void |
selectSection(PaneSection<? extends C> sect)
Selects the section. |
void |
setInsertionPoint(PlayPenCoordinate<T,C> newIP)
Changes the insertion point and fires a property change to that effect. |
protected void |
transferInvalidIndexItem(OLAPObject item,
PaneSection<OLAPObject> insertSection)
Handle Drag and Drop transfer for items with invalid index. |
| Methods inherited from class ca.sqlpower.architect.swingui.ContainerPane |
|---|
addItemSelectionListener, deSelectEverythingElse, deselectItem, deselectItem, dragDropEnd, dragEnter, dragExit, dragOver, dropActionChanged, fireItemsDeselected, fireItemsSelected, getItems, 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, toString, wait, wait, wait |
| Methods inherited from interface ca.sqlpower.architect.layout.LayoutNode |
|---|
getBounds, getBounds, getHeight, getLocation, getWidth, getX, getY, setBounds, setLocation, setLocation |
| Field Detail |
|---|
protected final java.util.List<PaneSection<? extends C extends OLAPObject>> sections
protected final java.util.Set<PaneSection<? extends C extends OLAPObject>> selectedSections
| Constructor Detail |
|---|
protected OLAPPane(PlayPenContentPane parent)
| Method Detail |
|---|
public java.util.List<PaneSection<? extends C>> getSections()
public java.lang.String getName()
PlayPenComponent
getName in class PlayPenComponent@Deprecated public int pointToItemIndex(java.awt.Point p)
pointToItemIndex in class ContainerPane<T extends OLAPObject,C extends OLAPObject>public PlayPenCoordinate<T,C> pointToPPCoordinate(java.awt.Point p)
PlayPenCoordinate.
p - The point to be translated.
public OLAPPaneUI<T,C> getUI()
getUI in class PlayPenComponent
public abstract ca.sqlpower.swingui.DataEntryPanel createEditDialog(PlayPenCoordinate<T,C> coord)
throws ArchitectException
coord - Containas information about the OLAPObject that the edit
dialog should be created for.
ArchitectException - If creating an edit dialog failed.public void handleMouseEvent(java.awt.event.MouseEvent evt)
PlayPenComponent
handleMouseEvent in class ContainerPane<T extends OLAPObject,C extends OLAPObject>public void deselectSection(PaneSection<? extends C> sect)
sect - the section to deselect.public void selectSection(PaneSection<? extends C> sect)
public boolean isSectionSelected(PaneSection<? extends C> sect)
sect - The section to check
public java.util.List<PaneSection<? extends C>> getSelectedSections()
public java.util.List<PlayPenCoordinate<T,C>> getSelectedCoordinates()
public void selectNone()
ContainerPane
selectNone in class ContainerPane<T extends OLAPObject,C extends OLAPObject>public javax.swing.JPopupMenu getPopup()
PlayPenComponent
getPopup in class PlayPenComponentpublic java.awt.datatransfer.Transferable createTransferableForSelection()
ContainerPane
createTransferableForSelection in class ContainerPane<T extends OLAPObject,C extends OLAPObject>public void dragEnter(java.awt.dnd.DropTargetDragEvent dtde)
NOTE: This method is expected to be called from the PlayPen's dragOver method (not directly by Swing), and as such the DropTargetContext (and the mouse co-ordinates) will be of the PlayPen.
dragEnter in class ContainerPane<T extends OLAPObject,C extends OLAPObject>public void dragExit(java.awt.dnd.DropTargetEvent dte)
NOTE: This method is expected to be called from the PlayPen's dragOver method (not directly by Swing), and as such the DropTargetContext (and the mouse co-ordinates) will be of the PlayPen.
dragExit in class ContainerPane<T extends OLAPObject,C extends OLAPObject>public void dragOver(java.awt.dnd.DropTargetDragEvent dtde)
NOTE: This method is expected to be called from the PlayPen's dragOver method (not directly by Swing), and as such the DropTargetContext (and the mouse co-ordinates) will be of the PlayPen.
dragOver in class ContainerPane<T extends OLAPObject,C extends OLAPObject>public void drop(java.awt.dnd.DropTargetDropEvent dtde)
NOTE: This method is expected to be called from the PlayPen's dragOver method (not directly by Swing), and as such the DropTargetContext (and the mouse co-ordinates) will be of the PlayPen.
drop in class ContainerPane<T extends OLAPObject,C extends OLAPObject>
protected int dndRemoveAndAdd(PaneSection<OLAPObject> insertSection,
int insertIndex,
C item)
protected java.util.List<OLAPObject> getItemsFromCoordinates(java.util.List<PlayPenCoordinate<? extends OLAPObject,? extends OLAPObject>> coords)
coords - The list of PlayPenCoordinates to convert.
protected void transferInvalidIndexItem(OLAPObject item,
PaneSection<OLAPObject> insertSection)
item - The item to be transferred.insertSection - The section to be inserted into.protected abstract java.util.List<C> filterDroppableItems(java.util.List<OLAPObject> items)
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.
items - The items that were dropped.
public void dropActionChanged(java.awt.dnd.DropTargetDragEvent dtde)
dropActionChanged in class ContainerPane<T extends OLAPObject,C extends OLAPObject>
public java.awt.datatransfer.DataFlavor bestImportFlavor(javax.swing.JComponent c,
java.awt.datatransfer.DataFlavor[] flavors)
bestImportFlavor in class ContainerPane<T extends OLAPObject,C extends OLAPObject>public void setInsertionPoint(PlayPenCoordinate<T,C> newIP)
newIP - The new insertion point. Null is allowed, and means
there shouldn't be a visible insertion point.public PlayPenCoordinate<T,C> getInsertionPoint()
public final java.util.List<LayoutEdge> getInboundEdges()
public final java.util.List<LayoutEdge> getOutboundEdges()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||