SlideShare una empresa de Scribd logo
1 de 51
Descargar para leer sin conexión
Flamingo: Bringing the
Ribbon Component to
Swing
Kirill Grouchnikov
Amdocs
Agenda
>   What is a ribbon?
>   Swing ribbon implementation
>   Swing ribbon structure
       Basic terminology
       Command buttons
       Ribbon bands
       Ribbon tasks
       Miscellaneous
>   Where to next?

                                  2
What is a ribbon?




                    3
Ribbon demo

              4
http://blogs.msdn.com/jensenh




                                5
Ribbon availability
>   Available for WinForms, Win32, WPF, Silverlight
>   Third-party vendors




>   Microsoft – WPF 3.5, Windows 7 (scenic ribbon)




                                                      6
Ribbon for Swing applications
              Metal             Looks Plastic XP




              Nimbus                     A03




                                                   7
Ribbon for Swing applications
         Office Blue 2007       Office Silver 2007




                 Creme                   Nebula




         Raven Graphite                  Autumn




                                                     8
Ribbon for Swing applications
           Black Moon           Orange Metallic




            Blue Moon           Mauve Metallic




             Blue Ice             Sky Metallic




                                                  9
Ribbon for Swing applications




   http://flamingo.dev.java.net




                                  10
Basic ribbon terminology

Application menu button                          Contextual ribbon task group
                                   Ribbon task
              Taskbar panel                                                                Help button
                                                                  Contextual ribbon task




                          Ribbon gallery
         Ribbon band                                          Ribbon band expand button




                                                                                                         11
Basic hierarchy
>   Ribbon
                                               Ribbon task
       Contains tasks
           Containing bands

>   JRibbon
       RibbonTask
           AbstractRibbonBand   Ribbon band




                                                             12
Basic building block




             Command buttons




                               13
Command buttons
>   AbstractCommandButton
       JCommandButton
       JCommandToggleButton




                               14
Command
buttons demo

               15
Display state

AbstractCommandButton.setDisplayState(
  CommandButtonDisplayState)



                  BIG     TILE      MEDIUM


                                    SMALL




                                             16
Action and popup areas
JCommandButton.setCommandButtonKind(CommandButtonKind)



   ACTION_ONLY   ACTION_AND_POPUP   ACTION_AND_POPUP   POPUP_ONLY
                   _MAIN_ACTION        _MAIN_POPUP




 ActionButtonModel AbstractCommandButton.getActionModel()
 PopupButtonModel JCommandButton.getPopupModel()




                                                                    17
Simple popups
JCommandButton.setPopupCallback(PopupPanelCallback)
             JCommandButton button = ...;
             button.setPopupCallback(new PopupPanelCallback() {
               public JPopupPanel getPopupPanel(
                            JCommandButton commandButton) {
                    JCommandPopupMenu menu =
                            new JCommandPopupMenu();
                    menu.addMenuButton(...);
                    menu.addMenuSeparator();
                    ...
                    return menu;
               }
             });




                                                                  18
Command button strips
JCommandButtonStrip

         HORIZONTAL     VERTICAL




                                   19
Command button panels
JCommandButtonPanel

        ROW_FILL        COLUMN_FILL




                                      20
Rich popups
              JCommandButton button = ...;
              button.setPopupCallback(new PopupPanelCallback() {
                public JPopupPanel getPopupPanel(
                             JCommandButton commandButton) {
                     JCommandButtonPanel panel =
                             new JCommandButtonPanel(...);
                     panel.addButtonGroup(...);
                     panel.addButtonToGroup(...);
                     ...
                     JCommandPopupMenu menu =
                             new JCommandPopupMenu(panel,
                                    maxColumns, maxRows);
                     ...
                     return menu;
                }
              });

                                                           21
Bands / tasks
   demo

                22
Ribbon bands



         Ribbon band   Ribbon band   Flow ribbon band   Ribbon band




>   AbstractRibbonBand
       JRibbonBand
       JFlowRibbonBand



                                                                      23
Flow ribbon bands
JFlowRibbonBand

