Package tvbrowser.ui.mainframe

Examples of tvbrowser.ui.mainframe.MainFrame


  }

  public static void handleChangedSettings() {
    Property[] propArr;

    MainFrame mainFrame = MainFrame.getInstance();

    propArr = new Property[] { propProgramTitleFont, propProgramInfoFont,
        propProgramTimeFont, propChannelNameFont, propUseDefaultFonts,
        propEnableAntialiasing, propProgramTableOnAirProgramsShowingBorder,
        propProgramPanelUsesExtraSpaceForMarkIcons,
        propProgramPanelWithMarkingsShowingBoder, propProgramPanelUsedDefaultMarkPriority,
        propProgramPanelMarkedLowerMediumPriorityColor, propProgramPanelMarkedMinPriorityColor,
        propProgramPanelMarkedMediumPriorityColor, propProgramPanelMarkedMaxPriorityColor,
        propProgramTableColorOnAirLight, propProgramTableColorOnAirDark, propProgramPanelForegroundColor,
        propProgramTableBackgroundSingleColor, propProgramPanelAllowTransparency};

    if (mProp.hasChanged(propArr)) {
      util.ui.ProgramPanel.updateFonts();
      tvbrowser.ui.programtable.ChannelPanel.fontChanged();
      ProgramTableScrollPane scrollPane = mainFrame.getProgramTableScrollPane();
      scrollPane.forceRepaintAll();
    }

    propArr = new Property[] {propPictureType, propPictureStartTime,
        propPictureEndTime, propIsPictureShowingDescription, propPicturePluginIds,
        propPictureDuration, propProgramTableCutTitle,
        propProgramTableCutTitleLines, propPictureDescriptionLines,
        propProgramPanelMaxLines, propProgramPanelShortDurationActive,
        propProgramPanelShortDurationMinutes};

    if(mProp.hasChanged(propArr)) {
      mainFrame.getProgramTableScrollPane().forceRepaintAll();
    }

    if(mProp.hasChanged(propProgramPanelHyphenation)) {
      TextLineBreakerStringWidth.resetHyphenator();
      mainFrame.getProgramTableScrollPane().forceRepaintAll();
    }

    if (mProp.hasChanged(propColumnWidth)) {
      util.ui.ProgramPanel.updateColumnWidth();
      ProgramTableScrollPane scrollPane = mainFrame.getProgramTableScrollPane();
      scrollPane.setColumnWidth(propColumnWidth.getInt());
      scrollPane.forceRepaintAll();
    }

    if (mProp.hasChanged(propTableLayout)) {
      ProgramTableScrollPane scrollPane = mainFrame.getProgramTableScrollPane();
      scrollPane.getProgramTable().setProgramTableLayout(null);
      scrollPane.getProgramTable().updateBackground();
      scrollPane.forceRepaintAll();
    }

    if (mProp.hasChanged(propDeactivatedPlugins)) {
      mainFrame.updatePluginsMenu();
      mainFrame.updateToolbar();
    }

    propArr = new Property[] { propTableBackgroundStyle,
        propOneImageBackground, propTimeBlockSize, propTimeBlockBackground1,
        propTimeBlockBackground2, propTimeBlockShowWest,
        propTimeBlockWestImage1, propTimeBlockWestImage2,
        propTimeOfDayBackgroundEdge, propTimeOfDayBackgroundEarly,
        propTimeOfDayBackgroundMidday, propTimeOfDayBackgroundAfternoon,
        propTimeOfDayBackgroundEvening };
    if (mProp.hasChanged(propArr)) {
      ProgramTableScrollPane scrollPane = mainFrame.getProgramTableScrollPane();
      scrollPane.getProgramTable().updateBackground();
      mainFrame.getProgramTableScrollPane().forceRepaintAll();
    }

    if(mProp.hasChanged(propTimeBlockSize)) {
      mainFrame.getProgramTableScrollPane().forceRepaintAll();
    }

    propArr = new Property[] { propToolbarButtonStyle, propToolbarButtons,
        propToolbarLocation, propIsToolbarVisible, propToolbarUseBigIcons };
    if (mProp.hasChanged(propArr)) {
      mainFrame.updateToolbar();
    }

    if (mProp.hasChanged(propTimeButtons)) {
      mainFrame.updateTimeButtons();
    }

    if (mProp.hasChanged(propSubscribedChannels)) {
      ChannelList.reload();
      DefaultProgramTableModel model = mainFrame.getProgramTableModel();
      model.setChannels(ChannelList.getSubscribedChannels());
      mainFrame.updateChannellist();
    }

    propArr = new Property[] { propProgramTableStartOfDay,
        propProgramTableEndOfDay };
    if (mProp.hasChanged(propArr)) {
      DefaultProgramTableModel model = mainFrame.getProgramTableModel();
      int startOfDay = propProgramTableStartOfDay.getInt();
      int endOfDay = propProgramTableEndOfDay.getInt();
      model.setTimeRange(startOfDay, endOfDay);
      model.setDate(mainFrame.getCurrentSelectedDate(), null, null);
    }

    propArr = new Property[] { propProgramTableIconPlugins,
        propProgramInfoFields };
    if (mProp.hasChanged(propArr)) {
      // Force a recreation of the table content
      DefaultProgramTableModel model = mainFrame.getProgramTableModel();
      model.setDate(mainFrame.getCurrentSelectedDate(), null, null);
    }

    propArr = new Property[] {
        propShowChannelIconsInProgramTable, propShowChannelIconsInChannellist,
        propShowChannelNamesInProgramTable, propShowChannelNamesInChannellist };
    if (mProp.hasChanged(propArr)) {
      mainFrame.getProgramTableScrollPane().updateChannelPanel();
      mainFrame.updateChannelChooser();
    }

    if(mProp.hasChanged(propTVDataDirectory)) {
      TvDataServiceProxyManager.getInstance().setTvDataDir(new File(propTVDataDirectory.getString()));
View Full Code Here

TOP

Related Classes of tvbrowser.ui.mainframe.MainFrame

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.