Package

cogdebugger.ui

components

Permalink

package components

This package is for reusable generic GUI components that have no dependence on Cog, sort of like the old buildingblocks package from the old coggui (perhaps that package should be copied here).

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. components
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Visibility
  1. Public
  2. All

Type Members

  1. class DoubleBufferedImagePanel extends Panel with ZoomProperty

    Permalink

    A double-buffered variant of ImagePanel.

    A double-buffered variant of ImagePanel. Meant to alleviate some of the screen-tearing seen using the old implementation. Note that there is currently no way to resize the internal buffers once they've been created.

    The imgType argument should be one of the constants defined in java.awt.image.BufferedImage, e.g. BufferedImage.TYPE_3BYTE_BGR.

  2. class ImagePanel extends Panel with ZoomProperty

    Permalink

    A panel that displays an image.

    A panel that displays an image. Preferred size is initially set to the current image's unscaled dimensions.

  3. class LoadingAnimationPanel extends BoxPanel

    Permalink

    A panel that displays an infinite progress bar at its center, with an optional label.

    A panel that displays an infinite progress bar at its center, with an optional label.

    Drop this panel into your GUI where you want to put components that take a long time to initialize. Once said expensive component has finished its initialization, swap it with your LoadingAnimationPanel.

  4. trait MouseDragZoom extends AnyRef

    Permalink

    A mixin that enables right-click-and-drag to adjust the magnification of a Zoomable component.

    A mixin that enables right-click-and-drag to adjust the magnification of a Zoomable component.

    This style of zoom level control lends itself to non-integral multiplicative zoom changes - e.g. each pixel of drag makes the view 10% larger, as opposed to 1x, 2x, 3x normal size. Note however that not every Swing component (including some of our own visualizations) draw with anti-aliasing enabled - this will become very noticable with non-integral zoom.

    Created by gonztobi on 3/31/2014.

  5. trait MousePanAndZoom extends Component with Zoomable

    Permalink

    Augments a panel with mouse pan and zoom capability (sort of like your favorite online maps application).

    Augments a panel with mouse pan and zoom capability (sort of like your favorite online maps application).

    Rather than mixing in this trait directly to some panel displaying the visual that you want to pan and zoom, you should wrap that panel in another panel and mix in this trait to the wrapper. This helps guarantee clean redraws of the panel (otherwise a screen clear can "miss" due to the applied pan and zoom).

  6. class PanPane extends ScrollPane

    Permalink

    A ScrollPane that scrolls in response to mouse drags on its viewport, in addition to the standard interactions with its scrollbars.

    A ScrollPane that scrolls in response to mouse drags on its viewport, in addition to the standard interactions with its scrollbars. The captured mouse drag events act on the scrollbars directly, so mouse-pan and scrollbar-pan should stay in sync.

    ---

    Note: This is the most robust implementation so far, in that children with tooltips enabled won't interfere with the mouse drag. It's built using an AWTEventListener, which gets ALL mouse events produced by the app, regardless of whether another listener somewhere is getting the events first (e.g. a tooltip enabled child). One small quirk of this approach is that you can initiate a pan by dragging from the blank corner formed by the horizontal and vertical scrollbars.

    Created by gonztobi on 3/11/14.

  7. class PopupButton extends Button

    Permalink

    A button that, when clicked, pops up a menu anchored at this button (as opposed to the mouse's current position).

    A button that, when clicked, pops up a menu anchored at this button (as opposed to the mouse's current position).

    Add scala.swing.Menu Menus and scala.swing.MenuItem MenuItems to it just like you would an ordinary menu.

  8. class PopupMenu extends Component with Wrapper with Publisher

    Permalink

    A popup menu.

    A popup menu.

    Example usage:

    val popupMenu = new PopupMenu {
      contents += new Menu("menu 1") {
        contents += new RadioMenuItem("radio 1.1")
        contents += new RadioMenuItem("radio 1.2")
      }
      contents += new Menu("menu 2") {
        contents += new RadioMenuItem("radio 2.1")
        contents += new RadioMenuItem("radio 2.2")
      }
    }
    val button = new Button("Show Popup Menu")
    reactions += {
      case e: ButtonClicked => popupMenu.show(button, 0, button.bounds.height)
    }
    listenTo(button)
    See also

    javax.swing.JPopupMenu

  9. case class PopupMenuCanceled(source: PopupMenu) extends PopupMenuEvent with Product with Serializable

    Permalink
  10. abstract class PopupMenuEvent extends ComponentEvent

    Permalink
  11. case class PopupMenuWillBecomeInvisible(source: PopupMenu) extends PopupMenuEvent with Product with Serializable

    Permalink
  12. case class PopupMenuWillBecomeVisible(source: PopupMenu) extends PopupMenuEvent with Product with Serializable

    Permalink
  13. class Spinner extends Component

    Permalink
  14. class SquareIcon extends Icon

    Permalink

    An icon that is just a small, colored square.

    An icon that is just a small, colored square.

    Created by gonztobi on 2/20/14.

  15. class StackedTimeseriesPlot extends BorderPanel with Zoomable

    Permalink

    A data visualization that displays a number of timeseries plots stacked on top of each other.

    A data visualization that displays a number of timeseries plots stacked on top of each other. Each chart has its own set of y/range values and range axis, but all share the same x/domain values and axis. This class is intended to provide the same functionality as Cog 3's MultiXYPlot class.

    All data is sorted according by the domain value prior to rendering. Thus, the lines drawn on the timeseries plots can never double back.

  16. class ToolBar extends Component with Wrapper

    Permalink

    A wrapper for a JToolBar.

  17. class WrapPanel extends FlowPanel

    Permalink

    A (hopefully) more intelligent variant of the scala.swing.FlowPanel, in that it should wrap its child components properly when placed inside of ScrollPanes or SplitPanes.

Value Members

  1. object MousePanAndZoom

    Permalink
  2. object PanPane

    Permalink
  3. object PopupMenu

    Permalink
  4. object Test

    Permalink
  5. object TestToolbar

    Permalink
  6. object TestingStuff extends SimpleSwingApplication

    Permalink

Inherited from AnyRef

Inherited from Any

Ungrouped