// ĠCopyright Ġ 2 0 0 0 - 2 0 2 0 ĠJetBrains Ġs . r . o . ĠUse Ġof Ġthis Ġsource Ġcode Ġis Ġgoverned Ġby Ġthe ĠApache Ġ 2 . 0 Ġlicense Ġthat Ġcan Ġbe Ġfound Ġin Ġthe ĠLICENSE Ġfile . Ċ package Ġcom . intellij . openapi . action System . impl . segment ed ActionBar Ċ Ċ import Ġcom . intellij . openapi . action System .* Ċ import Ġcom . intellij . openapi . action System . ex . Custom Component Action Ċ import Ġcom . intellij . openapi . project . D umb Aware Ċ import Ġjava . awt . Component Ċ import Ġjava . awt . Graphics 2 D Ċ import Ġjava . awt . Paint Ċ import Ġjavax . swing . J Component Ċ Ċ open Ġclass ĠSegment ed Bar Action Component ( private Ġval Ġplace : ĠString Ġ= ĠAction Places . RUN _ TOOL BAR ) Ġ: ĠAn Action (), ĠCustom Component Action , ĠD umb Aware Ġ{ ĊĠ Ġcompanion Ġobject Ġ{ ĊĠĠĠ Ġ@ Deprecated (" Use Ġ{@ link ĠSegment ed Action Toolbar Component # Companion # is Custom Bar ( Component )} ", ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠReplace With (" Segment ed Action Toolbar Component . is Custom Bar ( component ) ")) ĊĠĠĠ Ġfun Ġis Custom Bar ( component : ĠComponent ): ĠBoolean Ġ{ ĊĠĠĠĠĠ Ġreturn ĠSegment ed Action Toolbar Component . is Custom Bar ( component ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Deprecated (" Use Ġ{@ link ĠSegment ed Action Toolbar Component # Companion # paint Button Decor ations ( Component )} ", ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠReplace With (" Segment ed Action Toolbar Component . paint Button Decor ations ( g , Ġc , Ġpaint ) ")) ĊĠĠĠ Ġfun Ġpaint Button Decor ations ( g : ĠGraphics 2 D , Ġc : ĠJ Component , Ġpaint : ĠPaint ): ĠBoolean Ġ{ ĊĠĠĠĠĠ Ġreturn ĠSegment ed Action Toolbar Component . paint Button Decor ations ( g , Ġc , Ġpaint ) ĊĠĠĠ Ġ} ĊĠ Ġ} ĊĠ Ġenum Ġclass ĠControl Bar Property Ġ{ ĊĠĠĠ ĠFIRST , ĊĠĠĠ ĠLAST , ĊĠĠĠ ĠM ID DLE , ĊĠĠĠ ĠS INGLE ĊĠ Ġ} ĊĊĠ Ġprivate Ġval Ġgroup : ĠAction Group Ġ= Ġobject Ġ: ĠAction Group () Ġ{ ĊĠĠĠ Ġoverride Ġfun Ġget Children ( e : ĠAn ActionEvent ?): ĠArray < An Action > Ġ{ ĊĠĠĠĠĠ Ġval Ġactions Ġ= Ġmutable ListOf < An Action >() ĊĠĠĠĠĠ Ġaction Group ?. let Ġ{ ĊĠĠĠĠĠĠĠ Ġactions . add ( it ) ĊĠĠĠĠĠ Ġ} ĊĠĠĠĠĠ Ġreturn Ġactions . to Typed Array () ĊĠĠĠ Ġ} ĊĠ Ġ} ĊĊĠ Ġprotected Ġvar Ġaction Group : ĠAction Group ? Ġ= Ġnull ĊĊĊĠ Ġoverride Ġfun ĠactionPerformed ( e : ĠAn ActionEvent ) Ġ{ ĊĊĠ Ġ} ĊĊĠ Ġoverride Ġfun Ġupdate ( e : ĠAn ActionEvent ) Ġ{ ĊĠĠĠ Ġe . presentation . isVisible Ġ= Ġaction Group Ġ!= Ġnull ĊĠ Ġ} ĊĊĠ Ġoverride Ġfun Ġcreate Custom Component ( presentation : ĠPresentation , Ġplace _: ĠString ): ĠJ Component Ġ{ ĊĠĠĠĠĠ Ġval Ġbar Ġ= Ġcreate Segment ed Action Toolbar ( presentation , Ġplace , Ġgroup ). apply Ġ{ ĊĠĠĠĠĠĠĠ Ġset Force Minimum Size ( true ) ĊĠĠĠĠĠ Ġ} ĊĠĠĠĠĠ Ġbar . target Component Ġ= Ġbar ĊĠĠĠĠĠ Ġreturn Ġbar . component ĊĠ Ġ} ĊĊĠ Ġprotected Ġopen Ġfun Ġcreate Segment ed Action Toolbar ( presentation : ĠPresentation , Ġplace : ĠString , Ġgroup : ĠAction Group ): ĠSegment ed Action Toolbar Component Ġ{ ĊĠĠĠ Ġreturn ĠSegment ed Action Toolbar Component ( place , Ġgroup ) ĊĠ Ġ} Ċ } Ċ Ċ interface ĠBar Custom Component Action Ċ