Commits

Jonathan Giles  committed c5ec237

Fix control subclassing issue where .getClass() was used instead of .class

  • Participants
  • Parent commits 2a24331

Comments (0)

Files changed (6)

File controlsfx/src/main/java/org/controlsfx/control/InfoOverlay.java

     private static final String DEFAULT_STYLE_CLASS = "info-overlay"; //$NON-NLS-1$
 
     @Override protected String getUserAgentStylesheet() {
-        return getClass().getResource("info-overlay.css").toExternalForm(); //$NON-NLS-1$
+        return InfoOverlay.class.getResource("info-overlay.css").toExternalForm(); //$NON-NLS-1$
     }
 }

File controlsfx/src/main/java/org/controlsfx/control/Notifications.java

             // need to install our CSS
             if (owner instanceof Stage) {
                 Scene ownerScene = ((Stage) owner).getScene();
-                ownerScene.getStylesheets().add(getClass().getResource("notificationpopup.css").toExternalForm()); //$NON-NLS-1$
+                ownerScene.getStylesheets().add(Notifications.class.getResource("notificationpopup.css").toExternalForm()); //$NON-NLS-1$
             }
 
             final Popup popup = new Popup();

File controlsfx/src/main/java/org/controlsfx/control/RangeSlider.java

      * {@inheritDoc}
      */
     @Override protected String getUserAgentStylesheet() {
-        return getClass().getResource("rangeslider.css").toExternalForm(); //$NON-NLS-1$
+        return RangeSlider.class.getResource("rangeslider.css").toExternalForm(); //$NON-NLS-1$
     }
     
     /**

File controlsfx/src/main/java/org/controlsfx/control/Rating.java

 
     /** {@inheritDoc} */
     @Override protected String getUserAgentStylesheet() {
-        return getClass().getResource("rating.css").toExternalForm(); //$NON-NLS-1$
+        return Rating.class.getResource("rating.css").toExternalForm(); //$NON-NLS-1$
     }
     
     

File controlsfx/src/main/java/org/controlsfx/control/SnapshotView.java

      */
     @Override
     protected String getUserAgentStylesheet() {
-        return getClass().getResource("snapshot-view.css").toExternalForm();
+        return SnapshotView.class.getResource("snapshot-view.css").toExternalForm();
     }
 
     /**

File controlsfx/src/main/java/org/controlsfx/dialog/CommandLinksDialog.java

         }; 
         setDialogPane(dialogPane);
         
-        dialogPane.getStylesheets().add(getClass().getResource("commandlink.css").toExternalForm());
+        dialogPane.getStylesheets().add(CommandLinksDialog.class.getResource("commandlink.css").toExternalForm());
 
         setTitle(DialogResources.getString("Dialog.info.title"));