Adding content:
  addFlowComponent(JComponent)




      Two row flowing       Three row flowing   Collapsed
         content                content




                                                            24
Regular ribbon bands
JRibbonBand

Can host:
> command buttons
> wrapped core / 3rd party components
> ribbon galleries




                                        25
Hosting command buttons
        JRibbonBand clipboardBand = new JRibbonBand(
          “Clipboard”, ...);

        JCommandButton pasteButton = new JCommandButton(
          “Paste”, pasteIcon);
        pasteButton.setCommandButtonKind(
          CommandButtonKind.ACTION_AND_POPUP_MAIN_ACTION);
        pasteButton.setPopupCallback(...);
        clipboardBand.addCommandButton(pasteButton,
          RibbonElementPriority.TOP);

        ...

        clipboardBand.addCommandButton(cutButton,
          RibbonElementPriority.MEDIUM);



                                                             26
Hosting core and 3rd party controls



        Simple wrapping                      Wrapping with icon
                                                and caption




                          Wrapped components
                          spanning multiple rows


                                                                  27
Ribbon galleries
  Hosted gallery   Expanded gallery   Expanded gallery
                   shown in a popup    scrolled down




  Hosted gallery
  scrolled down




                                                         28
Groups in ribbon bands

         Two unnamed
           groups with
      command buttons


         Three unnamed
             groups with
       command buttons


      Two named groups
       with wrapped core
             components




                           29
Ribbon tasks
       Ribbon task           Ribbon task          Ribbon task
                  Ribbon task          Ribbon task




new RibbonTask(title,
  AbstractRibbonBand... bands)

JRibbon.addTask(RibbonTask)

                                                                30
Contextual task groups
               Contextual ribbon task group               Contextual ribbon task group

                                       Contextual ribbon task




                                   Selected contextual ribbon task




                                                                                     31
Menu button /
taskbar demo

                32
Application menu button
Application menu button




                           33
Application menu


     Primary                                Secondary
  menu group                                menu group




                               Footer
 JRibbon.setApplicationMenu(RibbonApplicationMenu)

                                                         34
Taskbar panel

     Taskbar panel




JRibbon.addTaskbarComponent(Component)




                                         35
Tooltips / key
 tips demo

                 36
Rich tooltips


        Tooltip for the
          action area




                          Displayed below
                          the ribbon


        Tooltip for the
          popup area




                                            37
Rich tooltips


    Tooltip for wrapped
      core component
                           Multiple
                           paragraphs



     Tooltip for taskbar
                           Displayed below
            component
                           the taskbar




                                             38
Rich tooltips


       Tooltip for
application menu
           button


                     Footer section
                     and images




                                      39
Key tips

  Press Alt or         Showing key           Showing key tips
  F10 for the           tips of the           of the selected
   top chain           selected task               button

                 P                     V

                 Esc                   Esc




                                                                40
Resizing /
minimized
  demo
             41
Ribbon resizing




                  42
Ribbon resizing, collapsing and scrolling
                   Scrolling tasks   Scrolling bands




  Expanding the
collapsed ribbon
            band


                                                       43
Minimized mode



                 JRibbon.setMinimized(true)
                 User double-clicking a task button
                 User pressing Ctrl+F1



                 User clicking a task button




                                                      44
Big features recap
>   Ribbon regular and flow bands
>   Ribbon galleries
>   Ribbon tasks and contextual task groups
>   Application menu button and taskbar panel
>   Resizing, collapsing and scrolling
>   Rich tooltips and key tips
>   Minimized mode



                                                45
Under the hood
>   Visual consistency across LAFs
    >   org.jvnet.flamingo.common.ui.BasicCommandButtonUI.paintB
        uttonBackground
>   Key tips
    >   org.jvnet.flamingo.ribbon.JRibbonFrame.KeyTipLayer
>   Placing content in the title pane
    >   org.jvnet.substance.flamingo.ribbon.ui.SubstanceRibbonFr
        ameTitlePane
>   More in the code…



                                                               46
