simtools.diagram
Interface DiagramComponent.ContextualDrawing

All Known Implementing Classes:
PlotZoom
Enclosing class:
DiagramComponent

public static interface DiagramComponent.ContextualDrawing

An interface for additional drawing to be performed in specific context


Method Summary
 boolean consumeKeyEvent(java.awt.event.KeyEvent e)
          During this specific context, the key events can be consumed and thus nt handled as in normal mode
 boolean consumeMouseEvent(java.awt.event.MouseEvent e)
          During this specific context, the mouse events can be consumed and thus nt handled as in normal mode
 void draw(java.awt.Graphics2D g2, java.awt.Point max)
          Do the additional drawing
 

Method Detail

draw

void draw(java.awt.Graphics2D g2,
          java.awt.Point max)
Do the additional drawing

Parameters:
g2 - the current graphic
max - the max point to compute diagram size

consumeMouseEvent

boolean consumeMouseEvent(java.awt.event.MouseEvent e)
During this specific context, the mouse events can be consumed and thus nt handled as in normal mode

Parameters:
e - the mouse event (including motion events)
Returns:
true if it is consumed by the specific mouse event handler

consumeKeyEvent

boolean consumeKeyEvent(java.awt.event.KeyEvent e)
During this specific context, the key events can be consumed and thus nt handled as in normal mode

Parameters:
e - the key event
Returns:
true if it is consumed by the specific key event handler