Class: AWSCDK::CloudWatch::Column
- Inherits:
-
Jsii::Object
- Object
- Jsii::Object
- AWSCDK::CloudWatch::Column
- Includes:
- IWidget
- Defined in:
- cloud_watch/column.rb
Overview
A widget that contains other widgets in a vertical column.
Widgets will be laid out next to each other
Class Method Summary collapse
Instance Method Summary collapse
-
#add_widget(w) ⇒ void
Add the widget to this container.
-
#height ⇒ Numeric
The amount of vertical grid units the widget will take up.
-
#initialize(*widgets) ⇒ Column
constructor
A new instance of Column.
-
#position(x, y) ⇒ void
Place the widget at a given position.
-
#to_json ⇒ Array<Object>
Return the widget JSON for use in the dashboard.
-
#widgets ⇒ Array<AWSCDK::CloudWatch::IWidget>
List of contained widgets.
-
#width ⇒ Numeric
The amount of horizontal grid units the widget will take up.
Constructor Details
#initialize(*widgets) ⇒ Column
Returns a new instance of Column.
12 13 14 15 16 17 |
# File 'cloud_watch/column.rb', line 12 def initialize(*) .each_with_index do |item, index| Jsii::Type.check_type(item, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY2xvdWR3YXRjaC5JV2lkZ2V0In0=")), "widgets[#{index}]") end Jsii::Object.instance_method(:initialize).bind(self).call(*) end |
Class Method Details
.jsii_overridable_methods ⇒ Object
19 20 21 22 23 24 25 26 27 28 |
# File 'cloud_watch/column.rb', line 19 def self.jsii_overridable_methods { :height => { kind: :property, name: "height", is_optional: false }, :widgets => { kind: :property, name: "widgets", is_optional: false }, :width => { kind: :property, name: "width", is_optional: false }, :add_widget => { kind: :method, name: "addWidget", is_optional: false }, :position => { kind: :method, name: "position", is_optional: false }, :to_json => { kind: :method, name: "toJson", is_optional: false }, } end |
Instance Method Details
#add_widget(w) ⇒ void
This method returns an undefined value.
Add the widget to this container.
55 56 57 58 |
# File 'cloud_watch/column.rb', line 55 def (w) Jsii::Type.check_type(w, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY2xvdWR3YXRjaC5JV2lkZ2V0In0=")), "w") jsii_call_method("addWidget", [w]) end |
#height ⇒ Numeric
The amount of vertical grid units the widget will take up.
33 34 35 |
# File 'cloud_watch/column.rb', line 33 def height() jsii_get_property("height") end |
#position(x, y) ⇒ void
This method returns an undefined value.
Place the widget at a given position.
65 66 67 68 69 |
# File 'cloud_watch/column.rb', line 65 def position(x, y) Jsii::Type.check_type(x, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "x") Jsii::Type.check_type(y, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "y") jsii_call_method("position", [x, y]) end |
#to_json ⇒ Array<Object>
Return the widget JSON for use in the dashboard.
74 75 76 |
# File 'cloud_watch/column.rb', line 74 def to_json() jsii_call_method("toJson", []) end |
#widgets ⇒ Array<AWSCDK::CloudWatch::IWidget>
List of contained widgets.
40 41 42 |
# File 'cloud_watch/column.rb', line 40 def () jsii_get_property("widgets") end |
#width ⇒ Numeric
The amount of horizontal grid units the widget will take up.
47 48 49 |
# File 'cloud_watch/column.rb', line 47 def width() jsii_get_property("width") end |