org.gecode.explorer.swing.SwingInspector Class Reference
Inherits org.gecode.explorer.ExplorerEventListener.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 | ( | ) |
| 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 org.gecode.explorer.swing.SwingInspector.s [protected] |
String org.gecode.explorer.swing.SwingInspector.name [protected] |
boolean org.gecode.explorer.swing.SwingInspector.isList [protected] |
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.
JDialog org.gecode.explorer.swing.SwingInspector.dialog = null [package] |
JComponent org.gecode.explorer.swing.SwingInspector.list = null [package] |
Definition at line 63 of file SwingInspector.java.
int org.gecode.explorer.swing.SwingInspector.poscnt = 0 [static, package] |
Definition at line 120 of file SwingInspector.java.
final Color org.gecode.explorer.swing.SwingInspector.colors[] [protected] |
Initial value:
{Color.blue, Color.cyan, Color.gray, Color.green, Color.magenta,
Color.orange, Color.pink, Color.red, Color.yellow}
Definition at line 146 of file SwingInspector.java.
The documentation for this class was generated from the following file:
- org/gecode/explorer/swing/SwingInspector.java (Revision: 2944)
