Generated on Fri Oct 6 16:26:48 2006 for Gecode/J by doxygen 1.4.7

org.gecode.explorer.swing.SwingInspector Class Reference

Inherits org.gecode.explorer.ExplorerEventListener.

List of all members.


Detailed Description

This class can be subclassed to implement a custom component for displaying an inspected node.

Definition at line 47 of file SwingInspector.java.

Public Member Functions

 SwingInspector (String name, Boolean isList)
 Construct an Inspector with given name and display-mode.
String getName ()
void nodeClickEvent (org.gecode.explorer.Inspector inspect, SpaceNode s)
void paintComponent (Graphics g)
 Convenience implementation of the paintCOmponent method forwardingthe logic to draw(Graphics2D).
void draw (Space s, Graphics2D g)
 The logic of the component.
SwingInspector clone ()
 Covariant definition of clone().

Protected Member Functions

Color getColor (int i)
 Get color i, where colors are alternatively brightened and darkened for each new iteration through the array of colors.

Protected Attributes

Space s
 Space reference for the Space that is inspected.
String name
 Name of this inspection.
boolean isList
 Mode of this inspection.
final Color colors []
 Predefined colors from the Color class.

Package Functions

void create (JFrame parent)

Package Attributes

JDialog dialog = null
 Members for the display of the component.
JComponent list = null

Static Package Attributes

static int poscnt = 0


Constructor & Destructor Documentation

org.gecode.explorer.swing.SwingInspector.SwingInspector ( String  name,
Boolean  isList 
)

Construct an Inspector with given name and display-mode.

Definition at line 67 of file SwingInspector.java.


Member Function Documentation

String org.gecode.explorer.swing.SwingInspector.getName (  )  [virtual]

Implements org.gecode.explorer.ExplorerEventListener.

Definition at line 72 of file SwingInspector.java.

void org.gecode.explorer.swing.SwingInspector.nodeClickEvent ( org.gecode.explorer.Inspector  inspect,
SpaceNode  s 
)

Definition at line 73 of file SwingInspector.java.

void org.gecode.explorer.swing.SwingInspector.paintComponent ( Graphics  g  ) 

Convenience implementation of the paintCOmponent method forwardingthe logic to draw(Graphics2D).

Definition at line 95 of file SwingInspector.java.

void org.gecode.explorer.swing.SwingInspector.draw ( Space  s,
Graphics2D  g 
)

The logic of the component.

This method should draw the component with respect to the stored Space-copy.

Definition at line 103 of file SwingInspector.java.

SwingInspector org.gecode.explorer.swing.SwingInspector.clone (  ) 

Covariant definition of clone().

Definition at line 109 of file SwingInspector.java.

void org.gecode.explorer.swing.SwingInspector.create ( JFrame  parent  )  [package]

Definition at line 121 of file SwingInspector.java.

Color org.gecode.explorer.swing.SwingInspector.getColor ( int  i  )  [protected]

Get color i, where colors are alternatively brightened and darkened for each new iteration through the array of colors.

Definition at line 152 of file SwingInspector.java.


Member Data Documentation

Space reference for the Space that is inspected.

Definition at line 51 of file SwingInspector.java.

Name of this inspection.

Definition at line 53 of file SwingInspector.java.

Mode of this inspection.

If list is true, the inspected spaces are displayed in a list. If list is false, each insection will overwrite the previous inspection.

Definition at line 59 of file SwingInspector.java.

Members for the display of the component.

Definition at line 62 of file SwingInspector.java.

JComponent org.gecode.explorer.swing.SwingInspector.list = null [package]

Definition at line 63 of file SwingInspector.java.

Definition at line 120 of file SwingInspector.java.

Initial value:

 
    {Color.blue,   Color.cyan, Color.gray, Color.green, Color.magenta, 
     Color.orange, Color.pink, Color.red,  Color.yellow}
Predefined colors from the Color class.

Definition at line 146 of file SwingInspector.java.


The documentation for this class was generated from the following file: