BasePrintRootFrame (クラス)
public BasePrintRootFrame {inherits RootFrame}
インポート元: CURL.GUI.STANDARD. package 内で定義されています CURL.GUI.BASE.
直接継承しているサブクラス: PrintRootFrame, PDFPrintRootFrame

印刷に使用する RootFrame

プログラミング注意事項

PrintRootFrame を直接使用する代わりに print-graphic を使用してください。

次の一連のステップを実行します。最後のページが印刷されるまで、これらのステップを繰り返します。その後で PrintRootFrame.done-printing を呼び出します。

ページ サイズや印刷不可能な余白の情報に基づいて内容を配置すると便利です。ページのレイアウトには、Grid を使用することもできます。

注意事項

このオブジェクトは、"PrintRootFrame"のスタイル ルールを記述することによりスタイル化することが出来ます。

コンストラクタ
default:このタイプの新しいオブジェクトを作成します。
コンストラクタ public {BasePrintRootFrame.default
owner-view:#View = {View.get-default-owner},
orientation:PageOrientation = PageOrientation.default,
from-page:int = 1,
to-page:int = max-int,
print-margin:#PRINTER.PrintMargin = null,
printer-name:#String = null,
page-description:#PRINTER.PrintPageDescription = null,
media-source:#PRINTER.PrintMediaSource = null,
color:PRINTER.PrintSettingBool = PRINTER.PrintSettingBool.default,
collate:PRINTER.PrintSettingBool = PRINTER.PrintSettingBool.default,
duplex:PRINTER.PrintDuplex = PRINTER.PrintDuplex.default,
copies:int = 1,
...
}

プロパティ
bottom-margin:ページの下のマージンから、ページの下の端のマージンまでのオフセットです。
フィールド public-get protected-set BasePrintRootFrame.bottom-margin:Distance
bottom-unprintable-margin:ページ下部の、印刷不可能領域の高さ。
フィールド public-get protected-set BasePrintRootFrame.bottom-unprintable-margin:Distance
copies:部数を取得します。
フィールド public-get private-set BasePrintRootFrame.copies:int =1
from-page:印刷開始ページ番号。
フィールド public-get private-set BasePrintRootFrame.from-page:int =1
left-margin:ページの左のマージンから、ページの左の端のマージンまでのオフセットです。
フィールド public-get protected-set BasePrintRootFrame.left-margin:Distance
left-unprintable-margin:ページ左側の、印刷不可能領域の幅。
フィールド public-get protected-set BasePrintRootFrame.left-unprintable-margin:Distance
number-of-pages-printed:
フィールド protected BasePrintRootFrame.number-of-pages-printed:int =0
orientation:PageOrientation を決定します。
フィールド public-get private-set BasePrintRootFrame.orientation:PageOrientation
page-height:ページの高さ (ポイント単位)。
フィールド public-get protected-set BasePrintRootFrame.page-height:Distance
page-size-valid?:PrintRootFrame のページ サイズが有効であるかどうかを示します。
フィールド public-get protected-set BasePrintRootFrame.page-size-valid?:bool =false
page-width:ページの幅 (ポイント単位)。
フィールド public-get protected-set BasePrintRootFrame.page-width:Distance
range-type:印刷ダイアログ ボックスで選択された印刷範囲のタイプを指定します。
フィールド public-get private-set BasePrintRootFrame.range-type:PrintRangeSelection =PrintRangeSelection.all
right-margin:ページの右のマージンから、ページの右の端のマージンまでのオフセットです。
フィールド public-get protected-set BasePrintRootFrame.right-margin:Distance
right-unprintable-margin:ページ右側の、印刷不可能領域の幅。
フィールド public-get protected-set BasePrintRootFrame.right-unprintable-margin:Distance
style-element:スタイリングの目的のための、この Visual の "要素" や "型" です。
アクセサ public BasePrintRootFrame.style-element:String
to-page:印刷する最終ページ。
フィールド public-get private-set BasePrintRootFrame.to-page:int =max-int
top-margin:ページの上のマージンから、ページの上の端のマージンまでのオフセットです。
フィールド public-get protected-set BasePrintRootFrame.top-margin:Distance
top-unprintable-margin:ページ上部の、印刷不可能領域の高さ。
フィールド public-get protected-set BasePrintRootFrame.top-unprintable-margin:Distance
プロパティ 継承 RootFrame: background, bounds, cached-background, changing-size?, height, option-parent, pref-option-parent, width, x, y
プロパティ 継承 Frame: clonable-class?, halign, halign-spec, hstretch?, hstretch?-spec, valign, valign-spec, vstretch?, vstretch?-spec
プロパティ 継承 BaseFrame: child, completely-clonable-children?, graphical-children, ordered-children, reverse-ordered-children, width-first?
プロパティ 継承 GetBoundsBox: layout-locally-valid?, layout-valid?
プロパティ 継承 Box: clip-child-shadows?
プロパティ 継承 Graphic: avoid-page-break?, border-color, border-spec, border-style, border-width, cell-border-spec, cell-border-width, cell-margin, discrete-select-in-range?, display-context, enabled?, graphic-selectable, horigin, is-paginating?, layout, margin, opaque-to-events?, outside-margin, pagination-state, parent, possibly-displayed?, selection-context, shadow-color, shadow-spec, visible?, visual-parent, vorigin
プロパティ 継承 Visual: _style-element, cursor, data-source, dragee, font-size, graphical-parent, has-key-focus?, input-method-enabled?, input-method-keyboard-mode, name, options, style-class, style-manager, style-options, test-child?, test-description, test-name, test-parent?, test-type-name, test-visible?, tooltip, user-data
プロパティ 継承 DataBindingTarget: data-binding-context, data-bindings
プロパティ 継承 EventTarget: event-handlers
プロパティ 継承 OptionListInterface: option-register-proc, options-present-here, registered-option-keys