What is missing - small
>   Hosting small buttons in galleries
>   Resizing popup panels
>   Navigating with keyboard (arrows, tabs)
>   Dragging controls to the taskbar panel
>   Hosting taskbar panel below the ribbon




                                              47
What is missing - medium
>   Right-to-left support
>   High DPI support




                            48
Potentially useful
>   XML-driven ribbon content
>   SWT version
>   World domination




                                49
Try it now!




    http://flamingo.dev.java.net


                                   50
Kirill Grouchnikov
kirillcool@yahoo.com
http://flamingo.dev.java.net
http://www.pushing-pixels.org




                                51

Más contenido relacionado

La actualidad más candente

레벨디자인 특강 이동훈
레벨디자인 특강 이동훈레벨디자인 특강 이동훈
레벨디자인 특강 이동훈Donghun Lee
 
Unreal animation system
Unreal animation systemUnreal animation system
Unreal animation systemTonyCms
 
The Art of Game Design 도서 요약 - Part 1 (원론편) : 디자이너는 경험을 만들어 낸다
The Art of Game Design 도서 요약 - Part 1 (원론편) : 디자이너는 경험을 만들어 낸다The Art of Game Design 도서 요약 - Part 1 (원론편) : 디자이너는 경험을 만들어 낸다
The Art of Game Design 도서 요약 - Part 1 (원론편) : 디자이너는 경험을 만들어 낸다Harns (Nak-Hyoung) Kim
 
[NDC_16] 캐릭터 한 달에 하나씩 업데이트 하기 : '최강의 군단' 스킬 개발 툴 포스트 모템과 차기작 '건파이트 맨션' 툴 프리뷰
[NDC_16] 캐릭터 한 달에 하나씩 업데이트 하기 : '최강의 군단' 스킬 개발 툴 포스트 모템과 차기작 '건파이트 맨션' 툴 프리뷰[NDC_16] 캐릭터 한 달에 하나씩 업데이트 하기 : '최강의 군단' 스킬 개발 툴 포스트 모템과 차기작 '건파이트 맨션' 툴 프리뷰
[NDC_16] 캐릭터 한 달에 하나씩 업데이트 하기 : '최강의 군단' 스킬 개발 툴 포스트 모템과 차기작 '건파이트 맨션' 툴 프리뷰승민 백
 
게임제작개론 : #7 팀 역할과 게임 리소스에 대한 이해
게임제작개론 : #7 팀 역할과 게임 리소스에 대한 이해게임제작개론 : #7 팀 역할과 게임 리소스에 대한 이해
게임제작개론 : #7 팀 역할과 게임 리소스에 대한 이해Seungmo Koo
 
게임제작개론: #1 게임 구성 요소의 이해
게임제작개론: #1 게임 구성 요소의 이해게임제작개론: #1 게임 구성 요소의 이해
게임제작개론: #1 게임 구성 요소의 이해Seungmo Koo
 
게임제작개론 : #9 라이브 서비스
게임제작개론 : #9 라이브 서비스게임제작개론 : #9 라이브 서비스
게임제작개론 : #9 라이브 서비스Seungmo Koo
 
어서 와! 번역은 처음이지?
어서 와! 번역은 처음이지?어서 와! 번역은 처음이지?
어서 와! 번역은 처음이지?복연 이
 
바라는 대로 라이터가 쓰게 만드는 시나리오 디렉팅 기법
바라는 대로 라이터가 쓰게 만드는 시나리오 디렉팅 기법바라는 대로 라이터가 쓰게 만드는 시나리오 디렉팅 기법
바라는 대로 라이터가 쓰게 만드는 시나리오 디렉팅 기법Lee Sangkyoon (Kay)
 
The Blessing to Continue.pdf
The Blessing to Continue.pdfThe Blessing to Continue.pdf
The Blessing to Continue.pdfSilver Caprice
 
어서와 게임기획은 처음이지?
어서와 게임기획은 처음이지?어서와 게임기획은 처음이지?
어서와 게임기획은 처음이지?Lee Sangkyoon (Kay)
 
