Class: Canis::PropertyChangeEvent

Inherits:
Object
  • Object
show all
Defined in:
lib/canis/core/widgets/rwidget.rb

Overview

Created and sent to all listeners whenever a property is changed

See Also:

  • fire_property_change
  • fire_handler

Since:

  • 1.0.5 added 2010-02-25 23:06

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(source, property_name, oldvalue, newvalue) ⇒ PropertyChangeEvent

Returns a new instance of PropertyChangeEvent.

Since:

  • 1.0.5 added 2010-02-25 23:06



2238
2239
2240
# File 'lib/canis/core/widgets/rwidget.rb', line 2238

def initialize source, property_name, oldvalue, newvalue
  set source, property_name, oldvalue, newvalue
end

Instance Attribute Details

#newvalueObject

{{{

Since:

  • 1.0.5 added 2010-02-25 23:06



2237
2238
2239
# File 'lib/canis/core/widgets/rwidget.rb', line 2237

def newvalue
  @newvalue
end

#oldvalueObject

{{{

Since:

  • 1.0.5 added 2010-02-25 23:06



2237
2238
2239
# File 'lib/canis/core/widgets/rwidget.rb', line 2237

def oldvalue
  @oldvalue
end

#property_nameObject

{{{

Since:

  • 1.0.5 added 2010-02-25 23:06



2237
2238
2239
# File 'lib/canis/core/widgets/rwidget.rb', line 2237

def property_name
  @property_name
end

#sourceObject

{{{

Since:

  • 1.0.5 added 2010-02-25 23:06



2237
2238
2239
# File 'lib/canis/core/widgets/rwidget.rb', line 2237

def source
  @source
end

Instance Method Details

#inspectObject

Since:

  • 1.0.5 added 2010-02-25 23:06



2248
2249
2250
# File 'lib/canis/core/widgets/rwidget.rb', line 2248

def inspect
  to_s
end

#set(source, property_name, oldvalue, newvalue) ⇒ Object

Since:

  • 1.0.5 added 2010-02-25 23:06



2241
2242
2243
2244
# File 'lib/canis/core/widgets/rwidget.rb', line 2241

def set source, property_name, oldvalue, newvalue
    @source, @property_name, @oldvalue, @newvalue =
    source, property_name, oldvalue, newvalue
end

#to_sObject

Since:

  • 1.0.5 added 2010-02-25 23:06



2245
2246
2247
# File 'lib/canis/core/widgets/rwidget.rb', line 2245

def to_s
  "PROPERTY_CHANGE name: #{property_name}, oldval: #{@oldvalue}, newvalue: #{@newvalue}, source: #{@source}"
end