メソッド
compute-initial-size:RootFrame の初期サイズを設定します。
protected {BasePrintRootFrame.compute-initial-size}:void
done-printing:PrintRootFrame の印刷セッションを終了します。
public {BasePrintRootFrame.done-printing}:void
draw:このオブジェクトの可視表現を描画します。
public {BasePrintRootFrame.draw gc:Renderer2d}:void
print-page:PrintRootFrame の現在の内容に基づいて、ページを印刷します。
public {BasePrintRootFrame.print-page}:void
request-draw-rect-in-root:RootFrame の座標系にすでに存在する GRect によって記述される領域の再ペイント処理を要求します。
public {BasePrintRootFrame.request-draw-rect-in-root rect:GRect}:void
request-pointer-trace:表示されたオブジェクトの幾何形状が変更されていることを宣言し、必要な PointerCrossing イベントの発生を要求します。
public {BasePrintRootFrame.request-pointer-trace}:void
validate-layout:Box のレイアウトを有効にします。
public {BasePrintRootFrame.validate-layout}:void
メソッド 継承 RootFrame: change-height, change-width, compute-default-bounds, compute-default-bounds-recur, fire-event-in-envelope, get-bounds, get-elastic-bounds-into, get-layout-context, get-nonparent-bounds-into, get-top-left-in-ancestor, get-visible-bounds-into, get-visible-rect-in-root-into, propagate-request-layout, request-draw, request-draw-rect, set-layout, set-size-from-child, validate-layout-recur
メソッド 継承 Frame: add, clone-appearance-helper, remove-child
メソッド 継承 BaseFrame: add-internal, after-reposition, allocate-layout-object, attempt-revalidate-layout, before-reposition, compute-child-bounds, compute-parent-elastic, constrain-height, constrain-width, end-pagination, get-height-preference, get-text, get-width-preference, install-child-bounds, internal-remove-child, note-attached, note-detaching, notify-option-children, paginate, pick-child, register-options, set-size
メソッド 継承 BasicBox: contains-point?, find-graphic-at, handle-crossing, on-pointer-envelope-event, pointer-enter-occurred, pointer-leave-occurred
メソッド 継承 GetBoundsBox: request-layout
メソッド 継承 Box: clear, compare-children, find-test-children, get-delimited-child-text-selection, get-gui-path-to-child, get-range-as-selected-text, graphical-child-visible-at, make-gui-mark, search-next-here, search-prev-here
メソッド 継承 Graphic: create-pagination-state, detach, draw-range-as-selected, draw-shadow, find-ancestor, find-graphical-ancestor, fire-inferior-crossing-event, get-graphical-root, get-gui-path, get-origin-in-graphical-ancestor, get-origin-in-root, get-pagination-state, on-drag-enter, on-inspection, on-pointer-enter, option-changed, paint-with-decorations, replace-with, search-next, search-prev, start-pagination, xy-offset-to
メソッド 継承 Visual: add-from-init-args, animate, change-cursor, clonable-appearance?, clone-appearance, get-focus-manager, get-test-parent, get-test-property, get-view, maybe-fire-attach-event, maybe-fire-detach-event, non-keyword-init-arg, note-caret-position, on-drag-leave, on-pointer-leave, pop-cursor, prepare-test-object, prepare-test-parent, push-cursor, quantize-width, refresh-style-options, release-key-focus, request-key-focus, scroll-to-include, test-record, test-run, transform-from-display-coordinates, transform-from-graphical-root-coordinates, transform-to-display-coordinates, transform-to-graphical-root-coordinates
メソッド 継承 GraphicOptions: any-to-Distance, get-display-context
メソッド 継承 GuiEventTarget: handle-delegate-event, handle-event, on-action, on-cancel-mode, on-command-changed, on-commit, on-composition-change-event, on-composition-result-event, on-context-menu-event, on-current-record-change-request, on-current-record-changed, on-destroy-notify, on-destroy-requested, on-drag-over, on-drag-pointer, on-drag-started, on-drop, on-end-composition-event, on-focus-event, on-focus-in, on-focus-out, on-gesture, on-gesture-begin, on-gesture-end, on-gesture-magnify, on-gesture-pan, on-gesture-rotate, on-gesture-swipe, on-gesture-tap, on-gesture-touch, on-grab-release, on-gui-event, on-input-method-event, on-key-event, on-key-press, on-pointer-button, on-pointer-crossing, on-pointer-event, on-pointer-motion, on-pointer-press, on-pointer-release, on-pointer-scroll, on-raw-key-event, on-raw-key-press, on-raw-key-release, on-reset, on-selectable-added, on-selectable-removed, on-selection-changed, on-selection-context-activated, on-selection-context-deactivated, on-selection-event, on-start-composition-event, on-start-event, on-stop-event, on-view-activate, on-view-deactivate, on-window-close, remove-event-handlers-for-event-class
メソッド 継承 DataBindingTarget: add-data-binding, get-data-binding, refresh-data-binding, remove-data-binding, unset-property, update-data-binding, validate-data-binding
メソッド 継承 EventTarget: accepts-event-class?, add-event-handler, event-handler-present?, remove-event-handler, verify-event
メソッド 継承 OptionListInterface: add-option, add-style-option, change-option-parent-notify, clone-options, get-option, get-option-by-name, keyword-init-arg, local-add-notify, local-remove-notify, name-to-option-key, new-option-item, option-change-notify, option-lookup, option-lookup-here, option-propagate-notify, option-set?, propagate-option-change, remove-option, remove-style-option, remove-styles, set-option-by-name, set-style-option-by-name, unset-option-by-name, unset-style-option-by-name
メソッド 継承 BasicEventTarget: enqueue-event
メソッド 継承 InitRestArgParser: process-rest-args
メソッド 継承 Object: object-describe, object-describe-for-debugging, object-serialize



