package Ġcom . nas ller . code gl ance . listener Ċ Ċ import Ġcom . intellij . util . Alarm Ċ import Ġcom . nas ller . code gl ance . panel . Gl ance Panel Ċ import Ġjava . awt . Dimension Ċ import Ġjava . awt . event . Mouse Adapter Ċ import Ġjava . awt . event . MouseEvent Ċ Ċ class ĠHide ScrollBar Listener ( private Ġval Ġgl ance Panel : ĠGl ance Panel ): Mouse Adapter () Ġ{ Ċ ĉ private Ġvar Ġhover ing Ġ= Ġfalse Ċ ĉ private Ġval Ġalarm Ġ= ĠAlarm ( gl ance Panel ) Ċ ĉ override Ġfun Ġmouse Moved ( e : ĠMouseEvent ?) Ġ{ Ċĉ ĉ hover ing Ġ= Ġtrue Ċĉ ĉ if (! gl ance Panel . is Disabled ){ Ċĉĉ ĉ gl ance Panel . isVisible Ġ= Ġtrue Ċĉĉ ĉ show Hide Origin ScrollBar ( false ) Ċĉ ĉ } Ċ ĉ } ĊĊ ĉ override Ġfun Ġmouse Exit ed ( e : ĠMouseEvent ?) Ġ{ Ċĉ ĉ hover ing Ġ= Ġfalse Ċĉ ĉ hide Gl ance Request () Ċ ĉ } ĊĊ ĉ fun Ġhide Gl ance Request (){ Ċĉ ĉ if Ġ(! gl ance Panel . is Disabled Ġ&& Ġgl ance Panel . config . hover ing To Show ScrollBar Ġ&& Ġ! alarm . is Disposed Ġ&& Ċĉĉ ĉ gl ance Panel . isVisible Ġ&& Ġ! gl ance Panel . my Pop Handler . isVisible ) Ġ{ Ċĉĉ ĉ alarm . add Request ({ Ċĉĉĉ ĉ if Ġ(! gl ance Panel . my Pop Handler . isVisible Ġ&& Ġ! hover ing Ġ&& Ġgl ance Panel . scrollbar ?. hover ing Ġ== Ġfalse ) Ġ{ Ċĉĉĉĉ ĉ gl ance Panel . isVisible Ġ= Ġfalse Ċĉĉĉĉ ĉ show Hide Origin ScrollBar ( true ) Ċĉĉĉ ĉ } Ċĉĉ ĉ }, Ġ 5 0 0 ) Ċĉ ĉ } Ċ ĉ } ĊĊ ĉ fun Ġcancel All Request () Ġ= Ġalarm . cancel All Requests () ĊĊ ĉ fun Ġshow Hide Origin ScrollBar ( show : Boolean ){ Ċĉ ĉ if (! gl ance Panel . config . hide Original ScrollBar ){ Ċĉĉ ĉ if ( show ) Ġgl ance Panel . editor . scroll Pane . vertical ScrollBar . run Ġ{ Ċĉĉĉ ĉ this . preferred Size Ġ= ĠDimension ( gl ance Panel . original Scrollbar Width , Ġthis . preferred Size . height ) Ċĉĉ ĉ } Ċĉĉ ĉ else Ġgl ance Panel . editor . scroll Pane . vertical ScrollBar . run Ġ{ Ċĉĉĉ ĉ this . preferred Size Ġ= ĠDimension ( 0 , Ġthis . preferred Size . height ) Ċĉĉ ĉ } Ċĉ ĉ } Ċ ĉ } Ċ }