ca.sqlpower.architect.swingui
Class BasicTablePaneUI

java.lang.Object
  extended by ca.sqlpower.architect.swingui.ContainerPaneUI
      extended by ca.sqlpower.architect.swingui.TablePaneUI
          extended by ca.sqlpower.architect.swingui.BasicTablePaneUI
All Implemented Interfaces:
PlayPenComponentUI, java.beans.PropertyChangeListener, java.io.Serializable, java.util.EventListener

public class BasicTablePaneUI
extends TablePaneUI
implements java.beans.PropertyChangeListener, java.io.Serializable

See Also:
Serialized Form

Field Summary
static int BOX_LINE_THICKNESS
          Thickness (in Java2D units) of the surrounding box.
static int GAP
          Amount of space left between the surrounding box and the text it contains.
protected  int minimumWidth
          Doesn't return a preferredSize with width less than this.
static int PK_GAP
          The amount of extra (vertical) space between the PK columns and the non-PK columns.
protected  java.awt.Color selectedColor
          Colour of the text background for selected columns.
 
Constructor Summary
BasicTablePaneUI()
           
 
Method Summary
 int columnIndexToCentreY(int colidx)
          This delegate method is specified by TablePane.columnIndexToCentreY(int).
 boolean contains(java.awt.Point p)
           
static PlayPenComponentUI createUI(PlayPenComponent c)
           
 java.awt.Dimension getPreferredSize()
           
 java.awt.Dimension getPreferredSize(PlayPenComponent ppc)
           
 void installUI(PlayPenComponent c)
           
 void paint(java.awt.Graphics2D g)
           
 void paint(java.awt.Graphics g, PlayPenComponent c)
           
 int pointToItemIndex(java.awt.Point p)
          This method is specified by TablePane.pointToColumnIndex().
 void propertyChange(java.beans.PropertyChangeEvent e)
          Tells the component to revalidate (also causes a repaint) if the given property change makes this necessary (any properties rendered visibly repainting necessary).
 void revalidate()
           
 void uninstallUI(PlayPenComponent c)
           
 
Methods inherited from class ca.sqlpower.architect.swingui.ContainerPaneUI
paintInsertionPoint
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BOX_LINE_THICKNESS

public static final int BOX_LINE_THICKNESS
Thickness (in Java2D units) of the surrounding box.

See Also:
Constant Field Values

GAP

public static final int GAP
Amount of space left between the surrounding box and the text it contains.

See Also:
Constant Field Values

PK_GAP

public static final int PK_GAP
The amount of extra (vertical) space between the PK columns and the non-PK columns.

See Also:
Constant Field Values

selectedColor

protected java.awt.Color selectedColor
Colour of the text background for selected columns.


minimumWidth

protected int minimumWidth
Doesn't return a preferredSize with width less than this.

Constructor Detail

BasicTablePaneUI

public BasicTablePaneUI()
Method Detail

createUI

public static PlayPenComponentUI createUI(PlayPenComponent c)

installUI

public void installUI(PlayPenComponent c)
Specified by:
installUI in interface PlayPenComponentUI

uninstallUI

public void uninstallUI(PlayPenComponent c)
Specified by:
uninstallUI in interface PlayPenComponentUI

paint

public void paint(java.awt.Graphics2D g)
Specified by:
paint in interface PlayPenComponentUI

paint

public void paint(java.awt.Graphics g,
                  PlayPenComponent c)

getPreferredSize

public java.awt.Dimension getPreferredSize()
Specified by:
getPreferredSize in interface PlayPenComponentUI

getPreferredSize

public java.awt.Dimension getPreferredSize(PlayPenComponent ppc)

pointToItemIndex

public int pointToItemIndex(java.awt.Point p)
This method is specified by TablePane.pointToColumnIndex(). This implementation depends on the implementation of paint().

Specified by:
pointToItemIndex in class ContainerPaneUI

columnIndexToCentreY

public int columnIndexToCentreY(int colidx)
Description copied from class: TablePaneUI
This delegate method is specified by TablePane.columnIndexToCentreY(int).

Specified by:
columnIndexToCentreY in class TablePaneUI

propertyChange

public void propertyChange(java.beans.PropertyChangeEvent e)
Tells the component to revalidate (also causes a repaint) if the given property change makes this necessary (any properties rendered visibly repainting necessary).

Specified by:
propertyChange in interface java.beans.PropertyChangeListener

contains

public boolean contains(java.awt.Point p)
Specified by:
contains in interface PlayPenComponentUI

revalidate

public void revalidate()
Specified by:
revalidate in interface PlayPenComponentUI


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