コンストラクタ詳細
default (コンストラクタ)
public {BasePrintRootFrame.default
owner-view:#View = {View.get-default-owner},
orientation:PageOrientation = PageOrientation.default,
from-page:int = 1,
to-page:int = max-int,
print-margin:#PRINTER.PrintMargin = null,
printer-name:#String = null,
page-description:#PRINTER.PrintPageDescription = null,
media-source:#PRINTER.PrintMediaSource = null,
color:PRINTER.PrintSettingBool = PRINTER.PrintSettingBool.default,
collate:PRINTER.PrintSettingBool = PRINTER.PrintSettingBool.default,
duplex:PRINTER.PrintDuplex = PRINTER.PrintDuplex.default,
copies:int = 1,
...
}

このタイプの新しいオブジェクトを作成します。

owner-view:
ポップアップ印刷ダイアログ ボックスのオーナー View を指定します。
オーナーの指定がない場合、GuiManager によって既定のオーナーが選択されます (可能な場合)。
ダイアログがオーナーを持たない場合、null を使用します。
orientation: PageOrientation を決定します。
from-page: 印刷開始ページ番号。
to-page: 印刷する最終ページ。
print-margin:
4つのマージンの値で構成される PrintMargin です。
null の場合、Printer.get-page-setup-margin によって返されるマージンが使用されます。
printer-name:
null の場合、印刷するプリンタ名を設定します。Printer.get-printers プロシージャによって返される値の一つである必要があります。
null で、ターゲットとなるプリンタが見つからない場合、show-dialog?false であればエラーがスローされます。そうでなければ、printer-namenull として扱われます。
null の場合、プリンタ名は既定で Printer.get-current-printer になります。
既定では、null です。
page-description:
null の場合、印刷に使用されるページのサイズを規定します。印刷ジョブが送られるプリンタに関する Printer.get-page-description プロシージャによって返される値の一つでなければなりません。
ターゲットとなるプリンタがサポートしていない場合、このパラメータは無視されます。
media-source:
null の場合、印刷に使用するプリンタトレイを指定します。それは、印刷ジョブが送られるプリンタの Printer.get-media-source プロシージャによって返される値の一つでなければなりません。
対象となるプリンタがサポートしていない場合、このパラメータは無視されます。
color:
指定された場合、プリンタ出力をカラー (yes) か、モノクロ (no) か指定することが出来ます。
このパラメータは、対象のプリンタがこの機能をサポートしない場合、無視されます。
collate:
指定された場合、複数部印刷する時プリンタが部単位で印刷するかを指定することが出来ます。
このパラメータは、対象のプリンタがこの機能をサポートしない場合、無視されます。
duplex:
指定された場合、両面印刷の方法を指定することが出来ます。
このパラメータは、対象のプリンタがこの機能をサポートしない場合、無視されます。
...:
残余引数は、イベント ハンドラかグラフィック オプションになります。
更に、一つの引数を追加することができます。この引数が存在する場合、新しく作成されたオブジェクトの子として追加される Graphic にキャストされます。

