|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
ca.sqlpower.architect.swingui.PlayPen
public class PlayPen
The PlayPen is the main GUI component of the SQL*Power Architect.
| Nested Class Summary | |
|---|---|
protected class |
PlayPen.AddObjectsTask
|
static class |
PlayPen.BringToFrontAction
|
static interface |
PlayPen.CancelableListener
|
class |
PlayPen.CursorManager
A simple class that encapsulates the logic for making the cursor image look correct for the current activity. |
static class |
PlayPen.FloatingContainerPaneListener
Listens to mouse motion and moves the given component so it follows the mouse. |
static class |
PlayPen.MouseModeType
|
class |
PlayPen.PlayPenDropListener
Tracks incoming objects and adds successfully dropped objects at the current mouse position. |
protected class |
PlayPen.PPMouseListener
The PPMouseListener class receives all mouse and mouse motion events in the PlayPen. |
static class |
PlayPen.SendToBackAction
|
class |
PlayPen.TablePaneDragGestureListener
|
| Nested classes/interfaces inherited from class javax.swing.JPanel |
|---|
javax.swing.JPanel.AccessibleJPanel |
| Nested classes/interfaces inherited from class javax.swing.JComponent |
|---|
javax.swing.JComponent.AccessibleJComponent |
| Nested classes/interfaces inherited from class java.awt.Container |
|---|
java.awt.Container.AccessibleAWTContainer |
| Nested classes/interfaces inherited from class java.awt.Component |
|---|
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
| Field Summary | |
|---|---|
protected javax.swing.Action |
bringToFrontAction
This action brings the selected TablePane or Relationship to the front/top of the component stack. |
protected java.util.LinkedList<PlayPen.CancelableListener> |
cancelableListeners
|
protected PlayPenContentPane |
contentPane
Contains the child components of this playpen. |
protected javax.swing.JDialog |
dbcsDialog
This dialog box is for editting the PlayPen's DB Connection spec. |
protected boolean |
draggingTablePanes
used by mouseReleased to figure out if a DND operation just took place in the playpen, so it can make a good choice about leaving a group of things selected or deselecting everything except the TablePane that was clicked on. |
protected java.awt.dnd.DropTarget |
dt
Links this PlayPen with an instance of PlayPenDropListener so users can drop stuff on the playpen. |
protected PlayPen.PPMouseListener |
ppMouseListener
This object receives all mouse and mouse motion events in the PlayPen. |
protected java.awt.Component |
ppScrollPane
The component that is used my the mouse listener to be scrolled. |
protected java.awt.Rectangle |
rubberBand
The RubberBand allows the user to select multiple ppcomponents by click-and-drag across a region. |
protected java.awt.Color |
rubberBandColor
This is the colour that the rubber band will be painted with. |
protected java.util.LinkedList |
selectionListeners
|
protected javax.swing.Action |
sendToBackAction
This action sends the selected TablePane or Relationship to the back/bottom of the component stack. |
protected java.util.Set<java.lang.String> |
tableNames
Maps table names (Strings) to Integers. |
protected java.util.LinkedList |
undoEventListeners
|
protected double |
zoom
The visual magnification factor for this playpen. |
protected javax.swing.Action |
zoomInAction
The zoom in action used by the mouse listener. |
protected javax.swing.Action |
zoomOutAction
The zoom out action used by the mouse listener. |
| Fields inherited from class javax.swing.JComponent |
|---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
| Fields inherited from class java.awt.Component |
|---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface java.awt.image.ImageObserver |
|---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
|---|---|
PlayPen(ArchitectSwingSession session)
Creates a play pen with reasonable defaults. |
|
PlayPen(ArchitectSwingSession session,
PlayPen pp)
Creates a new PlayPen with similar contents to the given PlayPen. |
|
| Method Summary | |
|---|---|
void |
addCancelableListener(PlayPen.CancelableListener l)
|
protected void |
addImpl(java.awt.Component c,
java.lang.Object constraints,
int index)
|
protected void |
addImpl(PlayPenComponent c,
java.lang.Object constraints,
int index)
Adds the given component to this PlayPen's content pane. |
void |
addObjects(java.util.List list,
java.awt.Point preferredLocation,
ca.sqlpower.swingui.SPSwingWorker nextProcess)
Calls importTableCopy(ca.sqlpower.architect.SQLTable, java.awt.Point) for each table contained in the given schema. |
void |
addPlayPenComponent(PlayPenComponent ppc,
java.awt.Point point)
This method is primarily for loading project files. |
void |
addPlayPenLifecycleListener(PlayPenLifecycleListener ppll)
|
void |
addRelationship(Relationship r)
|
void |
addSelectionListener(SelectionListener l)
|
void |
addTablePane(TablePane tp,
java.awt.Point point)
This method is primarily for loading project files. |
void |
addUndoEventListener(UndoCompoundEventListener l)
|
void |
dbChildrenInserted(SQLObjectEvent e)
Listens for property changes in the model (tables added). |
void |
dbChildrenRemoved(SQLObjectEvent e)
Listens for property changes in the model (columns removed). |
void |
dbObjectChanged(SQLObjectEvent e)
Listens for property changes in the model (table properties modified). |
void |
dbStructureChanged(SQLObjectEvent e)
Listens for property changes in the model (significant structure change). |
void |
destroy()
Disconnects this play pen from everything it's listening to. |
void |
endCompoundEdit(java.lang.String message)
|
PlayPenComponent |
findPPComponent(java.lang.Object model)
Searches this PlayPen's children for a PlayPenComponent with the given model. |
Relationship |
findRelationship(SQLRelationship r)
Deprecated. |
TablePane |
findTablePane(SQLTable t)
Deprecated. |
TablePane |
findTablePaneByName(java.lang.String name)
Returns a TablePane in this PlayPen whose name is name. |
void |
fireCancel()
|
protected void |
fireSelectionEvent(SelectionEvent e)
|
java.awt.Component |
getComponent(int i)
Deprecated. Calling this method from Architect code is almost certainly a mistake, but it needs to exist for Swing to function correctly. You probably want to use findTablePane(ca.sqlpower.architect.SQLTable), getRelationships(), or getTablePanes() instead. |
int |
getComponentCount()
Deprecated. Calling this method from Architect code is almost certainly a mistake, but it needs to exist for Swing to function correctly. You probably want to use getPPComponentCount instead. |
PlayPenContentPane |
getContentPane()
|
PlayPen.CursorManager |
getCursorManager()
|
java.awt.font.FontRenderContext |
getFontRenderContext()
|
PlayPen.MouseModeType |
getMouseMode()
|
javax.swing.Action |
getMouseZoomInAction()
Returns the zoom in action that the mouse uses for this PlayPen. |
javax.swing.Action |
getMouseZoomOutAction()
Returns the zoom out action that the mouse uses for this PlayPen. |
java.util.List<PlayPenComponent> |
getPlayPenComponents()
Returns a list of the playpen components in this playpen. |
PlayPenContentPane |
getPlayPenContentPane()
|
PopupMenuFactory |
getPopupFactory()
|
int |
getPPComponentCount()
Returns the number of components in this PlayPen's PlayPenContentPane. |
java.awt.Dimension |
getPreferredScrollableViewportSize()
|
java.awt.Dimension |
getPreferredSize()
Calculates the smallest rectangle that will completely enclose the visible components. |
java.util.List<Relationship> |
getRelationships()
Returns a list of the Relationship gui components in this playpen. |
java.awt.Rectangle |
getRubberBand()
|
int |
getScrollableBlockIncrement(java.awt.Rectangle visibleRect,
int orientation,
int direction)
|
boolean |
getScrollableTracksViewportHeight()
|
boolean |
getScrollableTracksViewportWidth()
|
int |
getScrollableUnitIncrement(java.awt.Rectangle visibleRect,
int orientation,
int direction)
|
java.awt.Component |
getScrollPane()
Returns the scrollPane used in this PlayPen. |
java.util.List<ContainerPane<?,?>> |
getSelectedContainers()
Returns a read-only view of the set of selected ContainerPane's in the PlayPen. |
java.util.List<PlayPenComponent> |
getSelectedItems()
Returns a read-only view of the set of selected children in the PlayPen. |
java.util.List<Relationship> |
getSelectedRelationShips()
Returns a read-only view of the set of selected relationships in the PlayPen. |
ArchitectSwingSession |
getSession()
|
java.util.Set<java.lang.String> |
getTableNames()
Returns the already in use table names. |
java.util.List<TablePane> |
getTablePanes()
Returns a list of the TablePane components in this playpen. |
java.util.List<SQLTable> |
getTables()
Returns a new list of all tables in this play pen. |
java.lang.String |
getToolTipText(java.awt.event.MouseEvent e)
Delegates to the content pane. |
java.awt.Dimension |
getUsedArea()
|
java.awt.Dimension |
getViewportSize()
|
java.awt.Point |
getViewPosition()
|
double |
getZoom()
|
boolean |
ignoreTreeSelection()
|
TablePane |
importTableCopy(SQLTable source,
java.awt.Point preferredLocation)
Adds a copy of the given source table to this playpen, using preferredLocation as the layout constraint. |
boolean |
isDebugEnabled()
Tells whether or not this PlayPen instance is in debugging mode. |
boolean |
isDraggingTablePanes()
|
boolean |
isPaintingEnabled()
See paintingEnabled. |
boolean |
isRenderingAntialiased()
|
boolean |
isSelectionInProgress()
Returns true if there is a multi-select operation in progress. |
void |
itemDeselected(SelectionEvent e)
Forwards the selection event e to all PlayPen
selection listeners. |
void |
itemSelected(SelectionEvent e)
Forwards the selection event e to all PlayPen
selection listeners. |
protected void |
normalize()
If some playPen components get dragged into a negative range all tables are then shifted so that the lowest x and y values are 0. |
void |
paintComponent(java.awt.Graphics g)
|
void |
removeCancelableListener(PlayPen.CancelableListener l)
|
void |
removeSelectionListener(SelectionListener l)
|
void |
removeSelectionListener(UndoCompoundEventListener l)
|
void |
selectAll()
Selects all selectable items in the PlayPen. |
void |
selectNone()
Deselects all selectable items in the PlayPen. |
void |
selectObjects(java.util.List<OLAPObject> selections,
OLAPTree tree)
Selects the playpen component that represents the given OLAPObjects. |
void |
selectObjects(java.util.List<SQLObject> selections)
Selects the playpen component that represents the given SQLObject. |
void |
setChildPosition(PlayPenComponent child,
int x,
int y)
Calls setChildPositionImpl(child, x, y). |
void |
setChildPosition(PlayPenComponent child,
java.awt.Point p)
Calls setChildPositionImpl(child, p.x, p.y). |
protected void |
setChildPositionImpl(PlayPenComponent child,
int x,
int y)
Scales the given X and Y co-ords from the visible point (x,y) to the actual internal location, and sets child's position accordingly. |
protected void |
setDatabaseConnection(ca.sqlpower.sql.SPDataSource dbcs)
|
void |
setDraggingTablePanes(boolean draggingTablePanes)
|
void |
setFontRenderContext(java.awt.font.FontRenderContext frc)
|
void |
setIgnoreTreeSelection(boolean value)
|
void |
setInitialViewPosition()
|
void |
setMouseMode(PlayPen.MouseModeType mouseMode)
|
void |
setMouseZoomInAction(javax.swing.Action zoomInAction)
Sets the zoom in action for which the mouse uses for this PlayPen. |
void |
setMouseZoomOutAction(javax.swing.Action zoomOutAction)
Sets the zoom out action for which the mouse uses for this PlayPen. |
void |
setPaintingEnabled(boolean paintingEnabled)
See paintingEnabled. |
void |
setPopupFactory(PopupMenuFactory popupFactory)
|
void |
setRenderingAntialiased(boolean v)
|
void |
setScrollPane(java.awt.Component ppScrollPane)
Sets the scrollPane that will be scrolled when the mouse wheel is moved for this PlayPen. |
void |
setupKeyboardActions()
Sets up the generic keyboard actions for this playpen. |
void |
setViewportSize(int width,
int height)
|
void |
setViewPosition(java.awt.Point p)
|
void |
setZoom(double newZoom)
|
void |
showSelected()
Scrolls the playpen to show the selected objects. |
void |
startCompoundEdit(java.lang.String message)
|
java.awt.Point |
unzoomPoint(java.awt.Point p)
Modifies the given point p from apparent position in screen space to model space. |
java.awt.Rectangle |
unzoomRect(java.awt.Rectangle r)
Modifies the given rect r from apparent position in screen space to model space. |
void |
updateHiddenColumns()
|
java.awt.Point |
zoomPoint(java.awt.Point p)
Modifies the given point p in model space to apparent position in screen space. |
java.awt.Rectangle |
zoomRect(java.awt.Rectangle r)
Modifies the given rect p in model space to apparent position in screen space. |
| Methods inherited from class javax.swing.JPanel |
|---|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
| Methods inherited from class javax.swing.JComponent |
|---|
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update |
| Methods inherited from class java.awt.Container |
|---|
add, add, add, add, add, addContainerListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponentAt, getComponentAt, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree |
| Methods inherited from class java.awt.Component |
|---|
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected java.awt.dnd.DropTarget dt
protected java.util.Set<java.lang.String> tableNames
protected PlayPen.PPMouseListener ppMouseListener
protected java.awt.Rectangle rubberBand
protected java.awt.Color rubberBandColor
protected double zoom
protected PlayPenContentPane contentPane
protected javax.swing.Action bringToFrontAction
protected javax.swing.Action sendToBackAction
protected javax.swing.Action zoomInAction
protected javax.swing.Action zoomOutAction
protected java.awt.Component ppScrollPane
protected javax.swing.JDialog dbcsDialog
protected boolean draggingTablePanes
protected java.util.LinkedList selectionListeners
protected java.util.LinkedList<PlayPen.CancelableListener> cancelableListeners
protected java.util.LinkedList undoEventListeners
| Constructor Detail |
|---|
public PlayPen(ArchitectSwingSession session)
destroy() when you are
done with it.
session - The session this play pen belongs to. Null is not allowed.
public PlayPen(ArchitectSwingSession session,
PlayPen pp)
Remember to call destroy() when you are done with this playpen!
session - The session that this new copy should live in. If you specify a session other
than the session that the given playpen lives in, it should still produce a usable copy, however
be aware that the underlying SQLObjects will be shared between the two sessions.pp - The playpen to duplicate.| Method Detail |
|---|
public void destroy()
As the method name implies, once you have called this method, this PlayPen instance will not function properly, so you should stop using it.
public java.util.List<SQLTable> getTables()
throws ArchitectException
ArchitectExceptionprotected void setDatabaseConnection(ca.sqlpower.sql.SPDataSource dbcs)
public void setupKeyboardActions()
public boolean isDebugEnabled()
public void setChildPosition(PlayPenComponent child,
java.awt.Point p)
public void setChildPosition(PlayPenComponent child,
int x,
int y)
protected void setChildPositionImpl(PlayPenComponent child,
int x,
int y)
child - a component in this PlayPen's content pane.x - the apparent visible X co-ordinatey - the apparent visible Y co-ordinatepublic javax.swing.Action getMouseZoomInAction()
public void setMouseZoomInAction(javax.swing.Action zoomInAction)
zoomInAction - The zoom in action for the mouse to use in this PlayPen.public javax.swing.Action getMouseZoomOutAction()
public void setMouseZoomOutAction(javax.swing.Action zoomOutAction)
zoomOutAction - The zoom out action for the mouse to use in this PlayPen.public java.awt.Component getScrollPane()
public void setScrollPane(java.awt.Component ppScrollPane)
ppScrollPane - The scrollPane to be scrolled when the mouse wheel is movedpublic java.awt.Point zoomPoint(java.awt.Point p)
p - The point in model space (the space where the actual
components of the content pane live). THIS PARAMETER IS MODIFIED.
public java.awt.Point unzoomPoint(java.awt.Point p)
p - The point in visible screen space (the space where
mouse events are reported). THIS PARAMETER IS MODIFIED.
public java.awt.Rectangle zoomRect(java.awt.Rectangle r)
r - The rectangle in model space (the space where the actual
components of the content pane live). THIS PARAMETER IS MODIFIED.
public java.awt.Rectangle unzoomRect(java.awt.Rectangle r)
r - The rectangle in visible screen space (the space where
mouse events are reported). THIS PARAMETER IS MODIFIED.
public void setZoom(double newZoom)
public double getZoom()
public void setRenderingAntialiased(boolean v)
public boolean isRenderingAntialiased()
public PlayPenContentPane getContentPane()
public java.awt.Dimension getPreferredSize()
getPreferredSize in class javax.swing.JComponentpublic java.awt.Dimension getUsedArea()
public java.awt.Dimension getViewportSize()
public void setViewportSize(int width,
int height)
protected void normalize()
public java.awt.Point getViewPosition()
public void setViewPosition(java.awt.Point p)
public void setInitialViewPosition()
public void setPaintingEnabled(boolean paintingEnabled)
paintingEnabled.
public boolean isPaintingEnabled()
paintingEnabled.
public void paintComponent(java.awt.Graphics g)
paintComponent in class javax.swing.JComponent
protected void addImpl(java.awt.Component c,
java.lang.Object constraints,
int index)
addImpl in class java.awt.Container
protected void addImpl(PlayPenComponent c,
java.lang.Object constraints,
int index)
c - The component to add. The PlayPen only accepts
Relationship and ContainerPane components.constraints - The Point at which to add the componentindex - ignored for now, but would normally specify the
index of insertion for c in the child list.public void addRelationship(Relationship r)
public void addTablePane(TablePane tp,
java.awt.Point point)
tp - point -
public void addPlayPenComponent(PlayPenComponent ppc,
java.awt.Point point)
ppc - The component to add.point - The location to add the component at, in logical coordinates.
If you don't care where the component lands, or the
component's position is constrained by other factors
(Relationships are positioned relative to the two table panes
they connect) then this argument can be null.public int getComponentCount()
getComponentCount in class java.awt.Containerpublic java.awt.Component getComponent(int i)
findTablePane(ca.sqlpower.architect.SQLTable), getRelationships(), or getTablePanes() instead.
getComponent in class java.awt.Containerpublic java.lang.String getToolTipText(java.awt.event.MouseEvent e)
Important Note: If you want tooltips to be active on this PlayPen instance, you have to call ToolTipManager.sharedInstance().registerComponent(pp) on this instance (where pp is whatever your reference to this playpen is called).
getToolTipText in class javax.swing.JComponent@Deprecated public TablePane findTablePane(SQLTable t)
public PlayPenComponent findPPComponent(java.lang.Object model)
public TablePane findTablePaneByName(java.lang.String name)
name.
Warning: Unique names are not currently enforced in the PlayPen's database; results will be unpredictable if there is more than one table with the name you are searching for.
Implementation note: This method may benefit from a Map-based lookup rather than the current linear search algorithm.
name, or null if no such TablePane is
in the play pen.@Deprecated public Relationship findRelationship(SQLRelationship r)
public java.util.List<Relationship> getRelationships()
public java.util.List<TablePane> getTablePanes()
public java.util.List<PlayPenComponent> getPlayPenComponents()
public java.util.Set<java.lang.String> getTableNames()
public int getPPComponentCount()
public TablePane importTableCopy(SQLTable source,
java.awt.Point preferredLocation)
throws ArchitectException
ArchitectExceptionSQLTable.inherit(ca.sqlpower.architect.SQLTable),
PlayPenLayout#addLayoutComponent(Component,Object)
public void addObjects(java.util.List list,
java.awt.Point preferredLocation,
ca.sqlpower.swingui.SPSwingWorker nextProcess)
throws ArchitectException
importTableCopy(ca.sqlpower.architect.SQLTable, java.awt.Point) for each table contained in the given schema.
ArchitectExceptionpublic void dbChildrenInserted(SQLObjectEvent e)
dbChildrenInserted in interface SQLObjectListenerpublic void dbChildrenRemoved(SQLObjectEvent e)
dbChildrenRemoved in interface SQLObjectListenerpublic void dbObjectChanged(SQLObjectEvent e)
dbObjectChanged in interface SQLObjectListenerpublic void dbStructureChanged(SQLObjectEvent e)
NOTE: This is not currently implemented.
dbStructureChanged in interface SQLObjectListenerpublic void selectNone()
public void selectAll()
public java.util.List<PlayPenComponent> getSelectedItems()
public java.util.List<ContainerPane<?,?>> getSelectedContainers()
public java.util.List<Relationship> getSelectedRelationShips()
public void itemSelected(SelectionEvent e)
e to all PlayPen
selection listeners.
itemSelected in interface SelectionListenerpublic void itemDeselected(SelectionEvent e)
e to all PlayPen
selection listeners.
itemDeselected in interface SelectionListenerpublic void addSelectionListener(SelectionListener l)
public void removeSelectionListener(SelectionListener l)
protected void fireSelectionEvent(SelectionEvent e)
public void addCancelableListener(PlayPen.CancelableListener l)
public void removeCancelableListener(PlayPen.CancelableListener l)
public void fireCancel()
public void addUndoEventListener(UndoCompoundEventListener l)
public void removeSelectionListener(UndoCompoundEventListener l)
public void startCompoundEdit(java.lang.String message)
public void endCompoundEdit(java.lang.String message)
public java.awt.Rectangle getRubberBand()
public boolean isSelectionInProgress()
public boolean isDraggingTablePanes()
public void setDraggingTablePanes(boolean draggingTablePanes)
public java.awt.Dimension getPreferredScrollableViewportSize()
getPreferredScrollableViewportSize in interface javax.swing.Scrollable
public int getScrollableBlockIncrement(java.awt.Rectangle visibleRect,
int orientation,
int direction)
getScrollableBlockIncrement in interface javax.swing.Scrollablepublic boolean getScrollableTracksViewportHeight()
getScrollableTracksViewportHeight in interface javax.swing.Scrollablepublic boolean getScrollableTracksViewportWidth()
getScrollableTracksViewportWidth in interface javax.swing.Scrollable
public int getScrollableUnitIncrement(java.awt.Rectangle visibleRect,
int orientation,
int direction)
getScrollableUnitIncrement in interface javax.swing.Scrollablepublic java.awt.font.FontRenderContext getFontRenderContext()
public void setFontRenderContext(java.awt.font.FontRenderContext frc)
public void selectObjects(java.util.List<SQLObject> selections)
throws ArchitectException
selection - A list of SQLObjects, should only have SQLColumn, SQLTable or SQLRelationship.
ArchitectException
public void selectObjects(java.util.List<OLAPObject> selections,
OLAPTree tree)
throws ArchitectException
selection - A list of OLAPObjects.
ArchitectExceptionpublic PlayPenContentPane getPlayPenContentPane()
public void setMouseMode(PlayPen.MouseModeType mouseMode)
public PlayPen.MouseModeType getMouseMode()
public ArchitectSwingSession getSession()
public PlayPen.CursorManager getCursorManager()
public PopupMenuFactory getPopupFactory()
public void setPopupFactory(PopupMenuFactory popupFactory)
public void setIgnoreTreeSelection(boolean value)
public boolean ignoreTreeSelection()
public void showSelected()
public void updateHiddenColumns()
public void addPlayPenLifecycleListener(PlayPenLifecycleListener ppll)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||