Class: SLComponents::NodeShape

Inherits:
Object
  • Object
show all
Defined in:
lib/mk_semi_lattice/sl_components.rb

Overview

日本語対応フォントの優先順位で選択 for win11, なければ省略

Direct Known Subclasses

Document, Folder, FolderIcon, Icon

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attrs = {}) ⇒ NodeShape

Returns a new instance of NodeShape.



13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# File 'lib/mk_semi_lattice/sl_components.rb', line 13

def initialize(attrs = {})
  @x = attrs[:x]
  @y = attrs[:y]
  @z = attrs[:z]
  @color = attrs[:color]
  @name = attrs[:name]
  @label = attrs[:label]
  @fixed = attrs[:fixed]
  @linked = attrs[:linked]
  @dx = attrs[:dx]
  @dy = attrs[:dy]
  @type = attrs[:type]
  @file_path = attrs[:file_path]
  @icon_path = attrs[:icon_path] || nil
  setup_shape
end

Instance Attribute Details

#dxObject

Returns the value of attribute dx.



11
12
13
# File 'lib/mk_semi_lattice/sl_components.rb', line 11

def dx
  @dx
end

#dyObject

Returns the value of attribute dy.



11
12
13
# File 'lib/mk_semi_lattice/sl_components.rb', line 11

def dy
  @dy
end

#file_pathObject

Returns the value of attribute file_path.



11
12
13
# File 'lib/mk_semi_lattice/sl_components.rb', line 11

def file_path
  @file_path
end

#fixedObject

Returns the value of attribute fixed.



11
12
13
# File 'lib/mk_semi_lattice/sl_components.rb', line 11

def fixed
  @fixed
end

#labelObject

Returns the value of attribute label.



11
12
13
# File 'lib/mk_semi_lattice/sl_components.rb', line 11

def label
  @label
end

#linkedObject

Returns the value of attribute linked.



11
12
13
# File 'lib/mk_semi_lattice/sl_components.rb', line 11

def linked
  @linked
end

#nameObject

Returns the value of attribute name.



11
12
13
# File 'lib/mk_semi_lattice/sl_components.rb', line 11

def name
  @name
end

#typeObject

Returns the value of attribute type.



11
12
13
# File 'lib/mk_semi_lattice/sl_components.rb', line 11

def type
  @type
end

#xObject

Returns the value of attribute x.



11
12
13
# File 'lib/mk_semi_lattice/sl_components.rb', line 11

def x
  @x
end

#yObject

Returns the value of attribute y.



11
12
13
# File 'lib/mk_semi_lattice/sl_components.rb', line 11

def y
  @y
end

Instance Method Details

#color=(c) ⇒ Object



30
31
32
# File 'lib/mk_semi_lattice/sl_components.rb', line 30

def color=(c)
  # 派生クラスでオーバーライド
end

#setup_shapeObject



42
43
44
# File 'lib/mk_semi_lattice/sl_components.rb', line 42

def setup_shape
  # 派生クラスでオーバーライド
end