@@ -1020,53 +1020,43 @@ public void actionPerformed(ActionEvent evt) {
10201020
10211021 boolean isDesktop = CN .isDesktop ();
10221022
1023- LayeredLayout l = (LayeredLayout ) getLayout ();
1024- switch (orientation ) {
1025- case HORIZONTAL_SPLIT : {
1026- l .setInsets (btnCollapse , "0 0 auto 0" )
1027- .setInsets (btnExpand , "0 0 auto 0" )
1028- .setInsets (dragHandle , "auto auto auto auto" )
1029- .setReferenceComponentTop (btnExpand , btnCollapse , 1f );
1030- if (!isDesktop ) {
1031- // On tablets and phones it is difficult to use the collapse
1032- // expand buttons when they are adjacent.
1033- // On these devices we'll place them at opposite ends of the divider
1034- l .setInsets (btnExpand , "auto 0 0 0" )
1035- .setReferenceComponentTop (btnExpand , null , 1f );
1036- }
1037- break ;
1023+ LayeredLayout l = (LayeredLayout ) super .getLayout ();
1024+ if (orientation == HORIZONTAL_SPLIT ) {
1025+ l .setInsets (btnCollapse , "0 0 auto 0" )
1026+ .setInsets (btnExpand , "0 0 auto 0" )
1027+ .setInsets (dragHandle , "auto auto auto auto" )
1028+ .setReferenceComponentTop (btnExpand , btnCollapse , 1f );
1029+ if (!isDesktop ) {
1030+ // On tablets and phones it is difficult to use the collapse
1031+ // expand buttons when they are adjacent.
1032+ // On these devices we'll place them at opposite ends of the divider
1033+ l .setInsets (btnExpand , "auto 0 0 0" )
1034+ .setReferenceComponentTop (btnExpand , null , 1f );
10381035 }
1039- default : {
1040- l .setInsets (btnCollapse , "0 auto 0 0" )
1041- .setInsets (btnExpand , "0 auto 0 0" )
1042- .setInsets (dragHandle , "auto auto auto auto" )
1043- .setReferenceComponentLeft (btnExpand , btnCollapse , 1f );
1044- if (!isDesktop ) {
1045- // On tablets and phones it is difficult to use the collapse
1046- // expand buttons when they are adjacent.
1047- // On these devices we'll place them at opposite ends of the divider
1048- l .setInsets (btnExpand , "0 0 0 auto" )
1049- .setReferenceComponentLeft (btnExpand , null , 1f );
1050- }
1036+ } else {
1037+ l .setInsets (btnCollapse , "0 auto 0 0" )
1038+ .setInsets (btnExpand , "0 auto 0 0" )
1039+ .setInsets (dragHandle , "auto auto auto auto" )
1040+ .setReferenceComponentLeft (btnExpand , btnCollapse , 1f );
1041+ if (!isDesktop ) {
1042+ // On tablets and phones it is difficult to use the collapse
1043+ // expand buttons when they are adjacent.
1044+ // On these devices we'll place them at opposite ends of the divider
1045+ l .setInsets (btnExpand , "0 0 0 auto" )
1046+ .setReferenceComponentLeft (btnExpand , null , 1f );
10511047 }
10521048 }
10531049
10541050 if (dividerUIID == null ) {
10551051 $ (this )
10561052 .setBorder (createBorder ())
10571053 .setCursor (getDragCursor ())
1058- .setDraggable (true )
1059-
1060- ;
1054+ .setDraggable (true );
10611055 } else {
10621056 $ (this )
10631057 .setCursor (getDragCursor ())
1064- .setDraggable (true )
1065-
1066- ;
1058+ .setDraggable (true );
10671059 }
1068-
1069-
10701060 }
10711061
10721062 private char getCollapseMaterialIcon () {
0 commit comments