Class: ImageVoodoo::WindowClosed

Inherits:
WindowAdapter
  • Object
show all
Defined in:
lib/image_voodoo/awt.rb

Overview

Internal class for closing preview window

Instance Method Summary collapse

Constructor Details

#initialize(block = nil) ⇒ WindowClosed

Returns a new instance of WindowClosed.



61
62
63
64
# File 'lib/image_voodoo/awt.rb', line 61

def initialize(block = nil)
  @block = block || proc { java.lang.System.exit(0) }
  super()
end

Instance Method Details

#windowClosing(_) ⇒ Object



66
67
68
# File 'lib/image_voodoo/awt.rb', line 66

def windowClosing(_)
  @block.call
end