注意事項

この API は、低レベルの目的のために存在します。グラフィカル オブジェクトを印刷するために必要なアプリケーション コードは、通常 print-graphic を使用します。



プロパティ詳細
bottom-margin (フィールド)
public-get protected-set BasePrintRootFrame.bottom-margin:Distance

ページの下のマージンから、ページの下の端のマージンまでのオフセットです。

説明

これは常に PrintRootFrame.bottom-unprintable-margin 以上になります。
導入: バージョン 6.0


bottom-unprintable-margin (フィールド)
public-get protected-set BasePrintRootFrame.bottom-unprintable-margin:Distance

ページ下部の、印刷不可能領域の高さ。

説明

印刷デバイスによっては、ページの端まで印刷できないように設計されている場合があります。この値は、ページ底辺から印刷可能なページ最下部のポイントまでの距離 (ポイント単位) です。


copies (フィールド)
public-get private-set BasePrintRootFrame.copies:int =1

部数を取得します。

導入: バージョン 7.0


from-page (フィールド)
public-get private-set BasePrintRootFrame.from-page:int =1

印刷開始ページ番号。

注意事項

これは、PrintRootFrame.range-typePrintRangeSelection.range のときにのみ使用されます。
PrintRootFrame.from-page が総ページ数より大きい場合は、ページの印刷は行いません。


left-margin (フィールド)
public-get protected-set BasePrintRootFrame.left-margin:Distance

ページの左のマージンから、ページの左の端のマージンまでのオフセットです。

説明

これは常に PrintRootFrame.left-unprintable-margin 以上になります。
導入: バージョン 6.0


left-unprintable-margin (フィールド)
public-get protected-set BasePrintRootFrame.left-unprintable-margin:Distance

ページ左側の、印刷不可能領域の幅。

説明

印刷デバイスによっては、ページの端まで印刷できないように設計されている場合があります。この値は、ページ左端から印刷可能な一番左のポイントまでの距離 (ポイント単位) です。


number-of-pages-printed (フィールド)
protected BasePrintRootFrame.number-of-pages-printed:int =0
""


orientation (フィールド)
public-get private-set BasePrintRootFrame.orientation:PageOrientation

PageOrientation を決定します。



page-height (フィールド)
public-get protected-set BasePrintRootFrame.page-height:Distance

ページの高さ (ポイント単位)。

注意事項

印刷可能なページの高さは、ページの高さから印刷不可能な上と下のマージンを引いたものです。
印刷可能なページの高さは、選ばれたページのサイズと PageOrientation に依存します。