왜 게임 데이터 분석인가? (텐투플레이 웨비나)
왜 게임 데이터 분석인가? (텐투플레이 웨비나)왜 게임 데이터 분석인가? (텐투플레이 웨비나)
왜 게임 데이터 분석인가? (텐투플레이 웨비나)Hyeyon Kwon
 

La actualidad más candente (13)

레벨디자인 특강 이동훈
레벨디자인 특강 이동훈레벨디자인 특강 이동훈
레벨디자인 특강 이동훈
 
Real-time content creation with UE4 ray tracing
Real-time content creation with UE4 ray tracingReal-time content creation with UE4 ray tracing
Real-time content creation with UE4 ray tracing
 
Unreal animation system
Unreal animation systemUnreal animation system
Unreal animation system
 
The Art of Game Design 도서 요약 - Part 1 (원론편) : 디자이너는 경험을 만들어 낸다
The Art of Game Design 도서 요약 - Part 1 (원론편) : 디자이너는 경험을 만들어 낸다The Art of Game Design 도서 요약 - Part 1 (원론편) : 디자이너는 경험을 만들어 낸다
The Art of Game Design 도서 요약 - Part 1 (원론편) : 디자이너는 경험을 만들어 낸다
 
[NDC_16] 캐릭터 한 달에 하나씩 업데이트 하기 : '최강의 군단' 스킬 개발 툴 포스트 모템과 차기작 '건파이트 맨션' 툴 프리뷰
[NDC_16] 캐릭터 한 달에 하나씩 업데이트 하기 : '최강의 군단' 스킬 개발 툴 포스트 모템과 차기작 '건파이트 맨션' 툴 프리뷰[NDC_16] 캐릭터 한 달에 하나씩 업데이트 하기 : '최강의 군단' 스킬 개발 툴 포스트 모템과 차기작 '건파이트 맨션' 툴 프리뷰
[NDC_16] 캐릭터 한 달에 하나씩 업데이트 하기 : '최강의 군단' 스킬 개발 툴 포스트 모템과 차기작 '건파이트 맨션' 툴 프리뷰
 
게임제작개론 : #7 팀 역할과 게임 리소스에 대한 이해
게임제작개론 : #7 팀 역할과 게임 리소스에 대한 이해게임제작개론 : #7 팀 역할과 게임 리소스에 대한 이해
게임제작개론 : #7 팀 역할과 게임 리소스에 대한 이해
 
게임제작개론: #1 게임 구성 요소의 이해
게임제작개론: #1 게임 구성 요소의 이해게임제작개론: #1 게임 구성 요소의 이해
게임제작개론: #1 게임 구성 요소의 이해
 
게임제작개론 : #9 라이브 서비스
게임제작개론 : #9 라이브 서비스게임제작개론 : #9 라이브 서비스
게임제작개론 : #9 라이브 서비스
 
어서 와! 번역은 처음이지?
어서 와! 번역은 처음이지?어서 와! 번역은 처음이지?
어서 와! 번역은 처음이지?
 
바라는 대로 라이터가 쓰게 만드는 시나리오 디렉팅 기법
바라는 대로 라이터가 쓰게 만드는 시나리오 디렉팅 기법바라는 대로 라이터가 쓰게 만드는 시나리오 디렉팅 기법
바라는 대로 라이터가 쓰게 만드는 시나리오 디렉팅 기법
 
The Blessing to Continue.pdf
The Blessing to Continue.pdfThe Blessing to Continue.pdf
The Blessing to Continue.pdf
 
어서와 게임기획은 처음이지?
어서와 게임기획은 처음이지?어서와 게임기획은 처음이지?
어서와 게임기획은 처음이지?
 
왜 게임 데이터 분석인가? (텐투플레이 웨비나)
왜 게임 데이터 분석인가? (텐투플레이 웨비나)왜 게임 데이터 분석인가? (텐투플레이 웨비나)
왜 게임 데이터 분석인가? (텐투플레이 웨비나)
 

Más de Kirill Grouchnikov

Más de Kirill Grouchnikov (8)

