| javax.swing.JPanel com.jgoodies.forms.debug.FormDebugPanel
FormDebugPanel | public class FormDebugPanel extends JPanel (Code) | | A panel that paints grid bounds if and only if the panel's layout manager is
a
FormLayout . You can tweak the debug paint process by setting a
custom grid color, painting optional diagonals and painting the grid in the
background.
This class is not intended to be extended. However, it is not marked as
final to allow users to subclass it for debugging purposes. In
general it is recommended to use JPanel instances, not
extend them. You can see this implementation style in the Forms
tutorial classes. Rarely there's a need to extend JPanel; for example if you
provide a custom behavior for #paintComponent or
#updateUI .
author: Karsten Lentzsch version: $Revision: 1.2 $ See Also: FormDebugUtils |
Constructor Summary | |
public | FormDebugPanel() Constructs a FormDebugPanel with all options turned off. | public | FormDebugPanel(FormLayout layout) Constructs a FormDebugPanel on the given FormLayout instance that paints
the grid in the foreground and paints no diagonals. | public | FormDebugPanel(boolean paintInBackground, boolean paintDiagonals) Constructs a FormDebugPanel on the given FormLayout using the specified
settings that are otherwise turned off. | public | FormDebugPanel(FormLayout layout, boolean paintInBackground, boolean paintDiagonals) Constructs a FormDebugPanel on the given FormLayout using the specified
settings that are otherwise turned off. |
FormDebugPanel | public FormDebugPanel()(Code) | | Constructs a FormDebugPanel with all options turned off.
|
FormDebugPanel | public FormDebugPanel(FormLayout layout)(Code) | | Constructs a FormDebugPanel on the given FormLayout instance that paints
the grid in the foreground and paints no diagonals.
Parameters: layout - the panel's FormLayout instance |
FormDebugPanel | public FormDebugPanel(boolean paintInBackground, boolean paintDiagonals)(Code) | | Constructs a FormDebugPanel on the given FormLayout using the specified
settings that are otherwise turned off.
Parameters: paintInBackground - true to paint grid lines in the background, false to paint thegrid in the foreground Parameters: paintDiagonals - true to paint diagonals, false to not paint them |
FormDebugPanel | public FormDebugPanel(FormLayout layout, boolean paintInBackground, boolean paintDiagonals)(Code) | | Constructs a FormDebugPanel on the given FormLayout using the specified
settings that are otherwise turned off.
Parameters: layout - the panel's FormLayout instance Parameters: paintInBackground - true to paint grid lines in the background, false to paint thegrid in the foreground Parameters: paintDiagonals - true to paint diagonals, false to not paint them |
paint | public void paint(Graphics g)(Code) | | Paints the panel. If the panel's layout manager is a FormLayout it paints
the form's grid lines.
Parameters: g - the Graphics object to paint on |
paintComponent | protected void paintComponent(Graphics g)(Code) | | Paints the component and - if background painting is enabled - the grid
Parameters: g - the Graphics object to paint on |
setGridColor | public void setGridColor(Color color)(Code) | | Sets the debug grid's color.
Parameters: color - the color used to paint the debug grid |
setPaintDiagonals | public void setPaintDiagonals(boolean b)(Code) | | Enables or disables to paint the panel's diagonals.
Parameters: b - true to paint diagonals, false to not paint them |
setPaintInBackground | public void setPaintInBackground(boolean b)(Code) | | Specifies to paint in background or foreground.
Parameters: b - true to paint in the background, false for the foreground |
|
|