page-size-valid? (フィールド)
public-get protected-set BasePrintRootFrame.page-size-valid?:bool =false

PrintRootFrame のページ サイズが有効であるかどうかを示します。

プログラミング注意事項

無効なページ サイズが設定されたデバイスには印刷できません。ただし、使用する印刷デバイスが不明な場合は、デバイスのページ サイズが無効かどうかは分かりません。したがって、PrintRootFrame を作成してから、使用前にページ サイズが有効であることを確認します。


page-width (フィールド)
public-get protected-set BasePrintRootFrame.page-width:Distance

ページの幅 (ポイント単位)。

注意事項

印刷可能なページの幅は、ページの幅から印刷不可能な左と右のマージンを引いたものです。
印刷可能なページの幅は、選ばれたページのサイズと PageOrientation に依存します。


range-type (フィールド)
public-get private-set BasePrintRootFrame.range-type:PrintRangeSelection =PrintRangeSelection.all

印刷ダイアログ ボックスで選択された印刷範囲のタイプを指定します。

注意事項

既定では、これは、文書全体の印刷を意味する PrintRangeSelection.all に設定されます。これが PrintRangeSelection.selection に設定された場合は、文書の選択された部分が印刷されます。さらに、これが PrintRangeSelection.range に設定された場合は、PrintRootFrame.from-pagePrintRootFrame.to-page で指定された範囲が印刷されます。
ページ番号は常に 1 から始まります。
PrintRangeSelection も参照してください。


right-margin (フィールド)
public-get protected-set BasePrintRootFrame.right-margin:Distance

ページの右のマージンから、ページの右の端のマージンまでのオフセットです。

説明

これは常に PrintRootFrame.right-unprintable-margin 以上になります。
導入: バージョン 6.0


right-unprintable-margin (フィールド)
public-get protected-set BasePrintRootFrame.right-unprintable-margin:Distance

ページ右側の、印刷不可能領域の幅。

説明

印刷デバイスによっては、ページの端まで印刷できないように設計されている場合があります。この値は、ページ右端から印刷可能な一番右のポイントまでの距離 (ポイント単位) です。


style-element (アクセサ)
アクセサ public BasePrintRootFrame.style-element:String

スタイリングの目的のための、この Visual の "要素" や "型" です。

説明

この実装によって Visual._style-elementの値が返されますが、通常は定数を返すためにオーバーライドされます。

オーバーライド

Visual のサブクラスのスタイルが他のオブジェクトと異なる場合、このゲッターは適切な文字列を返すようにオーバーライドされる必要があります。 慣例では,この文字列はクラス名または、オブジェクトを生成するマークアップの名前です。
オーバーライドでは、空の文字列でないかぎり、self._style-elementを返さなければなりません。
導入: バージョン 6.0


to-page (フィールド)
public-get private-set BasePrintRootFrame.to-page:int =max-int

印刷する最終ページ。

注意事項

これは、PrintRootFrame.range-typePrintRangeSelection.range のときにのみ使用されます。
PrintRootFrame.to-page が総ページ数より大きい場合は、PrintRange.to-page を総ページ数とみなします。


top-margin (フィールド)
public-get protected-set BasePrintRootFrame.top-margin:Distance

ページの上のマージンから、ページの上の端のマージンまでのオフセットです。

説明

これは常に PrintRootFrame.top-unprintable-margin 以上になります。
導入: バージョン 6.0


top-unprintable-margin (フィールド)
public-get protected-set BasePrintRootFrame.top-unprintable-margin:Distance

ページ上部の、印刷不可能領域の高さ。

説明

印刷デバイスによっては、ページの端まで印刷できないように設計されている場合があります。この値は、ページ上端から印刷可能な最上部のポイントまでの距離 (ポイント単位) です。





メソッド詳細
compute-initial-size (メソッド)
protected {BasePrintRootFrame.compute-initial-size}:void

RootFrame の初期サイズを設定します。

プログラミング注意事項

RootFrame.default を呼び出した後で、RootFrame を使用する前にこのメソッドを呼び出します。このメソッドは、RootFrame.default から分割されていますが、これにより RootFrame のサブクラスは construct-super の呼び出しと、このメソッドの呼び出しの間になんらかの処理をつなぎ合わせることができます。通常このような処理では、サイズを計算する前に RootFrame が存在する環境を詳細に設定します。このような設定の例として、埋め込みのグラフィックのサイズに適用されるオプション値を指定するオプション親に RootFrame をアタッチする場合があります。


