ca.sqlpower.architect.swingui.olap
Class UsageComponent

java.lang.Object
  extended by ca.sqlpower.architect.swingui.PlayPenComponent
      extended by ca.sqlpower.architect.swingui.olap.UsageComponent
All Implemented Interfaces:
LayoutEdge, Selectable

public class UsageComponent
extends PlayPenComponent
implements LayoutEdge

A component that visually indicates a usage of one olap pane by another. For example, a dimension usage or a cube usage.


Field Summary
 
Fields inherited from class ca.sqlpower.architect.swingui.PlayPenComponent
backgroundColor, componentPreviouslySelected, foregroundColor, selected
 
Constructor Summary
UsageComponent(PlayPenContentPane parent, OLAPObject model, OLAPPane<?,?> pane1, OLAPPane<?,?> pane2)
           
 
Method Summary
 LayoutNode getHeadNode()
          Returns the node whose inbound edge list includes this edge.
 OLAPObject getModel()
           
 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.
 OLAPPane<?,?> getPane1()
          Returns one of the panes that this usage component connects together.
 OLAPPane<?,?> getPane2()
          Returns one of the panes that this usage component connects together.
 LayoutNode getTailNode()
          Returns the node whose outbound edge list includes this edge.
 UsageComponentUI getUI()
           
 void handleMouseEvent(java.awt.event.MouseEvent evt)
          Performs the component specific actions for the given MouseEvent.
protected  void updateUI()
          Creates and installs the UI delegate.
 
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, getPopup, getPreferredLocation, getPreferredSize, getSize, getToolTipText, getWidth, getX, getY, isOpaque, isSelected, paint, removePropertyChangeListener, removeSelectionListener, repaint, repaint, repaint, revalidate, setBackgroundColor, setBounds, setBoundsImpl, setForegroundColor, setInsets, setLocation, setLocation, setOpaque, setSelected, setSize, setToolTipText, setUI, showPopup
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UsageComponent

public UsageComponent(PlayPenContentPane parent,
                      OLAPObject model,
                      OLAPPane<?,?> pane1,
                      OLAPPane<?,?> pane2)
Method Detail

updateUI

protected void updateUI()
Creates and installs the UI delegate. This generic UsageComponent creates a UsageComponentUI, which should be sufficient for most purposes. If your subclass needs a different UI, override this method and install a different one.

Nasty warning: If you override this method, be aware that it's going to get called before your constructor has been invoked. How weird is that?


getModel

public OLAPObject getModel()
Specified by:
getModel in class PlayPenComponent

getName

public java.lang.String getName()
Description copied from class: PlayPenComponent
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.

Specified by:
getName in class PlayPenComponent

handleMouseEvent

public void handleMouseEvent(java.awt.event.MouseEvent evt)
Description copied from class: PlayPenComponent
Performs the component specific actions for the given MouseEvent.

Specified by:
handleMouseEvent in class PlayPenComponent

getUI

public UsageComponentUI getUI()
Overrides:
getUI in class PlayPenComponent

getPane1

public OLAPPane<?,?> getPane1()
Returns one of the panes that this usage component connects together.


getPane2

public OLAPPane<?,?> getPane2()
Returns one of the panes that this usage component connects together.


getHeadNode

public LayoutNode getHeadNode()
Description copied from interface: LayoutEdge
Returns the node whose inbound edge list includes this edge.

Specified by:
getHeadNode in interface LayoutEdge

getTailNode

public LayoutNode getTailNode()
Description copied from interface: LayoutEdge
Returns the node whose outbound edge list includes this edge.

Specified by:
getTailNode in interface LayoutEdge


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