Responsive mobile design in practice
Responsive mobile design in practiceResponsive mobile design in practice
Responsive mobile design in practice
 
Responsive mobile design
Responsive mobile designResponsive mobile design
Responsive mobile design
 
Designing for the mobile form factor
Designing for the mobile form factorDesigning for the mobile form factor
Designing for the mobile form factor
 
Substance Java One 2007 Community Corner
Substance Java One 2007  Community  CornerSubstance Java One 2007  Community  Corner
Substance Java One 2007 Community Corner
 
Party of One
Party of OneParty of One
Party of One
 
Advanced Effects Oscon 2007
Advanced Effects   Oscon 2007Advanced Effects   Oscon 2007
Advanced Effects Oscon 2007
 
High DPI for desktop applications
High DPI for desktop applicationsHigh DPI for desktop applications
High DPI for desktop applications
 
On The Shoulders Of Giants
On The Shoulders Of GiantsOn The Shoulders Of Giants
On The Shoulders Of Giants
 

Último

GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesBoston Institute of Analytics
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfhans926745
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 

Último (20)

GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 

Flamingo Ribbon component

  • 1. Flamingo: Bringing the Ribbon Component to Swing Kirill Grouchnikov Amdocs
  • 2. Agenda > What is a ribbon? > Swing ribbon implementation > Swing ribbon structure  Basic terminology  Command buttons  Ribbon bands  Ribbon tasks  Miscellaneous > Where to next? 2
  • 3. What is a ribbon? 3
  • 6. Ribbon availability > Available for WinForms, Win32, WPF, Silverlight > Third-party vendors > Microsoft – WPF 3.5, Windows 7 (scenic ribbon) 6
  • 7. Ribbon for Swing applications Metal Looks Plastic XP Nimbus A03 7
  • 8. Ribbon for Swing applications Office Blue 2007 Office Silver 2007 Creme Nebula Raven Graphite Autumn 8
  • 9. Ribbon for Swing applications Black Moon Orange Metallic Blue Moon Mauve Metallic Blue Ice Sky Metallic 9
  • 10. Ribbon for Swing applications http://flamingo.dev.java.net 10
  • 11. Basic ribbon terminology Application menu button Contextual ribbon task group Ribbon task Taskbar panel Help button Contextual ribbon task Ribbon gallery Ribbon band Ribbon band expand button 11
  • 12. Basic hierarchy > Ribbon Ribbon task  Contains tasks  Containing bands > JRibbon  RibbonTask  AbstractRibbonBand Ribbon band 12
  • 13. Basic building block Command buttons 13
  • 14. Command buttons > AbstractCommandButton  JCommandButton  JCommandToggleButton 14
  • 16. Display state AbstractCommandButton.setDisplayState( CommandButtonDisplayState) BIG TILE MEDIUM SMALL 16
  • 17. Action and popup areas JCommandButton.setCommandButtonKind(CommandButtonKind) ACTION_ONLY ACTION_AND_POPUP ACTION_AND_POPUP POPUP_ONLY _MAIN_ACTION _MAIN_POPUP ActionButtonModel AbstractCommandButton.getActionModel() PopupButtonModel JCommandButton.getPopupModel() 17
  • 18. Simple popups JCommandButton.setPopupCallback(PopupPanelCallback) JCommandButton button = ...; button.setPopupCallback(new PopupPanelCallback() { public JPopupPanel getPopupPanel( JCommandButton commandButton) { JCommandPopupMenu menu = new JCommandPopupMenu(); menu.addMenuButton(...); menu.addMenuSeparator(); ... return menu; } }); 18
  • 20. Command button panels JCommandButtonPanel ROW_FILL COLUMN_FILL 20
  • 21. Rich popups JCommandButton button = ...; button.setPopupCallback(new PopupPanelCallback() { public JPopupPanel getPopupPanel( JCommandButton commandButton) { JCommandButtonPanel panel = new JCommandButtonPanel(...); panel.addButtonGroup(...); panel.addButtonToGroup(...); ... JCommandPopupMenu menu = new JCommandPopupMenu(panel, maxColumns, maxRows); ... return menu; } }); 21
  • 22. Bands / tasks demo 22
  • 23. Ribbon bands Ribbon band Ribbon band Flow ribbon band Ribbon band > AbstractRibbonBand  JRibbonBand  JFlowRibbonBand 23
  • 24. Flow ribbon bands JFlowRibbonBand Adding content: addFlowComponent(JComponent) Two row flowing Three row flowing Collapsed content content 24
  • 25. Regular ribbon bands JRibbonBand Can host: > command buttons > wrapped core / 3rd party components > ribbon galleries 25
  • 26. Hosting command buttons JRibbonBand clipboardBand = new JRibbonBand( “Clipboard”, ...); JCommandButton pasteButton = new JCommandButton( “Paste”, pasteIcon); pasteButton.setCommandButtonKind( CommandButtonKind.ACTION_AND_POPUP_MAIN_ACTION); pasteButton.setPopupCallback(...); clipboardBand.addCommandButton(pasteButton, RibbonElementPriority.TOP); ... clipboardBand.addCommandButton(cutButton, RibbonElementPriority.MEDIUM); 26
  • 27. Hosting core and 3rd party controls Simple wrapping Wrapping with icon and caption Wrapped components spanning multiple rows 27
  • 28. Ribbon galleries Hosted gallery Expanded gallery Expanded gallery shown in a popup scrolled down Hosted gallery scrolled down 28
  • 29. Groups in ribbon bands Two unnamed groups with command buttons Three unnamed groups with command buttons Two named groups with wrapped core components 29
  • 30. Ribbon tasks Ribbon task Ribbon task Ribbon task Ribbon task Ribbon task new RibbonTask(title, AbstractRibbonBand... bands) JRibbon.addTask(RibbonTask) 30
  • 31. Contextual task groups Contextual ribbon task group Contextual ribbon task group Contextual ribbon task Selected contextual ribbon task 31
  • 34. Application menu Primary Secondary menu group menu group Footer JRibbon.setApplicationMenu(RibbonApplicationMenu) 34
  • 35. Taskbar panel Taskbar panel JRibbon.addTaskbarComponent(Component) 35
  • 36. Tooltips / key tips demo 36
  • 37. Rich tooltips Tooltip for the action area Displayed below the ribbon Tooltip for the popup area 37
  • 38. Rich tooltips Tooltip for wrapped core component Multiple paragraphs Tooltip for taskbar Displayed below component the taskbar 38
  • 39. Rich tooltips Tooltip for application menu button Footer section and images 39
  • 40. Key tips Press Alt or Showing key Showing key tips F10 for the tips of the of the selected top chain selected task button P V Esc Esc 40
  • 43. Ribbon resizing, collapsing and scrolling Scrolling tasks Scrolling bands Expanding the collapsed ribbon band 43
  • 44. Minimized mode JRibbon.setMinimized(true) User double-clicking a task button User pressing Ctrl+F1 User clicking a task button 44
  • 45. Big features recap > Ribbon regular and flow bands > Ribbon galleries > Ribbon tasks and contextual task groups > Application menu button and taskbar panel > Resizing, collapsing and scrolling > Rich tooltips and key tips > Minimized mode 45
  • 46. Under the hood > Visual consistency across LAFs > org.jvnet.flamingo.common.ui.BasicCommandButtonUI.paintB uttonBackground > Key tips > org.jvnet.flamingo.ribbon.JRibbonFrame.KeyTipLayer > Placing content in the title pane > org.jvnet.substance.flamingo.ribbon.ui.SubstanceRibbonFr ameTitlePane > More in the code… 46
  • 47. What is missing - small > Hosting small buttons in galleries > Resizing popup panels > Navigating with keyboard (arrows, tabs) > Dragging controls to the taskbar panel > Hosting taskbar panel below the ribbon 47
  • 48. What is missing - medium > Right-to-left support > High DPI support 48
  • 49. Potentially useful > XML-driven ribbon content > SWT version > World domination 49
  • 50. Try it now! http://flamingo.dev.java.net 50