コード例 #1
0
 public static void resetFontSizes() {
   // get the current delta, and bring it towards 0.
   while (ThemeSettings.FONT_SIZE_INCREMENT.getValue() != 0) {
     int newDelta = ThemeSettings.FONT_SIZE_INCREMENT.getValue() > 0 ? -1 : 1;
     ThemeSettings.FONT_SIZE_INCREMENT.setValue(
         ThemeSettings.FONT_SIZE_INCREMENT.getValue() + newDelta);
     ThemeMediator.setFontSizeDelta(newDelta);
     ThemeMediator.updateComponentHierarchy();
   }
 }
コード例 #2
0
 /**
  * Note: This is set up for this to work. Polling is not needed though, because updates already
  * generate update events.
  */
 private LibraryPlaylistsTableMediator() {
   super("LIBRARY_PLAYLISTS_TABLE");
   setMediaType(MediaType.getAudioMediaType());
   ThemeMediator.addThemeObserver(this);
 }