com.guigarage.jgrid.ui
Class MacOsGridUI

java.lang.Object
  extended by javax.swing.plaf.ComponentUI
      extended by com.guigarage.jgrid.ui.GridUI
          extended by com.guigarage.jgrid.ui.BasicGridUI
              extended by com.guigarage.jgrid.ui.MacOsGridUI

public class MacOsGridUI
extends BasicGridUI

A default UI for the Grid. The UI is for MAC OS and the rendering looks like the grid in iPhoto.

Since:
0.1
Version:
0.1
Author:
Hendrik Ebbers

Field Summary
 
Fields inherited from class com.guigarage.jgrid.ui.BasicGridUI
grid
 
Constructor Summary
MacOsGridUI()
           
 
Method Summary
 void installUI(JComponent c)
           
protected  void paintCell(Graphics g, JComponent c, int index, Rectangle bounds, int leadIndex)
          Paints the specified cell.
protected  void paintCellBorder(Graphics g, JComponent c, int index, Rectangle bounds, int leadIndex)
          Paints the Border for the specified cell.
 
Methods inherited from class com.guigarage.jgrid.ui.BasicGridUI
getCellAt, getCellBounds, getCellsIntersectedBy, getColumnCount, getColumnForIndex, getIndexAt, getPreferredHeightForWidth, getPreferredSize, getRowCount, getRowForIndex, isDebugMode, markCellBoundsAsDirty, paint, uninstallUI
 
Methods inherited from class javax.swing.plaf.ComponentUI
contains, createUI, getAccessibleChild, getAccessibleChildrenCount, getBaseline, getBaselineResizeBehavior, getMaximumSize, getMinimumSize, update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MacOsGridUI

public MacOsGridUI()
Method Detail

installUI

public void installUI(JComponent c)
Overrides:
installUI in class BasicGridUI

paintCell

protected void paintCell(Graphics g,
                         JComponent c,
                         int index,
                         Rectangle bounds,
                         int leadIndex)
Description copied from class: BasicGridUI
Paints the specified cell. Subclasses should override this method and use the specified Graphics object to render the cell.

Overrides:
paintCell in class BasicGridUI
Parameters:
g - the Graphics context in which to paint
c - the JGrid being painted
index - the cellindex
bounds - the bounds of the cell

paintCellBorder

protected void paintCellBorder(Graphics g,
                               JComponent c,
                               int index,
                               Rectangle bounds,
                               int leadIndex)
Description copied from class: BasicGridUI
Paints the Border for the specified cell. Subclasses should override this method and use the specified Graphics object to render the Border of the cell.

Overrides:
paintCellBorder in class BasicGridUI
Parameters:
g - the Graphics context in which to paint
c - the JGrid being painted
index - the cellindex
bounds - the bounds of the cell


Copyright © 2012. All Rights Reserved.