Beispiel #1
0
 public void hookFAQLink() {
   SWTSkinObject FAQObject = skin.getSkinObject("buddies-viewer-nobuddies-link");
   if (null != FAQObject) {
     SWTSkinButtonUtility FAQButton = new SWTSkinButtonUtility(FAQObject);
     FAQButton.addSelectionListener(
         new ButtonListenerAdapter() {
           public void pressed(
               SWTSkinButtonUtility buttonUtility, SWTSkinObject skinObject, int stateMask) {
             String url = Constants.URL_FAQ_BY_TOPIC_ENTRY + FAQTopics.FAQ_TOPIC_WHAT_ARE_FRIENDS;
             Utils.launch(url);
           }
         });
   }
 }
Beispiel #2
0
 public void hookImageAction() {
   SWTSkinObject imageObject = skin.getSkinObject("buddies-viewer-nobuddies-graphic");
   if (null != imageObject) {
     SWTSkinButtonUtility imageButton = new SWTSkinButtonUtility(imageObject);
     imageButton.addSelectionListener(
         new ButtonListenerAdapter() {
           public void pressed(
               SWTSkinButtonUtility buttonUtility, SWTSkinObject skinObject, int stateMask) {
             FriendsToolbar friendsToolbar =
                 (FriendsToolbar) SkinViewManager.getByClass(FriendsToolbar.class);
             if (friendsToolbar != null) {
               friendsToolbar.addBuddy();
             }
           }
         });
   }
 }