done-printing (メソッド)
public {BasePrintRootFrame.done-printing}:void

PrintRootFrame の印刷セッションを終了します。

説明

このメソッドが呼び出されるとページは印刷できなくなり、印刷を実行するとエラーが発生します。

このオブジェクトの使用については、PrintRootFrame を参照してください。

注意事項

このメソッドでは、印刷されたページ数を示すダイアログがポップアップする場合があります。


draw (メソッド)
public {BasePrintRootFrame.draw gc:Renderer2d}:void

このオブジェクトの可視表現を描画します。

renderer2d: このオブジェクトを使用してそれ自身を描画する Renderer2d

オーバーライド

既定のメソッド Graphic.draw は何もしません。Graphic のサブクラスは、必要とされる描画の操作を実行するコードでこのメソッドをオーバーライドしなければなりません。
このメソッドをオーバーライドする場合は、再描画が必要となる時はいつでも、描画する Graphic の範囲が有効でない事を確認しなければなりません。たとえば、データの値を更新するために描画をする時は、データの値が変わる時にアプレットは必ず Graphic.request-drawGraphic.request-draw-rectを呼び出さなければなりません。


print-page (メソッド)
public {BasePrintRootFrame.print-page}:void

PrintRootFrame の現在の内容に基づいて、ページを印刷します。

説明

ページを印刷するときには、最初に Printer に関連付けられている Renderer2d を指定して PrintRootFrame.draw を呼び出して、現在の内容がレンダリングされます。次に、Printer.end-page が呼び出されてレンダリングされた内容が印刷セッションにコミットされます。

各ページは通常、印刷セッションが終了するまで印刷されません。印刷セッションを終了するには done-printing を呼び出します。印刷セッションの終了後、さらに print-page を呼び出すとエラーが発生します。


request-draw-rect-in-root (メソッド)
public {BasePrintRootFrame.request-draw-rect-in-root rect:GRect}:void

RootFrame の座標系にすでに存在する GRect によって記述される領域の再ペイント処理を要求します。

説明

再ペイントされる領域は、グラフィカル階層のルートの座標系に関連して記述されます。
rect: RootFrame の座標系に基づいて再ペイントされる領域を記述する GRect

プログラミング注意事項

通常このメソッドが呼び出されるのは、最初に LayoutContext.rect-for-request-draw を介して rect を取得し、BasicLayout.get-visible-bounds-into などのメソッドを使用して値を rect に入力した後です。

ただし、LayoutContext にアクセスできる場合は、グラフィカル階層で RootFrame を探す代わりに、request-draw-rect-in-root を呼び出します。


request-pointer-trace (メソッド)
public {BasePrintRootFrame.request-pointer-trace}:void

表示されたオブジェクトの幾何形状が変更されていることを宣言し、必要な PointerCrossing イベントの発生を要求します。

説明

要求は、このオブジェクトのグラフィック階層のルートに到達するまでグラフィカルな祖先のチェイン上を転送されていきます。このルートが View で、ポインタがその View 内にある場合、PointerNonevent を含む PointerEnvelopeEvent が発生し、必要な PointerCrossing イベントの生成を引き起こします。

オーバーライド

ポイント (x,y) を含む子オブジェクトの識別に (x,y) の位置をマップする、キャッシュされた状態を格納する SequenceBox のようなサブクラスによってオーバーライドできます。こうした状態はリセットして、グラフィック階層のオブジェクトの幾何形状が変更されても新しい PointerEnvelopeEvent が適切に送信されるようにします。このメソッドをオーバーライドする場合、オーバーライド メソッドには以下の呼び出しを含めます。

{super.request-pointer-trace}


validate-layout (メソッド)
public {BasePrintRootFrame.validate-layout}:void

Box のレイアウトを有効にします。

プログラミング注意事項

このメソッドは、境界および原点の位置についての情報のクエリができるように Box のレイアウトを有効にする必要があるときに呼び出されます。このメソッドは、一般に、レイアウト システムの一部をなすコードによってのみ呼び出されます。

オーバーライド

この抽象メソッドは、Box の 具象サブクラスによって、必要なアクションを実際に実行するコードでオーバーライドされなければなりません。