com.sas.swing.visuals.tableview
Class BasicRowHeaderUI

com.sas.swing.visuals.tableview.BasicRowHeaderUI
Direct Known Subclasses:
BasicOLAPRowHeaderUI

public class BasicRowHeaderUI


Nested Class Summary
 class BasicRowHeaderUI.MouseInputHandler
           
 
Field Summary
protected  RowHeader header
          The JTableHeader that is delegating the painting to this UI.
protected  javax.swing.event.MouseInputListener mouseInputListener
           
protected  javax.swing.CellRendererPane rendererPane
           
protected  boolean resizingHeader
           
protected  boolean resizingRow
           
 
Constructor Summary
BasicRowHeaderUI()
           
 
Method Summary
protected  java.awt.Dimension createHeaderSize()
           
protected  javax.swing.event.MouseInputListener createMouseInputListener()
          Creates the mouse listener for the JTable.
static javax.swing.plaf.ComponentUI createUI(javax.swing.JComponent h)
           
protected  RowHeader getHeader()
           
protected  java.awt.Component getHeaderRenderer(int rowIndex)
           
protected  int getHeaderWidth()
           
 java.awt.Dimension getMaximumSize(javax.swing.JComponent c)
          Return the maximum size of the header.
 java.awt.Dimension getMinimumSize(javax.swing.JComponent c)
          Return the minimum size of the header.
 java.awt.Dimension getPreferredSize(javax.swing.JComponent c)
          Return the preferred size of the header.
protected  void installDefaults()
          Initialize JTableHeader properties, e.g. font, foreground, and background.
protected  void installKeyboardActions()
          Register all keyboard actions on the JTableHeader.
protected  void installListeners()
          Attaches listeners to the JTableHeader.
 void installUI(javax.swing.JComponent c)
           
 boolean isResizingHeader()
           
 boolean isResizingRow()
           
protected  int modelIndexForRow(int row)
           
 void paint(java.awt.Graphics g, javax.swing.JComponent c)
           
protected  void paintCell(java.awt.Graphics g, java.awt.Rectangle cellRect, int rowIndex)
           
protected  void paintCells(java.awt.Graphics g, int rMin, int rMax)
           
 void setResizingHeader(boolean newValue)
           
 void setResizingRow(boolean newValue)
           
protected  void uninstallDefaults()
           
protected  void uninstallKeyboardActions()
           
protected  void uninstallListeners()
           
 void uninstallUI(javax.swing.JComponent c)
           
protected  int viewIndexForRow(int row)
           
 

Field Detail

header

protected RowHeader header
The JTableHeader that is delegating the painting to this UI.


rendererPane

protected javax.swing.CellRendererPane rendererPane

resizingHeader

protected boolean resizingHeader

resizingRow

protected boolean resizingRow

mouseInputListener

protected javax.swing.event.MouseInputListener mouseInputListener
Constructor Detail

BasicRowHeaderUI

public BasicRowHeaderUI()
Method Detail

viewIndexForRow

protected int viewIndexForRow(int row)

modelIndexForRow

protected int modelIndexForRow(int row)

getHeader

protected RowHeader getHeader()

setResizingHeader

public void setResizingHeader(boolean newValue)

isResizingHeader

public boolean isResizingHeader()

setResizingRow

public void setResizingRow(boolean newValue)

isResizingRow

public boolean isResizingRow()

createMouseInputListener

protected javax.swing.event.MouseInputListener createMouseInputListener()
Creates the mouse listener for the JTable.


createUI

public static javax.swing.plaf.ComponentUI createUI(javax.swing.JComponent h)

installUI

public void installUI(javax.swing.JComponent c)
Overrides:
installUI in class javax.swing.plaf.ComponentUI

installDefaults

protected void installDefaults()
Initialize JTableHeader properties, e.g. font, foreground, and background. The font, foreground, and background properties are only set if their current value is either null or a UIResource, other properties are set if the current value is null.

See Also:
installUI(javax.swing.JComponent)

installListeners

protected void installListeners()
Attaches listeners to the JTableHeader.


installKeyboardActions

protected void installKeyboardActions()
Register all keyboard actions on the JTableHeader.


uninstallUI

public void uninstallUI(javax.swing.JComponent c)
Overrides:
uninstallUI in class javax.swing.plaf.ComponentUI

uninstallDefaults

protected void uninstallDefaults()

uninstallListeners

protected void uninstallListeners()

uninstallKeyboardActions

protected void uninstallKeyboardActions()

getHeaderWidth

protected int getHeaderWidth()

createHeaderSize

protected java.awt.Dimension createHeaderSize()

getMinimumSize

public java.awt.Dimension getMinimumSize(javax.swing.JComponent c)
Return the minimum size of the header. The minimum height is the sum of the minimum heights of each row (plus inter-cell spacing).

Overrides:
getMinimumSize in class javax.swing.plaf.ComponentUI

getPreferredSize

public java.awt.Dimension getPreferredSize(javax.swing.JComponent c)
Return the preferred size of the header. The preferred height is the maximum of the preferred heights of all of the components provided by the header renderers. The preferred height is the sum of the preferred heights of each row (plus inter-cell spacing).

Overrides:
getPreferredSize in class javax.swing.plaf.ComponentUI

getMaximumSize

public java.awt.Dimension getMaximumSize(javax.swing.JComponent c)
Return the maximum size of the header. The maximum height is the sum of the maximum heights of each row (plus inter-cell spacing).

Overrides:
getMaximumSize in class javax.swing.plaf.ComponentUI

paint

public void paint(java.awt.Graphics g,
                  javax.swing.JComponent c)
Overrides:
paint in class javax.swing.plaf.ComponentUI

paintCell

protected void paintCell(java.awt.Graphics g,
                         java.awt.Rectangle cellRect,
                         int rowIndex)

getHeaderRenderer

protected java.awt.Component getHeaderRenderer(int rowIndex)

paintCells

protected void paintCells(java.awt.Graphics g,
                          int rMin,
                          int rMax)



Copyright © 2009 SAS Institute Inc. All Rights Reserved.