Class TableLayoutDebuggingPanel

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible

public class TableLayoutDebuggingPanel extends JPanel
A special panel that when used with a TableLayout, will draw all the table cell boundaries. This is intended for use when debugging only.
Version:
$Revision: 1.4 $
See Also:
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      See Also:
    • lineColor_

      private Color lineColor_
    • gridLinesEnabled_

      private boolean gridLinesEnabled_
  • Constructor Details

    • TableLayoutDebuggingPanel

      public TableLayoutDebuggingPanel()
      Create a new panel with a default line colour of red.
    • TableLayoutDebuggingPanel

      public TableLayoutDebuggingPanel(LayoutManager layout)
      Create a new panel with the specified layout and a default line colour of red.
      Parameters:
      layout - The new layout manager.
  • Method Details

    • setLineColor

      public void setLineColor(Color lineColor)
      Set the line colour.
      Parameters:
      lineColor - The new line colour.
    • getLineColor

      public Color getLineColor()
      Return the current line colour.
      Returns:
      the line colour.
    • paint

      public void paint(Graphics g)
      Override the painting logic to draw the gridlines.
      Overrides:
      paint in class JComponent
      Parameters:
      g - The graphics object.
    • setGridLinesEnabled

      public void setGridLinesEnabled(boolean enabled)
      Set whether or not the grid lines are visible. Default is true.
      Parameters:
      enabled - True if the grid lines are to be shown.
    • isGridLinesEnabled

      public boolean isGridLinesEnabled()
      Return true if the grid lines are enabled.
      Returns:
      true if the grid lines are enabled.
    • assertNotNull

      protected final void assertNotNull(String fieldName, Object fieldValue) throws DetailedNullPointerException
      Verify that the specified value is not null. If it is then throw an exception
      Parameters:
      fieldName - The name of the field to check
      fieldValue - The value of the field to check
      Throws:
      DetailedNullPointerException - If fieldValue is null