Package

cogdebugger

coggui3ports

Permalink

package coggui3ports

Visibility
  1. Public
  2. All

Type Members

  1. class ClearButton extends ReactiveButton

    Permalink

    A transparent button with only text "label" visible.

    A transparent button with only text "label" visible. The user attaches a function literal, "function", to the button which is called whenever the button is pressed.

  2. sealed trait Edge extends AnyRef

    Permalink

    An edge that appears in the network view.

    An edge that appears in the network view. Classes that don't care whether the underlying graph implementation is JGraph or JUNG based can use this class and its immediate subclasses.

  3. case class FramePackedEvent(source: InternalFrame) extends UIEvent with Product with Serializable

    Permalink

    This event is used to signal that a ProbeFrame has sized itself and is ready for display.

    This event is used to signal that a ProbeFrame has sized itself and is ready for display. This is important for the cogdebugger.coggui3ports.Tiler, as it can't know where to place a ProbeFrame until its final size is determined.

  4. class Graph extends mxGraph

    Permalink

    A model of a Graph which can be visually displayed using the GraphPanel class.

    A model of a Graph which can be visually displayed using the GraphPanel class. This is built on the JGraphX library.

    A Graph consists of a set of vertices connected with a set of directed edges. Each vertex (or edge) is bound to an Object (of any class) when it is created. This creates a one-to-one correspondence between an arbitrary programmatic representation of a Graph and the specific model provided by JGraphX.

    Vertices are created using one of the "addVertex" methods, and are interconnected using the "connect" method. See the TestGraphPanel class for an example of building a Graph model.

  5. class GraphPanel extends mxGraphComponent

    Permalink

    A Panel which displays a Graph (vertices and edges).

    A Panel which displays a Graph (vertices and edges). The graph uses rectangles filled with one or two lines of text for the vertices, and lines terminated with an arrowhead for the edges. The graph is automatically placed using a vertical hierarchical placement algorithm; this means that very large graphs may take a long time to display since the placement algorithmic is roughly quadratic.

    The panel has "as-needed" scrollbars to accommodate large graphs, but there is no mechanism for resizing the graph itself. The placement algorithm attempts to make as compact of a layout as it can, so this should not be too big of a problem. Java2D might be used later to add zooming if needed.

    A vertex or edge within the viewed graph may be "selected" or "deselected" by clicking on it with the mouse; the selected state toggles with each click. Graphically the selected state is shown as a heavy, black line (edge) or heavy, black bounding box (vertex). Deselecting a vertex or edge returns it to a thinner, lighter appearance.

    When a vertex or edge has its selected state changed by the user's mouse, a vertexEvent or edgeEvent is generated respectively. These create calls into user specified routines, "vertexEvent" or "edgeEvent", to report the state change. When either routine is called, the user object associated with the vertex or edge is passed as the first parameter, and the new selected state is passed as the second parameter. See the Graph class below for a description of how user objects are associated with vertices and edges.

    Note that creating a GraphPanel freezes the state of the Graph being displayed, so that edges or vertices may no longer be added to it. It would be fairly easy to allow for dynamic modification in the future.

  6. class ProbeDesktop extends BorderPanel

    Permalink

    A desktop on which to place internal frames displaying Probe data.

    A desktop on which to place internal frames displaying Probe data.

    There are some subtleties here that arise from the way Swing is implemented. All Swing GUI events are processed on the "Swing event thread," and that includes all methods of this object. This should be obvious for most methods since they are called from GUI components such as Buttons.

    The basic protocol of this module is simple. When a new Probe is requested by a user command (such as a button click), the ProbeDesktop creates a ProbeFrame where that Probe can be viewed.

  7. class ReactiveButton extends Button

    Permalink

    A ReactiveButton is a Button that allows you to directly attach a function literal that is called whenever the button is clicked.

    A ReactiveButton is a Button that allows you to directly attach a function literal that is called whenever the button is clicked. The button is labeled "label", and "function" is invoked on each button click.

  8. class ReactiveCheckBox extends CheckBox

    Permalink

    A ReactiveCheckbox is a Checkbox that allows you to directly attach a closure that is called whenever the button is clicked.

    A ReactiveCheckbox is a Checkbox that allows you to directly attach a closure that is called whenever the button is clicked. The button is labeled "label", and "function" is invoked on each button click.

  9. class Tiler extends Reactor

    Permalink

    User: gonzatob
    Date: 2/8/12
    Time: 2:51 PM



    User: gonzatob
    Date: 2/8/12
    Time: 2:51 PM

    This is a utility class to help lay out frames on a desktop in an organized fashion. It's based on a technique for packing small lightmaps into a single larger texture; read about it here:

    http://www.blackpawn.com/texts/lightmaps/default.html

    Basically, we carve up the available screen real estate into smaller and smaller rectangles as we add frames. These rectangles are organized in a tree where each node contains a rectangle representing a portion of the screen and also has a reference to the frame occupying that rectangle (or null if the space is unoccupied). A null reference signals that that piece of the screen is unoccupied.

    This implementation is event based to avoid issues arising from frames not knowing their final size immediately upon construction - they have to build and pack any child components first, which often doesn't happen before the frame's constructor returns.

    In its current form it has several limitations: it doesn't respond to screen resizing or merge rectangles as frames are closed. It's also limited to only handling ProbeFrames, when it could conceivably be made more generic to handle more generic InternalFrames. Lastly, it's possible that this should have been implemented as a LayoutManager to be applied to a component. This was quickest though.

  10. sealed trait Vertex extends AnyRef

    Permalink

    A vertex that appears in the network view.

    A vertex that appears in the network view. Classes that don't care whether the underlying graph implementation is built on JGraph or JUNG can use this class and its immediate subclasses.

  11. class WrappedInternalDesktopPane extends InternalDesktopPane

    Permalink
  12. class ZoomingToolbar extends ToolBar

    Permalink

  13. sealed trait mxEdge extends Edge

    Permalink

    An edge that only appears in graphs implemented in JGraph.

    An edge that only appears in graphs implemented in JGraph. An attempt to add some type safety where otherwise everything is just mxCell.

  14. sealed trait mxVertex extends mxCell with Vertex

    Permalink

    A vertex that only appears in graphs implemented in JGraph.

    A vertex that only appears in graphs implemented in JGraph. An attempt to add some type safety where otherwise everything is just mxCell.

Value Members

  1. object Graph

    Permalink
  2. object TestGraphPanel

    Permalink

    Test code for the Graph and GraphPanel classes.

    Test code for the Graph and GraphPanel classes. Also supplies a simple example of how to use the classes.

  3. object TestReactiveCheckBox extends SimpleSwingApplication

    Permalink

    Test code for the ReactiveCheckbox class.

  4. object TestZoomingToolbar extends SimpleSwingApplication

    Permalink

    Test code for the ZoomingToolbar class.

  5. object mxDummyEdge extends mxEdge

    Permalink

    An edge with no label for use in JGraph graphs.

    An edge with no label for use in JGraph graphs. Don't mind that it's a singleton object; JGraph uses it more as a template from which to create a new edge when connecting cells.

Ungrouped